]> 4ch.mooo.com Git - 16.git/blobdiff - src/test.c
going to look at walk today
[16.git] / src / test.c
index 74b84dce6a9e8d6263af62a49cb250d9b2d7b110..363047f2fbca5c1d79e150d1c1db8adb4ff976d6 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
  *\r
  * This file is part of Project 16.\r
  *\r
  */\r
 \r
 #include <stdio.h>\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
 #include "src/lib/16_in.h"\r
 #include "src/lib/scroll16.h"\r
+#include "src/lib/bakapee.h"\r
 \r
-global_game_variables_t gvar;\r
+static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
 player_t player[MaxPlayers];\r
 map_view_t mv[4];\r
 pan_t pan;\r
 \r
 void main(int argc, char *argv[])\r
 {\r
+       static global_game_variables_t gvar;\r
        int i, j;\r
        word startclk, endclk;\r
        word k;\r
        byte *pal, *pal2;\r
        sword bakapee;\r
 \r
+       word colo=LGQ;\r
+\r
        //argument\r
        if(argv[1]) bakapee = atoi(argv[1]);\r
        else bakapee = 1;\r
 \r
-\r
        // DOSLIB: check our environment\r
        probe_dos();\r
 \r
@@ -72,9 +75,6 @@ void main(int argc, char *argv[])
        _DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log\r
        _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U);\r
 \r
-       /* load our palette */\r
-       modexLoadPalFile("data/default.pal", &pal2);\r
-\r
        /* save the palette */\r
        pal  = modexNewPal();\r
        modexPalSave(pal);\r
@@ -89,6 +89,12 @@ void main(int argc, char *argv[])
        VGAmodeX(bakapee, 1, &gvar);\r
        modexPalBlack();\r
 \r
+       /* load our palette */\r
+       modexLoadPalFile("data/default.pal", &pal2);\r
+\r
+       /* overscan show */\r
+       //modexPalOverscan(44+1);\r
+\r
        /* set up the page, but with 16 pixels on all borders in offscreen mem */\r
        modexHiganbanaPageSetup(&gvar.video);\r
        for(i=0;i<gvar.video.num_of_pages;i++)\r
@@ -179,6 +185,18 @@ void main(int argc, char *argv[])
                if(IN_KeyDown(2+1)){ pan.pn=1; }\r
                if(IN_KeyDown(3+1)){ pan.pn=2; }\r
                if(IN_KeyDown(4+1)){ pan.pn=3; }\r
+               if(IN_KeyDown(12)) modexClearRegion(&gvar.video.page[0], (gvar.video.page[0].width/2)-4, (gvar.video.page[0].height/2)-16, 24, 32, 15);\r
+               if(IN_KeyDown(13)) modexClearRegion(&gvar.video.page[1], (gvar.video.page[1].width/2)-4, (gvar.video.page[1].height/2)-16, 24, 32, 15);\r
+               if(IN_KeyDown(7)){\r
+                       for(i=0;i<3;i++)\r
+                       {\r
+                               pal2[i] = rand()%64;\r
+                               modexPalUpdate1(pal2);\r
+                               colo++;\r
+                               if(colo>HGQ) colo=LGQ;\r
+                       }\r
+//                     if(i>PAL_SIZE) i=0;\r
+               }//9\r
                if(IN_KeyDown(25)){\r
                        modexpdump(&gvar.video.page[pan.pn]);\r
                        IN_UserInput(1,1);\r