]> 4ch.mooo.com Git - 16.git/commitdiff
__seguse.txt added to show _seg usage also OpenVGMFile needs to be ported to 16_snd...
authorsparky4 <sparky4@cock.li>
Mon, 13 Mar 2017 16:00:03 +0000 (11:00 -0500)
committersparky4 <sparky4@cock.li>
Mon, 13 Mar 2017 16:00:03 +0000 (11:00 -0500)
31 files changed:
DEBUG.16W [new file with mode: 0755]
HEAP.16W [new file with mode: 0755]
MMDUMP.16W [new file with mode: 0755]
db.exe [deleted file]
fmemtest.exe [deleted file]
fontgfx.exe [deleted file]
fonttest.exe [deleted file]
joytest.exe [deleted file]
makefile
pcx2vrl [deleted file]
pcxsscut [deleted file]
pcxtest.exe [deleted file]
pcxtest2.exe [deleted file]
scroll.exe [deleted file]
src/0.c
src/16.c
src/lib/16_enti.c
src/lib/16_enti.h
src/lib/16_in.c
src/lib/16_in.h
src/lib/16_tail.h
src/lib/16_tdef.h
src/lib/16_vl.c
src/lib/scroll16.h
src/scroll.c
src/test.c
src/zcroll.c
test0.exe [deleted file]
vrl2vrs [deleted file]
vrsdump [deleted file]
wcpu.exe [deleted file]

