From: sparky4 Date: Mon, 13 Mar 2017 17:48:47 +0000 (-0500) Subject: __seguse.txt added to show _seg usage also OpenVGMFile needs to be ported to 16_snd... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=80a2a492f6fe7c9d5b5f069fb37d4650b18f9f00;p=16.git __seguse.txt added to show _seg usage also OpenVGMFile needs to be ported to 16_snd.c so we can use CA MM and PM ][ ca needs huge amounts of work and i should remember what needs to be done soon also i should reverify 16_in.c to make sure it can work with other code of id engine] fixed the glitch] i need the sprite stuff to use the memory manager --- diff --git a/DEBUG.16W b/DEBUG.16W deleted file mode 100755 index 3a895a4d..00000000 --- a/DEBUG.16W +++ /dev/null @@ -1,210 +0,0 @@ -Seg:0 Size:9028 Owner:0x0 -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 -Seg:2427 Size:39 Owner:0x0 -++ -Seg:244e Size:256 Owner:0x1d50 -++++ -Seg:254e Size:256 Owner:0x1ba6 -++++ -Seg:264e Size:256 Owner:0x1ba8 -++++ -Seg:274e Size:256 Owner:0x1baa -++++ -Seg:284e Size:256 Owner:0x1bac -+++++ -Seg:294e Size:256 Owner:0x1bae -++++ -Seg:2a4e Size:256 Owner:0x1bb0 -++++ -Seg:2b4e Size:256 Owner:0x1bb2 -++++ -Seg:2c4e Size:256 Owner:0x1bb4 -++++ -Seg:2d4e Size:256 Owner:0x1bb6 -+++++ -Seg:2e4e Size:256 Owner:0x1bb8 -++++ -Seg:2f4e Size:256 Owner:0x1bba -++++ -Seg:304e Size:256 Owner:0x1bbc -++++ -Seg:314e Size:256 Owner:0x1bbe -++++ -Seg:324e Size:256 Owner:0x1bc0 -+++++ -Seg:334e Size:256 Owner:0x1bc2 -++++ -Seg:344e Size:256 Owner:0x1bc4 -++++ -Seg:354e Size:256 Owner:0x1bc6 -++++ -Seg:364e Size:256 Owner:0x1bc8 -++++ -Seg:374e Size:256 Owner:0x1bca -+++++ -Seg:384e Size:256 Owner:0x1bcc -++++ -Seg:394e Size:256 Owner:0x1bce -++++ -Seg:3a4e Size:256 Owner:0x1bd0 -++++ -Seg:3b4e Size:256 Owner:0x1bd2 -++++ -Seg:3c4e Size:256 Owner:0x1bd4 -+++++ -Seg:3d4e Size:256 Owner:0x1bd6 -++++ -Seg:3e4e Size:256 Owner:0x1bd8 -++++ -Seg:3f4e Size:256 Owner:0x1bda -++++ -Seg:404e Size:256 Owner:0x1bdc -++++ -Seg:414e Size:256 Owner:0x1bde -+++++ -Seg:424e Size:256 Owner:0x1be0 -++++ -Seg:434e Size:256 Owner:0x1be2 -++++ -Seg:444e Size:256 Owner:0x1be4 -++++ -Seg:454e Size:256 Owner:0x1be6 -++++ -Seg:464e Size:256 Owner:0x1be8 -+++++ -Seg:474e Size:256 Owner:0x1bea -++++ -Seg:484e Size:256 Owner:0x1bec -++++ -Seg:494e Size:256 Owner:0x1bee -++++ -Seg:4a4e Size:256 Owner:0x1bf0 -++++ -Seg:4b4e Size:256 Owner:0x1bf2 -+++++ -Seg:4c4e Size:256 Owner:0x1bf4 -++++ -Seg:4d4e Size:256 Owner:0x1bf6 -++++ -Seg:4e4e Size:256 Owner:0x1bf8 -++++ -Seg:4f4e Size:256 Owner:0x1bfa -++++ -Seg:504e Size:256 Owner:0x1bfc -+++++ -Seg:514e Size:256 Owner:0x1bfe -++++ -Seg:524e Size:256 Owner:0x1c00 -++++ -Seg:534e Size:256 Owner:0x1c02 -++++ -Seg:544e Size:256 Owner:0x1c04 -++++ -Seg:554e Size:256 Owner:0x1c06 -+++++ -Seg:564e Size:256 Owner:0x1c08 -++++ -Seg:574e Size:256 Owner:0x1c0a -++++ -Seg:584e Size:256 Owner:0x1c0c -++++ -Seg:594e Size:256 Owner:0x1c0e -++++ -Seg:5a4e Size:256 Owner:0x1c10 -+++++ -Seg:5b4e Size:256 Owner:0x1c12 -++++ -Seg:5c4e Size:256 Owner:0x1c14 -++++ -Seg:5d4e Size:256 Owner:0x1c16 -++++ -Seg:5e4e Size:256 Owner:0x1c18 -++++ -Seg:5f4e Size:256 Owner:0x1c1a -+++++ -Seg:604e Size:256 Owner:0x1c1c -++++ -Seg:614e Size:256 Owner:0x1c1e -++++ -Seg:624e Size:256 Owner:0x1c20 -++++ -Seg:634e Size:256 Owner:0x1c22 -++++ -Seg:644e Size:256 Owner:0x1c24 -+++++ -Seg:654e Size:256 Owner:0x1c26 -++++ -Seg:664e Size:256 Owner:0x1c28 -++++ -Seg:674e Size:256 Owner:0x1c2a -++++ -Seg:684e Size:256 Owner:0x1c2c -++++ -Seg:694e Size:256 Owner:0x1c2e -+++++ -Seg:6a4e Size:256 Owner:0x1c30 -++++ -Seg:6b4e Size:256 Owner:0x1c32 -++++ -Seg:6c4e Size:256 Owner:0x1c34 -++++ -Seg:6d4e Size:256 Owner:0x1c36 -++++ -Seg:6e4e Size:256 Owner:0x1c38 -+++++ -Seg:6f4e Size:256 Owner:0x1c3a -++++ -Seg:704e Size:256 Owner:0x1c3c -++++ -Seg:714e Size:256 Owner:0x1c3e -++++ -Seg:724e Size:256 Owner:0x1c40 -++++ -Seg:734e Size:256 Owner:0x1c42 -+++++ -Seg:744e Size:256 Owner:0x1c44 -++++ -Seg:754e Size:256 Owner:0x1c46 -++++ -Seg:764e Size:256 Owner:0x1c48 -++++ -Seg:774e Size:256 Owner:0x1c4a -++++ -Seg:784e Size:256 Owner:0x1c4c -+++++ -Seg:794e Size:256 Owner:0x1c4e -++++ -Seg:7a4e Size:256 Owner:0x1c50 -++++ -Seg:7b4e Size:256 Owner:0x1c52 -++++ -Seg:7c4e Size:256 Owner:0x1c54 -++++ -Seg:7d4e Size:256 Owner:0x1c56 -+++++ -Seg:7e4e Size:256 Owner:0x1c58 -++++ -Seg:7f4e Size:256 Owner:0x1c5a -++++ -Seg:804e Size:256 Owner:0x1c5c -++++ -Seg:814e Size:256 Owner:0x1c5e -++++ -Seg:824e Size:256 Owner:0x1c60 -+++++ -Seg:834e Size:256 Owner:0x1c62 -++++ -Seg:844e Size:256 Owner:0x1c64 -++++ -Seg:854e Size:256 Owner:0x1c66 -++++ -Seg:864e Size:256 Owner:0x1c68 -++++ -Seg:874e Size:256 Owner:0x1c6a -+++++ -Seg:884e Size:256 Owner:0x1c6c -++++ -Seg:894e Size:273 Owner:0x1b7c -++++ -Seg:9d8d Size:25202 Owner:0x0 -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W deleted file mode 100755 index bcb93b47..00000000 --- a/HEAP.16W +++ /dev/null @@ -1,47 +0,0 @@ - - == default == - - USED block at 24490016 of size 26 - USED block at 24490030 of size 26 - FREE block at 2449004a of size 38914 - USED block at 2449984c of size 136 - USED block at 244998d4 of size 20 - FREE block at 244998e8 of size 7972 -OK - end of heap - - == near == - - USED block at 1448edc6 of size 12 - USED block at 1448edd2 of size 332 - USED block at 1448ef1e of size 52 - USED block at 1448ef52 of size 20 - USED block at 1448ef66 of size 20 - USED block at 1448ef7a of size 20 - USED block at 1448ef8e of size 20 - USED block at 1448efa2 of size 20 - USED block at 1448efb6 of size 4166 -OK - end of heap - - == far == - - USED block at 24490016 of size 26 - USED block at 24490030 of size 26 - USED block at 2449004a of size 38914 - USED block at 2449984c of size 136 - USED block at 244998d4 of size 20 - USED block at 244998e8 of size 7972 -OK - end of heap - -Memory Type Total Used Free ----------------- -------- -------- -------- -Default 47094 208 46886 -Near 4662 496 4166 -Far 47094 208 46886 ----------------- -------- -------- -------- -HC_coreleft = 4164 -HC_farcoreleft = 458752 -HC_GetFreeSize = 46886 -HC_GetNearFreeSize = 4166 -HC_GetFarFreeSize = 46886 -memavl = 4164 -stackavail = 31606 diff --git a/MEMINFO.16W b/MEMINFO.16W deleted file mode 100755 index e69de29b..00000000 diff --git a/MMDUMP.16W b/MMDUMP.16W deleted file mode 100755 index 4893d8b9..00000000 Binary files a/MMDUMP.16W and /dev/null differ diff --git a/makefile b/makefile index 2632b8b8..2a24bf82 100755 --- a/makefile +++ b/makefile @@ -31,6 +31,8 @@ # serial output is plain text ASCII. DEBUGSERIAL=1 +DELLOGFILE=1 + #192x144 #wwww will add these !ifdef __LINUX__ @@ -106,7 +108,7 @@ UPXQ=-qqq # S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768 Z_FLAGS=-zk0 -zc -zp8 -zm -O_FLAGS=-opn -oe=24 -oil+ -outback -ohm -zp4##-ei -or +O_FLAGS=-opnr -oe=24 -oil+ -outback -ohm -zp4##-ei T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 -d1 -fo=.$(OBJ) ##-e=65536 DBUGFLAGS=-fm=$^&.meh -fd=$^& @@ -388,13 +390,15 @@ clean: .symbolic @if exist *.smp $(REMOVECOMMAND) *.smp @if exist *.SMP $(REMOVECOMMAND) *.SMP @if exist *.hed $(REMOVECOMMAND) *.hed - @if exist *.mah $(REMOVECOMMAND) *.mah - @if exist *.MAH $(REMOVECOMMAND) *.MAH + @if exist *.meh $(REMOVECOMMAND) *.meh + @if exist *.MEH $(REMOVECOMMAND) *.MEH @if exist *.err $(REMOVECOMMAND) *.err @if exist TC*.SWP $(REMOVECOMMAND) TC*.SWP -# @if exist *.16W $(REMOVECOMMAND) *.16W -# @if exist *.16B $(REMOVECOMMAND) *.16B - +!ifeq DELLOGFILE 1 + @if exist *.16W $(REMOVECOMMAND) *.16W + @if exist *.16B $(REMOVECOMMAND) *.16B + @if exist *.L16 $(REMOVECOMMAND) *.L16 +!endif # @$(COPYCOMMAND) $(SRC)exmmtest.c $(EXMMTESTDIR)$(SRC) # @$(COPYCOMMAND) $(SRCLIB)16_mm.* $(EXMMTESTDIR)$(SRCLIB) # @$(COPYCOMMAND) $(SRCLIB)16_head.* $(EXMMTESTDIR)$(SRCLIB) diff --git a/src/0.c b/src/0.c index 901d8ef7..28d5ff05 100755 --- a/src/0.c +++ b/src/0.c @@ -34,6 +34,7 @@ #define INITTNUM 1 +map_view_t mv[4]; map_t map;//junk var int main(int argc,char **argv) diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index bb190511..6bd889fd 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -55,14 +55,14 @@ #define TAIL_PANKEYFUNZC \ ZC_panPageManual(&gvar.mv, &gvar.player, 0); -#define TAIL_FUNCTIONKEYSHOWMV \ +#define FUNCTIONKEYSHOWMV \ if(IN_KeyDown(1+1)){ gvar.video.sp=0; ZC_ShowMV(&gvar.mv, 0, 0); } \ if(IN_KeyDown(2+1)){ gvar.video.sp=1; ZC_ShowMV(&gvar.mv, 0, 0); } \ if(IN_KeyDown(3+1)){ gvar.video.sp=2; ZC_ShowMV(&gvar.mv, 0, 1); } \ if(IN_KeyDown(4+1)){ gvar.video.sp=3; ZC_ShowMV(&gvar.mv, 0, 1); } #define TAIL_FUNCTIONKEYDRAWJUNK \ - TAIL_FUNCTIONKEYSHOWMV \ + FUNCTIONKEYSHOWMV \ TAIL_FUNCTIONKEYDRAWJUNKNOMV #define TAIL_FUNCTIONKEYDRAWJUNKNOMV \ diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 7f146fe4..8a7cbb7e 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -79,7 +79,7 @@ //printf("mv[0]txy: %dx%d ", mv[0].tx, mv[0].ty); printf("mv[1]txy: %dx%d", mv[1].tx, mv[1].ty); #define SCROLLEXITMESG printf("page[0]dxy: %dx%d", gvar.video.page[0].dx, gvar.video.page[0].dy);\ printf("\n\n");\ - printf("gvar.player vars:\n");\ + printf("player vars:\n");\ printf(" xy: %dx%d", gvar.player[0].enti.x, gvar.player[0].enti.y); printf(" txy: %dx%d", gvar.player[0].enti.tx, gvar.player[0].enti.ty); printf(" triggxy: %dx%d", gvar.player[0].enti.triggerx, gvar.player[0].enti.triggery); printf(" value: %d\n", gvar.mv[1].map->layerdata[0].data[(gvar.player[0].enti.triggerx-1)+(map.width*(gvar.player[0].enti.triggery-1))]);\ printf(" hp: %d", (gvar.player[0].enti.hp)); printf(" q: %u", gvar.player[0].enti.q); printf(" info.dir: %u", gvar.player[0].info.dir); printf(" d: %u", gvar.player[0].enti.d); printf(" dire: %u", gvar.player[0].enti.dire);\ printf(" pdir: %u\n", gvar.player[0].pdir); printf(" delay=%u", gvar.player[0].enti.spri.delay);\ diff --git a/src/lib/testpatt.h b/src/lib/testpatt.h index 0b908618..bd73e577 100755 --- a/src/lib/testpatt.h +++ b/src/lib/testpatt.h @@ -68,16 +68,16 @@ DRAWOTHERCORNERBOX_BOTTOMLEFT; \ DRAWOTHERCORNERBOX_BOTTOMRIGHT; #define TESTBG1 \ - modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 15); \ - modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 128); \ - modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 42); \ - modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 128); + modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 1); \ + modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 2); \ + modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 3); \ + modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 2); #define TESTBG2 \ - modexClearRegion(&gvar.video.page[1], 0, 0, gvar.video.page[1].width, gvar.video.page[1].height, 20); \ - modexClearRegion(&gvar.video.page[1], 16, 16, gvar.video.page[1].sw, gvar.video.page[1].sh, 133); \ - modexClearRegion(&gvar.video.page[1], 32, 32, gvar.video.page[1].sw-32, gvar.video.page[1].sh-32, 47); \ - modexClearRegion(&gvar.video.page[1], 48, 48, gvar.video.page[1].sw-64, gvar.video.page[1].sh-64, 133); + modexClearRegion(&gvar.video.page[1], 0, 0, gvar.video.page[1].width, gvar.video.page[1].height, 5); \ + modexClearRegion(&gvar.video.page[1], 16, 16, gvar.video.page[1].sw, gvar.video.page[1].sh, 6); \ + modexClearRegion(&gvar.video.page[1], 32, 32, gvar.video.page[1].sw-32, gvar.video.page[1].sh-32, 7); \ + modexClearRegion(&gvar.video.page[1], 48, 48, gvar.video.page[1].sw-64, gvar.video.page[1].sh-64, 6); #define TESTBG12 \ TESTBG1 \ diff --git a/src/test.c b/src/test.c index 5464355e..a4a7f489 100755 --- a/src/test.c +++ b/src/test.c @@ -49,6 +49,7 @@ void main(int argc, char *argv[]) static word paloffset=0; static global_game_variables_t gvar; +// map_view_t mv[4]; map_t map; int i, j; diff --git a/src/zcroll.c b/src/zcroll.c index a245efad..b7e2b730 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -27,6 +27,7 @@ #define FADE +//map_view_t mv[4]; static map_t map; float t; @@ -72,7 +73,7 @@ void main(int argc, char *argv[]) // OK, this one takes hellova time and needs to be done in farmalloc or MM_... //IN CA i think you use CAL_SetupGrFile but i do think we should work together on this part --sparky4 -// gvar.player[0].enti.spri.spritesheet = malloc(sizeof(struct vrs_container)); + //----gvar.player[0].enti.spri.spritesheet = malloc(sizeof(struct vrs_container)); // create the map // fprintf(stderr, "testing map load~ ");