]> 4ch.mooo.com Git - 16.git/commitdiff
[16_ca needs huge amounts of work and I should remember what needs to be done soon...
authorsparky4 <sparky4@cock.li>
Tue, 28 Mar 2017 18:11:48 +0000 (13:11 -0500)
committersparky4 <sparky4@cock.li>
Tue, 28 Mar 2017 18:11:48 +0000 (13:11 -0500)
src/lib/16_dbg.c
src/lib/16_dbg.h
src/lib/16_in.c
src/lib/16_spri.c
src/lib/16_tail.h
src/lib/doslib
src/lib/scroll16.c
src/lib/scroll16.h
test.exe [new file with mode: 0755]

index 9878998be3621b9468bb9bbdb4d1bc83bc5a9ebf..8fa25c3fd8d6385da2f46be082b5c52d6836a623 100755 (executable)
@@ -17,6 +17,12 @@ boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0,dbg_nointest=0;
 boolean dbg_maptext=0;\r
 byte *dbg_mapdata;\r
 #endif\r
+#ifdef __DEBUG_RF__\r
+boolean dbg_pagenorendermap=0,dbg_pagedelayrendermap=0;\r
+#endif\r
+#ifdef __DEBUG_SPRI__\r
+boolean dbg_delayanimation=0;\r
+#endif\r
 #endif //debug\r
 \r
 #ifdef __WATCOMC__\r
index 3be65fa663c79cf67a3096c155a8a27a401df8f3..a4a018431848aa3611cd91fedccf76593b6bb2e4 100755 (executable)
@@ -13,6 +13,8 @@
 //#define __DEBUG_CA__\r
 //#define __DEBUG_PM__\r
 //#define __DEBUG_MM__\r
+//#define __DEBUG_RF__\r
+#define __DEBUG_SPRI__\r
 \r
 \r
 #ifdef __DEBUG__\r
@@ -32,6 +34,12 @@ extern boolean dbg_testkeyin,dbg_testcontrolnoisy,dbg_nointest;
 extern boolean dbg_maptext;\r
 extern byte *dbg_mapdata;\r
 #endif\r
+#ifdef __DEBUG_RF__\r
+extern boolean dbg_pagenorendermap,dbg_pagedelayrendermap;\r
+#endif\r
+#ifdef __DEBUG_SPRI__\r
+extern boolean dbg_delayanimation;\r
+#endif\r
 #endif\r
 \r
 #ifdef __WATCOMC__\r
index 14086bd8909381c57da08fa8836a4a881efbc708..f4d90dbb13907ae8445bc75aa717b8bc3280125b 100755 (executable)
@@ -1305,8 +1305,8 @@ byte      IN_JoyButtons (void)
 boolean IN_KeyDown(byte code)\r
 {\r
 #ifdef __DEBUG_InputMgr__\r
-       if(inst.Keyboard[code])\r
-               printf("IN_KeyDown(%c): %u\n", code, inst.Keyboard[code]);\r
+//     if(inst.Keyboard[code])\r
+//             printf("IN_KeyDown(%c): %u\n", code, inst.Keyboard[code]);\r
        if(!dbg_nointest)\r
 #endif\r
        return inst.Keyboard[code];\r
index cde64ac644a96ca318e0d296f53ba0017375e31a..f2c58ff3e021a28ff2ffbfd32c999456f8d09d49 100755 (executable)
@@ -195,6 +195,9 @@ void animate_spri(entity_t *enti, video_t *video)
                enti->spri.sprite_vrl_cont.buffer + sizeof(struct vrl1_vgax_header),\r
                enti->spri.sprite_vrl_cont.data_size\r
        );\r
+#endif\r
+#ifdef __DEBUG_SPRI__\r
+       if(dbg_delayanimation) delay(250);//{ while(!IN_KeyDown(sc_Space)/* && !IN_KeyDown(sc_Escape)*/){} delay(250); }\r
 #endif\r
        if(!video->rss)\r
        {\r
index 3e1a455f846ea5dd8d8caca369096a01948f806b..81c5e1a0b54f2c7f1bb1df6445ea9eb2d2846bf7 100755 (executable)
        if(IN_KeyDown(88)){ panswitch=!panswitch;                                                       IN_UserInput(1, &gvar); } \\r
        TAIL_FUNCTIONKEYFUNCTIONS0EXE\r
 \r
+#define RFDEBUGFUNCTIONS\r
+#ifdef __DEBUG_RF__\r
+#undef RFDEBUGFUNCTIONS\r
+#define RFDEBUGFUNCTIONS \\r
+       if(IN_KeyDown(sc_F11)){ dbg_pagedelayrendermap=!dbg_pagedelayrendermap;         IN_UserInput(1, &gvar); } \\r
+       if(IN_KeyDown(sc_F9)){ dbg_pagenorendermap=!dbg_pagenorendermap;                        IN_UserInput(1, &gvar); }\r
+#endif\r
+\r
+/*#define SPRIDEBUGFUNCTIONS\r
+#ifdef __DEBUG_SPRI__\r
+#undef SPRIDEBUGFUNCTIONS\r
+#define SPRIDEBUGFUNCTIONS \\r
+       if(IN_KeyDown(sc_Y)){ dbg_delayanimation=!dbg_delayanimation;                           IN_UserInput(1, &gvar); }\r
+//     if(IN_KeyDown(sc_F9)){ dbg_pagenorendermap=!dbg_pagenorendermap;                        IN_UserInput(1, &gvar); }\r
+#endif*/\r
+\r
 #define TAIL_FUNCTIONKEYFUNCTIONS0EXE \\r
        if(IN_KeyDown(sc_F4)){ turboXT(12);                                                                     IN_UserInput(1, &gvar); } \\r
-       if(IN_KeyDown(87/*sc_F11*/)){ pagedelayrendermap=!pagedelayrendermap;           IN_UserInput(1, &gvar); } \\r
        if(IN_KeyDown(68/*sc_F10*/)){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap;         IN_UserInput(1, &gvar); } \\r
-       if(IN_KeyDown(sc_F9)){ pagenorendermap=!pagenorendermap;                                IN_UserInput(1, &gvar); } \\r
        if(IN_KeyDown(sc_F8)){ gvar.video.bgps=!gvar.video.bgps;                                        IN_UserInput(1, &gvar); } \\r
        if(IN_KeyDown(sc_F7)){ ZC_ShowMV(&gvar.mv, 0, 1);                                               IN_UserInput(1, &gvar); } \\r
        if(IN_KeyDown(sc_F6)){ ZC_ShowMV(&gvar.mv, 0, 0);                                               IN_UserInput(1, &gvar); } \\r
        if(IN_KeyDown(sc_T)){ gvar.video.rss=!gvar.video.rss;                                           IN_UserInput(1, &gvar); } \\r
-       if(IN_KeyDown(sc_P)){ modexpdump(&gvar.video.page[0]);                                  IN_UserInput(1, &gvar); }\r
+       if(IN_KeyDown(sc_P)){ modexpdump(&gvar.video.page[0]);                                  IN_UserInput(1, &gvar); } \\r
+       if(IN_KeyDown(sc_Y)){ dbg_delayanimation=!dbg_delayanimation;                           IN_UserInput(1, &gvar); } \\r
+       RFDEBUGFUNCTIONS\r
 \r
 #define TAIL_PANKEYFUN \\r
        TAIL_PANKEYFUNZC \\r
index 28578c14c4f230051b9cc217c344d8649985496d..69400af6d68a7c20510cf00374e3f27ba261ebbc 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 28578c14c4f230051b9cc217c344d8649985496d
+Subproject commit 69400af6d68a7c20510cf00374e3f27ba261ebbc
index 0e73d83b99492fb9eec83d1e8c5d7c8801fa6d82..9e69713cba5d7a6bc900918609c4e98f11c01e14 100755 (executable)
@@ -579,7 +579,10 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)
                        rx = (((i-1) % ((t->spri->sprite_vrl_cont.vrl_header->width)/t->tileWidth)) * t->tileWidth);\r
                        ry = (((i-1) / ((t->spri->sprite_vrl_cont.vrl_header->height)/t->tileHeight)) * t->tileHeight);\r
 #ifndef TILERENDER\r
-                       if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1);\r
+#ifdef __DEBUG_RF__\r
+                       if(!dbg_pagenorendermap)\r
+#endif\r
+                               modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1);\r
 #else\r
                        modexDrawBmpRegion              (page, x, y, rx, ry, t->tileWidth, t->tileHeight, i);\r
                        //draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
