]> 4ch.mooo.com Git - 16.git/commitdiff
wwww major changes in the repo and i did some house keeping in the repo ^^ and i...
authorsparky4 <sparky4@cock.li>
Fri, 24 Jul 2015 17:34:06 +0000 (12:34 -0500)
committersparky4 <sparky4@cock.li>
Fri, 24 Jul 2015 17:34:06 +0000 (12:34 -0500)
modified:   16.exe
modified:   16.hed
deleted:    16/BAKAPI.EXE
deleted:    16/DOS_GFX.EXE
deleted:    16/DOS_GFX.SMP
deleted:    16/DOS_KB.EXE
deleted:    16/INPUTEST.EXE
deleted:    16/dos_gfx.cpp
deleted:    16/dos_gfx.h
deleted:    16/dos_kb.c
deleted:    16/dos_kb.h
deleted:    16/k.bat
renamed:    old.7z -> 16/old16.7z
deleted:    16/x.bat
deleted:    16/xx.bat
deleted:    DEBUG.16
deleted:    MMDUMP.16
deleted:    PROFILE.16
new file:   bakapi.exe
renamed:    PTMP.TXT -> data/ptmp.16
renamed:    16/16.txt -> doc/16.txt
renamed:    TIMELINE.TXT -> doc/timeline.txt
modified:   fontgfx.exe
deleted:    fonttes0.exe
modified:   makefile
modified:   maptest.exe
deleted:    miditest.exe
modified:   palettec.exe
modified:   pcxtest.exe
modified:   run.bat
modified:   sountest.exe
new file:   src/bakapi.c
new file:   src/bakapi.h
modified:   src/lib/16_head.h
new file:   src/lib/bakapee.c
new file:   src/lib/bakapee.h
modified:   src/lib/modex16.c
modified:   test.exe
modified:   test2.exe
deleted:    testemm.exe
deleted:    testemm0.exe
deleted:    testsnd.exe

42 files changed:
16.exe
16.hed
16/BAKAPI.EXE [deleted file]
16/DOS_GFX.EXE [deleted file]
16/DOS_GFX.SMP [deleted file]
16/DOS_KB.EXE [deleted file]
16/INPUTEST.EXE [deleted file]
16/dos_gfx.cpp [deleted file]
16/dos_gfx.h [deleted file]
16/dos_kb.c [deleted file]
16/dos_kb.h [deleted file]
16/k.bat [deleted file]
16/old16.7z [moved from old.7z with 100% similarity]
16/x.bat [deleted file]
16/xx.bat [deleted file]
DEBUG.16 [deleted file]
MMDUMP.16 [deleted file]
PROFILE.16 [deleted file]
bakapi.exe [new file with mode: 0644]
data/ptmp.16 [moved from PTMP.TXT with 100% similarity]
doc/16.txt [moved from 16/16.txt with 100% similarity]
doc/timeline.txt [moved from TIMELINE.TXT with 100% similarity]
fontgfx.exe
fonttes0.exe [deleted file]
makefile
maptest.exe
miditest.exe [deleted file]
palettec.exe
pcxtest.exe
run.bat
sountest.exe
src/bakapi.c [new file with mode: 0644]
src/bakapi.h [new file with mode: 0644]
src/lib/16_head.h
src/lib/bakapee.c [new file with mode: 0644]
src/lib/bakapee.h [new file with mode: 0644]
src/lib/modex16.c
test.exe
test2.exe
testemm.exe [deleted file]
testemm0.exe [deleted file]
testsnd.exe [deleted file]