diff --git a/DEBUG.16W b/DEBUG.16W
new file mode 100755 (executable)
index 0000000..3a895a4
--- /dev/null
+++ b/DEBUG.16W
@@ -0,0 +1,210 @@
+\e[0mSeg:0      Size:9028       Owner:0x0\r
+\e[41;31m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m\e[42;32m0000\r
+\e[0m\e[0mSeg:2427       Size:39 Owner:0x0\r
+\e[41;31m++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:244e       Size:256        Owner:0x1d50\r
+\e[44;34m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:254e       Size:256        Owner:0x1ba6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:264e       Size:256        Owner:0x1ba8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:274e       Size:256        Owner:0x1baa\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:284e       Size:256        Owner:0x1bac\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:294e       Size:256        Owner:0x1bae\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2a4e       Size:256        Owner:0x1bb0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2b4e       Size:256        Owner:0x1bb2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2c4e       Size:256        Owner:0x1bb4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2d4e       Size:256        Owner:0x1bb6\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2e4e       Size:256        Owner:0x1bb8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2f4e       Size:256        Owner:0x1bba\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:304e       Size:256        Owner:0x1bbc\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:314e       Size:256        Owner:0x1bbe\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:324e       Size:256        Owner:0x1bc0\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:334e       Size:256        Owner:0x1bc2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:344e       Size:256        Owner:0x1bc4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:354e       Size:256        Owner:0x1bc6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:364e       Size:256        Owner:0x1bc8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:374e       Size:256        Owner:0x1bca\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:384e       Size:256        Owner:0x1bcc\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:394e       Size:256        Owner:0x1bce\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3a4e       Size:256        Owner:0x1bd0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3b4e       Size:256        Owner:0x1bd2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3c4e       Size:256        Owner:0x1bd4\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3d4e       Size:256        Owner:0x1bd6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3e4e       Size:256        Owner:0x1bd8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3f4e       Size:256        Owner:0x1bda\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:404e       Size:256        Owner:0x1bdc\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:414e       Size:256        Owner:0x1bde\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:424e       Size:256        Owner:0x1be0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:434e       Size:256        Owner:0x1be2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:444e       Size:256        Owner:0x1be4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:454e       Size:256        Owner:0x1be6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:464e       Size:256        Owner:0x1be8\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:474e       Size:256        Owner:0x1bea\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:484e       Size:256        Owner:0x1bec\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:494e       Size:256        Owner:0x1bee\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4a4e       Size:256        Owner:0x1bf0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4b4e       Size:256        Owner:0x1bf2\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4c4e       Size:256        Owner:0x1bf4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4d4e       Size:256        Owner:0x1bf6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4e4e       Size:256        Owner:0x1bf8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4f4e       Size:256        Owner:0x1bfa\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:504e       Size:256        Owner:0x1bfc\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:514e       Size:256        Owner:0x1bfe\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:524e       Size:256        Owner:0x1c00\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:534e       Size:256        Owner:0x1c02\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:544e       Size:256        Owner:0x1c04\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:554e       Size:256        Owner:0x1c06\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:564e       Size:256        Owner:0x1c08\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:574e       Size:256        Owner:0x1c0a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:584e       Size:256        Owner:0x1c0c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:594e       Size:256        Owner:0x1c0e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5a4e       Size:256        Owner:0x1c10\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5b4e       Size:256        Owner:0x1c12\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5c4e       Size:256        Owner:0x1c14\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5d4e       Size:256        Owner:0x1c16\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5e4e       Size:256        Owner:0x1c18\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5f4e       Size:256        Owner:0x1c1a\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:604e       Size:256        Owner:0x1c1c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:614e       Size:256        Owner:0x1c1e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:624e       Size:256        Owner:0x1c20\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:634e       Size:256        Owner:0x1c22\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:644e       Size:256        Owner:0x1c24\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:654e       Size:256        Owner:0x1c26\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:664e       Size:256        Owner:0x1c28\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:674e       Size:256        Owner:0x1c2a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:684e       Size:256        Owner:0x1c2c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:694e       Size:256        Owner:0x1c2e\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6a4e       Size:256        Owner:0x1c30\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6b4e       Size:256        Owner:0x1c32\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6c4e       Size:256        Owner:0x1c34\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6d4e       Size:256        Owner:0x1c36\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6e4e       Size:256        Owner:0x1c38\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6f4e       Size:256        Owner:0x1c3a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:704e       Size:256        Owner:0x1c3c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:714e       Size:256        Owner:0x1c3e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:724e       Size:256        Owner:0x1c40\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:734e       Size:256        Owner:0x1c42\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:744e       Size:256        Owner:0x1c44\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:754e       Size:256        Owner:0x1c46\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:764e       Size:256        Owner:0x1c48\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:774e       Size:256        Owner:0x1c4a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:784e       Size:256        Owner:0x1c4c\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:794e       Size:256        Owner:0x1c4e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7a4e       Size:256        Owner:0x1c50\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7b4e       Size:256        Owner:0x1c52\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7c4e       Size:256        Owner:0x1c54\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7d4e       Size:256        Owner:0x1c56\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7e4e       Size:256        Owner:0x1c58\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7f4e       Size:256        Owner:0x1c5a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:804e       Size:256        Owner:0x1c5c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:814e       Size:256        Owner:0x1c5e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:824e       Size:256        Owner:0x1c60\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:834e       Size:256        Owner:0x1c62\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:844e       Size:256        Owner:0x1c64\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:854e       Size:256        Owner:0x1c66\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:864e       Size:256        Owner:0x1c68\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:874e       Size:256        Owner:0x1c6a\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:884e       Size:256        Owner:0x1c6c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:894e       Size:273        Owner:0x1b7c\r
+\e[44;34m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:9d8d       Size:25202      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..bcb93b4
--- /dev/null
+++ b/HEAP.16W
@@ -0,0 +1,47 @@
+\r
+       == default ==\r
+\r
+  USED block at 24490016 of size 26\r
+  USED block at 24490030 of size 26\r
+  FREE block at 2449004a of size 38914\r
+  USED block at 2449984c of size 136\r
+  USED block at 244998d4 of size 20\r
+  FREE block at 244998e8 of size 7972\r
+OK - end of heap\r
+\r
+       == near ==\r
+\r
+  USED block at 1448edc6 of size 12\r
+  USED block at 1448edd2 of size 332\r
+  USED block at 1448ef1e of size 52\r
+  USED block at 1448ef52 of size 20\r
+  USED block at 1448ef66 of size 20\r
+  USED block at 1448ef7a of size 20\r
+  USED block at 1448ef8e of size 20\r
+  USED block at 1448efa2 of size 20\r
+  USED block at 1448efb6 of size 4166\r
+OK - end of heap\r
+\r
+       == far ==\r
+\r
+  USED block at 24490016 of size 26\r
+  USED block at 24490030 of size 26\r
+  USED block at 2449004a of size 38914\r
+  USED block at 2449984c of size 136\r
+  USED block at 244998d4 of size 20\r
+  USED block at 244998e8 of size 7972\r
+OK - end of heap\r
+\r
+Memory Type         Total      Used       Free\r
+----------------  --------   --------   --------\r
+Default                   47094        208       46886\r
+Near              4662         496       4166\r
+Far               47094        208       46886\r
+----------------  --------   --------   --------\r
+HC_coreleft = 4164\r
+HC_farcoreleft = 458752\r
+HC_GetFreeSize = 46886\r
+HC_GetNearFreeSize = 4166\r
+HC_GetFarFreeSize = 46886\r
+memavl = 4164\r
+stackavail = 31606\r
diff --git a/MMDUMP.16W b/MMDUMP.16W
new file mode 100755 (executable)
index 0000000..4893d8b
Binary files /dev/null and b/MMDUMP.16W differ
diff --git a/db.exe b/db.exe
deleted file mode 100755 (executable)
index 457a9fa..0000000
Binary files a/db.exe and /dev/null differ
diff --git a/fmemtest.exe b/fmemtest.exe
deleted file mode 100755 (executable)
index 589f2c3..0000000
Binary files a/fmemtest.exe and /dev/null differ
diff --git a/fontgfx.exe b/fontgfx.exe
deleted file mode 100755 (executable)
index d1b24cf..0000000
Binary files a/fontgfx.exe and /dev/null differ
diff --git a/fonttest.exe b/fonttest.exe
deleted file mode 100755 (executable)
index bc9de1e..0000000
Binary files a/fonttest.exe and /dev/null differ
diff --git a/joytest.exe b/joytest.exe
deleted file mode 100755 (executable)
index 49400b1..0000000
Binary files a/joytest.exe and /dev/null differ
index f650f020f614f23573ea6aacb4be77447311ae27..2632b8b803171052d8efb12c46cc8071c73f3816 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -9,7 +9,6 @@
 # -oe - expand user functions inline (-oe=20 is default, adds lots of code)
 # -oh  Enable repeated optimizations
 # -oi  generate certain lib funcs inline
-# -oi  +Set max inline depth (C++ only, use -oi for C)
 # -ok  Flowing of register save into function flow graph
 # -ol  loop optimizations
 # -ol+ loop optimizations plus unrolling
@@ -107,7 +106,7 @@ UPXQ=-qqq
 #
 S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768
 Z_FLAGS=-zk0 -zc -zp8 -zm
-O_FLAGS=-opnr -oe=24 -oil+ -outback -ohm                               -zp4##-ei
+O_FLAGS=-opn -oe=24 -oil+ -outback -ohm                                -zp4##-ei -or
 T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 -d1 -fo=.$(OBJ) ##-e=65536
 
 DBUGFLAGS=-fm=$^&.meh -fd=$^&
@@ -207,16 +206,25 @@ SPRIUTILEXEC = &
        pcxsscut &
        vrl2vrs &
        vrsdump
-#UTILEXEC += $(SPRIUTILEXEC)
+UTILEXEC += $(SPRIUTILEXEC)
 !endif
 
 EXEC = &
        16.exe &
        bakapi.exe &
-       $(UTILEXEC) &
        $(TESTEXEC)
 
-all: $(EXEC) $(EXTERNTESTEXEC)
+!ifdef __LINUX__
+EXEC += $(SPRIUTILEXEC)
+!endif
+
+ALLEXEC = &
+       $(EXEC) &
+       $(UTILEXEC) &
+       $(TESTEXEC2) &
+       $(TESTEXEC3)
+
+all: $(EXEC)
 testexec: $(EXEC) $(TESTEXEC2)
 
 #
@@ -361,12 +369,13 @@ ll.$(OBJ):                $(SRCLIB)/ll.c  $(SRCLIB)/ll.h
 #
 clean: .symbolic
        @if not exist $(DOSLIBDIR)/buildall.sh wmake -h initlibs
-       @for %f in ($(EXEC)) do @if exist %f $(REMOVECOMMAND) %f
+       @for %f in ($(ALLEXEC)) do @if exist %f $(REMOVECOMMAND) %f
 !ifdef __LINUX__
        @if exist *.LIB $(REMOVECOMMAND) *.LIB
        @. src/util/bcexmm.sh
        @if exist *.EXE $(REMOVECOMMAND) *.EXE
        @if exist *.OBJ $(REMOVECOMMAND) *.OBJ
+       @for %f in ($(SPRIUTILEXEC)) do @if exist %f $(REMOVECOMMAND) %f
 !else
        @if exist *.o $(REMOVECOMMAND) *.o
 !endif
diff --git a/pcx2vrl b/pcx2vrl
deleted file mode 100755 (executable)
index 4c3afde..0000000
Binary files a/pcx2vrl and /dev/null differ
diff --git a/pcxsscut b/pcxsscut
deleted file mode 100755 (executable)
index be46317..0000000
Binary files a/pcxsscut and /dev/null differ
diff --git a/pcxtest.exe b/pcxtest.exe
deleted file mode 100755 (executable)
index f14e332..0000000
Binary files a/pcxtest.exe and /dev/null differ
diff --git a/pcxtest2.exe b/pcxtest2.exe
deleted file mode 100755 (executable)
index 63e6ab8..0000000
Binary files a/pcxtest2.exe and /dev/null differ
diff --git a/scroll.exe b/scroll.exe
deleted file mode 100755 (executable)
index 71c1365..0000000
Binary files a/scroll.exe and /dev/null differ
diff --git a/src/0.c b/src/0.c
index 80ff31bbd6529ab2effb7bf26a7628d13006da89..901d8ef77492b5680e8dffd785941feac7e60b2a 100755 (executable)
--- a/src/0.c
+++ b/src/0.c
@@ -34,8 +34,6 @@
 \r
 #define INITTNUM 1\r
 \r
-map_view_t mv[4];\r
-\r
 map_t map;//junk var\r
 \r
 int main(int argc,char **argv)\r
@@ -104,12 +102,12 @@ int main(int argc,char **argv)
 \r
        IN_Startup();\r
        IN_Default(0,&gvar.player[0],ctrl_Keyboard1);\r
-       EN_initPlayer(&gvar.player, 0, &gvar.video);\r
+       EN_initPlayer(&gvar.player[0], &gvar.video);\r
 \r
        /* setup camera and screen~ */\r
        modexHiganbanaPageSetup(&gvar.video);\r
-       ZC_MVSetup(&mv, &map, &gvar);\r
-       ZC_ShowMV(&mv, gvar.video.sp, 0);\r
+       ZC_MVSetup(&gvar.mv, &map, &gvar);\r
+       ZC_ShowMV(&gvar.mv, gvar.video.sp, 0);\r
 \r
 //     VL_PatternDraw(video_t *video, word pn, boolean sw, boolean allsw);\r
        VL_PatternDraw(&gvar.video, 0/*gvar.video.sp*/, 0, 1);\r
@@ -152,7 +150,7 @@ int main(int argc,char **argv)
                        }\r
                        if(IN_KeyDown(sc_R)){\r
                                gvar.video.page[0].dx=gvar.video.page[0].dy=gvar.video.page[1].dx=gvar.video.page[1].dy=16;\r
-                               mv[0].tx = mv[0].ty = mv[1].tx = mv[1].ty = INITTNUM;\r
+                               gvar.mv[0].tx = gvar.mv[0].ty = gvar.mv[1].tx = gvar.mv[1].ty = INITTNUM;\r
                                VL_ShowPage(&gvar.video.page[gvar.video.sp], 1, 0);\r
                                gvar.player[0].enti.q = 1; gvar.player[0].enti.d = 2;\r
                                x=y=0;\r
@@ -218,7 +216,7 @@ draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header
 \r
 //===========================================================================//\r
 \r
-       ZC_ShowMV(&mv, 0, 0);\r
+       ZC_ShowMV(&gvar.mv, 0, 0);\r
 if(!noanim) {\r
        /* another handy "demo" effect using VGA write mode 1.\r
         * we can take what's on screen and vertically squash it like an old analog TV set turning off. */\r
@@ -313,7 +311,7 @@ if(!noanim) {
        printf("\nProject 16 0.exe. This is just a test file!\n");\r
        printf("version %s\n", VERSION);\r
        //SCROLLEXITMESG;\r
-       printf("mv 0\n- tx=%d   ty=%d   dx=%d   dy=%d\n", mv[0].tx, mv[0].ty, gvar.video.page[0].dx, gvar.video.page[0].dy);\r
-       printf("mv 1\n- tx=%d   ty=%d   dx=%d   dy=%d\n", mv[1].tx, mv[1].ty, gvar.video.page[1].dx, gvar.video.page[1].dy);\r
+       printf("mv 0\n- tx=%d   ty=%d   dx=%d   dy=%d\n", gvar.mv[0].tx, gvar.mv[0].ty, gvar.video.page[0].dx, gvar.video.page[0].dy);\r
+       printf("mv 1\n- tx=%d   ty=%d   dx=%d   dy=%d\n", gvar.mv[1].tx, gvar.mv[1].ty, gvar.video.page[1].dx, gvar.video.page[1].dy);\r
        return 0;\r
 }\r
index a96b1c495de738a594f791d6041a335277a664c4..b0ca840a447cf52cc1e51c7b74229fd5419a6786 100755 (executable)
--- a/src/16.c
+++ b/src/16.c
 \r
 #include "src/16.h"\r
 \r
-engi_stat_t engi_stat;\r
-\r
 void\r
 main(int argc, char *argv[])\r
 {\r
        static global_game_variables_t gvar;\r
        Startup16(&gvar);\r
 \r
-       engi_stat = ENGI_RUN;\r
+       gvar.engi_stat = ENGI_RUN;\r
 \r
        /* save the palette */\r
        modexPalSave(gvar.video.dpal);\r
@@ -41,10 +39,10 @@ main(int argc, char *argv[])
 //     modexPalBlack();        //so player will not see loadings~\r
        IN_Default(0,&gvar.player[0],ctrl_Joystick);\r
        //modexprint(&screen, 32, 32, 1, 2, 0, "a", 1);\r
-       while(ENGI_EXIT != engi_stat)\r
+       while(ENGI_QUIT != gvar.engi_stat)\r
        {\r
                IN_ReadControl(&gvar.player[0]);\r
-               if(IN_KeyDown(sc_Escape)) engi_stat = ENGI_EXIT;\r
+               if(IN_KeyDown(sc_Escape)) gvar.engi_stat = ENGI_QUIT;\r
                shinku(&gvar);\r
                _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U);\r
        }\r
index 8011ada3e6f60cf4c6606d84b3e758cb555e68b9..c66eead06669bcb581d484bac9c82f7210fd30ab 100755 (executable)
@@ -66,17 +66,17 @@ void EN_initentity(entity_t *enti, video_t *video)
 }\r
 \r
 //init player!\r
-void EN_initPlayer(player_t *player, word pn, video_t *video)\r
+void EN_initPlayer(player_t *player, 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].walktype=0;\r
-       player[pn].enti.dire=30;\r
+       EN_initentity(&player->enti, video);\r
+       player->enti.spri.x = player[0].enti.x-4;\r
+       player->enti.spri.y = player[0].enti.y-16;\r
+       player->walktype=0;\r
+       player->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
-       animate_spri(&player[pn].enti, video);\r
+       video->sprifilei =      set_anim_by_id(&player->enti.spri, player->enti.dire);\r
+       animate_spri(&player->enti, video);\r
 \r
        //print_anim_ids(player[0].enti.spri);\r
 /*     player[0].info.x = player[0].tx;\r
index 9dfbbf0953464afb578317fe2c0a40aa8f5336a6..72c1939c95806b1c2f65111eb4d96f3b4cead9cd 100755 (executable)
@@ -45,6 +45,6 @@
 // } entity_t;
 
 void EN_initentity(entity_t *enti, video_t *video);
-void EN_initPlayer(player_t *player, word pn, video_t *video);
+void EN_initPlayer(player_t *player, video_t *video);
 
 #endif
index f3a807661d2b4f231042a00457605be0e6f7ca51..e7ed19edafbe81620eadfbd47dac839280a916a9 100755 (executable)
@@ -1,3 +1,24 @@
+/* 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
 //     ID Engine\r
 //     ID_IN.c - Input Manager\r
index 540cc4d4fedc0d456835727f72d374ac8197732e..8978a759fe2ae585eda424ce377985147c47a335 100755 (executable)
@@ -1,3 +1,24 @@
+/* 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
 //     ID Engine\r
 //     ID_IN.h - Header file for Input Manager\r
index ecb3ba527e6b4bdb9721cd94241c7cc402d5107a..bb190511a2125edf7ff9a728ab2c9e5149e3fca0 100755 (executable)
@@ -43,8 +43,8 @@
        if(IN_KeyDown(68/*sc_F10*/)){ gvar.kurokku.fpscap=!gvar.kurokku.fpscap;         IN_UserInput(1); } \\r
        if(IN_KeyDown(sc_F9)){ pagenorendermap=!pagenorendermap;                                IN_UserInput(1); } \\r
        if(IN_KeyDown(sc_F8)){ gvar.video.bgps=!gvar.video.bgps;                                        IN_UserInput(1); } \\r
-       if(IN_KeyDown(sc_F7)){ ZC_ShowMV(&mv, 0, 1);                                                    IN_UserInput(1); } \\r
-       if(IN_KeyDown(sc_F6)){ ZC_ShowMV(&mv, 0, 0);                                                    IN_UserInput(1); } \\r
+       if(IN_KeyDown(sc_F7)){ ZC_ShowMV(&gvar.mv, 0, 1);                                               IN_UserInput(1); } \\r
+       if(IN_KeyDown(sc_F6)){ ZC_ShowMV(&gvar.mv, 0, 0);                                               IN_UserInput(1); } \\r
        if(IN_KeyDown(sc_T)){ gvar.video.rss=!gvar.video.rss;                                           IN_UserInput(1); } \\r
        if(IN_KeyDown(sc_P)){ modexpdump(&gvar.video.page[0]);                                  IN_UserInput(1); }\r
 \r
        TAIL_FUNCTIONKEYDRAWJUNK\r
 \r
 #define TAIL_PANKEYFUNZC \\r
-       ZC_panPageManual(&mv, &gvar.player, 0);\r
+       ZC_panPageManual(&gvar.mv, &gvar.player, 0);\r
 \r
 #define TAIL_FUNCTIONKEYSHOWMV \\r
-       if(IN_KeyDown(1+1)){ gvar.video.sp=0; ZC_ShowMV(&mv, 0, 0); } \\r
-       if(IN_KeyDown(2+1)){ gvar.video.sp=1; ZC_ShowMV(&mv, 0, 0); } \\r
-       if(IN_KeyDown(3+1)){ gvar.video.sp=2; ZC_ShowMV(&mv, 0, 1); } \\r
-       if(IN_KeyDown(4+1)){ gvar.video.sp=3; ZC_ShowMV(&mv, 0, 1); }\r
+       if(IN_KeyDown(1+1)){ gvar.video.sp=0; ZC_ShowMV(&gvar.mv, 0, 0); } \\r
+       if(IN_KeyDown(2+1)){ gvar.video.sp=1; ZC_ShowMV(&gvar.mv, 0, 0); } \\r
+       if(IN_KeyDown(3+1)){ gvar.video.sp=2; ZC_ShowMV(&gvar.mv, 0, 1); } \\r
+       if(IN_KeyDown(4+1)){ gvar.video.sp=3; ZC_ShowMV(&gvar.mv, 0, 1); }\r
 \r
 #define TAIL_FUNCTIONKEYDRAWJUNK \\r
        TAIL_FUNCTIONKEYSHOWMV \\r
index 504e67310aee6c7547c41aa925bdc0dab251097b..e059fedfd607b8eaf10967ab957712c6692823ec 100755 (executable)
@@ -598,15 +598,16 @@ typedef struct    //TODO: USE THIS!!!!
 \r
 //actual global game varables!\r
 typedef enum {\r
-       ENGI_EXIT,\r
        ENGI_QUIT,\r
        ENGI_RUN,\r
-       ENGI_INPUT,\r
+       ENGI_MENU,\r
        ENGI_PAUSE\r
 } engi_stat_t;\r
+//ENGI_INPUT,\r
 \r
 typedef struct\r
 {\r
+       engi_stat_t     engi_stat;\r
        video_t video;  // video settings variable\r
        ca_t            ca;     // ca stuff\r
        pm_t            pm;     // pm stuff\r
@@ -615,7 +616,7 @@ typedef struct
        mminfo_t        mm; mminfotype  mmi;    // mm stuff\r
 //++++ in_info_t       in;             // 16_in info\r
        player_t        player[MaxPlayers];     // player vars\r
-//==== word far*       clockw;         /* 18.2hz clock */\r
+       map_view_t      mv[4];\r
 } global_game_variables_t;\r
 \r
 #ifdef __WATCOMC__\r
index 2e5fa42e184eb9d6ed18da64adc0fc4a1abe8503..7e67b01293432e91b9166b430996522576c12711 100755 (executable)
@@ -409,20 +409,21 @@ modexSelectPlane(byte plane) {
 }\r
 \r
 void\r
-modexClearRegion(page_t *page, int x, int y, int w, int h, byte  color) {\r
+modexClearRegion(page_t *page, int x, int y, int w, int h, byte color)\r
+{\r
        word pageOff = (word) page->data;\r
-       word xoff=x/4;     /* xoffset that begins each row */\r
-       word scanCount=w/4;  /* number of iterations per row (excluding right clip)*/\r
-       word poffset = pageOff + y*(page->stridew) + xoff; /* starting offset */\r
-       word nextRow = page->stridew-scanCount-1;  /* loc of next row */\r
-       byte lclip[] = {0x0f, 0x0e, 0x0c, 0x08};  /* clips for rectangles not on 4s */\r
+       word xoff=(x>>2);                                                       // xoffset that begins each row\r
+       word poffset = pageOff + y*(page->stridew) + xoff;      // starting offset\r
+       word scanCount=w>>2;                                            // number of iterations per row (excluding right clip)\r
+       word nextRow = page->stridew-scanCount-1;               // loc of next row\r
+       byte lclip[] = {0x0f, 0x0e, 0x0c, 0x08};                        // clips for rectangles not on 4s\r
        byte rclip[] = {0x00, 0x01, 0x03, 0x07};\r
        byte left = lclip[x&0x03];\r
        byte right = rclip[(x+w)&0x03];\r
 \r
-       /* handle the case which requires an extra group */\r
+       // handle the case which requires an extra group\r
        if((x & 0x03) && !((x+w) & 0x03)) {\r
-         right=0x0f;\r
+               right=0x0f;\r
        }\r
 \r
        //printf("modexClearRegion(x=%u, y=%u, w=%u, h=%u, left=%u, right=%u)\n", x, y, w, h, left, right);\r
@@ -492,17 +493,17 @@ modexCopyPageRegion(page_t *dest, page_t *src,
                        word dx, word dy,\r
                        word width, word height)\r
 {\r
-       word doffset = (word)dest->data + dy*(dest->stridew) + dx/4;\r
-       word soffset = (word)src->data + sy*(src->stridew) + sx/4;\r
-       word scans   = vga_state.vga_stride;                            //++++0000 the quick and dirty fix of the major issue with p16 video display wwww\r
+       word doffset = (word)dest->data + dy*(dest->stridew) + (dx>>2);\r
+       word soffset = (word)src->data + sy*(src->stridew) + (sx>>2);\r
+       word scans      = vga_state.vga_stride+8;                               //++++0000 the quick and dirty fix of the major issue with p16 video display wwww\r
        word nextSrcRow = src->stridew - scans - 1;\r
        word nextDestRow = dest->stridew - scans - 1;\r
-       byte lclip[] = {0x0f, 0x0e, 0x0c, 0x08};  /* clips for rectangles not on 4s */\r
+       byte lclip[] = {0x0f, 0x0e, 0x0c, 0x08};                        // clips for rectangles not on 4s\r
        byte rclip[] = {0x00, 0x01, 0x03, 0x07};\r
        byte left = lclip[sx&0x03];\r
        byte right = rclip[(sx+width)&0x03];\r
 \r
-       /* handle the case which requires an extra group */\r
+       // handle the case which requires an extra group\r
        if((sx & 0x03) && !((sx+width) & 0x03)) {\r
                right=0x0f;\r
        }\r
index 744e2f4a07eee94f35b8ef97687258262ab3f4ee..7f146fe4c00f513b25a8e2dc6f4c537a24bd7b68 100755 (executable)
@@ -80,7 +80,7 @@
 #define SCROLLEXITMESG         printf("page[0]dxy: %dx%d", gvar.video.page[0].dx, gvar.video.page[0].dy);\\r
        printf("\n\n");\\r
        printf("gvar.player vars:\n");\\r
-       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", mv[1].map->layerdata[0].data[(gvar.player[0].enti.triggerx-1)+(map.width*(gvar.player[0].enti.triggery-1))]);\\r
+       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))]);\\r
        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);\\r
                printf("        pdir: %u\n", gvar.player[0].pdir); printf("     delay=%u", gvar.player[0].enti.spri.delay);\\r
 printf("\n\n");\\r
index 228c1a897d0ee20c1547ca2c52149af09d7a77f1..43adbd8dad3b83b4b8d749b863e5527460e2c1c0 100755 (executable)
@@ -28,7 +28,6 @@
 #define MODEX  //this is for mode x initiating\r
 \r
 static map_t map;\r
-map_view_t mv[4];\r
 float t;\r
 sword bakapee;\r
 //debugswitches\r
@@ -107,16 +106,16 @@ void main(int argc, char *argv[])
 \r
        /* setup camera and screen~ */\r
        modexHiganbanaPageSetup(&gvar.video);\r
-       ZC_MVSetup(&mv, &map, &gvar);\r
+       ZC_MVSetup(&gvar.mv, &map, &gvar);\r
 \r
        //renderswitch\r
        gvar.video.rss=1;\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
-       mapGoTo(&mv, 0, 0);\r
+       mapGoTo(&gvar.mv, 0, 0);\r
 \r
-       ZC_gvar.playerXYpos(0, 0, &gvar.player, &mv, 0, 1);\r
+       ZC_gvar.playerXYpos(0, 0, &gvar.player, &gvar.mv, 0, 1);\r
        EN_initgvar.player(&gvar.player, 0, &gvar.video);\r
        if (gvar.video.sprifilei == -1)\r
        {\r
@@ -137,7 +136,7 @@ void main(int argc, char *argv[])
 \r
        //if(!pageflipflop)\r
                VL_ShowPage(mv[1].page, 0, 0);//modexShowPage(mv[1].page);\r
-       //else                  ZC_ShowMV(&mv, 0, 0);//modexShowPage(mv[0].page);//!(gvar.video.p)\r
+       //else                  ZC_ShowMV(&gvar.mv, 0, 0);//modexShowPage(mv[0].page);//!(gvar.video.p)\r
 \r
        //modexDrawBmp(&gvar.video.page[0], 16, 16, PCXBMPPTR);\r
        /* buffer pages */\r
@@ -170,9 +169,9 @@ void main(int argc, char *argv[])
        //gvar.player movement\r
                IN_ReadControl(0, &gvar.player);\r
        if(!panswitch){\r
-               ZC_walk(&mv, &gvar.player, 0);\r
+               ZC_walk(&gvar.mv, &gvar.player, 0);\r
        }else{\r
-               PANKEYFUNZC;//panPageManual(&mv, &gvar.player, 0);\r
+               PANKEYFUNZC;//panPageManual(&gvar.mv, &gvar.player, 0);\r
                //printf("      gvar.player[0].enti.q: %d", gvar.player[0].enti.q);     printf("        gvar.player[0].d: %d\n", gvar.player[0].d);\r
        }\r
 \r
index 37116b283d6b80178503ccadcc7311255c7673a4..5464355e3cc262e2eac6579d90daab44d7df8876 100755 (executable)
 \r
 static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
 \r
+void drawboxesmodex(page_t *pg)\r
+{\r
+       modexClearRegion(pg, 0, 0, pg->width, pg->height, 1);\r
+       modexClearRegion(pg, 16, 16, pg->sw, pg->sh, 2);\r
+       modexClearRegion(pg, 32, 32, pg->sw-32, pg->sh-32, 3);\r
+       modexClearRegion(pg, 48, 48, pg->sw-64, pg->sh-64, 2);\r
+}\r
+\r
+void copyboxesmodex(page_t *page, boolean pn)\r
+{\r
+       modexCopyPageRegion(&page[pn], &page[!pn], 0, 0, 0, 0, page[pn].width, page[pn].height);\r
+}\r
+\r
 void main(int argc, char *argv[])\r
 {\r
        static word paloffset=0;\r
        static global_game_variables_t gvar;\r
 \r
        map_t map;\r
-       map_view_t mv[4];\r
 \r
        int i, j;\r
        word startclk, endclk;\r
@@ -88,7 +100,7 @@ void main(int argc, char *argv[])
 \r
        //IN_Startup();\r
        IN_Default(0,&gvar.player[0],ctrl_Keyboard1);\r
-       EN_initPlayer(&gvar.player, 0, &gvar.video);\r
+       EN_initPlayer(&gvar.player[0], &gvar.video);\r
 \r
        VGAmodeX(1, 1, &gvar);\r
        modexPalBlack();\r
@@ -109,7 +121,7 @@ void main(int argc, char *argv[])
 \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
+       ZC_MVSetup(&gvar.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
@@ -123,12 +135,8 @@ void main(int argc, char *argv[])
        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
+       drawboxesmodex(&gvar.video.page[0]);\r
+       copyboxesmodex(&gvar.video.page, 1);\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
@@ -141,53 +149,13 @@ void main(int argc, char *argv[])
        while(!IN_KeyDown(sc_Escape))\r
        {\r
                IN_ReadControl(&gvar.player[0]);\r
-               ZC_panPageManual(&mv, &gvar.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
+               ZC_panPageManual(&gvar.mv, &gvar.player, 0);\r
+//                     if(IN_KeyDown(sc_5)){ modexClearRegion(&gvar.video.page[1],  gvar.video.page[1].sw, 16, 8, 4, 45); }\r
+//                     if(IN_KeyDown(sc_4)){\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
                TAIL_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
@@ -202,8 +170,10 @@ void main(int argc, char *argv[])
 //                     if(i>PAL_SIZE) i=0;\r
                }//9*/\r
                if(IN_KeyDown(25)){ modexpdump(&gvar.video.page[gvar.video.sp]); IN_UserInput(1); }//p\r
+               if(IN_KeyDown(sc_I)){ drawboxesmodex(&gvar.video.page[gvar.video.sp]); IN_UserInput(1); }//i\r
+               if(IN_KeyDown(sc_O)){ copyboxesmodex(&gvar.video.page, !gvar.video.sp); IN_UserInput(1); }//o\r
                //VL_ShowPage(&gvar.video.page[gvar.video.sp], 0, 0);\r
-               ZC_ShowMV(&mv, 0, 0);\r
+               ZC_ShowMV(&gvar.mv, 0, 0);\r
        }\r
 \r
        endclk = *clockw;\r
@@ -216,7 +186,7 @@ void main(int argc, char *argv[])
        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("gvar.player.d=%d\n", gvar.player[0].enti.d);\r
+       printf("tx=%d   ", gvar.mv[gvar.video.sp].tx); printf("ty=%d    ", gvar.mv[gvar.video.sp].ty); printf("gvar.player.d=%d\n", gvar.player[0].enti.d);\r
        printf("\n====\n");\r
        printf("0       paloffset=      %d\n", paloffset/3);\r
        printf("====\n\n");\r
index 3cc838dc8eb11d38d14b68abcc468aa0bd7a4020..716cc876a063448e1fd475f2c7f1d3fcfa932cdf 100755 (executable)
@@ -28,7 +28,6 @@
 #define FADE\r
 \r
 static map_t map;\r
-map_view_t mv[4];\r
 float t;\r
 \r
 //debugswitches\r
@@ -118,14 +117,14 @@ void main(int argc, char *argv[])
 \r
        // setup camera and screen~\r
        modexHiganbanaPageSetup(&gvar.video);\r
-       ZC_MVSetup(&mv, &map, &gvar);\r
+       ZC_MVSetup(&gvar.mv, &map, &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
-       mapGoTo(&mv, 0, 0);\r
+       mapGoTo(&gvar.mv, 0, 0);\r
 \r
-       ZC_PlayerXYpos(0, 0, &gvar.player, &mv, 0, 1);\r
-       EN_initPlayer(&gvar.player, 0, &gvar.video);\r
+       ZC_PlayerXYpos(0, 0, &gvar.player, &gvar.mv, 0, 1);\r
+       EN_initPlayer(&gvar.player[0], &gvar.video);\r
        //print_anim_ids(gvar.player[0].enti.spri);\r
        if (gvar.video.sprifilei == -1)\r
        {\r
@@ -139,17 +138,17 @@ void main(int argc, char *argv[])
        }\r
 \r
 //     while(!IN_KeyDown(sc_Escape) && !IN_KeyDown(sc_Space) && !IN_KeyDown(sc_Enter)){ FUNCTIONKEYSHOWMV }\r
-       gvar.video.page[0].tlx=mv[0].tx*TILEWH;\r
-       gvar.video.page[0].tly=mv[0].ty*TILEWH;\r
+       gvar.video.page[0].tlx=gvar.mv[0].tx*TILEWH;\r
+       gvar.video.page[0].tly=gvar.mv[0].ty*TILEWH;\r
        shinku(&gvar);\r
-//modexpdump(mv[0].page);\r
+//modexpdump(gvar.mv[0].page);\r
 #ifdef FADE\r
        modexFadeOn(4, &gvar.video.palette);\r
 #endif\r
        while(!IN_KeyDown(sc_Escape) && gvar.player[0].enti.hp>0)\r
        {\r
-               gvar.video.page[0].tlx=mv[0].tx*TILEWH;\r
-               gvar.video.page[0].tly=mv[0].ty*TILEWH;\r
+               gvar.video.page[0].tlx=gvar.mv[0].tx*TILEWH;\r
+               gvar.video.page[0].tly=gvar.mv[0].ty*TILEWH;\r
                shinku(&gvar);\r
                //top left corner & bottem right corner of map veiw be set as map edge trigger since maps are actually square\r
                //to stop scrolling and have the gvar.player position data move to the edge of the screen with respect to the direction\r
@@ -159,7 +158,7 @@ void main(int argc, char *argv[])
                IN_ReadControl(&gvar.player[0]);\r
                if(!panswitch){\r
                        //ZC_walk2(gvar.player[0].ent, mv);\r
-                       ZC_walk(&mv, &gvar.player, 0);\r
+                       ZC_walk(&gvar.mv, &gvar.player, 0);\r
                }else{\r
                        TAIL_PANKEYFUNZC;\r
                        //printf("      gvar.player[0].enti.q: %d", gvar.player[0].enti.q);     printf("        gvar.player[0].d: %d\n", gvar.player[0].d);\r
@@ -167,7 +166,7 @@ void main(int argc, char *argv[])
 \r
                //the scripting stuff....\r
                //if(((gvar.player[0].enti.triggerx == TRIGGX && gvar.player[0].enti.triggery == TRIGGY) && IN_KeyDown(0x1C))||(gvar.player[0].enti.tx == 5 && gvar.player[0].enti.ty == 5))\r
-               if(((mv[0].map->layerdata[0].data[(gvar.player[0].enti.triggerx-1)+(map.width*(gvar.player[0].enti.triggery-1))] == 0) && IN_KeyDown(0x1C))||(gvar.player[0].enti.tx == 5 && gvar.player[0].enti.ty == 5))\r
+               if(((gvar.mv[0].map->layerdata[0].data[(gvar.player[0].enti.triggerx-1)+(map.width*(gvar.player[0].enti.triggery-1))] == 0) && IN_KeyDown(0x1C))||(gvar.player[0].enti.tx == 5 && gvar.player[0].enti.ty == 5))\r
                {\r
                        short i;\r
                        for(i=800; i>=400; i--)\r
@@ -179,7 +178,7 @@ void main(int argc, char *argv[])
                if(gvar.player[0].enti.q == (TILEWH/(gvar.player[0].enti.speed))+1 && gvar.player[0].info.dir != 2 && (gvar.player[0].enti.triggerx == 5 && gvar.player[0].enti.triggery == 5)){ gvar.player[0].enti.hp--; }\r
                //debugging binds!\r
 \r
-               if(IN_KeyDown(24)){ modexPalUpdate0(&gvar.video.palette); /*paloffset=0;*/ modexpdump(mv[0].page); IN_UserInput(1); } //o\r
+               if(IN_KeyDown(24)){ modexPalUpdate0(&gvar.video.palette); /*paloffset=0;*/ modexpdump(gvar.mv[0].page); IN_UserInput(1); } //o\r
                if(IN_KeyDown(22)){ modexPalUpdate0(&gvar.video.palette); } //u\r
 \r
                TAIL_FUNCTIONKEYFUNCTIONS\r
diff --git a/test0.exe b/test0.exe
deleted file mode 100755 (executable)
index d3554f9..0000000
Binary files a/test0.exe and /dev/null differ
diff --git a/vrl2vrs b/vrl2vrs
deleted file mode 100755 (executable)
index 348d00f..0000000
Binary files a/vrl2vrs and /dev/null differ
diff --git a/vrsdump b/vrsdump
deleted file mode 100755 (executable)
index 1121c2f..0000000
Binary files a/vrsdump and /dev/null differ
diff --git a/wcpu.exe b/wcpu.exe
deleted file mode 100755 (executable)
index da55120..0000000
Binary files a/wcpu.exe and /dev/null differ