@@ -595,10 +598,14 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)
 void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *player, word poopoffset)\r
 {\r
        int i; nibble z;\r
-if(pagedelayrendermap)         if(!y)  y+=TILEWH;      else    y-=TILEWH;\r
+#ifdef __DEBUG_RF__\r
+if(dbg_pagedelayrendermap)             if(!y)  y+=TILEWH;      else    y-=TILEWH;\r
+#endif\r
        poopoffset%=player[0].enti.speed;\r
 //printf("y: %d\n", poopoffset);\r
-if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dx); modexprint(mv[0].page, player[0].enti.x, player[0].enti.y-28-(poopoffset*8) , 1, 0, PALMAPDRAWW, 1, global_temp_status_text); }\r
+#ifdef __DEBUG_RF__\r
+if(dbg_pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dx); modexprint(mv[0].page, player[0].enti.x, player[0].enti.y-28-(poopoffset*8) , 1, 0, PALMAPDRAWW, 1, global_temp_status_text); }\r
+#endif\r
        /* the position within the map array */\r
        i=ty * mv->map->width + tx;\r
        for(    mv->dx=poopoffset;      mv->dx<(mv->page->sw+mv->dxThresh)/(poopoffset+1) && tx < mv->map->width;       mv->dx+=mv->map->tiles->tileWidth, tx++) {\r
@@ -611,16 +618,23 @@ if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dx); modexp
                                }\r
                }\r
                i++; /* next! */\r