diff --git a/16.exe b/16.exe
index 50e959ffa5b119ffa8cf75b354f7140d88797a55..755921db3d47f760caced6e0e3fdd6b3e4873b61 100644 (file)
Binary files a/16.exe and b/16.exe differ
diff --git a/16.hed b/16.hed
index e4b49e1a767497a62e3cc508e88d59077c1f9471..779861318b526cd4a95e31273a8ef7e5e238f7db 100644 (file)
Binary files a/16.hed and b/16.hed differ
diff --git a/16/BAKAPI.EXE b/16/BAKAPI.EXE
deleted file mode 100644 (file)
index ba0690e..0000000
Binary files a/16/BAKAPI.EXE and /dev/null differ
diff --git a/16/DOS_GFX.EXE b/16/DOS_GFX.EXE
deleted file mode 100644 (file)
index 586644a..0000000
Binary files a/16/DOS_GFX.EXE and /dev/null differ
diff --git a/16/DOS_GFX.SMP b/16/DOS_GFX.SMP
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/16/DOS_KB.EXE b/16/DOS_KB.EXE
deleted file mode 100644 (file)
index 3527174..0000000
Binary files a/16/DOS_KB.EXE and /dev/null differ
diff --git a/16/INPUTEST.EXE b/16/INPUTEST.EXE
deleted file mode 100644 (file)
index 9b3ec19..0000000
Binary files a/16/INPUTEST.EXE and /dev/null differ
diff --git a/16/dos_gfx.cpp b/16/dos_gfx.cpp
deleted file mode 100644 (file)
index 268b99a..0000000
+++ /dev/null
@@ -1,402 +0,0 @@
-//DOS Graphics thingy by sparky4 licence GPL v2\r
-//a special thanks to everyone to release source code for mode X\r
-/*src\lib\*/\r
-#include "dos_gfx.h"
-//#include "lib\modex16.h" //____\r
-\r
-int old_mode;\r
-//color \82Ä\82·\82Æ\r
-short gq = LGQ;\r
-\r
-//\82Ä\82·\82Æ\r
-short bakax = 0, bakay = 0;\r
-word xx = rand()&0%SW, yy = rand()&0%SH, sx = 0, sy = 0;\r
-byte coor;\r
-\r
-byte *vga = (byte *) MK_FP(0xA000, 0);\r
-\r
-/*\r
- * Comment out the following #define if you don't want the testing main()\r
- * to be included.\r
- */\r
-#define TESTING\r
-//#define TILE\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//                                                                         //\r
-// setvideo() - This function Manages the video modes                                    //\r
-//                                                                         //\r
-/////////////////////////////////////////////////////////////////////////////\r
-void setvideo(/*byte mode, */short vq){\r
-               union REGS in, out;\r
-\r
-               if(!vq){ // deinit the video\r
-                               // change to the video mode we were in before we switched to mode 13h\r
-                               //mxSetMode( MX_TEXT );\r
-                               mxTerm();\r
-                               in.h.ah = 0x00;\r
-                               in.h.al = old_mode;\r
-                               int86(0x10, &in, &out);\r
-\r
-               }else if(vq==1){ // init the video\r
-                               // get old video mode\r
-                               in.h.ah = 0xf;\r
-                               int86(0x10, &in, &out);\r
-                               old_mode = out.h.al;\r
-\r
-                               // enter mode\r
-                               mxInit();\r
-                               mxSetMode( MX_320x240 );\r
-//                             mxSetVirtualScreen(SW+(SW/4), SH+(SH/4));\r
-//                             mxSetVirtualScreen(SW*2, SH*2);\r
-                               mxSetVirtualScreen(VW,BH);\r
-//                             mxSetVirtualScreen((640-(TILEWH*4)),(480-(TILEWH*4)));\r
-                               mxSetClip(true);\r
-                               mxSetClipRegion(0, 0, VW, BH);\r
-                               mxPan(TILEWH*2,TILEWH*2);\r
-                               //mxSetClipRegion(0, VH+1, VW, (TILEWH*BUFFMX));\r
-               }\r
-}\r
-\r
-void pdump(){\r
-       int mult=(QUADWH)/2;\r
-       int palq=(mult)*16;\r
-       int palcol=0;\r
-       for(int paly=0; paly<palq; paly+=mult){\r
-               for(int palx=0; palx<palq; palx+=mult){\r
-                               mxFillBox((SW-palq)+palx+32, paly+32, TILEWH, TILEWH, palcol, OP_SET);\r
-                       palcol++;\r
-               }\r
-       }\r
-}\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//                                                                                                                                              //\r
-// cls() - This clears the screen to the specified color, on the VGA or on //\r
-//              the Virtual screen.                                                                                     //\r
-//                                                                                                                                              //\r
-/////////////////////////////////////////////////////////////////////////////\r
-void cls(byte color, byte *Where){\r
-               _fmemset(Where, color, VW*(VH*2));\r
-}\r
-\r
-//color \82Ä\82·\82Æ\r
-short colortest(){\r
-               if(gq < NUM_COLORS){\r
-                               cls(gq, vga);\r
-                               gq++;\r
-               }else gq = 0;\r
-               return gq;\r
-}\r
-\r
-//color \82Ä\82·\82Æ\r
-short colorz(){\r
-               if(gq <= HGQ){\r
-//----           cls(gq, vaddr);\r
-                               cls(gq, vga);\r
-                               gq++;\r
-               }else gq = LGQ;\r
-               return gq;\r
-}\r
-\r
-//slow spectrum down\r
-void ssd(short svq){\r
-               if(sy < SH+1){\r
-                               if(sx < SW+1){\r
-                                               //plotpixel(xx, yy, coor, vga);\r
-                                               //ppf(sx, sy, coor, vga);\r
-                                               mxPutPixel(sx, sy, coor);\r
-                                               //printf("%d %d %d %d\n", sx, sy, svq, coor);\r
-                                               sx++;\r
-                               }else sx = 0;\r
-                               if(sx == SW){\r
-                                               sy++;\r
-                                               if(svq == 7) coor++;\r
-                                               if(sy == SH && svq == 8) coor = rand()%NUM_COLORS;\r
-                               }\r
-               }else sy = 0;\r
-}\r
-\r
-/*-----------ding-------------*/\r
-short ding(int q){\r
-\r
-               short d3y;\r
-\r
-//++++  if(q <= 4 && q!=2 && gq == BONK-1) coor = rand()%HGQ;\r
-               if((q == 2\r
-               ||q==4\r
-               ||q==16\r
-               ) && gq == BONK){\r
-                                               if(coor < HGQ && coor < LGQ) coor = LGQ;\r
-                                               if(coor < HGQ){\r
-                                                               coor++;\r
-                               }else{ coor = LGQ;\r
-                                               bakax = rand()%3; bakay = rand()%3;\r
-                               }\r
-               }\r
-\r
-               if(q==8){ colorz(); return gq; mxOutText(SW/2, SH/2, "bakapi"); }else\r
-               if(q==10){ ssd(q); /*printf("%d\n", coor);*/ }else\r
-               if(q==5){ colortest(); return gq; }else\r
-               if(q==11){ colorz(); delay(100); return gq; }\r
-               if(q==6){\r
-                               coor = rand()%NUM_COLORS;\r
-                               cls(coor, vga);\r
-                               //updatevbuff();\r
-               }\r
-\r
-               if(q==7||q==9){\r
-                               if(gq <= HGQ){\r
-                                               if(q == 7) ssd(q);\r
-                                               if(q == 9){ ssd(q); coor++; }\r
-                                               gq++;\r
-                               }else gq = LGQ;\r
-               }\r
-               if((q<5 && gq<BONK) || (q==16 && gq<BONK)){ // the number variable make the colors more noticable\r
-                               if(q==1){\r
-                                               if(xx==VW){bakax=0;}\r
-                                               if(xx==0){bakax=1;}\r
-                                               if(yy==VH){bakay=0;}\r
-                                               if(yy==0){bakay=1;}\r
-                               }else if(q==3){\r
-                                               if(xx!=VW||yy!=VH){\r
-                                                               if(xx==0){bakax=1;bakay=-1;d3y=1;}\r
-                                                               if(yy==0){bakax=1;bakay=0;d3y=1;}\r
-                                                               if(xx==VW){bakax=-1;bakay=-1;d3y=1;}\r
-                                                               if(yy==VH){bakax=1;bakay=0;d3y=1;}\r
-                                               }else if(xx==VW&&yy==VH) xx=yy=0;\r
-                               }\r
-                               if(q==3){\r
-                                               if(d3y){\r
-                                                               if(bakay<0){\r
-                                                                               yy--;\r
-                                                                               d3y--;\r
-                                                               }else\r
-                                                               if(bakay>0){\r
-                                                                               yy++;\r
-                                                                               d3y--;\r
-                                                               }\r
-                                               }\r
-                                               if(bakax<0){\r
-                                                               xx--;\r
-                                               }else\r
-                                               if(bakax>0){\r
-                                                               xx++;\r
-                                               }\r
-                               }else{\r
-                                               if(q==16)\r
-                                               {\r
-                                                               if(!bakax){\r
-                                                                       xx--;\r
-                                                               }else if(bakax>0){\r
-                                                                       xx++;\r
-                                                               }\r
-                                                               if(!bakay){\r
-                                                                       yy--;\r
-                                                               }else if(bakay>0){\r
-                                                                       yy++;\r
-                                                               }\r
-                                               }else{\r
-                                                               if(!bakax){\r
-                                                                       #ifdef TILE\r
-                                                                       xx-=TILEWH;\r
-                                                                       #else\r
-                                                                       xx--;\r
-                                                                       #endif\r
-                                                               }else if(bakax>1){\r
-                                                                       #ifdef TILE\r
-                                                                       xx+=TILEWH;\r
-                                                                       #else\r
-                                                                       xx++;\r
-                                                                       #endif\r
-                                                               }\r
-                                                               if(!bakay){\r
-                                                                       #ifdef TILE\r
-                                                                       yy-=TILEWH;\r
-                                                                       #else\r
-                                                                       yy--;\r
-                                                                       #endif\r
-                                                               }else if(bakay>1){\r
-                                                                       #ifdef TILE\r
-                                                                       yy+=TILEWH;\r
-                                                                       #else\r
-                                                                       yy++;\r
-                                                                       #endif\r
-                                                               }\r
-                                               }\r
-                               }\r
-                               // fixer\r
-                               if(q!=16){\r
-                                       #ifdef TILE\r
-                                               if(xx<0) xx=(VW-TILEWH);\r
-                                               if(yy<0) yy=(VH-TILEWH);\r
-                                               if(xx>(VW-TILEWH)) xx=0;\r
-                                               if(yy>(VH-TILEWH)/*+(TILEWH*BUFFMX)*/) yy=0;\r
-                                       #else\r
-                                               if(xx<0) xx=VW;\r
-                                               if(yy<0) yy=VH;\r
-                                               if(xx>VW) xx=0;\r
-                                               if(yy>VH) yy=0;\r
-                                       #endif\r
-                               }\r
-\r
-//interesting effects\r
-                               if(q==16)\r
-                               {\r
-                               short tx=0,ty=0;\r
-                               tx+=xx+16;\r
-                               ty+=yy+16;\r
-                               mxPutPixel(tx, ty, coor);\r
-                               //printf("%d %d %d %d %d %d\n", xx, yy, tx, ty, TILEWH);\r
-\r
-                               // plot the pixel\r
-                               }else{\r
-                                       #ifdef TILE\r
-                                       mxFillBox(xx, yy, TILEWH, TILEWH, coor, OP_SET);\r
-                                       #else\r
-                                       mxPutPixel(xx, yy, coor);\r
-                                       #endif\r
-                               } \r
-\r
-                               if(q==2)\r
-                               #ifdef TILE\r
-                                       mxFillBox((rand()*TILEWH)%VW, (rand()*TILEWH)%(VH), TILEWH, TILEWH, 0, OP_SET);\r
-                               #else\r
-                                       mxPutPixel(rand()%VW, rand()%(VH), 0);\r
-                               #endif\r
-                               if(q==16) mxPutPixel(rand()%VW, rand()%(VH), 0);\r
-                               if(q==2||q==4||q==16){ bakax = rand()%3; bakay = rand()%3; }  //random 3 switch\r
-                               gq++;\r
-//if(xx<0||xx>320||yy<0||yy>(SH*3))\r
-//       printf("%d %d %d %d %d\n", xx, yy, coor, bakax, bakay);\r
-               }else gq = LGQ;\r
-               return gq;\r
-}\r
-\r
-\r
-/*\r
- * The library testing routines follows below.\r
- */\r
-\r
-#ifdef TESTING\r
-\r
-/*\r
- * Library test (program) entry point.\r
- */\r
-\r
-int main(void)\r
-               {
-               //bitmap_t bmp; //____
-               //bmp = modexLoadPcx("chikyuu.pcx"); //____\r
-               short key,d,xpos,ypos,xdir,ydir;\r
-               int ch=0x0;\r
-               // main variables\r
-               d=4; // switch variable\r
-               key=2; // default screensaver number\r
-               xpos=TILEWH*2;\r
-               ypos=TILEWH*2;\r
-               xdir=1;\r
-               ydir=1;\r
-               setvideo(1);
-               //modexPalUpdate(bmp.palette); //____
-               //modexDrawBmp(VGA, 0, 0, &bmp, 0); //____
-               //getch(); //____\r
-// screen savers\r
-\r
-/*while(d!=0){ // on!\r
-                               if(!kbhit()){ // conditions of screen saver\r
-                                               ding(key);\r
-                               }else{\r
-                                               setvideo(0);\r
-                                               // user imput switch\r
-                                               printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 5 to quit.\n", getch());  // prompt the user\r
-                                               scanf("%d", &key);\r
-                                               //if(key==3){xx=yy=0;} // crazy screen saver wwww\r
-                                               if(key==5) d=0;\r
-                                               setvideo(1);\r
-                               }\r
-               }*/ // else off\r
-               //mxFillBox(0, 0, VW, BH, 10, OP_SET);\r
-               while(1){ // conditions of screen saver\r
-               while(!kbhit()){\r
-                       ding(key);\r
-               }\r
-               //end of screen savers\r
-               //doTest();\r
-/*             for (int x = 0; x < VW; ++x)\r
-                       {\r
-                               mxPutPixel(x, 0, 15);\r
-                               mxPutPixel(x, SH-1, 15);\r
-                       }\r
-               for (int y = 0; y < VH; ++y)\r
-                       {\r
-                               mxPutPixel(0, y, 15);\r
-                               mxPutPixel(SW-1, y, 15);\r
-                       }\r
-               for (int x = 0; x < VW; ++x)\r
-                       {\r
-                               mxPutPixel(x, 0, 15);\r
-                               mxPutPixel(x, VH-1, 15);\r
-                       }\r
-               for (int y = 240; y < VH; ++y)\r
-                       {\r
-                               mxPutPixel(0, y, 15);\r
-                               mxPutPixel(VW-1, y, 15);\r
-                       }\r
-                       */\r
-                       pdump();\r
-                       getch();\r
-                       //text box\r
-                       mxSetTextColor(10, OP_TRANS); //set font\r
-                       mxBitBlt(xpos, ypos+(TILEWH*12), SW, TILEWH*BUFFMX, 0, BS); //copy background\r
-                       mxFillBox(xpos, ypos+(TILEWH*12), SW, TILEWH*BUFFMX, 0, OP_SET); // background for text box\r
-                       //+(QUADWH*6)\r
-                       mxOutText(xpos+1, ypos+SH-48, "========================================");\r
-                       mxOutText(xpos+1, ypos+SH-40, "|    |Chikyuu:$line1");\r
-                       mxOutText(xpos+1, ypos+SH-32, "|    |$line2");\r
-                       mxOutText(xpos+1, ypos+SH-24, "|    |$line3");\r
-                       mxOutText(xpos+1, ypos+SH-16, "|    |$line4");\r
-                       mxOutText(xpos+1, ypos+SH-8,  "========================================");\r
-                       mxFillBox(xpos+QUADWH, ypos+QUADWH+(TILEWH*12), TILEWH*2, TILEWH*2, 9, OP_SET); //portriat~\r
-                       getch();\r
-                       mxBitBlt(0, BS, SW, TILEWH*BUFFMX, xpos, ypos+(TILEWH*12)); //copy background\r
-                       getch();\r
-               while(!kbhit()){\r
-                       //for(int i=0;i<TILEWH;i++){\r
-                               \r
-                               ding(key);\r
-                               mxPan(xpos,ypos);\r
-mxFillBox(384, 304, 384, 304, 10, OP_SET);\r
-//mxBitBlt(xpos, ypos, SW, SH, 32, (SH+64+32));\r
-mxBitBlt(TILEWH*2, TILEWH*2, SW, SH, 32, (SH+64+32));\r
-                               //for(short o = 0; o<TILEWH; o++){\r
-                                       xpos+=xdir;\r
-                                       ypos+=ydir;\r
-                                       //if(ypos==1 || (ypos==(BH-SH-1)))delay(500);\r
-                                       //if((xpos>(VW-SW-1)) || (xpos<1))delay(500);\r
-                                       //mxWaitRetrace();\r
-//mxBitBlt(32, (SH+32), SW, SH, xpos, ypos);\r
-mxBitBlt(TILEWH*2, (SH+64+32), SW, SH, TILEWH*2, TILEWH*2);\r
-//xpos=ypos=TILEWH*2;\r
-mxPan(32,32);\r
-                               //}\r
-                               if( (xpos>(VW-SW-1))  || (xpos<1)){xdir=-xdir;}\r
-                               if( (ypos>(BH-SH-1)) || (ypos<1)){ydir=-ydir;} // { Hit a boundry, change\r
-                       //    direction! }\r
-//mxBitBlt(32, (SH+64+32), SW, SH, xpos, ypos);\r
-//mxBitBlt(TILEWH*2, (SH+64+32), SW, SH, TILEWH*2, TILEWH*2);\r
-                       }\r
-                       ch=getch();\r
-                       if(ch==0x71)break; // 'q'\r
-                       if(ch==0x1b)break; // 'ESC'\r
-               }\r
-               setvideo(0);\r
-               printf("wwww\nFull Buffer Virtual Resolution: %dx%d\n", VW,BH);\r
-               printf("Virtual Resolution: %dx%d\n", VW,VH);\r
-               printf("Resolution: %dx%d\n", SW,SH);\r
-               printf("Mode X Library Version: %d\n", mxGetVersion());\r
-               printf("bakapi ver. 1.04.09.04\nis made by sparky4\81i\81\86\83Ö\81\85\81j feel free to use it ^^\nLicence: GPL v2\n");\r
-               return 0;\r
-               }\r
-\r
-#endif\r
diff --git a/16/dos_gfx.h b/16/dos_gfx.h
deleted file mode 100644 (file)
index cb47dc9..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef _DOSLIB_GFX_H_\r
-#define _DOSLIB_GFX_H_\r
-#include <iostream.h>\r
-#include <stdlib.h>\r
-#include "lib\lib_com.h"
-#include "lib\x\modex.h"
-#include "lib\modex16.h" //____\r
-\r
-#define NUM_COLORS     256 // number of colors in vga mode\r
-//static lgq=NUM_COLORS/(1/8)\r
-//static hgq=NUM_COLORS/(1/8)\r
-#define BONK       400\r
-#define LGQ         32\r
-#define HGQ         55\r
-#define TILEWH                 16
-#define QUADWH                 TILEWH/2
-#define BUFFMX                 4\r
-/*byte SIZE = 80;      // Size =  40 = 1 across, 4 down\r
-                    // Size =  80 = 2 across, 2 down\r
-                    // Size = 160 = 4 across, 1 down*/\r
-//#define VMEM     0xA000 // = vga\r
-
-#define SW     320\r
-#define SH     240\r
-//#define VW   560\r
-//#define VH   416
-#define VW     (SW+64)\r
-#define VH     (SH+64)
-#define BS (VH*2) // buffer space! not BULLSHIT
-#define BH     BS+(TILEWH*BUFFMX) // buffer resolution
-\r
-//void drawChar(int x, int y, int color, byte c);\r
-//void drawText(int x, int y, int color, byte string);\r
-void setvideo(/*byte mode, */short vq);\r
-//void setvbuff(int vq);\r
-//void updatevbuff();\r
-void cls(byte color, byte *Where);\r
-//void clearscr();\r
-//void plotpixel(int x, int y, byte color, byte *Where);\r
-//void plotpixelfast(int x, int y, byte color, byte *Where);\r
-//void putPixel_X(int x, int y, byte color);\r
-//void putColorBox_X(int x, int y, int w, int h, byte color);
-//void vScroll(int rows);
-//void scrolly(int bong);
-//void wait_for_retrace(void); // Waits for vertical retrace\r
-//void BlockMove();\r
-//void eraseplayer(int x, int y);\r
-//void drawplayer(int x, int y, int color);\r
-short colortest();\r
-short colorz();\r
-void ssd(short svq);\r
-void pdump();\r
-//void tulip();\r
-short ding(int q);\r
-\r
-#endif/*_DOSLIB_GFX_H_*/\r
diff --git a/16/dos_kb.c b/16/dos_kb.c
deleted file mode 100644 (file)
index 2bebd70..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/* Thanks to Alex Russell for example code */
-/* Thanks to Gary Neal for example code */
-/* working out the licencing~ */
-#include "src/lib/dos_kb.h"
-
-// keyboard buffer
-static byte key[NUM_SCANCODES]; // pressed
-static byte kea[NUM_SCANCODES]; // released
-
-#ifdef __cplusplus             /* Function must be declared C style */
-extern "C" {
-#endif
-static void interrupt (far *oldkb)(void) = NULL; /* BIOS keyboard handler */
-#ifdef __cplusplus
-}
-#endif
-
-/*
- * Comment out the following #define if you don't want the testing main()
- * to be included.
- */
-//#define TESTING
-#define TESTING2
-
-/*****************NEW KEYBOARD 09h ISR***********************/
-void interrupt newkb(void){
-       byte kee;
-       register char qx;
-
-       kee = inp(0x60);        /* Read the keyboard scan code */
-
-       /* Clear keyboard controller on XT machines */
-       qx = inp(0x61);    /* Get keyboard control register */
-       qx |= 0x82;
-       outp(0x61, qx);    /* Toggle acknowledge bit high */
-       qx &= 0x7F;
-       outp(0x61, qx);    /* Toggle acknowledge bit low */
-
-       /* Interpret the scan code and set our flags */
-       #ifdef TESTING2
-       //printf("%d[%d]\n",kee,key[kee]);
-       printf("\0"); // bug
-       #endif
-       if(kee & 0x80)
-               key[kee & 0x7F] = 0; // a key is released
-       else
-               key[kee] = kea[kee] = 1; // a key is pressed
-
-       /* Acknowledge the interrupt to the programmable interrupt controller */
-       outp(0x20, 0x20);      /* Signal non specific end of interrupt */
-}
-
-/* ---------------------- init_keyboard() ---------------- April 17,1993 */
-/* restore the bios keyboard handler */
-/* ---------------------- deinit_keyboard() -------------- April 17,1993 */
-void setkb(int vq){
-       int i;  /* Index variable */
-       if(!vq){ // deinitiation
-               /* Abort if our function pointer has no valid address */
-               if(oldkb == NULL) return;
-               /* Set address in our function pointer in interrupt vector table */
-               _dos_setvect(9, oldkb);
-               /* Reset our function pointer to contain no valid address */
-               oldkb = NULL;
-               #ifdef TESTING
-               /* Print the key heap */
-               printf("\n");
-               for(i=0; i<NUM_SCANCODES; i++){
-                       if(i==NUM_SCANCODES/2) printf("================================\n");
-                       printf("%03d[%d][%d]",i+1,key[i],kea[i]);
-                       if(key[i]==1)printf("====");
-                       printf(",\n");
-               }
-               #endif
-       }else if(vq == 1){ // initiation
-               byte far *lock_key;
-
-               /* Abort if our function pointer has a valid address. */
-               if(oldkb != NULL) return;
-
-               /* Clear the keyboard buttons state arrays */
-               for(i = 0; i < NUM_SCANCODES; i++)
-                       key[i] = kea[i] = 0;
-
-               /* save old BIOS key board handler */
-               oldkb = _dos_getvect(9);
-
-               // turn off num-lock via BIOS
-               lock_key = MK_FP(0x040, 0x017); // Pointing to the address of the bios shift state keys
-               *lock_key&=(~(16 | 32 | 64)); // toggle off the locks by changing the values of the 4th, 5th, and 6th bits of the address byte of 0040:0017
-               oldkb();        // call BIOS keyhandler to change keyboard lights
-
-               /* setup our own handler */
-               _dos_setvect(9, newkb);
-       }
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
- * keyp                                                              *
- *                                                                      *
- * Returns the status of the key requested.                            *
- * The status is 1 if the key is pressed or has been pressed since the     *
- * last call to this function for that particular key.              *
-\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-int keyp(byte c){
-       register char retVal;
-
-       /* Key value in range of keyboard keys available */
-       c &= 0x7F;
-
-       /* Get the status of the key requested */
-       retVal = key[c] | kea[c];
-
-       /* Reset the was pressed status for the requested key */
-       kea[c] = 0;
-
-       /* Return the requested key's state */
-       return retVal;
-}
-
-
-/*
- * The library testing routines follows below.
- */
-
-#ifdef TESTING
-
-/*
- * Library test (program) entry point.
- */
-
-void main(void)
-{
-       byte q;
-       setkb(1);
-       while(!keyp(1))
-       {
-               keyp(q);
-       }
-       setkb(0);
-}
-
-#endif
diff --git a/16/dos_kb.h b/16/dos_kb.h
deleted file mode 100644 (file)
index 3161cfe..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _DOSLIB_KB_H_
-#define _DOSLIB_KB_H_
-#include "src/lib/16_head.h"
-
-/* Maximum number of scan codes on keyboard controllers */
-#define NUM_SCANCODES   128
-
-#ifdef __cplusplus      /* Functions must be declared C style */
-extern "C" {
-#endif
-void interrupt far newkb(void);
-//extern void interrupt (far *oldkb)(void);
-void setkb(int vq);
-int keyp(byte c);
-
-/* Define macro */
-//#define kepn(c) key[c & 0x7F]
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif/*_DOSLIB_KB_H_*/
diff --git a/16/k.bat b/16/k.bat
deleted file mode 100644 (file)
index 92a9953..0000000
--- a/16/k.bat
+++ /dev/null
@@ -1 +0,0 @@
-wcl -0 /l=dos DOS_COMM\r
similarity index 100%
rename from old.7z
rename to 16/old16.7z
diff --git a/16/x.bat b/16/x.bat
deleted file mode 100644 (file)
index 55c8054..0000000
--- a/16/x.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-wpp /d2 /0 /ml dos_gfx
-rem wcl -0 -d2 -ml -c lib\modex16.c
-wlink debug c option cvp file 'dos_gfx' library 'lib\x\modex.lib' name dos_gfx\r
-copy /y dos_gfx.exe c:\z\bakapi.exe\r
diff --git a/16/xx.bat b/16/xx.bat
deleted file mode 100644 (file)
index 400b1f1..0000000
--- a/16/xx.bat
+++ /dev/null
@@ -1,7 +0,0 @@
-cd lib\x\r
-rem del *~1.*\r
-REM call compile\r
-call make\r
-cd ..\r
-cd ..\r
-call x
\ No newline at end of file
diff --git a/DEBUG.16 b/DEBUG.16
deleted file mode 100644 (file)
index ee53cff..0000000
--- a/DEBUG.16
+++ /dev/null
@@ -1,16 +0,0 @@
-Seg:0  Size:6749       Owner:0x1\r
-Seg:1b56       Size:1  Owner:0x86f6\r
-Seg:1b57       Size:256        Owner:0xc25c\r
-Seg:1efc       Size:45317      Owner:0xbc93\r
-Seg:d01f       Size:4294967266 Owner:0x869a\r
-Seg:d01f       Size:4294967266 Owner:0x70bc\r
-Seg:d01f       Size:4294967266 Owner:0xb868\r
-Seg:d01f       Size:4294967266 Owner:0xa650\r
-Seg:d01f       Size:4294967266 Owner:0x8d00\r
-Seg:d01f       Size:4294967266 Owner:0x8689\r
-Seg:d01f       Size:4294967266 Owner:0x8689\r
-Seg:d01f       Size:4294967266 Owner:0xf13e\r
-Seg:d01f       Size:4294967266 Owner:0x8336\r
-Seg:d01f       Size:4294967266 Owner:0x8d50\r
-Seg:d01f       Size:467        Owner:0x70bc\r
-Seg:e000       Size:4294909951 Owner:0xff11\r
diff --git a/MMDUMP.16 b/MMDUMP.16
deleted file mode 100644 (file)
index fb14356..0000000
Binary files a/MMDUMP.16 and /dev/null differ
diff --git a/PROFILE.16 b/PROFILE.16
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/bakapi.exe b/bakapi.exe
new file mode 100644 (file)
index 0000000..901f024
Binary files /dev/null and b/bakapi.exe differ
similarity index 100%
rename from PTMP.TXT
rename to data/ptmp.16
similarity index 100%
rename from 16/16.txt
rename to doc/16.txt
similarity index 100%
rename from TIMELINE.TXT
rename to doc/timeline.txt
index 55d03ac450ebc3c3a266f38f4f746b59f042299b..3d7992f0efd3f03d7c5fe4600a641bd4f7c3e314 100644 (file)
Binary files a/fontgfx.exe and b/fontgfx.exe differ
diff --git a/fonttes0.exe b/fonttes0.exe
deleted file mode 100644 (file)
index 32fe3ed..0000000
Binary files a/fonttes0.exe and /dev/null differ
index 68c74339bb019e52d80cd72d675c935da8bf42b2..5bfc58ea0ac49a9473ae5bf892daecf1d599dacd 100644 (file)
--- a/makefile
+++ b/makefile
@@ -12,11 +12,6 @@ TARGET_OS = dos
 #-zk0 = kanji support~
 #-zkl = current codepage
 
-ZFLAGS=-zk0 -zu -zc# -zm# -zdp# -zp16 -zq
-DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1
-CFLAGS=-ei -wo -x -mc -r -fh=16.hed -k60000#16384#
-OFLAGS=-ot -ox -ob -oh -or -om -ol# -ol+
-FLAGS=-0 -d2 -lr $(OFLAGS) $(CFLAGS) $(DFLAGS) $(ZFLAGS)
 SRC=src$(DIRSEP)
 SRCLIB=$(SRC)lib$(DIRSEP)
 JSMNLIB=$(SRCLIB)jsmn$(DIRSEP)
@@ -24,28 +19,43 @@ JSMNLIB=$(SRCLIB)jsmn$(DIRSEP)
 DOSLIB=$(SRCLIB)doslib$(DIRSEP)
 WCPULIB=$(SRCLIB)wcpu$(DIRSEP)
 
+ZFLAGS=-zk0 -zu -zc# -zm# -zdp# -zp16 -zq
+DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1
+CFLAGS=-ei -wo -x -mc -r -fh=16.hed -k60000#16384#
+OFLAGS=-ot -ox -ob -oh -or -om -ol# -ol+
+FLAGS=-0 -d2 -lr $(OFLAGS) $(CFLAGS) $(DFLAGS) $(ZFLAGS)
+
 DOSLIBEXMMOBJ = himemsys.$(OBJ) emm.$(OBJ)
 DOSLIBOBJ = adlib.$(OBJ) midi.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
-16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) scroll16.$(OBJ) 16_ca.$(OBJ)
+16LIBOBJS = bakapee.$(OBJ) 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) scroll16.$(OBJ) 16_ca.$(OBJ)
 GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ)
 
