From: sparky4 Date: Tue, 28 Mar 2017 18:11:48 +0000 (-0500) Subject: [16_ca needs huge amounts of work and I should remember what needs to be done soon... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=62a51803dc18b07a6d1c298220c2aaf553c802e7;p=16.git [16_ca needs huge amounts of work and I should remember what needs to be done soon][OpenVGMFile needs to be ported to 16_snd.c]going to port rest of code to borland c some time so we can use the core components of id engine here [going to add 16_us.c eventually but the debug system and CA_ PM_ and MM_ usage is priority now] added animation delay test back wwww --- diff --git a/src/lib/16_dbg.c b/src/lib/16_dbg.c index 9878998b..8fa25c3f 100755 --- a/src/lib/16_dbg.c +++ b/src/lib/16_dbg.c @@ -17,6 +17,12 @@ boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0,dbg_nointest=0; boolean dbg_maptext=0; byte *dbg_mapdata; #endif +#ifdef __DEBUG_RF__ +boolean dbg_pagenorendermap=0,dbg_pagedelayrendermap=0; +#endif +#ifdef __DEBUG_SPRI__ +boolean dbg_delayanimation=0; +#endif #endif //debug #ifdef __WATCOMC__ diff --git a/src/lib/16_dbg.h b/src/lib/16_dbg.h index 3be65fa6..a4a01843 100755 --- a/src/lib/16_dbg.h +++ b/src/lib/16_dbg.h @@ -13,6 +13,8 @@ //#define __DEBUG_CA__ //#define __DEBUG_PM__ //#define __DEBUG_MM__ +//#define __DEBUG_RF__ +#define __DEBUG_SPRI__ #ifdef __DEBUG__ @@ -32,6 +34,12 @@ extern boolean dbg_testkeyin,dbg_testcontrolnoisy,dbg_nointest; extern boolean dbg_maptext; extern byte *dbg_mapdata; #endif +#ifdef __DEBUG_RF__ +extern boolean dbg_pagenorendermap,dbg_pagedelayrendermap; +#endif +#ifdef __DEBUG_SPRI__ +extern boolean dbg_delayanimation; +#endif #endif #ifdef __WATCOMC__ diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 14086bd8..f4d90dbb 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -1305,8 +1305,8 @@ byte IN_JoyButtons (void) boolean IN_KeyDown(byte code) { #ifdef __DEBUG_InputMgr__ - if(inst.Keyboard[code]) - printf("IN_KeyDown(%c): %u\n", code, inst.Keyboard[code]); +// if(inst.Keyboard[code]) +// printf("IN_KeyDown(%c): %u\n", code, inst.Keyboard[code]); if(!dbg_nointest) #endif return inst.Keyboard[code]; diff --git a/src/lib/16_spri.c b/src/lib/16_spri.c index cde64ac6..f2c58ff3 100755 --- a/src/lib/16_spri.c +++ b/src/lib/16_spri.c @@ -195,6 +195,9 @@ void animate_spri(entity_t *enti, video_t *video) enti->spri.sprite_vrl_cont.buffer + sizeof(struct vrl1_vgax_header), enti->spri.sprite_vrl_cont.data_size ); +#endif +#ifdef __DEBUG_SPRI__ + if(dbg_delayanimation) delay(250);//{ while(!IN_KeyDown(sc_Space)/* && !IN_KeyDown(sc_Escape)*/){} delay(250); } #endif if(!video->rss) { diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index 3e1a455f..81c5e1a0 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -37,16 +37,32 @@ if(IN_KeyDown(88)){ panswitch=!panswitch; IN_UserInput(1, &gvar); } \ TAIL_FUNCTIONKEYFUNCTIONS0EXE +#define RFDEBUGFUNCTIONS +#ifdef __DEBUG_RF__ +#undef RFDEBUGFUNCTIONS +#define RFDEBUGFUNCTIONS \ + if(IN_KeyDown(sc_F11)){ dbg_pagedelayrendermap=!dbg_pagedelayrendermap; IN_UserInput(1, &gvar); } \ + if(IN_KeyDown(sc_F9)){ dbg_pagenorendermap=!dbg_pagenorendermap; IN_UserInput(1, &gvar); } +#endif + +/*#define SPRIDEBUGFUNCTIONS +#ifdef __DEBUG_SPRI__ +#undef SPRIDEBUGFUNCTIONS +#define SPRIDEBUGFUNCTIONS \ + if(IN_KeyDown(sc_Y)){ dbg_delayanimation=!dbg_delayanimation; IN_UserInput(1, &gvar); } +// if(IN_KeyDown(sc_F9)){ dbg_pagenorendermap=!dbg_pagenorendermap; IN_UserInput(1, &gvar); } +#endif*/ + #define TAIL_FUNCTIONKEYFUNCTIONS0EXE \ if(IN_KeyDown(sc_F4)){ turboXT(12); IN_UserInput(1, &gvar); } \ - if(IN_KeyDown(87/*sc_F11*/)){ pagedelayrendermap=!pagedelayrendermap; IN_UserInput(1, &gvar); } \ if(IN_KeyDown(68/*sc_F10*/)){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap; IN_UserInput(1, &gvar); } \ - if(IN_KeyDown(sc_F9)){ pagenorendermap=!pagenorendermap; IN_UserInput(1, &gvar); } \ if(IN_KeyDown(sc_F8)){ gvar.video.bgps=!gvar.video.bgps; IN_UserInput(1, &gvar); } \ if(IN_KeyDown(sc_F7)){ ZC_ShowMV(&gvar.mv, 0, 1); IN_UserInput(1, &gvar); } \ if(IN_KeyDown(sc_F6)){ ZC_ShowMV(&gvar.mv, 0, 0); IN_UserInput(1, &gvar); } \ if(IN_KeyDown(sc_T)){ gvar.video.rss=!gvar.video.rss; IN_UserInput(1, &gvar); } \ - if(IN_KeyDown(sc_P)){ modexpdump(&gvar.video.page[0]); IN_UserInput(1, &gvar); } + if(IN_KeyDown(sc_P)){ modexpdump(&gvar.video.page[0]); IN_UserInput(1, &gvar); } \ + if(IN_KeyDown(sc_Y)){ dbg_delayanimation=!dbg_delayanimation; IN_UserInput(1, &gvar); } \ + RFDEBUGFUNCTIONS #define TAIL_PANKEYFUN \ TAIL_PANKEYFUNZC \ diff --git a/src/lib/doslib b/src/lib/doslib index 28578c14..69400af6 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit 28578c14c4f230051b9cc217c344d8649985496d +Subproject commit 69400af6d68a7c20510cf00374e3f27ba261ebbc diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 0e73d83b..9e69713c 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -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); ry = (((i-1) / ((t->spri->sprite_vrl_cont.vrl_header->height)/t->tileHeight)) * t->tileHeight); #ifndef TILERENDER - if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1); +#ifdef __DEBUG_RF__ + if(!dbg_pagenorendermap) +#endif + modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1); #else modexDrawBmpRegion (page, x, y, rx, ry, t->tileWidth, t->tileHeight, i); //draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header)); @@ -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) { int i; nibble z; -if(pagedelayrendermap) if(!y) y+=TILEWH; else y-=TILEWH; +#ifdef __DEBUG_RF__ +if(dbg_pagedelayrendermap) if(!y) y+=TILEWH; else y-=TILEWH; +#endif poopoffset%=player[0].enti.speed; //printf("y: %d\n", poopoffset); -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); } +#ifdef __DEBUG_RF__ +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); } +#endif /* the position within the map array */ i=ty * mv->map->width + tx; for( mv->dx=poopoffset; mv->dx<(mv->page->sw+mv->dxThresh)/(poopoffset+1) && tx < mv->map->width; mv->dx+=mv->map->tiles->tileWidth, tx++) { @@ -611,16 +618,23 @@ if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dx); modexp } } i++; /* next! */ - } if(pagedelayrendermap) delay(200); + } +#ifdef __DEBUG_RF__ +if(dbg_pagedelayrendermap) delay(200); +#endif } void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player, word poopoffset) { int i; nibble z; -if(pagedelayrendermap) if(!x) x+=TILEWH; else x-=TILEWH; +#ifdef __DEBUG_RF__ +if(dbg_pagedelayrendermap) if(!x) x+=TILEWH; else x-=TILEWH; +#endif poopoffset%=player[0].enti.speed; //printf("x: %d\n", poopoffset); -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); } +#ifdef __DEBUG_RF__ +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); } +#endif /* location in the map array */ i=ty * mv->map->width + tx; /* We'll copy all of the columns in the screen, @@ -635,7 +649,10 @@ if(pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", mv->dy); modexp } } i += mv->map->width; - } if(pagedelayrendermap) delay(200); + } +#ifdef __DEBUG_RF__ +if(dbg_pagedelayrendermap) delay(200); +#endif } void mapDrawWRow(map_view_t *mv, int tx, int ty, word y) @@ -679,8 +696,6 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x) } } -boolean pagenorendermap = 0; -boolean pagedelayrendermap = 0; /* sync */ void shinku(global_game_variables_t *gv) diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 8a7cbb7e..8f367bf7 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -89,8 +89,17 @@ printf("\n\n");\ printf("gvar.video:\n");\ printf(" r=%u ", gvar.video.dorender);\ printf("bgps=%u ", gvar.video.bgps);\ + printf("dbg_delayanimation=%u ", dbg_delayanimation);\ printf("\n\n"); +/* + if(IN_KeyDown(sc_F11)){ pagedelayrendermap=!pagedelayrendermap; IN_UserInput(1, &gvar); } + if(IN_KeyDown(sc_F10)){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap; IN_UserInput(1, &gvar); } + if(IN_KeyDown(sc_F9)){ pagenorendermap=!pagenorendermap; IN_UserInput(1, &gvar); } + if(IN_KeyDown(sc_F8)){ gvar.video.bgps=!gvar.video.bgps; IN_UserInput(1, &gvar); } + if(IN_KeyDown(sc_T)){ gvar.video.rss=!gvar.video.rss; IN_UserInput(1, &gvar); } +*/ + extern boolean pagenorendermap, pagedelayrendermap; extern char global_temp_status_text[512]; diff --git a/test.exe b/test.exe new file mode 100755 index 00000000..22805283 Binary files /dev/null and b/test.exe differ