From ea82069949d35f517679d02184787b70a74c2fc2 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Mon, 15 May 2017 06:38:08 -0500 Subject: [PATCH] 16_ca needs huge amounts of work and I should remember what needs to be done soon[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]older zcroll renamed to xcroll][zcroll is now the pre menu game loop system with PROPER data usage with CAMMPM] added 1st scroll back [i work on CA] palette debug show values added wwww and i need to know how to see vrs/vrl imaage data palette index numbers [i am trying to find out how the hell you get the index number values of VRL/VRS] boom has been fixed ^^[CA_CacheMap added seems to be used in start a new game] what is mapsegs? testing xcroll.exe also reverted because broken in dosbox --- makefile | 13 +++++-------- src/lib/16_dbg.h | 3 --- src/lib/16_head.c | 3 --- src/lib/16_map.c | 4 +++- src/lib/16_spri.c | 2 -- src/lib/16_tail.h | 9 ++++----- src/lib/bakapee.c | 2 ++ 7 files changed, 14 insertions(+), 22 deletions(-) diff --git a/makefile b/makefile index 1615fcde..5c21b2ad 100755 --- a/makefile +++ b/makefile @@ -34,7 +34,7 @@ # comment this out on game release. # serial output goes to COM1 at 9600 baud 1 stop bit odd parity. # serial output is plain text ASCII. -DEBUGSERIAL=0 +DEBUGSERIAL=1 DELLOGFILE=1 @@ -119,7 +119,7 @@ UPXQ=-qqq # # compile flags # -S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k37000#32768#24576 +S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768#24576 Z_FLAGS=-zk0 -zc -zm#### -zp4 -ei O_FLAGS=-opnr -oe=24 -oil+ -outback -ohm T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 -d1 -fo=.$(OBJ)## -e=65536 @@ -139,10 +139,8 @@ LIBFLAGS=$(WLIBQ) -b -n # VGMSNDOBJ = vgmSnd.$(OBJ) OLDLIBOBJS=bitmap.$(OBJ) 16render.$(OBJ) -GFXLIBCOREOBJS = 16_vl.$(OBJ) 16text.$(OBJ) scroll16.$(OBJ) 16_vrs.$(OBJ) 16_spri.$(OBJ) 16_vl_1.$(OBJ) #bakapee.$(OBJ) -GFXLIBOBJS = $(GFXLIBCOREOBJS) 16_vl_2.$(OBJ) 16_vlpal.$(OBJ) -16LIBCOREOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_head.$(OBJ) 16_enti.$(OBJ) 16_dbg.$(OBJ) 16_in.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ) 16_tail_.$(OBJ) -16LIBOBJS = $(16LIBCOREOBJS) 16_sd.$(OBJ) 16_dbg_1.$(OBJ) +GFXLIBOBJS = 16_vl.$(OBJ) 16_vl_1.$(OBJ) 16_vl_2.$(OBJ) 16_vlpal.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16_vrs.$(OBJ) 16_spri.$(OBJ) +16LIBOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_head.$(OBJ) 16_enti.$(OBJ) 16_dbg.$(OBJ) 16_in.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ) 16text.$(OBJ) 16_sd.$(OBJ) 16_tail_.$(OBJ) 16_dbg_1.$(OBJ) DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ) !ifeq DEBUGSERIAL 1 DOSLIBOBJ += 8250.$(OBJ) @@ -262,8 +260,7 @@ bakapi.exe: bakapi.$(OBJ) 16_vl.$(OBJ) 16_vl_1.$(OBJ) 16text.$(OBJ) bakapee.$(O # scroll.exe: scroll.$(OBJ) $(16LIB) gfx.lib $(DOSLIB) scroll.$(OBJ): $(SRC)/scroll.c -#$(16LIB) gfx.lib -xcroll.exe: xcroll.$(OBJ) $(DOSLIB) $(16LIBCOREOBJS) $(GFXLIBCOREOBJS) +xcroll.exe: xcroll.$(OBJ) $(16LIB) gfx.lib $(DOSLIB) xcroll.$(OBJ): $(SRC)/xcroll.c zcroll.exe: zcroll.$(OBJ) $(16LIB) gfx.lib $(DOSLIB) zcroll.$(OBJ): $(SRC)/zcroll.c diff --git a/src/lib/16_dbg.h b/src/lib/16_dbg.h index 3a2ce94c..3322046c 100755 --- a/src/lib/16_dbg.h +++ b/src/lib/16_dbg.h @@ -7,8 +7,6 @@ #include "src/lib/16_tdef.h" #define __DEBUG__ - -#ifdef __DEBUG__ //#define __DEBUG_InputMgr__ #define __DEBUG_MAP__ //#define __DEBUG_2__ @@ -18,7 +16,6 @@ //#define __DEBUG_RF__ #define __DEBUG_SPRI__ #define __DEBUG_VL__ -#endif #ifdef __DEBUG__ diff --git a/src/lib/16_head.c b/src/lib/16_head.c index 9862dd73..8786a9fd 100755 --- a/src/lib/16_head.c +++ b/src/lib/16_head.c @@ -22,9 +22,6 @@ #include "src/lib/16_head.h" -char global_temp_status_text[512]; -char global_temp_status_text2[512]; - long int filesize(FILE *fp) { diff --git a/src/lib/16_map.c b/src/lib/16_map.c index ad846e81..6bd66ccf 100755 --- a/src/lib/16_map.c +++ b/src/lib/16_map.c @@ -242,8 +242,10 @@ int CA_loadmap(char *mn, map_t *map, global_game_variables_t *gvar) else if(status != tokcount) { printf("Warning: used %d tok\n", status);} extract_map((char const *)MAPSEGINLM, tok, tokcount, map); + printf("freeing tok\n"); free(tok); //TODO: USE MM_ CA_ AND PM_ - fclose(fh); //TODO: USE MM_ CA_ AND PM_ +// printf("fclose fh\n"); +// fclose(fh); //TODO: USE MM_ CA_ AND PM_ return 0; } diff --git a/src/lib/16_spri.c b/src/lib/16_spri.c index aaeda8fc..502ed4a4 100755 --- a/src/lib/16_spri.c +++ b/src/lib/16_spri.c @@ -159,9 +159,7 @@ void animate_spri(entity_t *enti, video_t *video) #define INC_PER_FRAME if(enti->q&1) enti->persist_aniframe++; if(enti->persist_aniframe>4) enti->persist_aniframe = 1; unsigned int i,o,o2; int j; int x,y,rx,ry,w,h; -#ifdef __DEBUG_SPRI__ static struct glob_game_vars *ggvv; -#endif VGA_RAM_PTR omemptr = (VGA_RAM_PTR)video->page[0].data;// save original mem ptr x=enti->spri.x; diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index 60f919e2..d106d0ef 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -82,13 +82,13 @@ if(gvar.in.inst->Keyboard[sc_F6]){ ZC_ShowMV(&gvar.mv, 0, 0); IN_UserInput(1, &gvar); } \ if(gvar.in.inst->Keyboard[sc_T]){ gvar.video.vga_state.rss=!gvar.video.vga_state.rss; IN_UserInput(1, &gvar); } \ if(gvar.in.inst->Keyboard[sc_P]){ modexpdump(0, &gvar); IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_Y]){ dbg_delayanimation=!dbg_delayanimation; IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_Q]){ VL_modexPrintTextBox(&gvar); IN_UserInput(1, &gvar); } \ if(gvar.in.inst->Keyboard[sc_W]){ VL_MemToScreen((byte __far *)&gvar, 64, 64, 16, 16, &gvar); IN_UserInput(1, &gvar); } \ + if(gvar.in.inst->Keyboard[sc_LBrkt]){ ShowPalVal (&gvar); IN_UserInput(1, &gvar); } \ if(gvar.in.inst->Keyboard[sc_M]){ MM_ShowMemory(&gvar); IN_UserInput(1, &gvar); } \ RFDEBUGFUNCTIONS //FIZZLEFADEFUNCTION - //if(gvar.in.inst->Keyboard[sc_Y]){ dbg_delayanimation=!dbg_delayanimation; IN_UserInput(1, &gvar); } - //if(gvar.in.inst->Keyboard[sc_LBrkt]){ ShowPalVal (&gvar); IN_UserInput(1, &gvar); } - //if(gvar.in.inst->Keyboard[sc_Q]){ VL_modexPrintTextBox(&gvar); IN_UserInput(1, &gvar); } #define TAIL_PANKEYFUN \ TAIL_PANKEYFUNZC \ @@ -115,14 +115,13 @@ if(gvar.in.inst->Keyboard[sc_X]){ TESTBG12 } \ if(gvar.in.inst->Keyboard[sc_C]){ TESTBG34 } \ if(gvar.in.inst->Keyboard[sc_V]){ VL_PatternDraw(&gvar.video, 0, 1, 1); } \ + if(gvar.in.inst->Keyboard[sc_I]){ dbg_maptext=!dbg_maptext; IN_UserInput(1, &gvar); } \ if(gvar.in.inst->Keyboard[sc_PgDn]){ \ rotateR(gvar.video.palette, sizeof(gvar.video.palette)/sizeof(gvar.video.palette[0])); \ VL_UpdatePaletteWrite(&gvar.video.palette, 0, &gvar); IN_UserInput(1, &gvar); } \ if(gvar.in.inst->Keyboard[sc_PgUp]){ \ rotateL(gvar.video.palette, sizeof(gvar.video.palette)/sizeof(gvar.video.palette[0])); \ VL_UpdatePaletteWrite(&gvar.video.palette, 0, &gvar); IN_UserInput(1, &gvar); } -// if(gvar.in.inst->Keyboard[sc_I]){ dbg_maptext=!dbg_maptext; IN_UserInput(1, &gvar); } - #ifdef __BORLANDC__ #define PAL_WRITE_REG 0x03C8 /* Color register, write address */ #define PAL_DATA_REG 0x03C9 /* Color register, data port */ diff --git a/src/lib/bakapee.c b/src/lib/bakapee.c index ff388853..52786282 100755 --- a/src/lib/bakapee.c +++ b/src/lib/bakapee.c @@ -23,6 +23,8 @@ #include "src/lib/bakapee.h" //static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ +char global_temp_status_text[512]; +char global_temp_status_text2[512]; //========================================================================== -- 2.39.5