-all: 16.exe exmmtest.exe test.exe pcxtest.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe sountest.exe tsthimem.exe inputest.exe
+TESTEXEC =  exmmtest.exe test.exe pcxtest.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe sountest.exe tsthimem.exe inputest.exe
 #testemm.exe testemm0.exe fonttes0.exe miditest.exe
+EXEC = 16.exe bakapi.exe $(TESTEXEC)
+
+all: $(EXEC)
 
 #
-#executables
+#game and bakapi executables
 #
 16.exe: 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
        wcl $(FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
 
-scroll.exe: scroll.$(OBJ) 16.lib mapread.$(OBJ) jsmn.$(OBJ) dos_kb.$(OBJ)
-       wcl $(FLAGS) scroll.$(OBJ) 16.lib mapread.$(OBJ) jsmn.$(OBJ) dos_kb.$(OBJ)
+bakapi.exe: bakapi.$(OBJ) 16.lib
+       wcl $(FLAGS) bakapi.$(OBJ) 16.lib
+#
+#Test Executables!
+#
+scroll.exe: scroll.$(OBJ) 16.lib mapread.$(OBJ) jsmn.$(OBJ)# dos_kb.$(OBJ)
+       wcl $(FLAGS) scroll.$(OBJ) 16.lib mapread.$(OBJ) jsmn.$(OBJ)# dos_kb.$(OBJ)
 scroll.$(OBJ): $(SRC)scroll.c
        wcl $(FLAGS) -c $(SRC)scroll.c
 sega.exe: sega.$(OBJ)
        wcl $(FLAGS) -c sega.$(OBJ)
 sega.$(OBJ): $(SRC)sega.c
        wcl $(FLAGS) -c $(SRC)sega.c
+
 test.exe: test.$(OBJ) gfx.lib
        wcl $(FLAGS) test.$(OBJ) gfx.lib
 
@@ -109,6 +119,9 @@ exmmtest.exe: exmmtest.$(OBJ) 16.lib
 16.$(OBJ): $(SRC)16.h $(SRC)16.c
        wcl $(FLAGS) -c $(SRC)16.c
 
+bakapi.$(OBJ): $(SRC)bakapi.h $(SRC)bakapi.c
+       wcl $(FLAGS) -c $(SRC)bakapi.c
+
 test.$(OBJ): $(SRC)test.c $(SRCLIB)modex16.h
        wcl $(FLAGS) -c $(SRC)test.c
 
@@ -181,8 +194,8 @@ doslib.lib: $(DOSLIBOBJ) # $(SRCLIB)cpu.lib
 modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c
        wcl $(FLAGS) -c $(SRCLIB)modex16.c
 
-#dos_kb.$(OBJ): $(SRCLIB)dos_kb.h $(SRCLIB)dos_kb.c
-#      wcl $(FLAGS) -c $(SRCLIB)dos_kb.c
+bakapee.$(OBJ): $(SRCLIB)bakapee.h $(SRCLIB)bakapee.c
+       wcl $(FLAGS) -c $(SRCLIB)bakapee.c
 
 bitmap.$(OBJ): $(SRCLIB)bitmap.h $(SRCLIB)bitmap.c
        wcl $(FLAGS) -c $(SRCLIB)bitmap.c
@@ -241,7 +254,7 @@ himemsys.$(OBJ): $(DOSLIB)himemsys.h $(DOSLIB)himemsys.c
 emm.$(OBJ): $(DOSLIB)emm.h $(DOSLIB)emm.c
        wcl $(FLAGS) -c $(DOSLIB)emm.c
 
-# end
+# end of doslib stuff
 
 16_head.$(OBJ): $(SRCLIB)16_head.h $(SRCLIB)16_head.c
        wcl $(FLAGS) -c $(SRCLIB)16_head.c
@@ -259,16 +272,16 @@ jsmn.$(OBJ): $(JSMNLIB)jsmn.h $(JSMNLIB)jsmn.c
 #other~
 #
 clean: .symbolic
+       @$(REMOVECOMMAND) $(EXEC)
        @$(REMOVECOMMAND) *.$(OBJ)
        @$(REMOVECOMMAND) *.lib
        @wlib -n 16.lib
        @wlib -n  gfx.lib
+       @wlib -n  doslib.lib
+       @$(REMOVECOMMAND) *.16
 #      @$(REMOVECOMMAND) *.OBJ
-#      @$(REMOVECOMMAND) *.out
-#      @$(REMOVECOMMAND) *.OUT
 #      @$(REMOVECOMMAND) makefi~1
 #      @$(REMOVECOMMAND) makefile~
 #      @$(REMOVECOMMAND) __WCL__.LNK
 #      @$(REMOVECOMMAND) *.smp
 #      @$(REMOVECOMMAND) *.SMP
-
index c73928d6726bf10009fabd39af96089605cfa20b..72086a5f57dedae6146bfc9c8b73cf35ce613e4e 100644 (file)
Binary files a/maptest.exe and b/maptest.exe differ
diff --git a/miditest.exe b/miditest.exe
deleted file mode 100644 (file)
index c3d2642..0000000
Binary files a/miditest.exe and /dev/null differ
index 31f055c1f1cc2abbf326a30cd00afe54027ef85e..44c1f7319a341d2b069f4b066d46c5871346f40c 100644 (file)
Binary files a/palettec.exe and b/palettec.exe differ
index b9814b6d05745c709321115acd85947d08b635a2..e011ca41aa52de723298e74db53f2cf7aa05f417 100644 (file)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
diff --git a/run.bat b/run.bat
index 05be6dd587e2f371f414b23f4e9acaf8045b52d1..093735f09768be9ba91ee06f200ae6e5a9c819d0 100644 (file)
--- a/run.bat
+++ b/run.bat
@@ -1,4 +1,5 @@
-@rem wmake clean\r
-@rem wmake\ 2scroll.exe > scroll.out\r
-@rem wmake maptest.exe\ 2maptest.exe > maptest.out\r
-wmake maptest0.exe\ 2maptest0.exe\r
+@echo off\r
+wmake clean\r
+wmake exmmtest.exe > exmmtest.16\r
+@rem wmake\ 2scroll.exe > scroll.16\r
+@rem wmake maptest.exe\ 2maptest.exe > maptest.16\r
index eb47aad2a4f61f63359795b46a404ea1cec1a98e..87ad9cd7303eb775bc218eb5ed2388de893edaf4 100644 (file)
Binary files a/sountest.exe and b/sountest.exe differ
diff --git a/src/bakapi.c b/src/bakapi.c
new file mode 100644 (file)
index 0000000..16ef895
--- /dev/null
@@ -0,0 +1,158 @@
+/* Project 16 Source Code‾
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ *
+ * This file is part of Project 16.
+ *
+ * Project 16 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as publiSCREEN_HEIGHTed by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Project 16 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You SCREEN_HEIGHTould have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include "src/bakapi.h"
+
+/*
+ * BAKAPEE!
+ */
+void
+main(int argc, char *argv[])
+{
+       global_game_variables_t gamevars;
+       bakapee_t bakapee;
+       page_t screen;
+       word key,d,xpos,ypos,xdir,ydir;
+       int ch=0x0;
+       // main variables values
+       d=4; // switch variable
+       key=2; // default screensaver number
+       xpos=TILEWH*2;
+       ypos=TILEWH*2;
+       xdir=1;
+       ydir=1;
+       bakapee.xx = rand()&0%SCREEN_WIDTH;
+       bakapee.yy = rand()&0%SCREEN_HEIGHT;
+       bakapee.gq = LGQ;
+       bakapee.sx=0;
+       bakapee.sy=0;
+       bakapee.bakax=0;
+       bakapee.bakay=0;
+
+       /* setup camera and screen‾ */
+       screen = modexDefaultPage();
+       screen.width += (TILEWH*2);
+       screen.height += (TILEWH*2);
+       textInit();
+
+       //modexPalUpdate(bmp.palette); //____
+       //modexDrawBmp(VGA, 0, 0, &bmp, 0); //____
+       //getch(); //____
+
+// screen savers
+#ifdef BOINK
+       while(d!=0)     // on!
+       {
+               if(!kbhit())
+               { // conditions of screen saver
+                       ding(&screen, &bakapee, key);
+               }
+               else
+               {
+                       setVGAmodeX(&gamevars, 0);
+                       // user imput switch
+                       printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 0 to quit.¥n", getch());  // prompt the user
+                       scanf("%d", &key);
+                       //if(key==3){xx=yy=0;} // crazy screen saver wwww
+                       if(key==0) d=0;
+                       setVGAmodeX(&gamevars, 1);
+               }
+       }
+#else
+       setVGAmodeX(&gamevars, 1);
+       while(1)
+       { // conditions of screen saver
+               while(!kbhit())
+               {
+                       ding(&screen, &bakapee, key);
+               }
+               //end of screen savers
+               /*for(int x = 0; x < screen.width; ++x)
+               {
+                       modexputPixel(&page, x, 0, 15);
+                       mxPutPixel(x, SCREEN_HEIGHT-1, 15);
+                       }
+               for (int y = 0; y < VH; ++y)
+                       {
+                               mxPutPixel(0, y, 15);
+                               mxPutPixel(SCREEN_WIDTH-1, y, 15);
+                       }
+               for (int x = 0; x < VW; ++x)
+                       {
+                               mxPutPixel(x, 0, 15);
+                               mxPutPixel(x, VH-1, 15);
+                       }
+               for (int y = 240; y < VH; ++y)
+                       {
+                               mxPutPixel(0, y, 15);
+                               mxPutPixel(VW-1, y, 15);
+                       }*/
+               pdump(&screen);
+               getch();
+               //text box
+               /*++++mxBitBlt(xpos, ypos+(TILEWH*12), SCREEN_WIDTH, TILEWH*BUFFMX, 0, BS); //copy background
+               mxFillBox(xpos, ypos+(TILEWH*12), SCREEN_WIDTH, TILEWH*BUFFMX, 0, OP_SET); // background for text box
+               //+(QUADWH*6)
+               mxOutText(xpos+1, ypos+SCREEN_HEIGHT-48, "========================================");
+               mxOutText(xpos+1, ypos+SCREEN_HEIGHT-40, "|    |Chikyuu:$line1");
+               mxOutText(xpos+1, ypos+SCREEN_HEIGHT-32, "|    |$line2");
+               mxOutText(xpos+1, ypos+SCREEN_HEIGHT-24, "|    |$line3");
+               mxOutText(xpos+1, ypos+SCREEN_HEIGHT-16, "|    |$line4");
+               mxOutText(xpos+1, ypos+SCREEN_HEIGHT-8,  "========================================");
+               mxFillBox(xpos+QUADWH, ypos+QUADWH+(TILEWH*12), TILEWH*2, TILEWH*2, 9, OP_SET); //portriat‾
+               getch();
+               mxBitBlt(0, BS, SCREEN_WIDTH, TILEWH*BUFFMX, xpos, ypos+(TILEWH*12)); //copy background
+               getch();++++*/
+               while(!kbhit())
+               {
+                       //for(int i=0;i<TILEWH;i++){
+                               ding(&screen, &bakapee, key);
+                               modexPanPage(&screen, xpos, ypos);
+//++++mxFillBox(384, 304, 384, 304, 10, OP_SET);
+//mxBitBlt(xpos, ypos, SCREEN_WIDTH, SCREEN_HEIGHT, 32, (SCREEN_HEIGHT+64+32));
+//++++mxBitBlt(TILEWH*2, TILEWH*2, SCREEN_WIDTH, SCREEN_HEIGHT, 32, (SCREEN_HEIGHT+64+32));
+                               //for(word o = 0; o<TILEWH; o++){
+                                       xpos+=xdir;
+                                       ypos+=ydir;
+                                       //if(ypos==1 || (ypos==(BH-SCREEN_HEIGHT-1)))delay(500);
+                                       //if((xpos>(VW-SCREEN_WIDTH-1)) || (xpos<1))delay(500);
+                                       //mxWaitRetrace();
+//mxBitBlt(32, (SCREEN_HEIGHT+32), SCREEN_WIDTH, SCREEN_HEIGHT, xpos, ypos);
+//++++mxBitBlt(TILEWH*2, (SCREEN_HEIGHT+64+32), SCREEN_WIDTH, SCREEN_HEIGHT, TILEWH*2, TILEWH*2);
+//xpos=ypos=TILEWH*2;
+                                       //????modexPanPage(&screen, 32, 32);
+                               //}
+                               if( (xpos>(VW-SCREEN_WIDTH-1))  || (xpos<1)){xdir=-xdir;}
+                               if( (ypos>(BH-SCREEN_HEIGHT-1)) || (ypos<1)){ydir=-ydir;} // { Hit a boundry, change
+                       //}//    direction!
+//mxBitBlt(32, (SCREEN_HEIGHT+64+32), SCREEN_WIDTH, SCREEN_HEIGHT, xpos, ypos);
+//mxBitBlt(TILEWH*2, (SCREEN_HEIGHT+64+32), SCREEN_WIDTH, SCREEN_HEIGHT, TILEWH*2, TILEWH*2);
+               }
+       ch=getch();
+       if(ch==0x71)break; // 'q'
+       if(ch==0x1b)break; // 'ESC'
+       }
+       setVGAmodeX(&gamevars, 0);
+#endif
+       printf("bakapi ver. 1.04.13.04¥nis made by sparky4(≧ω≦) feel free to use it ^^¥nLicence: GPL v3¥n");
+}
+//pee!
diff --git a/src/bakapi.h b/src/bakapi.h
new file mode 100644 (file)
index 0000000..6e37157
--- /dev/null
@@ -0,0 +1,30 @@
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ *
+ * This file is part of Project 16.
+ *
+ * Project 16 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Project 16 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#ifndef __BAKAPI_H_
+#define __BAKAPI_H_
+
+#include "src/lib/bakapee.h"
+
+#define BOINK
+
+#endif /*__BAKAPI_H_*/
index ee6ebf5f0351884289c988816862d0f0e967659d..c0bc4cfbcbf57c83558e4506c331f549120de042 100644 (file)
@@ -41,6 +41,7 @@
 #include <unistd.h>\r
 #include <fcntl.h>\r
 #include <sys/stat.h>
+#include <mem.h>
 #include "src/lib/types.h"
 
 /* Control codes for all keys on the keyboard */
diff --git a/src/lib/bakapee.c b/src/lib/bakapee.c
new file mode 100644 (file)
index 0000000..8dbca62
--- /dev/null
@@ -0,0 +1,327 @@
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ *
+ * This file is part of Project 16.
+ *
+ * Project 16 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as publiSCREEN_HEIGHTed by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Project 16 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You SCREEN_HEIGHTould have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include "src/lib/bakapee.h"
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// setvideo() - This function Manages the video modes                                    //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+void setVGAmodeX(global_game_variables_t *vid, boolean vq)
+{
+       union REGS in, out;
+
+       if(!vq)
+       { // deinit the video
+               // change to the video mode we were in before we switched to mode 13h
+               modexLeave();
+               in.h.ah = 0x00;
+               in.h.al = vid->old_mode;
+               int86(0x10, &in, &out);
+
+       }else if(vq==1){ // init the video
+               // get old video mode
+               in.h.ah = 0xf;
+               int86(0x10, &in, &out);
+               vid->old_mode = out.h.al;
+               // enter mode
+               modexEnter();
+       }
+}
+
+void pdump(page_t *pee)
+{
+       int mult=(QUADWH);
+       int palq=(mult)*TILEWH;
+       int palcol=0;
+       int palx, paly;
+       for(paly=0; paly<palq; paly+=mult){
+               for(palx=0; palx<palq; palx+=mult){
+                               modexClearRegion(pee, palx+TILEWH, paly+TILEWH, mult, mult, palcol);
+                       palcol++;
+               }
+       }
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                                                                                              //
+// cls() - This clears the screen to the specified color, on the VGA or on //
+//              the Virtual screen.                                                                                     //
+//                                                                                                                                              //
+/////////////////////////////////////////////////////////////////////////////
+void cls(page_t *page, byte color, byte *Where)
+{
+       //modexClearRegion(page, 0, 0, page->width, page->height, color);
+       _fmemset(Where, color, page->width*(page->height*2));
+}
+
+//color \82Ä\82·\82Æ
+void colortest(page_t *page, bakapee_t *pee)
+{
+       if(pee->gq < 256)
+       {
+               cls(page, pee->gq, VGA);
+               pee->gq++;
+       }else pee->gq = 0;
+}
+
+//color \82Ä\82·\82Æ
+void colorz(page_t *page, bakapee_t *pee)
+{
+       if(pee->gq <= HGQ)
+       {
+               cls(page, pee->gq, VGA);
+               pee->gq++;
+       }else pee->gq = LGQ;
+}
+
+//slow spectrum down
+void ssd(page_t *page, bakapee_t *pee, word svq)
+{
+       if(pee->sy < SCREEN_HEIGHT+1)
+       {
+               if(pee->sx < SCREEN_WIDTH+1)
+               {
+                       //mxPutPixel(sx, sy, coor);
+                       printf("%d %d %d %d\n", pee->sx, pee->sy, svq, pee->coor);
+                       pee->sx++;
+               }else pee->sx = 0;
+               if(pee->sx == SCREEN_WIDTH)
+               {
+                       pee->sy++;
+                       if(svq == 7) pee->coor++;
+                       if(pee->sy == SCREEN_HEIGHT && svq == 8) pee->coor = rand()%256;
+               }
+       }else pee->sy = 0;
+}
+
+void dingpp(page_t *page, bakapee_t *pee)
+{
+#ifdef TILE
+       modexClearRegion(page, pee->xx, pee->yy, TILEWH, TILEWH, pee->coor);
+#else
+       modexputPixel(page, pee->xx, pee->yy, pee->coor);
+#endif
+}
+
+void dingo(bakapee_t *pee)
+{
+       #ifdef TILE
+       if(pee->xx<0) pee->xx=(SCREEN_WIDTH-TILEWH);
+       if(pee->yy<0) pee->yy=(SCREEN_HEIGHT-TILEWH);
+       if(pee->xx>(SCREEN_WIDTH-TILEWH)) pee->xx=0;
+       if(pee->yy>(SCREEN_HEIGHT-TILEWH)/*+(TILEWH*BUFFMX)*/) pee->yy=0;
+       #else
+       if(pee->xx<0) pee->xx=SCREEN_WIDTH;
+       if(pee->yy<0) pee->yy=SCREEN_HEIGHT;
+       if(pee->xx>SCREEN_WIDTH) pee->xx=0;
+       if(pee->yy>SCREEN_HEIGHT) pee->yy=0;
+       #endif
+}
+
+void dingas(bakapee_t *pee)
+{
+       if(pee->gq == BONK) dingu(pee);
+       if(!pee->bakax)
+       {
+               #ifdef TILE
+               pee->xx-=TILEWH;
+               #else
+               pee->xx--;
+               #endif
+       }
+       else if(pee->bakax>1)
+       {
+               #ifdef TILE
+               pee->xx+=TILEWH;
+               #else
+               pee->xx++;
+               #endif
+       }
+       if(!pee->bakay)
+       {
+               #ifdef TILE
+               pee->yy-=TILEWH;
+               #else
+               pee->yy--;
+               #endif
+       }
+       else if(pee->bakay>1)
+       {
+               #ifdef TILE
+               pee->yy+=TILEWH;
+               #else
+               pee->yy++;
+               #endif
+       }
+}
+
+void dingu(bakapee_t *pee)
+{
+       if(pee->coor < HGQ && pee->coor < LGQ) pee->coor = LGQ;
+       if(pee->coor < HGQ)
+       {
+               pee->coor++;
+       }else{ pee->coor = LGQ;
+               pee->bakax = rand()%3; pee->bakay = rand()%3;
+       }
+}
+
+/*-----------ding-------------*/
+void ding(page_t *page, bakapee_t *pee, word q)
+{
+       word d3y, tx=0,ty=0;
+
+//++++  if(q <= 4 && q!=2 && gq == BONK-1) coor = rand()%HGQ;
+       switch(q)
+       {
+               case 1:
+                       if(pee->gq<BONK)
+                       {
+                               if(pee->xx==SCREEN_WIDTH){pee->bakax=0;}
+                               if(pee->xx==0){pee->bakax=1;}
+                               if(pee->yy==SCREEN_HEIGHT){pee->bakay=0;}
+                               if(pee->yy==0){pee->bakay=1;}
+                               pee->gq++;
+                       }else pee->gq = LGQ;
+               break;
+               case 2:
+                       if(pee->gq<BONK)
+                       {
+                               dingas(pee);
+                               dingo(pee);
+                               dingpp(page, pee);      //plot the pixel/tile
+#ifdef TILE
+                               modexClearRegion(page, (rand()*TILEWH)%SCREEN_WIDTH, (rand()*TILEWH)%(SCREEN_HEIGHT), TILEWH, TILEWH, 0);
+#else
+                               modexputPixel(page, rand()%SCREEN_WIDTH, rand()%(SCREEN_HEIGHT), 0);
+#endif
+                               pee->bakax = rand()%3; pee->bakay = rand()%3;
+                               pee->gq++;
+                       }else pee->gq = LGQ;
+               break;
+               case 3:
+                       if(pee->gq<BONK)
+                       {
+                               if(pee->xx!=SCREEN_WIDTH||pee->yy!=SCREEN_HEIGHT)
+                               {
+                                       if(pee->xx==0){pee->bakax=1;pee->bakay=-1;d3y=1;}
+                                       if(pee->yy==0){pee->bakax=1;pee->bakay=0;d3y=1;}
+                                       if(pee->xx==SCREEN_WIDTH){pee->bakax=-1;pee->bakay=-1;d3y=1;}
+                                       if(pee->yy==SCREEN_HEIGHT){pee->bakax=1;pee->bakay=0;d3y=1;}
+                               }else if(pee->xx==SCREEN_WIDTH&&pee->yy==SCREEN_HEIGHT) pee->xx=pee->yy=0;
+                               if(d3y)
+                               {
+                                       if(pee->bakay<0)
+                                       {
+                                               pee->yy--;
+                                               d3y--;
+                                       }else
+                                       if(pee->bakay>0)
+                                       {
+                                               pee->yy++;
+                                               d3y--;
+                                       }
+                               }
+                               if(pee->bakax<0)
+                               {
+                                       pee->xx--;
+                               }else
+                               if(pee->bakax>0)
+                               {
+                                       pee->xx++;
+                               }
+                               pee->gq++;
+                       }else pee->gq = LGQ;
+               break;
+               case 4:
+                       if(pee->gq<BONK)
+                       {
+                               dingas(pee);
+                               dingo(pee);
+                               dingpp(page, pee);      //plot the pixel/tile
+                               pee->bakax = rand()%3; pee->bakay = rand()%3;
+                               pee->gq++;
+                       }else pee->gq = LGQ;
+               break;
+               case 5:
+                       colortest(page, pee);
+               break;
+               case 6:
+                       pee->coor = rand()%256;
+                       cls(page, pee->coor, VGA);
+               break;
+               case 7:
+                       if(pee->gq <= HGQ)
+                       {
+                               ssd(page, pee, q);
+                               pee->gq++;
+                       }else pee->gq = LGQ;
+               break;
+               case 8:
+                       colorz(page, pee);
+                       modexprint(page, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, 1, 47, 0, "bakapi");
+               break;
+               case 9:
+                       if(pee->gq <= HGQ)
+                       {
+                               ssd(page, pee, q); pee->coor++;
+                               pee->gq++;
+                       }else pee->gq = LGQ;
+               break;
+               case 10:
+                       ssd(page, pee, q); /*printf("%d\n", pee->coor);*/
+               break;
+               case 11:
+                       colorz(page, pee); delay(100);
+               break;
+
+               case 16:        //interesting effects
+                       if(pee->gq<BONK)
+                       {
+                               if(!pee->bakax){ pee->xx--;}
+                               else if(pee->bakax>0){ pee->xx++; }
+                               if(!pee->bakay){ pee->yy--;}
+                               else if(pee->bakay>0){ pee->yy++; }
+                               dingas(pee);
+                               tx+=pee->xx+TILEWH+4;
+                               ty+=pee->yy+TILEWH+4;
+                               modexClearRegion(page, tx, ty, 4, 4, pee->coor);
+#ifdef TILE
+                               modexClearRegion(page, (rand()*TILEWH)%SCREEN_WIDTH, (rand()*TILEWH)%(SCREEN_HEIGHT), TILEWH, TILEWH, 0);
+#else
+                               modexputPixel(page, rand()%SCREEN_WIDTH, rand()%(SCREEN_HEIGHT), 0);
+#endif
+                               pee->bakax = rand()%3; pee->bakay = rand()%3;
+                               //printf("%d %d %d %d %d %d\n", pee->xx, pee->yy, tx, ty, TILEWH);
+                               pee->gq++;
+                       }else pee->gq = LGQ;
+               break;
+               case 0:
+               return;
+               break;
+               default:
+               return;
+               break;
+       }
+}
diff --git a/src/lib/bakapee.h b/src/lib/bakapee.h
new file mode 100644 (file)
index 0000000..672d804
--- /dev/null
@@ -0,0 +1,59 @@
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ *
+ * This file is part of Project 16.
+ *
+ * Project 16 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Project 16 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#ifndef __BAKAPEE_H_
+#define __BAKAPEE_H_
+
+#include "src/lib/16_head.h"
+#include "src/lib/modex16.h"
+
+#define TILEWH 16
+#define QUADWH                 TILEWH/2
+#define BONK       400\r
+#define LGQ         32\r
+#define HGQ         55
+
+typedef struct {\r
+       word gq;\r
+       sword bakax, bakay;\r
+       sword xx, yy, sx, sy;\r
+       byte coor;
+} bakapee_t;
+
+typedef struct
+{\r
+       int old_mode;   //old video mode before game!
+} global_game_variables_t;
+
+void setVGAmodeX(global_game_variables_t *vid, boolean vq);
+void pdump(page_t *pee);
+void cls(page_t *page, byte color, byte *Where);
+void colortest(page_t *page, bakapee_t *pee);
+void colorz(page_t *page, bakapee_t *pee);
+void ssd(page_t *page, bakapee_t *pee, word svq);
+void dingpp(page_t *page, bakapee_t *pee);
+void dingo(bakapee_t *pee);
+void dingas(bakapee_t *pee);
+void dingu(bakapee_t *pee);
+void ding(page_t *page, bakapee_t *pee, word q);
+
+#endif /*__BAKAPEE_H_*/
index 1e086ea74f130cc9444f67f9a68f2c0a3938f7a8..2bb0a34842ef6a5390c8f41b23c740d3f59e9a11 100644 (file)
@@ -20,9 +20,6 @@
  *\r
  */\r
 \r
-#include <dos.h>\r
-#include <string.h>\r
-#include <mem.h>\r
 #include <conio.h>\r
 #include <stdio.h>\r
 #include <stdlib.h>\r
index bcd6c01d548fa12d170203924ee08c63cb81e15e..9bb2f6aee3ec6282c50778ab515f80e5c9230e29 100644 (file)
Binary files a/test.exe and b/test.exe differ
index 2e214f452c8146d4736c516ba9133a7b13af9c2b..69f2adc9f1b437636e585e436ea9ab9579787605 100644 (file)
Binary files a/test2.exe and b/test2.exe differ
diff --git a/testemm.exe b/testemm.exe
deleted file mode 100644 (file)
index 55c56d3..0000000
Binary files a/testemm.exe and /dev/null differ
diff --git a/testemm0.exe b/testemm0.exe
deleted file mode 100644 (file)
index cb076ad..0000000
Binary files a/testemm0.exe and /dev/null differ
diff --git a/testsnd.exe b/testsnd.exe
deleted file mode 100644 (file)
index b54d141..0000000
Binary files a/testsnd.exe and /dev/null differ