]> 4ch.mooo.com Git - 16.git/commitdiff
enti->spri is now enti.spri
authorsparky4 <sparky4@cock.li>
Fri, 17 Feb 2017 15:04:16 +0000 (09:04 -0600)
committersparky4 <sparky4@cock.li>
Fri, 17 Feb 2017 15:04:16 +0000 (09:04 -0600)
23 files changed:
16/othersrc/emmtest.c [moved from src/emmtest.c with 100% similarity]
16/othersrc/emstest.c [moved from src/emstest.c with 100% similarity]
16/othersrc/test.c [new file with mode: 0755]
16/othersrc/test0.c [moved from src/test0.c with 100% similarity]
16/othersrc/test2.c [moved from src/test2.c with 100% similarity]
16/othersrc/testsnd.c [moved from src/testsnd.c with 100% similarity]
16/src/lib/bitmap.c [moved from src/lib/bitmap.c with 100% similarity]
16/src/lib/bitmap.h [moved from src/lib/bitmap.h with 100% similarity]
DEBUG.16W [new file with mode: 0755]
HEAP.16W [new file with mode: 0755]
MMDUMP.16W [new file with mode: 0755]
src/lib/16_enti.c
src/lib/16_head.c
src/lib/16_map.c
src/lib/16_spri.c
src/lib/16_tdef.h
src/lib/16_vl.h
src/lib/16_vrs.c
src/lib/scroll16.c
src/lib/scroll16.h
src/maptest.c
src/vrstest.c
src/zcroll.c

