+++ /dev/null
-\e[0mSeg:0 Size:4897 Owner:0x0\r
-\e[41;31m++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:1321 Size:256 Owner:0x993\r
-\e[44;34m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1421 Size:256 Owner:0x798\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1521 Size:256 Owner:0x79a\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1621 Size:256 Owner:0x79c\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1721 Size:256 Owner:0x79e\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1821 Size:256 Owner:0x7a0\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1921 Size:256 Owner:0x7a2\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1a21 Size:256 Owner:0x7a4\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1b21 Size:256 Owner:0x7a6\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1c21 Size:256 Owner:0x7a8\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1d21 Size:256 Owner:0x7aa\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1e21 Size:256 Owner:0x7ac\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:1f21 Size:256 Owner:0x7ae\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2021 Size:256 Owner:0x7b0\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2121 Size:256 Owner:0x7b2\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2221 Size:256 Owner:0x7b4\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2321 Size:256 Owner:0x7b6\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2421 Size:256 Owner:0x7b8\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2521 Size:256 Owner:0x7ba\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2621 Size:256 Owner:0x7bc\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2721 Size:256 Owner:0x7be\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2821 Size:256 Owner:0x7c0\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2921 Size:256 Owner:0x7c2\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2a21 Size:256 Owner:0x7c4\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2b21 Size:256 Owner:0x7c6\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2c21 Size:256 Owner:0x7c8\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2d21 Size:256 Owner:0x7ca\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2e21 Size:256 Owner:0x7cc\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2f21 Size:256 Owner:0x7ce\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3021 Size:256 Owner:0x7d0\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3121 Size:256 Owner:0x7d2\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3221 Size:256 Owner:0x7d4\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3321 Size:256 Owner:0x7d6\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3421 Size:256 Owner:0x7d8\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3521 Size:256 Owner:0x7da\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3621 Size:256 Owner:0x7dc\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3721 Size:256 Owner:0x7de\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3821 Size:256 Owner:0x7e0\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3921 Size:256 Owner:0x7e2\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3a21 Size:256 Owner:0x7e4\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3b21 Size:256 Owner:0x7e6\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3c21 Size:256 Owner:0x7e8\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3d21 Size:256 Owner:0x7ea\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3e21 Size:256 Owner:0x7ec\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3f21 Size:256 Owner:0x7ee\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4021 Size:256 Owner:0x7f0\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4121 Size:256 Owner:0x7f2\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4221 Size:256 Owner:0x7f4\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4321 Size:256 Owner:0x7f6\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4421 Size:256 Owner:0x7f8\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4521 Size:256 Owner:0x7fa\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4621 Size:256 Owner:0x7fc\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4721 Size:256 Owner:0x7fe\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4821 Size:256 Owner:0x800\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4921 Size:256 Owner:0x802\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4a21 Size:256 Owner:0x804\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4b21 Size:256 Owner:0x806\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4c21 Size:256 Owner:0x808\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4d21 Size:256 Owner:0x80a\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4e21 Size:256 Owner:0x80c\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4f21 Size:256 Owner:0x80e\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5021 Size:256 Owner:0x810\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5121 Size:256 Owner:0x812\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5221 Size:256 Owner:0x814\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5321 Size:256 Owner:0x816\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5421 Size:256 Owner:0x818\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5521 Size:256 Owner:0x81a\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5621 Size:256 Owner:0x81c\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5721 Size:256 Owner:0x81e\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5821 Size:256 Owner:0x820\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5921 Size:256 Owner:0x822\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5a21 Size:256 Owner:0x824\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5b21 Size:256 Owner:0x826\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5c21 Size:256 Owner:0x828\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5d21 Size:256 Owner:0x82a\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5e21 Size:256 Owner:0x82c\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5f21 Size:256 Owner:0x82e\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6021 Size:256 Owner:0x830\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6121 Size:256 Owner:0x832\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6221 Size:256 Owner:0x834\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6321 Size:256 Owner:0x836\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6421 Size:256 Owner:0x838\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6521 Size:256 Owner:0x83a\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6621 Size:256 Owner:0x83c\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6721 Size:256 Owner:0x83e\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6821 Size:256 Owner:0x840\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6921 Size:256 Owner:0x842\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6a21 Size:256 Owner:0x844\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6b21 Size:256 Owner:0x846\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6c21 Size:256 Owner:0x848\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6d21 Size:256 Owner:0x84a\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6e21 Size:256 Owner:0x84c\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6f21 Size:256 Owner:0x84e\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7021 Size:256 Owner:0x850\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7121 Size:256 Owner:0x852\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7221 Size:256 Owner:0x854\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7321 Size:256 Owner:0x856\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7421 Size:256 Owner:0x858\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7521 Size:256 Owner:0x85a\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7621 Size:256 Owner:0x85c\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7721 Size:256 Owner:0x85e\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7821 Size:273 Owner:0xfde\r
-\e[44;34m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:9fde Size:32802 Owner:0x0\r
-\e[41;31m\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:9ffe Size:24577 Owner:0x0\r
-\e[41;31m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m
\ No newline at end of file
--- /dev/null
+@echo off\r
+iff exist %* then\r
+ del %*\r
+endiff\r
+setlocal\r
+set url="beta.latech.edu/~wwc001/16"\r
+rem for %@eval[%#+1] in (%*) do (\r
+rem for %# in (1,1,%*) do (\r
+:loop\r
+ set /a o=0\r
+:oooo\r
+ set /a q=%@EVAL[%@LEN[%1] - 4]\r
+ set w=%@INSTR[0,%q,%1]\r
+ iff NOT "%w" == "" then\r
+ set /a o=%o+1\r
+ set y=%w.z%o\r
+rem echo y=%y\r
+ if %o lt 100 (\r
+ if %o lt 10 (\r
+ set z=00%o\r
+ ) else (\r
+ set z=0%o\r
+ ) endif\r
+ ) else if %o gt 99 (\r
+ set z=%o\r
+ ) endif\r
+\r
+ htget http://%url/%1.zip.%z > %y\r
+rem pause\r
+ iff NOT "%@FILESIZE[%y,b]" == "0" then\r
+ type %y >> %w.zip\r
+ iff "%@FILESIZE[%y,b]" == "65536" then\r
+rem echo o=%o\r
+ goto oooo\r
+ endiff\r
+ iff NOT "%#" == "0" then\r
+ shift /1\r
+ iff exist %w.zip then\r
+ unzip %w.zip\r
+ del %w.z*\r
+ endiff\r
+ goto loop\r
+ else\r
+ del %#\r
+ endiff\r
+ else\r
+ del %y\r
+ echo Error null zip file wwww\r
+ endiff\r
+ else\r
+ rem del %y.z*\r
+ rem need to add a cleaner wwww\r
+ echo done~ wwww\r
+ endiff\r
+rem echo y="%y"\r
+rem echo q=%q\r
+rem echo o=%o\r
+rem echo w=%w\r
+rem echo %%1=%1\r
+endlocal\r
DOSLIB_MEMMODE=dos86$(MEMORYMODE)
# remote host (for sparky4)
-HOSTUSER=sparky4#wwc001
-HOSTADDR=4ch.mooo.com#beta.latech.edu
-HOSTDIR=/var/www/#~/public_html/
+HOSTUSER=sparky4
+HOSTADDR=4ch.mooo.com
+HOSTDIR=/var/www/
#ssh port
HOSTPORT=26
+# 2nd remote host (for sparky4)
+HOST2USER=wwc001
+HOST2ADDR=beta.latech.edu
+HOST2DIR=~/public_html/
+#ssh port
+HOST2PORT=22
#
# quiet flags
wwwext: .symbolic
####----@ssh -p $(HOSTPORT) $(HOSTUSER)@$(HOSTADDR) 'rm -f $(HOSTDIR)/16/*exe*'
+ #4ch.mooo.com
@scp -r -P $(HOSTPORT) *.exe $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/
@scp -r -P $(HOSTPORT) *get.bat $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/
@scp -r -P $(HOSTPORT) /var/www/*.exe.zip.* $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/
+ #beta.latech.edu
+ @scp -r -P $(HOST2PORT) *.exe $(HOST2USER)@$(HOST2ADDR):$(HOST2DIR)/16/
+ @scp -r -P $(HOST2PORT) *get.bat $(HOST2USER)@$(HOST2ADDR):$(HOST2DIR)/16/
+ @scp -r -P $(HOST2PORT) /var/www/*.exe.zip.* $(HOST2USER)@$(HOST2ADDR):$(HOST2DIR)/16/
getwww: .symbolic
*x4get.bat $(EXEC)
-grep -iR "$1" src/*
+grep -i "$1" src/*
+grep -i "$1" src/lib/*
map_view_t mv[4];\r
pan_t pan;\r
\r
+map_t map;//junk var\r
+\r
int main(int argc,char **argv)\r
{\r
static global_game_variables_t gvar;\r
vrl1_vgax_offset_t *vrl_lineoffs;\r
unsigned char *buffer;\r
unsigned int bufsz;\r
- int fd, i;\r
+ int fd;\r
char *bakapee1,*bakapee2;\r
\r
boolean anim=1,noanim=0;\r
\r
/* setup camera and screen~ */\r
modexHiganbanaPageSetup(&gvar.video);\r
+ modexMVSetup(&mv, &map, &pan, &gvar);\r
modexShowPage(&(gvar.video.page[pan.pn]));\r
- for(i=0;i<gvar.video.num_of_pages;i++)\r
- {\r
- mv[i].page = &gvar.video.page[i];\r
- mv[i].video = &gvar.video;\r
- mv[i].pan = &pan;\r
- mv[i].tx = INITTNUM;\r
- mv[i].ty = INITTNUM;\r
- }\r
//player[0].tx = INITTNUM; player[0].ty = INITTNUM;\r
//mapinitmapview(mv, player[0].tx, player[0].tx);\r
\r
#ifdef __DEBUG_InputMgr__\r
boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0,dbg_notest=0;\r
#endif\r
+#ifdef __DEBUG_MAP__\r
+boolean dbg_maptext=0;\r
+byte *dbg_mapdata;\r
+#endif\r
#endif\r
\r
\r
\r
#define __DEBUG__\r
#define __DEBUG_InputMgr__\r
+#define __DEBUG_MAP__\r
//#define __DEBUG_PM__\r
//#define __DEBUG_MM__\r
\r
#ifdef __DEBUG_InputMgr__\r
extern boolean dbg_testkeyin,dbg_testcontrolnoisy,dbg_notest;\r
#endif\r
+#ifdef __DEBUG_MAP__\r
+extern boolean dbg_maptext;\r
+extern byte *dbg_mapdata;\r
+#endif\r
#endif\r
\r
# ifdef DEBUGSERIAL\r
map->tiles->tileWidth = 16;\r
map->tiles->rows = 1;\r
map->tiles->cols = 1;\r
- map->tiles->debug_text=false;\r
+#ifdef __DEBUG_MAP__\r
+ dbg_maptext=false;\r
+#endif\r
strcpy(js_sv, "data");//strdup(js+t->start);//, t->end - t->start);\r
}\r
else\r
map->layertile[k]->tileWidth = 16;\r
map->layertile[k]->rows = 1;\r
map->layertile[k]->cols = 1;\r
- map->layertile[k]->debug_text=false;\r
+#ifdef __DEBUG_MAP__\r
+ dbg_maptext=false;\r
+#endif\r
//Fix to load tileset specified.\r
//And move to vrs, probably\r
//bp = bitmapLoadPcx("data/ed.pcx");\r
#define _16_MAP__H_\r
\r
#include "src/lib/16_head.h"\r
+#include "src/lib/16_tdef.h"\r
#include "src/lib/jsmn/jsmn.h"\r
//#include "stdio.h" included in 16_head.h\r
//#include "stdlib.h" included in 16_head.h\r
#include "src/lib/16_vl.h"\r
#include "src/lib/16_ca.h"\r
#include "src/lib/16_mm.h"\r
+#include "src/lib/16_pm.h"\r
\r
//#define DEBUG_MAPDATA\r
//#define DEBUG_MAPVAR\r
//#define DEBUG_DUMPVARS\r
//#define DEBUG_JS\r
\r
-//TODO: 16_mm and 16_ca must handle this\r
-typedef struct {\r
- bitmap_t far *btdata; //old\r
- planar_buf_t far *data; //old\r
- word tileHeight, tileWidth;\r
- unsigned int rows, cols;\r
- #ifdef __DEBUG__\r
- boolean debug_text; //show the value of the tile! wwww\r
- byte *debug_data;\r
- #endif\r
-} tiles_t;\r
-\r
-//TODO: 16_mm and 16_ca must handle this\r
-//TODO: add variables from 16_ca\r
-typedef struct {\r
- //long planestart[3];\r
- //unsigned planelength[3];\r
- byte *data; //TODO: 16_mm and 16_ca must handle this\r
- byte * far *layerdata; //TODO: 16_mm and 16_ca must handle this\r
- tiles_t *tiles; //TODO: 16_mm and 16_ca must handle this\r
- tiles_t * far *layertile; //TODO: 16_mm and 16_ca must handle this\r
- int width, height; //this has to be signed!\r
- char name[16];\r
-} map_t;\r
+//typedefs moved to 16_tdef.h\r
\r
int jsoneq(const char *json, jsmntok_t *tok, const char *s);\r
word dump(const char *js, jsmntok_t *t, size_t count, word indent, char *js_sv, map_t *map, dword q);\r
} tileset_t;\r
\r
typedef struct {\r
- byte far *plane[4]; /* 4 planes of image data */\r
- word width; /* width of the image (spread across 4 planes) */\r
- word height; /* height of the image (spread across 4 planes) */\r
- word pwidth; /* the number of bytes in each plane */\r
+ byte far *plane[4]; // 4 planes of image data\r
+ word width; // width of the image (spread across 4 planes)\r
+ word height; // height of the image (spread across 4 planes)\r
+ word pwidth; // the number of bytes in each plane\r
byte *palette;\r
} planar_buf_t;\r
\r
+//TODO: 16_mm and 16_ca must handle this\r
+typedef struct {\r
+ bitmap_t far *btdata; //old\r
+ planar_buf_t far *data; //old\r
+ word tileHeight, tileWidth;\r
+ unsigned int rows, cols;\r
+// #ifdef __DEBUG__\r
+// boolean debug_text; //show the value of the tile! wwww\r
+// byte *debug_data;\r
+// #endif\r
+} tiles_t;\r
+\r
+//TODO: 16_mm and 16_ca must handle this\r
+//TODO: add variables from 16_ca\r
+typedef struct {\r
+ //long planestart[3];\r
+ //unsigned planelength[3];\r
+ byte *data; //TODO: 16_mm and 16_ca must handle this\r
+ byte * far *layerdata; //TODO: 16_mm and 16_ca must handle this\r
+ tiles_t *tiles; //TODO: 16_mm and 16_ca must handle this\r
+ tiles_t * far *layertile; //TODO: 16_mm and 16_ca must handle this\r
+ int width, height; //this has to be signed!\r
+ char name[16];\r
+} map_t;\r
+\r
typedef struct {\r
/*nibble*/word id; /* the Identification number of the page~ For layering~ */\r
byte far* data; /* the data for the page */\r
-Subproject commit 0c6774ead605d21c220a3a076faa79b31434a450
+Subproject commit bff76110ad29bd30f6f78efb7ec187c7207822c9
//if (player[pn].d!=2) printf("player[%u].d=%u player[%u].q=%u\n", pn, player[pn].d, pn, player[pn].q);\r
}\r
\r
+/*\r
+ * modex mv setup\r
+*/\r
+void modexMVSetup(map_view_t *mv, map_t *map, pan_t *pan, global_game_variables_t *gv)\r
+{\r
+ word i;\r
+ // 1st page\r
+ mv[0].page = &gv->video.page[0];\r
+ mv[0].map = map;\r
+ mv[0].video = &gv->video;\r
+ mv[0].pan = pan;\r
+\r
+ for(i=1;i<gv->video.num_of_pages;i++)\r
+ {\r
+ mv[i].page = &gv->video.page[i];\r
+ mv[i].map = mv[0].map;\r
+ mv[i].video = mv[0].video;\r
+ mv[i].pan = mv[0].pan;\r
+ }\r
+}\r
+\r
/*map_t\r
allocMap(int w, int h) {\r
map_t result;\r
//fix this to be far~\r
// bp = bitmapLoadPcx("data/ed.pcx");\r
// map->tiles->data = &bp;\r
- map->tiles->debug_data = map->data;\r
+#ifdef __DEBUG_MAP__\r
+ dbg_mapdata = map->data;\r
+#endif\r
map->tiles->tileHeight = 16;\r
map->tiles->tileWidth = 16;\r
map->tiles->rows = 1;\r
map->tiles->cols = 1;\r
- map->tiles->debug_text = true;\r
+#ifdef __DEBUG_MAP__\r
+ dbg_maptext = true;\r
+#endif\r
}\r
- else map->tiles->debug_text = false;\r
+#ifdef __DEBUG_MAP__\r
+ else dbg_maptext = false;\r
+#endif\r
return 0;\r
}\r
\r
rx = (((i-1) % ((t->data->width)/t->tileWidth)) * t->tileWidth);\r
ry = (((i-1) / ((t->data->height)/t->tileHeight)) * t->tileHeight);\r
////0000printf("i=%d\n", i);\r
- switch(t->debug_text)\r
+#ifdef __DEBUG_MAP__\r
+ switch(dbg_maptext)\r
{\r
case 0:\r
+#endif\r
#ifndef TILERENDER\r
- modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((t->debug_data[i])+1));\r
+ modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((dbg_mapdata[i])+1));\r
//modexprint(page, x, y, 1, 15, 0, (char const *)(t->debug_data[i]));\r
#else\r
PBUFBFUN (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));\r
//draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
//modexDrawBmpRegion (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));\r
#endif\r
+#ifdef __DEBUG_MAP__\r
break;\r
case 1:\r
- modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, (t->debug_data[i])+1);\r
+ modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, (dbg_mapdata[i])+1);\r
//modexprintbig(page, x, y, 1, 15, 0, (t->debug_data));\r
/*for(texty=0; texty<2; texty++)\r
{\r
}*/\r
break;\r
}\r
+#endif\r
}\r
}\r
\r
* should have a sprite too. Map is drawn left-to-right, top-to-bottom.\r
*/\r
\r
-typedef struct\r
-{\r
- map_view_t *mv;\r
-} map_view_db_t;\r
-\r
//for null map!\r
#define MAPW 40\r
#define MAPH 30\r
void walk(map_view_t *pip, player_t *player, word pn);\r
void panPageManual(map_view_t *pip, player_t *player, word pn);\r
void panVmemManual(map_view_t *pip, player_t *player, word pn);\r
+void modexMVSetup(map_view_t *mv, map_t *map, pan_t *pan, global_game_variables_t *gv);\r
void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid);\r
void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid);\r
void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid);\r
\r
/* setup camera and screen~ */\r
modexHiganbanaPageSetup(&gvar.video);\r
- for(i=0;i<gvar.video.num_of_pages;i++)\r
- {\r
- mv[i].page = &gvar.video.page[i];\r
- mv[i].map = ↦\r
- mv[i].video = &gvar.video;\r
- mv[i].pan = &pan;\r
- }\r
+ modexMVSetup(&mv, &map, &pan, &gvar);\r
\r
/* set up paging */\r
//TODO: LOAD map data and position the map in the middle of the screen if smaller then screen\r
\r
// setup camera and screen~\r
modexHiganbanaPageSetup(&gvar.video);\r
- for(i=0;i<gvar.video.num_of_pages;i++)\r
- {\r
- mv[i].page = &gvar.video.page[i];\r
- mv[i].map = ↦\r
- mv[i].video = &gvar.video;\r
- mv[i].pan = &pan;\r
- }\r
+ modexMVSetup(&mv, &map, &pan, &gvar);\r
player[0].ent->spri->x = player[0].ent->spri->y = TILEWH;\r
\r
// set up paging\r