-       } if(pagedelayrendermap) delay(200);\r
+       }\r
+#ifdef __DEBUG_RF__\r
+if(dbg_pagedelayrendermap) delay(200);\r
+#endif\r
 }\r
 \r
 void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player, word poopoffset)\r
 {\r
        int i; nibble z;\r
-if(pagedelayrendermap)         if(!x)  x+=TILEWH;              else    x-=TILEWH;\r
+#ifdef __DEBUG_RF__\r
+if(dbg_pagedelayrendermap)             if(!x)  x+=TILEWH;              else    x-=TILEWH;\r
+#endif\r
        poopoffset%=player[0].enti.speed;\r
 //printf("x: %d\n", poopoffset);\r
-if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dy); modexprint(mv[0].page, player[0].enti.x, player[0].enti.y-28-(poopoffset*8) , 1, 0, PALMAPDRAWW, 1, global_temp_status_text); }\r
+#ifdef __DEBUG_RF__\r
+if(dbg_pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dy); modexprint(mv[0].page, player[0].enti.x, player[0].enti.y-28-(poopoffset*8) , 1, 0, PALMAPDRAWW, 1, global_temp_status_text); }\r
+#endif\r
        /* location in the map array */\r
        i=ty * mv->map->width + tx;\r
        /* We'll copy all of the columns in the screen,\r
@@ -635,7 +649,10 @@ if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dy); modexp
                                }\r
                }\r
                i += mv->map->width;\r
-       } if(pagedelayrendermap) delay(200);\r
+       }\r
+#ifdef __DEBUG_RF__\r
+if(dbg_pagedelayrendermap) delay(200);\r
+#endif\r
 }\r
 \r
 void mapDrawWRow(map_view_t *mv, int tx, int ty, word y)\r
@@ -679,8 +696,6 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x)
        }\r
 }\r
 \r
-boolean pagenorendermap = 0;\r
-boolean pagedelayrendermap = 0;\r
 \r
 /*     sync    */\r
 void shinku(global_game_variables_t *gv)\r
index 8a7cbb7ea744e68b91e2fc6622591dfea9deb09e..8f367bf7b48a14a2fb9f1ff66cbe37da3a55afd4 100755 (executable)
@@ -89,8 +89,17 @@ printf("\n\n");\
        printf("gvar.video:\n");\\r
        printf(" r=%u ", gvar.video.dorender);\\r
        printf("bgps=%u ", gvar.video.bgps);\\r
+       printf("dbg_delayanimation=%u ", dbg_delayanimation);\\r
 printf("\n\n");\r
 \r
+/*\r
+       if(IN_KeyDown(sc_F11)){ pagedelayrendermap=!pagedelayrendermap;         IN_UserInput(1, &gvar); }\r
+       if(IN_KeyDown(sc_F10)){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap;               IN_UserInput(1, &gvar); }\r
+       if(IN_KeyDown(sc_F9)){ pagenorendermap=!pagenorendermap;                                IN_UserInput(1, &gvar); }\r
+       if(IN_KeyDown(sc_F8)){ gvar.video.bgps=!gvar.video.bgps;                                        IN_UserInput(1, &gvar); }\r
+       if(IN_KeyDown(sc_T)){ gvar.video.rss=!gvar.video.rss;                                           IN_UserInput(1, &gvar); }\r
+*/\r
+\r
 extern boolean pagenorendermap, pagedelayrendermap;\r
 \r
 extern char global_temp_status_text[512];\r
diff --git a/test.exe b/test.exe
new file mode 100755 (executable)
index 0000000..2280528
Binary files /dev/null and b/test.exe differ