similarity index 100%
rename from src/emmtest.c
rename to 16/othersrc/emmtest.c
similarity index 100%
rename from src/emstest.c
rename to 16/othersrc/emstest.c
diff --git a/16/othersrc/test.c b/16/othersrc/test.c
new file mode 100755 (executable)
index 0000000..2885dc4
--- /dev/null
@@ -0,0 +1,227 @@
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+#include <stdio.h>\r
+#include "src/lib/16_vl.h"\r
+#include "src/lib/16_vlpal.h"\r
+#include "src/lib/16_in.h"\r
+#include "src/lib/scroll16.h"\r
+\r
+#define LGQ 32\r
+#define HGQ 55\r
+\r
+static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
+\r
+void main(int argc, char *argv[])\r
+{\r
+       static word paloffset=0;\r
+       static global_game_variables_t gvar;\r
+       static player_t player[MaxPlayers];\r
+\r
+       map_t map;\r
+       map_view_t mv[4];\r
+\r
+       int i, j;\r
+       word startclk, endclk;\r
+       word k;\r
+\r
+       imgtestpal_t bmp1, bmp2;\r
+\r
+\r
+       bmp1.width=bmp2.width=  40;\r
+       bmp1.width=bmp2.height= 30;\r
+\r
+       //====word colo=LGQ;\r
+\r
+       // DOSLIB: check our environment\r
+       /*probe_dos();\r
+\r
+       // DOSLIB: what CPU are we using?\r
+       // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS.\r
+       //      So this code by itself shouldn't care too much what CPU it's running on. Except that other\r
+       //      parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for\r
+       //      the CPU to carry out tasks. --J.C.\r
+       cpu_probe();\r
+\r
+       // DOSLIB: check for VGA\r
+       if (!probe_vga()) {\r
+               printf("VGA probe failed\n");\r
+               return;\r
+       }\r
+       // hardware must be VGA or higher!\r
+       if (!(vga_state.vga_flags & VGA_IS_VGA)) {\r
+               printf("This program requires VGA or higher graphics hardware\n");\r
+               return;\r
+       }\r
+\r
+       if (_DEBUG_INIT() == 0) {\r
+#ifdef DEBUGSERIAL\r
+               printf("WARNING: Failed to initialize DEBUG output\n");\r
+#endif\r
+       }\r
+       _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
+       Startup16(&gvar);\r
+\r
+       /* save the palette */\r
+       //====modexPalSave(pal);\r
+       //====modexFadeOff(1, pal);\r
+       //====modexPalBlack();\r
+\r
+       //IN_Startup();\r
+       IN_Default(0,&player,ctrl_Keyboard1);\r
+       EN_initplayer(&player, 0, &gvar.video);\r
+\r
+       VGAmodeX(1, 1, &gvar);\r
+       modexPalBlack();\r
+\r
+       /* load our palette */\r
+       VL_LoadPalFile("data/16.pal", &gvar.video.palette);\r
+       bmp1.offset=(paloffset/3);\r
+       VL_palette(&bmp1, &gvar.video.palette, &paloffset, 0, 0, &gvar);\r
+\r
+       //VL_LoadPalFilewithoffset("data/default.pal", &palette, paloffset);\r
+       modexLoadPalFile("data/16t.pal", &gvar.video.dpal);\r
+       bmp2.offset=(paloffset/3);\r
+       VL_palette(&bmp2, &gvar.video.dpal, &paloffset, 0, 0, &gvar);\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
+       ZC_MVSetup(&mv, &map, &gvar);\r
+\r
+       /* fill the page with one color, but with a black border */\r
+       /*modexClearRegion(&gvar.video.page[1], 0, 0, gvar.video.page[1].width, gvar.video.page[1].height, 15);\r
+       modexClearRegion(&gvar.video.page[1], 16, 16, gvar.video.page[1].sw, gvar.video.page[1].sh, 128);\r
+       modexClearRegion(&gvar.video.page[1], 32, 32, gvar.video.page[1].sw-32, gvar.video.page[1].sh-32, 42);\r
+       modexClearRegion(&gvar.video.page[1], 48, 48, gvar.video.page[1].sw-64, gvar.video.page[1].sh-64, 128);\r
+       modexShowPage(&gvar.video.page[1]);\r
+       modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 15);\r
+       modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 128);\r
+       modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 42);\r
+       modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 128);\r
+       modexShowPage(&gvar.video.page[0]);*/\r
+\r
+\r
+       modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 1);\r
+       modexClearRegion(&gvar.video.page[0], 16, 16, gvar.video.page[0].sw, gvar.video.page[0].sh, 2);\r
+       modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 3);\r
+       modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 2);\r
+       modexCopyPageRegion(&gvar.video.page[1], &gvar.video.page[0], 0, 0, 0, 0, gvar.video.page[0].width, gvar.video.page[0].height);\r
+       modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 4);\r
+       modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 6);\r
+\r
+\r
+       /* fade in */\r
+       //====modexFadeOn(1, pal2);\r
+\r
+       i=0,k=0,j=0;\r
+       startclk = *clockw;\r
+       while(!IN_KeyDown(sc_Escape))\r
+       {\r
+               IN_ReadControl(0,&player);\r
+               ZC_panPageManual(&mv, &player, 0);\r
+               //[gvar.video.sp]\r
+               //ZC_MVSync(&mv);\r
+\r
+               /*if(i<5){\r
+               switch (k)\r
+               {\r
+                       case 0:\r
+                               pee:\r
+                               // go right\r
+                               gvar.video.page[gvar.video.sp].dx++;\r
+                               if(i==5){ if(j>=31){ i++; j=0; goto baka; }else j++; }else\r
+                               if(j>=32){ k++; j=0; }else j++;\r
+                       break;\r
+                       case 1:\r
+                               // go left\r
+                               gvar.video.page[gvar.video.sp].dx--;\r
+                               if(j>=32){ k++; j=0; }else j++;\r
+                       break;\r
+                       case 2:\r
+                               // go up\r
+                               gvar.video.page[gvar.video.sp].dy++;\r
+                               if(j>=32){ k++; j=0; }else j++;\r
+                       break;\r
+                       case 3:\r
+                               // go down\r
+                               gvar.video.page[gvar.video.sp].dy--;\r
+                               if(j>=32){ k=0; j=0; i++; }else j++;\r
+                       break;\r
+                       default:\r
+\r
+                       break;\r
+               }}else{\r
+                       if(i==5) goto pee;\r
+                       baka:\r
+                       i++;\r
+                       modexClearRegion(&gvar.video.page[1], 0, gvar.video.page[0].height/2, gvar.video.page[0].width-32, 16, 45);*/\r
+//                     if(IN_KeyDown(6))\r
+//                     {\r
+//                             modexClearRegion(&gvar.video.page[1],  gvar.video.page[1].sw, 16, 8, 4, 45);\r
+//                     }\r
+//                     if(IN_KeyDown(4+1)){\r
+//                             modexClearRegion(&gvar.video.page[1], 16, 16, gvar.video.page[1].sw, gvar.video.page[1].sh, 128);\r
+//                             modexClearRegion(&gvar.video.page[1], 32, 32, gvar.video.page[1].sw-32, gvar.video.page[1].sh-32, 42);\r
+//                             modexClearRegion(&gvar.video.page[1], 48, 48, gvar.video.page[1].sw-64, gvar.video.page[1].sh-64, 128);\r
+//                     }\r
+               //}\r
+               PANKEYFUN;\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
+                               modexPalUpdate(pal2);\r
+                               colo++;\r
+                               if(colo>HGQ) colo=LGQ;\r
+                       }\r
+//                     if(i>PAL_SIZE) i=0;\r
+               }//9*/\r
+               if(IN_KeyDown(25)){ modexpdump(&gvar.video.page[gvar.video.sp]); IN_UserInput(1,1); }//p\r
+               //VL_ShowPage(&gvar.video.page[gvar.video.sp], 0, 0);\r
+               ZC_ShowMV(&mv, 0, 0);\r
+       }\r
+\r
+       endclk = *clockw;\r
+\r
+       /* fade back to text mode */\r
+       //====modexFadeOff(1, pal2);\r
+       //====modexPalBlack();\r
+       VGAmodeX(0, 1, &gvar);\r
+       Shutdown16(&gvar);\r
+       printf("Project 16 test.exe. This is just a test file!\n");\r
+       printf("version %s\n", VERSION);\r
+       VL_PrintmodexmemInfo(&gvar.video);\r
+       printf("tx=%d   ", mv[gvar.video.sp].tx); printf("ty=%d ", mv[gvar.video.sp].ty); printf("player.d=%d\n", player[0].enti.d);\r
+       printf("\n====\n");\r
+       printf("0       paloffset=      %d\n", paloffset/3);\r
+       printf("====\n\n");\r
+       //IN_Shutdown();\r
+       //====modexPalBlack();\r
+       //====modexFadeOn(1, pal);\r
+}\r
similarity index 100%
rename from src/test0.c
rename to 16/othersrc/test0.c
similarity index 100%
rename from src/test2.c
rename to 16/othersrc/test2.c
similarity index 100%
rename from src/testsnd.c
rename to 16/othersrc/testsnd.c
similarity index 100%
rename from src/lib/bitmap.c
rename to 16/src/lib/bitmap.c
similarity index 100%
rename from src/lib/bitmap.h
rename to 16/src/lib/bitmap.h
diff --git a/DEBUG.16W b/DEBUG.16W
new file mode 100755 (executable)
index 0000000..311e948
--- /dev/null
+++ b/DEBUG.16W
@@ -0,0 +1,210 @@
+\e[0mSeg:0      Size:9880       Owner:0x0\r
+\e[41;31m++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m\e[42;32m0000\r
+\e[0m\e[0mSeg:276c       Size:36 Owner:0x0\r
+\e[41;31m+\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2790       Size:256        Owner:0x1c7c\r
+\e[44;34m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2890       Size:256        Owner:0x1a6e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2990       Size:256        Owner:0x1a70\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2a90       Size:256        Owner:0x1a72\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2b90       Size:256        Owner:0x1a74\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2c90       Size:256        Owner:0x1a76\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2d90       Size:256        Owner:0x1a78\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2e90       Size:256        Owner:0x1a7a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2f90       Size:256        Owner:0x1a7c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3090       Size:256        Owner:0x1a7e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3190       Size:256        Owner:0x1a80\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3290       Size:256        Owner:0x1a82\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3390       Size:256        Owner:0x1a84\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3490       Size:256        Owner:0x1a86\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3590       Size:256        Owner:0x1a88\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3690       Size:256        Owner:0x1a8a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3790       Size:256        Owner:0x1a8c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3890       Size:256        Owner:0x1a8e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3990       Size:256        Owner:0x1a90\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3a90       Size:256        Owner:0x1a92\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3b90       Size:256        Owner:0x1a94\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3c90       Size:256        Owner:0x1a96\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3d90       Size:256        Owner:0x1a98\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3e90       Size:256        Owner:0x1a9a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3f90       Size:256        Owner:0x1a9c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4090       Size:256        Owner:0x1a9e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4190       Size:256        Owner:0x1aa0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4290       Size:256        Owner:0x1aa2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4390       Size:256        Owner:0x1aa4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4490       Size:256        Owner:0x1aa6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4590       Size:256        Owner:0x1aa8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4690       Size:256        Owner:0x1aaa\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4790       Size:256        Owner:0x1aac\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4890       Size:256        Owner:0x1aae\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4990       Size:256        Owner:0x1ab0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4a90       Size:256        Owner:0x1ab2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4b90       Size:256        Owner:0x1ab4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4c90       Size:256        Owner:0x1ab6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4d90       Size:256        Owner:0x1ab8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4e90       Size:256        Owner:0x1aba\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4f90       Size:256        Owner:0x1abc\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5090       Size:256        Owner:0x1abe\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5190       Size:256        Owner:0x1ac0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5290       Size:256        Owner:0x1ac2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5390       Size:256        Owner:0x1ac4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5490       Size:256        Owner:0x1ac6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5590       Size:256        Owner:0x1ac8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5690       Size:256        Owner:0x1aca\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5790       Size:256        Owner:0x1acc\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5890       Size:256        Owner:0x1ace\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5990       Size:256        Owner:0x1ad0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5a90       Size:256        Owner:0x1ad2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5b90       Size:256        Owner:0x1ad4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5c90       Size:256        Owner:0x1ad6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5d90       Size:256        Owner:0x1ad8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5e90       Size:256        Owner:0x1ada\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5f90       Size:256        Owner:0x1adc\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6090       Size:256        Owner:0x1ade\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6190       Size:256        Owner:0x1ae0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6290       Size:256        Owner:0x1ae2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6390       Size:256        Owner:0x1ae4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6490       Size:256        Owner:0x1ae6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6590       Size:256        Owner:0x1ae8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6690       Size:256        Owner:0x1aea\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6790       Size:256        Owner:0x1aec\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6890       Size:256        Owner:0x1aee\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6990       Size:256        Owner:0x1af0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6a90       Size:256        Owner:0x1af2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6b90       Size:256        Owner:0x1af4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6c90       Size:256        Owner:0x1af6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6d90       Size:256        Owner:0x1af8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6e90       Size:256        Owner:0x1afa\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6f90       Size:256        Owner:0x1afc\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7090       Size:256        Owner:0x1afe\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7190       Size:256        Owner:0x1b00\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7290       Size:256        Owner:0x1b02\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7390       Size:256        Owner:0x1b04\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7490       Size:256        Owner:0x1b06\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7590       Size:256        Owner:0x1b08\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7690       Size:256        Owner:0x1b0a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7790       Size:256        Owner:0x1b0c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7890       Size:256        Owner:0x1b0e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7990       Size:256        Owner:0x1b10\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7a90       Size:256        Owner:0x1b12\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7b90       Size:256        Owner:0x1b14\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7c90       Size:256        Owner:0x1b16\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7d90       Size:256        Owner:0x1b18\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7e90       Size:256        Owner:0x1b1a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7f90       Size:256        Owner:0x1b1c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8090       Size:256        Owner:0x1b1e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8190       Size:256        Owner:0x1b20\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8290       Size:256        Owner:0x1b22\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8390       Size:256        Owner:0x1b24\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8490       Size:256        Owner:0x1b26\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8590       Size:256        Owner:0x1b28\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8690       Size:256        Owner:0x1b2a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8790       Size:256        Owner:0x1b2c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8890       Size:256        Owner:0x1b2e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8990       Size:256        Owner:0x1b30\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8a90       Size:256        Owner:0x1b32\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8b90       Size:256        Owner:0x1b34\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8c90       Size:401        Owner:0x1a4c\r
+\e[44;34m++++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:b790       Size:18543      Owner:0x0\r
+\e[41;31m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m
\ No newline at end of file
diff --git a/HEAP.16W b/HEAP.16W
new file mode 100755 (executable)
index 0000000..8e94789
--- /dev/null
+++ b/HEAP.16W
@@ -0,0 +1,69 @@
+\r
+       == default ==\r
+\r
+  FREE block at 278e0016 of size 68\r
+  USED block at 278e005a of size 50\r
+  USED block at 278e008c of size 50\r
+  USED block at 278e00be of size 50\r
+  USED block at 278e00f0 of size 50\r
+  USED block at 278e0122 of size 50\r
+  USED block at 278e0154 of size 50\r
+  USED block at 278e0186 of size 50\r
+  USED block at 278e01b8 of size 50\r
+  USED block at 278e01ea of size 50\r
+  USED block at 278e021c of size 50\r
+  USED block at 278e024e of size 50\r
+  USED block at 278e0280 of size 50\r
+  FREE block at 278e02b2 of size 14\r
+  USED block at 278e02c0 of size 20\r
+  USED block at 278e02d4 of size 136\r
+  FREE block at 278e035c of size 7328\r
+OK - end of heap\r
+\r
+       == near ==\r
+\r
+  USED block at 178deeb6 of size 12\r
+  USED block at 178deec2 of size 330\r
+  USED block at 178df00c of size 52\r
+  USED block at 178df040 of size 20\r
+  USED block at 178df054 of size 20\r
+  USED block at 178df068 of size 20\r
+  USED block at 178df07c of size 20\r
+  USED block at 178df090 of size 20\r
+  USED block at 178df0a4 of size 3928\r
+OK - end of heap\r
+\r
+       == far ==\r
+\r
+  USED block at 278e0016 of size 68\r
+  USED block at 278e005a of size 50\r
+  USED block at 278e008c of size 50\r
+  USED block at 278e00be of size 50\r
+  USED block at 278e00f0 of size 50\r
+  USED block at 278e0122 of size 50\r
+  USED block at 278e0154 of size 50\r
+  USED block at 278e0186 of size 50\r
+  USED block at 278e01b8 of size 50\r
+  USED block at 278e01ea of size 50\r
+  USED block at 278e021c of size 50\r
+  USED block at 278e024e of size 50\r
+  USED block at 278e0280 of size 50\r
+  USED block at 278e02b2 of size 14\r
+  USED block at 278e02c0 of size 20\r
+  USED block at 278e02d4 of size 136\r
+  USED block at 278e035c of size 7328\r
+OK - end of heap\r
+\r
+Memory Type         Total      Used       Free\r
+----------------  --------   --------   --------\r
+Default                   8166         756       7410\r
+Near              4422         494       3928\r
+Far               8166         756       7410\r
+----------------  --------   --------   --------\r
+coreleft = 3926\r
+farcoreleft = 35742\r
+GetFreeSize = 31836\r
+GetNearFreeSize = 3928\r
+GetFarFreeSize = 31836\r
+memavl = 3926\r
+stackavail = 31541\r
diff --git a/MMDUMP.16W b/MMDUMP.16W
new file mode 100755 (executable)
index 0000000..1fa8582
Binary files /dev/null and b/MMDUMP.16W differ
index cc4197965e7f6b4fff1cfefeb166ab4975212051..6f5b49cd5216cceab25a074fe05a53d6daf7ce44 100755 (executable)
@@ -69,13 +69,13 @@ void EN_initentity(entity_t *enti, video_t *video)
 void EN_initplayer(player_t *player, word pn, video_t *video)\r
 {\r
        EN_initentity(&player[pn].enti, video);\r
-       player[pn].enti.spri->x = player[0].enti.x-4;\r
-       player[pn].enti.spri->y = player[0].enti.y-16;\r
+       player[pn].enti.spri.x = player[0].enti.x-4;\r
+       player[pn].enti.spri.y = player[0].enti.y-16;\r
        player[pn].walktype=0;\r
        player[pn].enti.dire=30;\r
        vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = video->page[0].stridew;//skewing bug\r
 \r
-       video->sprifilei =      set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire);\r
+       video->sprifilei =      set_anim_by_id(&player[pn].enti.spri, player[pn].enti.dire);\r
        animate_spri(&player[pn].enti, video);\r
 \r
        //print_anim_ids(player[0].enti.spri);\r
index 7f46743e44644c2f9fb9d722358f8b72c9f6620b..2dadb9715633385d1db7503e3f721956fdad2046 100755 (executable)
@@ -52,7 +52,7 @@ char *remove_ext (char* mystr, char dot, char sep) {
 \r
        if (mystr == NULL)\r
                return NULL;\r
-       if ((retstr = malloc (strlen (mystr) + 1)) == NULL)\r
+       if ((retstr = malloc(strlen (mystr) + 1)) == NULL)\r
                return NULL;\r
 \r
        // Make a copy and find the relevant characters.\r
@@ -80,7 +80,7 @@ char *remove_ext (char* mystr, char dot, char sep) {
        }\r
 \r
        // Return the modified string.\r
-\r
+       free(mystr);\r
        return retstr;\r
 }\r
 \r
index 3b1d7d72ae05908ff8341ea63afe715128c6d59f..931afe435553116819dcd7682dc26ba1cfaf992f 100755 (executable)
@@ -88,7 +88,7 @@ void extract_map(const char *js, jsmntok_t *t, size_t count, map_t *map) {
 #ifdef DEBUG_MAPDATA\r
                                        printf("objects detected\n");\r
 #endif\r
-//                                     map->layerdata[k].layername = malloc(sizeof(byte) * MAPLNAMESIZE);//TODO: USE MM_ CA_ AND PM_\r
+//                                     map->layerdata[k].layername = mAlloc(sizeof(byte) * MAPLNAMESIZE);//TODO: USE MM_ CA_ AND PM_\r
 //                                     strncpy(map->layerdata[k].layername, js+t[i+1].start, MAPLNAMESIZE);//TODO: USE MM_ CA_ AND PM_\r
 //                                     if(map->layerdata[k].layername[MAPLNAMESIZE]!=0) map->layerdata[k].layername[MAPLNAMESIZE]='\0';\r
                                }else if(jsoneq(js, &(t[i]), "name") == 0) {\r
index 5029636edda5e92d209d07cc032060b90218fd69..f4c795371490c4eef4fdb2d2b5ecef499575f549 100755 (executable)
@@ -103,8 +103,8 @@ void animate_spri(entity_t *enti, video_t *video)
        int x,y,rx,ry,w,h;\r
        VGA_RAM_PTR omemptr = (VGA_RAM_PTR)video->page[0].data;// save original mem ptr\r
 \r
-       x=enti->spri->x;\r
-       y=enti->spri->y;\r
+       x=enti->spri.x;\r
+       y=enti->spri.y;\r
        VL_Initofs(video);\r
 \r
        // Depending on delay, update indices\r
@@ -119,7 +119,7 @@ void animate_spri(entity_t *enti, video_t *video)
        vga_wm1_mem_block_copy(copy_ofs,        display_ofs,    vga_state.vga_stride * vga_state.vga_height);\r
        vga_restore_rm0wm0();*/\r
 \r
-       switch(enti->spri->delay)\r
+       switch(enti->spri.delay)\r
        {\r
                // Delay = 0 means that sprite should loop. Nothing to change here\r
                case 0:\r
@@ -128,18 +128,18 @@ void animate_spri(entity_t *enti, video_t *video)
                // Delay = 1 means that on next time unit sprite should be changed\r
                case 1:\r
                        INC_PER_FRAME\r
-                       enti->spri->curr_anim_spri++;\r
+                       enti->spri.curr_anim_spri++;\r
 \r
                        // If we hit the end of an animation sequence, restart it\r
-                       if(!(   enti->spri->curr_spri_id = enti->spri->curr_anim_list[enti->spri->curr_anim_spri].sprite_id)){\r
-                               enti->spri->curr_anim_spri = 0;\r
-                               enti->spri->curr_spri_id = enti->spri->curr_anim_list[enti->spri->curr_anim_spri].sprite_id;\r
+                       if(!(   enti->spri.curr_spri_id = enti->spri.curr_anim_list[enti->spri.curr_anim_spri].sprite_id)){\r
+                               enti->spri.curr_anim_spri = 0;\r
+                               enti->spri.curr_spri_id = enti->spri.curr_anim_list[enti->spri.curr_anim_spri].sprite_id;\r
                        }\r
-                       enti->spri->delay = enti->spri->curr_anim_list[enti->spri->curr_anim_spri].delay;\r
+                       enti->spri.delay = enti->spri.curr_anim_list[enti->spri.curr_anim_spri].delay;\r
 \r
                // Delay > 1 means that we should not change sprite yet. Decrease delay\r
                default:\r
-                       enti->spri->delay--;\r
+                       enti->spri.delay--;\r
                break;\r
        }\r
 \r
@@ -148,7 +148,7 @@ void animate_spri(entity_t *enti, video_t *video)
 \r
 \r
        // Draw sprite\r
-       j = get_vrl_by_id(enti->spri->spritesheet, enti->spri->curr_spri_id, enti->spri->sprite_vrl_cont);\r
+       j = get_vrl_by_id(enti->spri.spritesheet, enti->spri.curr_spri_id, enti->spri.sprite_vrl_cont);\r
        if(j < 0)\r
        {\r
                //Quit (gv, "Error retriving required sprite");\r
@@ -162,8 +162,8 @@ void animate_spri(entity_t *enti, video_t *video)
                        else rx = -(video->page[0].dx);\r
                if (y >= enti->overdrawh) ry = (y - enti->overdrawh);\r
                        else ry = -(video->page[0].dy);\r
-               h = enti->spri->sprite_vrl_cont->vrl_header->height + enti->overdrawh + y - ry;\r
-               w = (x + enti->spri->sprite_vrl_cont->vrl_header->width + (enti->overdraww*2) + 3 - rx) & (~3) - enti->overdraww;//round up\r
+               h = enti->spri.sprite_vrl_cont->vrl_header->height + enti->overdrawh + y - ry;\r
+               w = (x + enti->spri.sprite_vrl_cont->vrl_header->width + (enti->overdraww*2) + 3 - rx) & (~3) - enti->overdraww;//round up\r
                if ((rx+w) > video->page[0].width) w = video->page[0].width-rx;\r
                if ((ry+h) > video->page[0].height) h = video->page[0].height-ry;\r
 \r
@@ -190,10 +190,10 @@ void animate_spri(entity_t *enti, video_t *video)
        draw_vrl1_vgax_modex(\r
                x-rx,\r
                y-ry,\r
-               enti->spri->sprite_vrl_cont->vrl_header,\r
-               enti->spri->sprite_vrl_cont->line_offsets,\r
-               enti->spri->sprite_vrl_cont->buffer + sizeof(struct vrl1_vgax_header),\r
-               enti->spri->sprite_vrl_cont->data_size\r
+               enti->spri.sprite_vrl_cont->vrl_header,\r
+               enti->spri.sprite_vrl_cont->line_offsets,\r
+               enti->spri.sprite_vrl_cont->buffer + sizeof(struct vrl1_vgax_header),\r
+               enti->spri.sprite_vrl_cont->data_size\r
        );\r
 #endif\r
        if(!video->rss)\r
index 447bfbf61dbc6e2052c171509da13ce17de313b4..ec92baaa11bc12cf945e62cf6d14b2d758b11b8f 100755 (executable)
@@ -108,11 +108,11 @@ typedef struct {
        byte    *data;                  //TODO: 16_mm and 16_ca must handle this\r
 } mapl_t;      //map layer array type def\r
 \r
-#define MAPLAYERS 3\r
+#define MAP_LAYERS 3\r
 typedef struct {\r
        //long          planestart[3];\r
        //unsigned      planelength[3];\r
-       mapl_t layerdata[MAPLAYERS];    // mapdata for multilayer (map index values for rendering which image on the tile)\r
+       mapl_t layerdata[MAP_LAYERS];   // mapdata for multilayer (map index values for rendering which image on the tile)\r
        tiles_t *tiles;         //TODO: 16_mm and 16_ca must handle this        // tilesets for layers (currently ony 4 can be loaded wwww)\r
        int width, height;              //this has to be signed!\r
        byte name[16];\r
@@ -168,7 +168,7 @@ typedef     struct
        word speed;             //entity speed!\r
        word spt;               //speed per tile\r
 #ifdef __WATCOMC__\r
-       sprite_t *spri; // sprite used by entity\r
+       sprite_t spri; // sprite used by entity\r
 #endif\r
        sword hp; //hitpoints of the entity\r
        nibble overdraww, overdrawh;    // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks.\r
index d113825e951eafc315d56b8f4134a7a3e2af5095..b1b03a21f60874ff59d21792f43222017c894c5b 100755 (executable)
@@ -26,7 +26,6 @@
 #define MODEX16_H\r
 \r
 #include "src/lib/16_head.h"\r
-#include "src/lib/bitmap.h"\r
 //#include "src/lib/planar.h"\r
 //#include "src/lib/modex16/16planar.h"\r
 #include "src/lib/16text.h"\r
index 0b3fc8f5bf78b6c487a8c67dc3f8895f8a8c7060..f77c7e3c5427467d7d631880120e77d9d42ac534 100755 (executable)
@@ -74,8 +74,8 @@ void VRS_OpenVRS(char *filename, entity_t *enti, boolean rlsw, global_game_varia
        }\r
        vrs.vrl_line_offsets = vrl_line_offsets;\r
 \r
-       enti->spri->spritesheet = &vrs;\r
-       enti->spri->sprite_vrl_cont = malloc(sizeof(struct vrl_container));\r
+       enti->spri.spritesheet = &vrs;\r
+       enti->spri.sprite_vrl_cont = malloc(sizeof(struct vrl_container));\r
 }\r
 \r
 // Read .vrs file into far memory\r
index fdd675a151530682cdeb48fdcfed6ea5563a9535..b4523474b50547d84b693ebc3ebc0e88d6cdd997 100755 (executable)
@@ -693,7 +693,7 @@ void shinku(global_game_variables_t *gv)
         // NTS: For some bizarre reason, gv->pee is not initialized, but the pointer is not NULL even\r
         //      though it should be. Instead it's NULL as a neAr pointer but contains a non-null\r
         //      segment value, so testing against NULL doesn't work. It is initialized properly if\r
-        //      you call start_timer() though which uses neAr malloc. Rather than fight with that,\r
+        //      you call start_timer() though which uses neAr mAlloc. Rather than fight with that,\r
         //      I decided it would be better to declare a temp buffer statically and sprintf to that.\r
         //\r
         //      This fixes *** Null pointer assignment detected error message in ZCROLL.EXE on exit.\r
@@ -794,13 +794,13 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn)
        }\r
        player[pn].enti.dire+=dd;\r
        //setting xy position\r
-       player[pn].enti.spri->x = x;\r
-       player[pn].enti.spri->y = y;\r
+       player[pn].enti.spri.x = x;\r
+       player[pn].enti.spri.y = y;\r
 \r
        if((player[pn].enti.q==1 && player[pn].enti.pred != player[pn].enti.d) || !dd)//when dir changed OR when player change face direction\r
        {\r
                //0000printf("  q=%u    pred=%u d=%u    dd=%u\n", player[pn].enti.q, player[pn].enti.pred, player[pn].enti.d, dd);\r
-               set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire); //pip->video->sprifilei = set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire);       if(pip->video->sprifilei == -1){ printf("ERROR! %u\n", player[pn].enti.dire); return; }\r
+               set_anim_by_id(&player[pn].enti.spri, player[pn].enti.dire); //pip->video->sprifilei = set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire);      if(pip->video->sprifilei == -1){ printf("ERROR! %u\n", player[pn].enti.dire); return; }\r
                player[pn].enti.pred = player[pn].enti.d;\r
                if(!dd)//changed direction while NOT moving!\r
                {\r
index a749d7f943368d6e4f75fa7c1b7c19515d4633ba..cb92ce4a7a8192160d0978d0230ad2a65381bd04 100755 (executable)
@@ -28,7 +28,6 @@
 #include "src/lib/bakapee.h"\r
 #include "src/lib/16_vl.h"\r
 #include "src/lib/16_in.h"\r
-#include "src/lib/bitmap.h"\r
 #include "src/lib/16_map.h" //map is loaded here www\r
 #include "src/lib/16render.h"\r
 //#include "src/lib/16_map.h"  //new map stuff\r
@@ -83,7 +82,7 @@
        printf("player vars:\n");\\r
        printf("        xy: %dx%d", player[0].enti.x, player[0].enti.y); printf("       txy: %dx%d", player[0].enti.tx, player[0].enti.ty); printf("    triggxy: %dx%d", player[0].enti.triggerx, player[0].enti.triggery); printf("    value: %d\n", mv[1].map->layerdata[0].data[(player[0].enti.triggerx-1)+(map.width*(player[0].enti.triggery-1))]);\\r
        printf("        hp: %d", (player[0].enti.hp));  printf("        q: %u", player[0].enti.q);      printf("        info.dir: %u", player[0].info.dir);     printf("        d: %u", player[0].enti.d);      printf("        dire: %u", player[0].enti.dire);\\r
-               printf("        pdir: %u\n", player[0].pdir); printf("  delay=%u", player[0].enti.spri->delay);\\r
+               printf("        pdir: %u\n", player[0].pdir); printf("  delay=%u", player[0].enti.spri.delay);\\r
 printf("\n\n");\\r
        VL_PrintmodexmemInfo(&gvar.video);\\r
 \\r
index e1cf3691c634486a40d47248bd26d19c112774b1..a605a8efef4551a2c1da94daabe2120c9dc1a939 100755 (executable)
@@ -61,7 +61,7 @@ main(int argc, char *argv[])
        getch();\r
 #ifdef DUMP_MAP\r
        //if(map.width*map.height != 1200)\r
-       for(k=0;k<MAPLAYERS;k++)\r
+       for(k=0;k<MAP_LAYERS;k++)\r
        {\r
                printf("maplayer: %u\n[\n", k);\r
                for(i=0; i<(map.width*map.height); i++)\r
index 1037b7c92c43b1be25891adc9e3f8cf00cd0b625..15d69d7b7da6feba898ddb4b173e409d3ea65493 100755 (executable)
@@ -91,16 +91,16 @@ void main()
 //     read_vrs(&gvar, "data/spri/chikyuu.vrs", &vrs);\r
 \r
 \r
-       enti.spri->spritesheet = &vrs;\r
-       enti.spri->sprite_vrl_cont = malloc(sizeof(struct vrl_container));*/\r
+       enti.spri.spritesheet = &vrs;\r
+       enti.spri.sprite_vrl_cont = malloc(sizeof(struct vrl_container));*/\r
        VRS_LoadVRS("data/spri/chikyuu.vrs", &enti, &gvar);\r
-       i = set_anim_by_id((enti.spri), 31);\r
+       i = set_anim_by_id(&(enti.spri), 31);\r
        if (i == -1)\r
        {\r
                //Quit(&gvar, "ERROR!! glitch IN FILE!\n");\r
        }\r
-       enti.spri->x = TILEWH-4;\r
-       enti.spri->y = TILEWH;\r
+       enti.spri.x = TILEWH-4;\r
+       enti.spri.y = TILEWH;\r
 \r
 //     Uncomment to see broken sprites\r
 /*     sega = mm.bufferseg;\r
@@ -124,11 +124,11 @@ void main()
        //modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].width, gvar.video.page[0].height, 2);\r
        VL_LoadPalFile("data/spri/chikyuu.pal", &gvar.video.palette);\r
        for (i = 0; i < 10; i++){\r
-               enti.spri->delay = 1;\r
+               enti.spri.delay = 1;\r
 \r
-               if(i==5) set_anim_by_id(enti.spri, 21);\r
+               if(i==5) set_anim_by_id(&enti.spri, 21);\r
 \r
-               animate_spri(&enti, &gvar.video);// enti.spri->x += 16;\r
+               animate_spri(&enti, &gvar.video);// enti.spri.x += 16;\r
                delay(500);\r
        }\r
 \r
@@ -154,10 +154,10 @@ void main()
        MM_DumpData(&gvar);\r
        MM_Report_(&gvar);\r
        Shutdown16(&gvar);\r
-       free(enti.spri->sprite_vrl_cont);\r
-       free(enti.spri->spritesheet->vrl_line_offsets);\r
+       free(enti.spri.sprite_vrl_cont);\r
+       free(enti.spri.spritesheet->vrl_line_offsets);\r
        MM_FreePtr(&bigbuffer, &gvar);\r
-       //MM_FreePtr(&((void __based(sega)*)enti.spri->spritesheet->buffer), &mm);\r
+       //MM_FreePtr(&((void __based(sega)*)enti.spri.spritesheet->buffer), &mm);\r
        //printf("CPU to VGA: %f\n", t1);\r
        //printf("VGA to VGA: %f\n", t2);\r
        heapdump(&gvar);\r
index 6d38a789d041327531d045d90788873c83e29062..af771fb75bb0d0d37481db62e7855af04d215160 100755 (executable)
@@ -74,9 +74,8 @@ void main(int argc, char *argv[])
 \r
        // OK, this one takes hellova time and needs to be done in farmalloc or MM_...\r
        //IN CA i think you use CAL_SetupGrFile but i do think we should work together on this part --sparky4\r
-       //player[0].ent = malloc(sizeof(entity_t));\r
-       player[0].enti.spri = malloc(sizeof(struct sprite));\r
-       player[0].enti.spri->spritesheet = malloc(sizeof(struct vrs_container));\r
+       //player[0].enti.spri = malloc(sizeof(struct sprite));\r
+       player[0].enti.spri.spritesheet = malloc(sizeof(struct vrs_container));\r
 \r
        // create the map\r
 //     fprintf(stderr, "testing map load~      ");\r