]> 4ch.mooo.com Git - 16.git/commitdiff
made a new function modexMVSetup()
authorsparky4 <sparky4@cock.li>
Tue, 10 Jan 2017 17:32:59 +0000 (11:32 -0600)
committersparky4 <sparky4@cock.li>
Tue, 10 Jan 2017 17:32:59 +0000 (11:32 -0600)
21 files changed:
DEBUG.16B [deleted file]
MEMINFO.16B [new file with mode: 0755]
MEMINFO.16W [new file with mode: 0755]
MMDUMP.16B
b4get.bat [new file with mode: 0755]
bcexmm.dsk
bcexmm.exe
bcexmm.prj
makefile
q.sh
src/0.c
src/lib/16_dbg.c
src/lib/16_dbg.h
src/lib/16_map.c
src/lib/16_map.h
src/lib/16_tdef.h
src/lib/doslib
src/lib/scroll16.c
src/lib/scroll16.h
src/scroll.c
src/zcroll.c

diff --git a/DEBUG.16B b/DEBUG.16B
deleted file mode 100755 (executable)
index f30673d..0000000
--- a/DEBUG.16B
+++ /dev/null
@@ -1,210 +0,0 @@
-\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
diff --git a/MEMINFO.16B b/MEMINFO.16B
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/MEMINFO.16W b/MEMINFO.16W
new file mode 100755 (executable)
index 0000000..e69de29
index 451d087ed8a9e199d66b37c7b7cee5dd7d4d7e95..841a51a99e0f7f6efa600cec81728651103e2c3e 100755 (executable)
Binary files a/MMDUMP.16B and b/MMDUMP.16B differ
diff --git a/b4get.bat b/b4get.bat
new file mode 100755 (executable)
index 0000000..c770c63
--- /dev/null
+++ b/b4get.bat
@@ -0,0 +1,60 @@
+@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
index c8d927e3fe1c262b224b4549af444f03470807ee..47bc095d2011f2fda545edf03fb3ab3453cbbec0 100755 (executable)
Binary files a/bcexmm.dsk and b/bcexmm.dsk differ
index 585ca07a74a6ebc81ad7ef6383333f01f32e6974..fcac85558044c20ef0d0b782ef39e9d6bba3bdba 100755 (executable)
Binary files a/bcexmm.exe and b/bcexmm.exe differ
index 72ec764f317f94de0cafa57501cc14ed020e3ccb..82dc00b900c2c09a9e1e6671f804f0edee956c4b 100755 (executable)
Binary files a/bcexmm.prj and b/bcexmm.prj differ
index f97d87fafae72df370080e8612ed299d0d302a35..cad8a5545fad06003d70d52d7dc96564d9dcfe41 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -82,11 +82,17 @@ DOSLIB_JOYSTICK=$(DOSLIBDIR)/hw/joystick
 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
@@ -396,9 +402,14 @@ www: .symbolic
 
 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)
diff --git a/q.sh b/q.sh
index db78af58e0a9cddfe488885d64b163ea626f7d20..db8984def875980365e8e4e81f9240c33dfb776f 100755 (executable)
--- a/q.sh
+++ b/q.sh
@@ -1 +1,2 @@
-grep -iR "$1" src/*
+grep -i "$1" src/*
+grep -i "$1" src/lib/*
diff --git a/src/0.c b/src/0.c
index d6a48249477c1a7223aadd735edc1d97fa7a01be..d7fc2fda8969de24a8f9c6125300a5a1bddce50d 100755 (executable)
--- a/src/0.c
+++ b/src/0.c
@@ -18,6 +18,8 @@ player_t player[MaxPlayers];
 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
@@ -25,7 +27,7 @@ int main(int argc,char **argv)
        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
@@ -99,15 +101,8 @@ int main(int argc,char **argv)
 \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
index d7b14159abb88a89ddd73fd5daa2dc775e6dd605..7ba768df6402d5c3b33dfefb09afdc9b6d529cf2 100755 (executable)
@@ -7,6 +7,10 @@ boolean dbg_debugpm=0;
 #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
index ddec1684015177eebe9f211f442f21a0a9962455..823e727204eb072d0b5130abcb584e9a1e7ef645 100755 (executable)
@@ -7,6 +7,7 @@
 \r
 #define __DEBUG__\r
 #define __DEBUG_InputMgr__\r
+#define __DEBUG_MAP__\r
 //#define __DEBUG_PM__\r
 //#define __DEBUG_MM__\r
 \r
@@ -18,6 +19,10 @@ extern boolean dbg_debugpm;
 #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
index db65158d5ab7c8e1fdc655ea131df51571bd9d42..895e4d68345a24e7f8301fa5e336ae9280f3798a 100755 (executable)
@@ -108,7 +108,9 @@ word dump(const char *js, jsmntok_t *t, size_t count, word indent, char *js_sv,
                        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
@@ -295,7 +297,9 @@ void extract_map(const char *js, jsmntok_t *t, size_t count, map_t *map) {
                                        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
index 103ff76369a2cefec8ebf918320f9bb86eac0860..5cf56c2c0ade0ce15ca97f755570c7d2573c563b 100755 (executable)
 #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
index 152f509dd0315cd8705203a575bb4e3b3c35c7f9..09e86c746bbf640d8e815b8dd77165dea3b7080c 100755 (executable)
@@ -57,13 +57,38 @@ typedef struct {
 } 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
index 0c6774ead605d21c220a3a076faa79b31434a450..bff76110ad29bd30f6f78efb7ec187c7207822c9 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0c6774ead605d21c220a3a076faa79b31434a450
+Subproject commit bff76110ad29bd30f6f78efb7ec187c7207822c9
index f2a16e3d6dffb957f5a73d4e3bcc47164a510493..0901f382ebcaf9bbab4d9c3852571d5d840724d2 100755 (executable)
@@ -333,6 +333,27 @@ void panVmemManual(map_view_t *pip, player_t *player, word pn)
        //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
@@ -640,14 +661,20 @@ sword chkmap(map_t *map, word q)
                //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
@@ -711,11 +738,13 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)
                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
@@ -723,9 +752,10 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)
                                //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
@@ -736,6 +766,7 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y)
                                }*/\r
                        break;\r
                }\r
+#endif\r
        }\r
 }\r
 \r
index a29f1f50eade5f596aeb5f83619d22dd42c68acd..8d79d213bb02579773fa97d831ae47933914b2e1 100755 (executable)
@@ -75,11 +75,6 @@ typedef struct {
  *     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
@@ -128,6 +123,7 @@ extern char global_temp_status_text[512];
 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
index 855ffb091dc2af73cf8a464952ebb787e5515f8f..d3ff0ef2cc1367f780962d0a63da3719b642df6f 100755 (executable)
@@ -125,13 +125,7 @@ void main(int argc, char *argv[])
 \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 = &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
index 0dc84d860f88dc728b431a1d21f731beaeefe5fa..333d027e4b2719a76073e9955ef0913d00d68f45 100755 (executable)
@@ -107,13 +107,7 @@ void main(int argc, char *argv[])
 \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 = &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