]> 4ch.mooo.com Git - 16.git/commitdiff
something is bothering me very much on the animation part of frame. particularly...
authorsparky4 <sparky4@cock.li>
Tue, 24 Jan 2017 18:50:17 +0000 (12:50 -0600)
committersparky4 <sparky4@cock.li>
Tue, 24 Jan 2017 18:50:17 +0000 (12:50 -0600)
24 files changed:
DEBUG.16W [new file with mode: 0755]
HEAP.16W [new file with mode: 0755]
MMDUMP.16W [new file with mode: 0755]
ZCROLL.L16 [new file with mode: 0755]
data/spri/chikyuu.sht
data/spri/chikyuu.vrs
makefile
spri.sh
src/0.c
src/lib/16_enti.c
src/lib/16_enti.h
src/lib/16_in.c
src/lib/16_in.h
src/lib/16_sprit.c
src/lib/16_sprit.h
src/lib/16_tail.h
src/lib/16_tdef.h
src/lib/16_vl.c
src/lib/scroll16.c
src/lib/scroll16.h
src/scroll.c
src/test.c
src/vrstest.c
src/zcroll.c

diff --git a/DEBUG.16W b/DEBUG.16W
new file mode 100755 (executable)
index 0000000..5bef76d
--- /dev/null
+++ b/DEBUG.16W
@@ -0,0 +1,210 @@
+\e[0mSeg:0      Size:9859       Owner:0x0\r
+\e[41;31m++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m\e[42;32m000\r
+\e[0m\e[0mSeg:274a       Size:44 Owner:0x0\r
+\e[41;31m++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2776       Size:256        Owner:0x1970\r
+\e[44;34m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2876       Size:256        Owner:0x1762\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2976       Size:256        Owner:0x1764\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2a76       Size:256        Owner:0x1766\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2b76       Size:256        Owner:0x1768\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2c76       Size:256        Owner:0x176a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2d76       Size:256        Owner:0x176c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2e76       Size:256        Owner:0x176e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:2f76       Size:256        Owner:0x1770\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3076       Size:256        Owner:0x1772\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3176       Size:256        Owner:0x1774\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3276       Size:256        Owner:0x1776\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3376       Size:256        Owner:0x1778\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3476       Size:256        Owner:0x177a\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3576       Size:256        Owner:0x177c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3676       Size:256        Owner:0x177e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3776       Size:256        Owner:0x1780\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3876       Size:256        Owner:0x1782\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3976       Size:256        Owner:0x1784\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3a76       Size:256        Owner:0x1786\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3b76       Size:256        Owner:0x1788\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3c76       Size:256        Owner:0x178a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3d76       Size:256        Owner:0x178c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3e76       Size:256        Owner:0x178e\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:3f76       Size:256        Owner:0x1790\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4076       Size:256        Owner:0x1792\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4176       Size:256        Owner:0x1794\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4276       Size:256        Owner:0x1796\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4376       Size:256        Owner:0x1798\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4476       Size:256        Owner:0x179a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4576       Size:256        Owner:0x179c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4676       Size:256        Owner:0x179e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4776       Size:256        Owner:0x17a0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4876       Size:256        Owner:0x17a2\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4976       Size:256        Owner:0x17a4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4a76       Size:256        Owner:0x17a6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4b76       Size:256        Owner:0x17a8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4c76       Size:256        Owner:0x17aa\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4d76       Size:256        Owner:0x17ac\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4e76       Size:256        Owner:0x17ae\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:4f76       Size:256        Owner:0x17b0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5076       Size:256        Owner:0x17b2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5176       Size:256        Owner:0x17b4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5276       Size:256        Owner:0x17b6\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5376       Size:256        Owner:0x17b8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5476       Size:256        Owner:0x17ba\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5576       Size:256        Owner:0x17bc\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5676       Size:256        Owner:0x17be\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5776       Size:256        Owner:0x17c0\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5876       Size:256        Owner:0x17c2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5976       Size:256        Owner:0x17c4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5a76       Size:256        Owner:0x17c6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5b76       Size:256        Owner:0x17c8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5c76       Size:256        Owner:0x17ca\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5d76       Size:256        Owner:0x17cc\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5e76       Size:256        Owner:0x17ce\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:5f76       Size:256        Owner:0x17d0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6076       Size:256        Owner:0x17d2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6176       Size:256        Owner:0x17d4\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6276       Size:256        Owner:0x17d6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6376       Size:256        Owner:0x17d8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6476       Size:256        Owner:0x17da\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6576       Size:256        Owner:0x17dc\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6676       Size:256        Owner:0x17de\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6776       Size:256        Owner:0x17e0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6876       Size:256        Owner:0x17e2\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6976       Size:256        Owner:0x17e4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6a76       Size:256        Owner:0x17e6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6b76       Size:256        Owner:0x17e8\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6c76       Size:256        Owner:0x17ea\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6d76       Size:256        Owner:0x17ec\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6e76       Size:256        Owner:0x17ee\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:6f76       Size:256        Owner:0x17f0\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7076       Size:256        Owner:0x17f2\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7176       Size:256        Owner:0x17f4\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7276       Size:256        Owner:0x17f6\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7376       Size:256        Owner:0x17f8\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7476       Size:256        Owner:0x17fa\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7576       Size:256        Owner:0x17fc\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7676       Size:256        Owner:0x17fe\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7776       Size:256        Owner:0x1800\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7876       Size:256        Owner:0x1802\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7976       Size:256        Owner:0x1804\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7a76       Size:256        Owner:0x1806\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7b76       Size:256        Owner:0x1808\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7c76       Size:256        Owner:0x180a\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7d76       Size:256        Owner:0x180c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7e76       Size:256        Owner:0x180e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:7f76       Size:256        Owner:0x1810\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8076       Size:256        Owner:0x1812\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8176       Size:256        Owner:0x1814\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8276       Size:256        Owner:0x1816\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8376       Size:256        Owner:0x1818\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8476       Size:256        Owner:0x181a\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8576       Size:256        Owner:0x181c\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8676       Size:256        Owner:0x181e\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8776       Size:256        Owner:0x1820\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8876       Size:256        Owner:0x1822\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8976       Size:256        Owner:0x1824\r
+\e[45;35m+++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8a76       Size:256        Owner:0x1826\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8b76       Size:256        Owner:0x1828\r
+\e[45;35m++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:8c76       Size:401        Owner:0xef42\r
+\e[44;34m++++++\e[0m\e[42;32m\r
+\e[0m\e[0mSeg:b776       Size:18569      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..7effaf8
--- /dev/null
+++ b/HEAP.16W
@@ -0,0 +1,69 @@
+\r
+       == default ==\r
+\r
+  USED block at 276c0016 of size 136\r
+  FREE block at 276c009e of size 68\r
+  USED block at 276c00e2 of size 50\r
+  USED block at 276c0114 of size 50\r
+  USED block at 276c0146 of size 50\r
+  USED block at 276c0178 of size 50\r
+  USED block at 276c01aa of size 50\r
+  USED block at 276c01dc of size 50\r
+  USED block at 276c020e of size 50\r
+  USED block at 276c0240 of size 50\r
+  USED block at 276c0272 of size 50\r
+  USED block at 276c02a4 of size 50\r
+  USED block at 276c02d6 of size 50\r
+  USED block at 276c0308 of size 50\r
+  FREE block at 276c033a of size 14\r
+  USED block at 276c0348 of size 20\r
+  FREE block at 276c035c of size 7328\r
+OK - end of heap\r
+\r
+       == near ==\r
+\r
+  USED block at 176bef86 of size 12\r
+  USED block at 176bef92 of size 330\r
+  USED block at 176bf0dc of size 52\r
+  USED block at 176bf110 of size 20\r
+  USED block at 176bf124 of size 20\r
+  USED block at 176bf138 of size 20\r
+  USED block at 176bf14c of size 20\r
+  USED block at 176bf160 of size 20\r
+  USED block at 176bf174 of size 3720\r
+OK - end of heap\r
+\r
+       == far ==\r
+\r
+  USED block at 276c0016 of size 136\r
+  USED block at 276c009e of size 68\r
+  USED block at 276c00e2 of size 50\r
+  USED block at 276c0114 of size 50\r
+  USED block at 276c0146 of size 50\r
+  USED block at 276c0178 of size 50\r
+  USED block at 276c01aa of size 50\r
+  USED block at 276c01dc of size 50\r
+  USED block at 276c020e of size 50\r
+  USED block at 276c0240 of size 50\r
+  USED block at 276c0272 of size 50\r
+  USED block at 276c02a4 of size 50\r
+  USED block at 276c02d6 of size 50\r
+  USED block at 276c0308 of size 50\r
+  USED block at 276c033a of size 14\r
+  USED block at 276c0348 of size 20\r
+  USED block at 276c035c of size 7328\r
+OK - end of heap\r
+\r
+Memory Type         Total      Used       Free\r
+----------------  --------   --------   --------\r
+Default                   8166         756       7410\r
+Near              4214         494       3720\r
+Far               8166         756       7410\r
+----------------  --------   --------   --------\r
+coreleft = 3718\r
+farcoreleft = 35534\r
+GetFreeSize = 31836\r
+GetNearFreeSize = 3720\r
+GetFarFreeSize = 31836\r
+memavl = 3718\r
+stackavail = 31533\r
diff --git a/MMDUMP.16W b/MMDUMP.16W
new file mode 100755 (executable)
index 0000000..73ac128
Binary files /dev/null and b/MMDUMP.16W differ
diff --git a/ZCROLL.L16 b/ZCROLL.L16
new file mode 100755 (executable)
index 0000000..fae19f1
--- /dev/null
@@ -0,0 +1,25 @@
+WARNING: Failed to initialize DEBUG output\r
+\r
+Project 16 zcroll.exe. This is just a test file!\r
+version Jan 24 2017 12:37:40\r
+tx: 0  ty: 0\r
+\r
+player vars:\r
+       x: 160  y: 128\r
+       tx: 10  ty: 8\r
+       triggx: 10      triggy: 9\r
+       hp: 0   q: 1    player.info.dir: 2      player.d: 2     pdir=0\r
+       aniframe=1      delay=1\r
+\r
+Virtual Screen: 352x272        Screen: 320x240\r
+virtual tile resolution: 22x17 tile resolution: 20x15\r
+middle tile position: 10x8\r
+video memory remaining: 9215\r
+page   [0]=(a000:0000) size=23936      w=352  h=272 sw=320  sh=240 pi=1408\r
+       [1]=(a000:5d80) size=23936      w=352  h=272 sw=320  sh=240 pi=1408\r
+       [2]=(a000:bb00) size=5120       w=64  h=64 sw=64  sh=64 pi=1408\r
+       [3]=(a000:cf00) size=3328       w=320  h=208 sw=320  sh=208 pi=1408\r
+gvar.video.p=0 gvar.video.r=0 pageflipflop=1\r
+\r
+detected CPU type: 80386 or newer\r
+detected FPU type: 80387\r
index 8ae88cf08f11bdcdf2d410e1a870d32ea8da68eb..701617a2049d2a2bc69f517b1747b0b6047b247b 100755 (executable)
@@ -81,17 +81,17 @@ sprite=CHUBFCW1
 
 +CHUBFCW_WALKING@11
 sprite=CHUBFCW0
-delay=20
+delay=3
 -newframe
 sprite=CHUBFCW1
-delay=20
+delay=3
 event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
 -newframe
 sprite=CHUBFCW2
-delay=20
+delay=3
 -newframe
 sprite=CHUBFCW1
-delay=20
+delay=3
 event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
 
 # Chikyuu, left, standing and walking animation cycles
@@ -100,17 +100,17 @@ sprite=CHUBLCW1
 
 +CHUBLCW_WALKING@21
 sprite=CHUBLCW0
-delay=20
+delay=3
 -newframe
 sprite=CHUBLCW1
-delay=20
+delay=3
 event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
 -newframe
 sprite=CHUBLCW2
-delay=20
+delay=3
 -newframe
 sprite=CHUBLCW1
-delay=20
+delay=3
 event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
 
 # Chikyuu, right, standing and walking animation cycles
@@ -119,17 +119,17 @@ sprite=CHUBRCW1
 
 +CHUBRCW_WALKING@31
 sprite=CHUBRCW0
-delay=20
+delay=3
 -newframe
 sprite=CHUBRCW1
-delay=20
+delay=3
 event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
 -newframe
 sprite=CHUBRCW2
-delay=20
+delay=3
 -newframe
 sprite=CHUBRCW1
-delay=20
+delay=3
 event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
 
 # Chikyuu, away, standing and walking animation cycles
@@ -138,16 +138,16 @@ sprite=CHUBACW1
 
 +CHUBACW_WALKING@41
 sprite=CHUBACW0
-delay=20
+delay=3
 -newframe
 sprite=CHUBACW1
-delay=20
+delay=3
 event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
 -newframe
 sprite=CHUBACW2
-delay=20
+delay=3
 -newframe
 sprite=CHUBACW1
-delay=20
+delay=3
 event=@100         # in this example, signal the game engine the frame is one that can immediately transition to "standing"
 
index ac1f7c2babb882193959bc1ab57aaf990b3253f6..abcaf75b4785eb26163ce3eb5b68b5b1e1ecad1f 100755 (executable)
Binary files a/data/spri/chikyuu.vrs and b/data/spri/chikyuu.vrs differ
index e6f0d7d624ed60f097052a50c6f7331df3b19d8a..5695c6800fb17968b5b57b296e2ecf6d3ab2d739 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -125,7 +125,7 @@ LIBFLAGS=$(WLIBQ) -b -n
 VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ)
 OLDLIBOBJS=bitmap.$(OBJ) 16render.$(OBJ)
 GFXLIBOBJS = 16_vl.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16_vrs.$(OBJ) 16_sprit.$(OBJ) $(OLDLIBOBJS)
-16LIBOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_head.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ) 16text.$(OBJ)
+16LIBOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_head.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ) 16text.$(OBJ) 16_enti.$(OBJ)
 DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
 !ifeq DEBUGSERIAL 1
 DOSLIBOBJ += 8250.$(OBJ)
@@ -330,6 +330,7 @@ bitmap.$(OBJ):      $(SRCLIB)/bitmap.c $(SRCLIB)/bitmap.h
 planar.$(OBJ): $(SRCLIB)/planar.c $(SRCLIB)/planar.h
 scroll16.$(OBJ):$(SRCLIB)/scroll16.c $(SRCLIB)/scroll16.h
 16text.$(OBJ): $(SRCLIB)/16text.c $(SRCLIB)/16text.h
+16_enti.$(OBJ):        $(SRCLIB)/16_enti.c $(SRCLIB)/16_enti.h
 mapread.$(OBJ):$(SRCLIB)/mapread.c $(SRCLIB)/mapread.h
 16_map.$(OBJ):$(SRCLIB)/16_map.c $(SRCLIB)/16_map.h
 16_timer.$(OBJ):$(SRCLIB)/16_timer.c $(SRCLIB)/16_timer.h
diff --git a/spri.sh b/spri.sh
index bdff2260133d2e3be7b49d848533d35a54f590ad..172cc06e897d345c0f0ddb16cda85f7ccbbad660 100755 (executable)
--- a/spri.sh
+++ b/spri.sh
@@ -1,12 +1,16 @@
 #! /bin/bash
 cd data/spri
+if [ ! -f "$1".vrs ]; then
+       ../../vrl2vrs -s "$1".sht -o "$1".vrs -hc "$1".h -hp _"$1"_
+       echo "$1".vrs created
+#      echo "1st condition ok!"
+fi
 if [ -f "$1".sht ]; then
        ../../pcxsscut -s "$1".sht -hc "$1".h -hp _"$1"_ -i ../"$1".pcx -p "$1".pal -tc 0x"$2" -y
-       #echo "1st condition ok!"
+#      echo "2nd condition ok!"
 else
        ../../pcx2vrl -i ../"$1".pcx -o "$1".vrl -p "$1".pal -tc 0x"$2"
-       #echo "2nd condition ok!"
        echo check if "$1".sht exist!
+#      echo "3rd condition ok!"
 fi
 cd ../../
-
diff --git a/src/0.c b/src/0.c
index c4d0ece35a71ec5a590fcb8b6dc75eb7fafd16bc..b909273f88d9376857d75ab9a1e0f549d75c09e6 100755 (executable)
--- a/src/0.c
+++ b/src/0.c
@@ -87,7 +87,7 @@ int main(int argc,char **argv)
 \r
        IN_Startup();\r
        IN_Default(0,&player,ctrl_Keyboard1);\r
-       IN_initplayer(&player, 0);\r
+       EN_initplayer(&player, 0);\r
 \r
        /* setup camera and screen~ */\r
        modexHiganbanaPageSetup(&gvar.video);\r
index 1d8a1b938965840621ec39512e008d2d5a9fd7cc..088701d780637eeb7bb57c26ddf8070afd983983 100755 (executable)
  *\r
  */\r
 \r
+#include "src/lib/16_enti.h"\r
+\r
+void EN_initentity(entity_t *enti)\r
+{\r
+       //tx and ty inited by map\r
+       enti->x = enti->tx*TILEWH;\r
+       enti->y = enti->ty*TILEWH;\r
+       enti->triggerx = enti->tx;\r
+       enti->triggery = enti->ty+1;\r
+       enti->q = 1;\r
+       enti->d =2;\r
+       enti->hp=4;\r
+       enti->speed=4;\r
+       enti->persist_aniframe= enti->q;\r
+       enti->spt=(TILEWH/(enti->speed));       //speed per tile wwww\r
+       enti->spri->delay=1;\r
+       enti->invq=1;\r
+       enti->pred = enti->d;\r
+}\r
+\r
+//init player!\r
+void EN_initplayer(player_t *player, word pn)\r
+{\r
+       EN_initentity(&player[pn].enti);\r
+/*     player[0].info.x = player[0].tx;\r
+       player[0].info.xaxis = player[0].tx*TILEWH;\r
+       player[0].info.y = player[0].ty;\r
+       player[0].info.yaxis = player[0].ty*TILEWH;*/\r
+}\r
index bfda2c15f9b39f42c2cbd17bfba02222314ab7f3..dc76c8a45be528506f685d407d6f8b03dc4673b3 100755 (executable)
@@ -44,4 +44,7 @@
 //     word spt;               // speed per tile
 // } entity_t;
 
+void EN_initentity(entity_t *enti);
+void EN_initplayer(player_t *player, word pn);
+
 #endif
index 71307a6e9bcf22b00eabb750ee73f7310cfd9ca2..8d17c37ff27d8950ff024fc8f3f306c5fa6f0cc8 100755 (executable)
@@ -1275,22 +1275,3 @@ boolean IN_qb(byte kee)
        if(inpu.Keyboard[kee]==true) return 1;\r
        else return 0;\r
 }\r
-\r
-//init player!\r
-void IN_initplayer(player_t *player, word pn)\r
-{\r
-       player[pn].enti.x = player[pn].enti.tx*TILEWH;\r
-       player[pn].enti.y = player[pn].enti.ty*TILEWH;\r
-       player[pn].enti.triggerx = player[pn].enti.tx;\r
-       player[pn].enti.triggery = player[pn].enti.ty+1;\r
-/*     player[0].info.x = player[0].tx;\r
-       player[0].info.xaxis = player[0].tx*TILEWH;\r
-       player[0].info.y = player[0].ty;\r
-       player[0].info.yaxis = player[0].ty*TILEWH;*/\r
-       player[pn].enti.q =                             1;\r
-       player[pn].enti.d =2;\r
-       player[pn].enti.hp=4;\r
-       player[pn].enti.speed=4;\r
-       player[pn].enti.persist_aniframe=       1;\r
-       player[pn].enti.spt=(TILEWH/(player[pn].enti.speed));   //speed per tile wwww\r
-}\r
index f03b337d61970f27fa262916201e969ca90b7216..b84db1b104da8e561d62c39a5a0aa677fe3120be 100755 (executable)
@@ -302,6 +302,5 @@ extern boolean IN_UserInput(dword delay,boolean clear);
 extern boolean IN_KeyDown(byte code);\r
 extern void IN_ClearKey(byte code);\r
 extern boolean IN_qb(byte kee);\r
-void IN_initplayer(player_t *player, word pn);\r
 \r
 #endif\r
index d3705138856bea3ff60f19dce1f02ca8d691f013..311a3dd73a5f60954a35f3ddf378e1a02e174539 100755 (executable)
@@ -96,69 +96,7 @@ void print_anim_ids(struct sprite *spri)
        }\r
 }\r
 \r
-void oldanimate_spri(struct sprite *spri, video_t *video)\r
-{\r
-       int i;\r
-       // Events go here\r
-\r
-\r
-       vga_state.vga_graphics_ram = (VGA_RAM_PTR)video->page[0].data;//vga_state.vga_graphics_ram; // save original mem ptr\r
-\r
-\r
-       // Draw sprite\r
-       i = get_vrl_by_id(spri->spritesheet, spri->curr_spri_id, spri->sprite_vrl_cont);\r
-       if(i < 0)\r
-       {\r
-               //Quit (gv, "Error retriving required sprite");\r
-               return;\r
-       }\r
-\r
-       // replace VGA stride with our own and mem ptr. then sprite rendering at this stage is just (0,0)\r
-       vga_state.vga_draw_stride_limit = (video->page[0].width + 3 - spri->x) >> 2;\r
-\r
-#ifndef SPRITE\r
-       modexClearRegion(&video->page[0], spri->x, spri->y, 16, 32, 1);\r
-#else\r
-       draw_vrl1_vgax_modex(\r
-               spri->x,//-video->page[0].dx,\r
-               spri->y,//-video->page[0].dy,\r
-               spri->sprite_vrl_cont->vrl_header,\r
-               spri->sprite_vrl_cont->line_offsets,\r
-               spri->sprite_vrl_cont->buffer + sizeof(struct vrl1_vgax_header),\r
-               spri->sprite_vrl_cont->data_size\r
-       );\r
-#endif\r
-\r
-       // restore stride\r
-       vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = video->page[0].stridew;\r
-\r
-       // Depending on delay, update indices\r
-       switch(spri->delay){\r
-               // Delay = 0 means that sprite should loop. Nothing to change here\r
-               case 0:\r
-                       break;\r
-\r
-               // Delay = 1 means that on next time unit sprite should be changed\r
-               case 1:\r
-                       spri->curr_anim_spri++;\r
-\r
-                       // If we hit the end of an animation sequence, restart it\r
-                       if(!(spri->curr_spri_id = spri->curr_anim_list[spri->curr_anim_spri].sprite_id)){\r
-                               spri->curr_anim_spri = 0;\r
-                               spri->curr_spri_id = spri->curr_anim_list[spri->curr_anim_spri].sprite_id;\r
-                       }\r
-                       spri->delay = spri->curr_anim_list[spri->curr_anim_spri].delay;\r
-\r
-               // Delay > 1 means that we should not change sprite yet. Decrease delay\r
-               default:\r
-                       spri->delay--;\r
-                       break;\r
-       }\r
-       vga_state.vga_graphics_ram = video->omemptr;\r
-}\r
-\r
-\r
-void animate_spri(struct sprite *spri, video_t *video)\r
+void animate_spri(entity_t *enti, video_t *video)\r
 {\r
 #define GVARVIDEO video\r
 #define VMEMPAGESIZE2  GVARVIDEO->page[0].pagesize+GVARVIDEO->page[1].pagesize\r
@@ -172,12 +110,12 @@ void animate_spri(struct sprite *spri, video_t *video)
        // Events go here\r
 \r
 \r
-       omemptr = (VGA_RAM_PTR)video->page[0].data;//vga_state.vga_graphics_ram; // save original mem ptr\r
-       x=spri->x;\r
-       y=spri->y;\r
+       omemptr = (VGA_RAM_PTR)video->page[0].data;// save original mem ptr\r
+       x=enti->spri->x;\r
+       y=enti->spri->y;\r
 \r
        // Draw sprite\r
-       j = get_vrl_by_id(spri->spritesheet, spri->curr_spri_id, spri->sprite_vrl_cont);\r
+       j = get_vrl_by_id(enti->spri->spritesheet, enti->spri->curr_spri_id, enti->spri->sprite_vrl_cont);\r
        if(j < 0)\r
        {\r
                //Quit (gv, "Error retriving required sprite");\r
@@ -185,12 +123,13 @@ void animate_spri(struct sprite *spri, video_t *video)
        }\r
 \r
        // render box bounds. y does not need modification, but x and width must be multiple of 4\r
+       if(!GVARVIDEO->rss){\r
        if (x >= overdraw) rx = (x - overdraw) & (~3);\r
                else rx = -(GVARVIDEO->page[0].dx);\r
        if (y >= overdraw) ry = (y - overdraw);\r
                else ry = -(GVARVIDEO->page[0].dy);\r
-       h = spri->sprite_vrl_cont->vrl_header->height + overdraw + y - ry;\r
-       w = (x + spri->sprite_vrl_cont->vrl_header->width + (overdraw*2) + 3 - rx) & (~3);//round up\r
+       h = enti->spri->sprite_vrl_cont->vrl_header->height + overdraw + y - ry;\r
+       w = (x + enti->spri->sprite_vrl_cont->vrl_header->width + (overdraw*2) + 3 - rx) & (~3);//round up\r
        if ((rx+w) > GVARVIDEO->page[0].width) w = GVARVIDEO->page[0].width-rx;\r
        if ((ry+h) > GVARVIDEO->page[0].height) h = GVARVIDEO->page[0].height-ry;\r
 \r
@@ -204,9 +143,10 @@ void animate_spri(struct sprite *spri, video_t *video)
        vga_restore_rm0wm0();\r
 \r
        // replace VGA stride with our own and mem ptr. then sprite rendering at this stage is just (0,0)\r
-       vga_state.vga_draw_stride_limit = (GVARVIDEO->page[0].width + 3 - x) >> 2;//round up\r
        vga_state.vga_draw_stride = w >> 2;\r
        vga_state.vga_graphics_ram = omemptr + VMEMPAGESIZE2;\r
+       }else{ rx=ry=w=h=0; vga_state.vga_graphics_ram = (VGA_RAM_PTR)video->page[0].data; }\r
+       vga_state.vga_draw_stride_limit = (GVARVIDEO->page[0].width + 3 - x) >> 2;//round up\r
 \r
        // then the sprite. note modding ram ptr means we just draw to (x&3,0)\r
 #ifndef SPRITE\r
@@ -215,12 +155,13 @@ void animate_spri(struct sprite *spri, video_t *video)
        draw_vrl1_vgax_modex(\r
                x-rx,\r
                y-ry,\r
-               spri->sprite_vrl_cont->vrl_header,\r
-               spri->sprite_vrl_cont->line_offsets,\r
-               spri->sprite_vrl_cont->buffer + sizeof(struct vrl1_vgax_header),\r
-               spri->sprite_vrl_cont->data_size\r
+               enti->spri->sprite_vrl_cont->vrl_header,\r
+               enti->spri->sprite_vrl_cont->line_offsets,\r
+               enti->spri->sprite_vrl_cont->buffer + sizeof(struct vrl1_vgax_header),\r
+               enti->spri->sprite_vrl_cont->data_size\r
        );\r
 #endif\r
+       if(!GVARVIDEO->rss){\r
        // restore ptr\r
        vga_state.vga_graphics_ram = omemptr;\r
 \r
@@ -231,31 +172,38 @@ void animate_spri(struct sprite *spri, video_t *video)
        for (i=0;i < h;i++,o += vga_state.vga_draw_stride,o2 += GVARVIDEO->page[0].stridew) vga_wm1_mem_block_copy(o2,o,w >> 2);\r
        // must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally\r
        vga_restore_rm0wm0();\r
-\r
+       }\r
        // restore stride\r
        vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = GVARVIDEO->page[0].stridew;\r
 \r
        // Depending on delay, update indices\r
-       switch(spri->delay){\r
+//#define FRAME1 modexDrawSpriteRegion(pip[(pip->video->p)].page, x, y, 48, player[pn].enti.dire, 24, 32,      PLAYERBMPDATAPTR);\r
+//#define FRAME2 modexDrawSpriteRegion(pip[(pip->video->p)].page, x, y, 24, player[pn].enti.dire, 24, 32,      PLAYERBMPDATAPTR); stand\r
+//#define FRAME3 modexDrawSpriteRegion(pip[(pip->video->p)].page, x, y, 0, player[pn].enti.dire, 24, 32,       PLAYERBMPDATAPTR);\r
+//#define FRAME4 modexDrawSpriteRegion(pip[(pip->video->p)].page, x, y, 24, player[pn].enti.dire, 24, 32,      PLAYERBMPDATAPTR); stand\r
+       switch(enti->spri->delay)\r
+{\r
                // Delay = 0 means that sprite should loop. Nothing to change here\r
                case 0:\r
-                       break;\r
+               break;\r
 \r
                // Delay = 1 means that on next time unit sprite should be changed\r
                case 1:\r
-                       spri->curr_anim_spri++;\r
+                       if(enti->invq)  enti->spri->curr_anim_spri++;\r
+                       else                    enti->spri->curr_anim_spri--;\r
 \r
                        // If we hit the end of an animation sequence, restart it\r
-                       if(!(spri->curr_spri_id = spri->curr_anim_list[spri->curr_anim_spri].sprite_id)){\r
-                               spri->curr_anim_spri = 0;\r
-                               spri->curr_spri_id = spri->curr_anim_list[spri->curr_anim_spri].sprite_id;\r
+                       if(!(   enti->spri->curr_spri_id = enti->spri->curr_anim_list[enti->spri->curr_anim_spri].sprite_id)){\r
+                               enti->spri->curr_anim_spri = 1;\r
+                               enti->spri->curr_spri_id = enti->spri->curr_anim_list[enti->spri->curr_anim_spri].sprite_id;\r
+                               enti->invq=!enti->invq;\r
                        }\r
-                       spri->delay = spri->curr_anim_list[spri->curr_anim_spri].delay;\r
+                       enti->spri->delay = enti->spri->curr_anim_list[enti->spri->curr_anim_spri].delay;\r
 \r
                // Delay > 1 means that we should not change sprite yet. Decrease delay\r
                default:\r
-                       spri->delay--;\r
-                       break;\r
+                       enti->spri->delay--;\r
+               break;\r
        }\r
        vga_state.vga_graphics_ram = video->omemptr;\r
 }\r
index 7fc360c6aa8a295d0f4c3a34549c0797051df1ed..bb1462484dc8d686f0d4d96e3db6e5b9156c9573 100755 (executable)
@@ -67,8 +67,7 @@ int set_anim_by_id(struct sprite *spri, int anim_id);
  * In:\r
  * + struct sprite *spri - sprite to animate\r
  */\r
-void oldanimate_spri(struct sprite *spri, video_t *video);\r
-void animate_spri(struct sprite *spri, video_t *video);\r
+void animate_spri(entity_t *enti, video_t *video);\r
 \r
 void print_anim_ids(struct sprite *spri);\r
 \r
index 1b4b9914499e4230a59ef396b175e070a5f83fd6..97a5f8279e0b4e576c86c5dc340ad5f057dfaa0c 100755 (executable)
 #define FUNCTIONKEYFUNCTIONS \\r
        if(IN_KeyDown(sc_F6)){ VL_ShowPage(&gvar.video.page[0], 0, 0); IN_UserInput(1,1); } \\r
        if(IN_KeyDown(sc_F7)){ VL_ShowPage(&gvar.video.page[0], 0, 1); IN_UserInput(1,1); } \\r
-       if(IN_KeyDown(sc_T)){ \\r
-               switch(gvar.video.rs){\\r
-                       case 0:\\r
-                       case 1:\\r
-                               gvar.video.rs++;\\r
-                       break;\\r
-                       case 2:\\r
-                               gvar.video.rs=0;\\r
-                       break;}\\r
-                       IN_UserInput(1,1); }\r
+       if(IN_KeyDown(sc_T)){ gvar.video.rss=!gvar.video.rss; IN_UserInput(1,1); }\r
 #define FUNCTIONKEYFUNCTIONS0EXE \\r
        if(IN_KeyDown(sc_F6)){ VL_ShowPage(&gvar.video.page[gvar.video.panp], 0, 0); IN_UserInput(1,1); } \\r
        if(IN_KeyDown(sc_F7)){ VL_ShowPage(&gvar.video.page[gvar.video.panp], 0, 1); IN_UserInput(1,1); }\r
index 125e0a233a4ee2a6520f143250637bfca6d9ec66..77ef45490b01e1b35ad58b334f6ef6745ed02a2a 100755 (executable)
@@ -138,8 +138,10 @@ typedef    struct
        int sheetsetx; //NOT USED YET! entity sprite sheet set on the image x\r
        int sheetsety; //NOT USED YET! entity sprite sheet set on the image y\r
        nibble d;               //direction to render sprite!! wwww\r
+       nibble pred;    //prev. direction for animation changing\r
        word dire;              //sprite in use\r
-       nibble q,preq;  //loop variable for anumation and locking the playing to compleate the animation cycle to prevent issues with misalignment www\r
+       nibble q;               //loop variable for anumation and locking the playing to compleate the animation cycle to prevent issues with misalignment www\r
+       boolean invq;   //animation inversing\r
        word speed;             //entity speed!\r
        word spt;               //speed per tile\r
        struct sprite *spri; // sprite used by entity\r
@@ -218,7 +220,6 @@ typedef     struct          {
 typedef        struct\r
 {\r
        entity_t near   enti;\r
-       entity_t *ent;\r
 #ifdef __WATCOMC__\r
        //struct sprite *spri;  //supposively the sprite sheet data\r
        memptr          gr;\r
@@ -267,7 +268,7 @@ typedef struct
        byte vga_draw_stride;\r
        byte vga_draw_stride_limit;             // further X clipping\r
 //\r
-       word __near rs;                 //render switch\r
+       boolean __near rss;                     //render sprite switch\r
        sword __near sprifilei;         //player file's i\r
        boolean __near p;                       //render page number //BLEH\r
        boolean __near r;                       //page flip if true\r
index 8199666f3f4ff29e4cb7e05e0e366228232553eb..c3ecaa126e7e9bc4176aef2d2561ee240aea66b5 100755 (executable)
@@ -297,7 +297,7 @@ void modexHiganbanaPageSetup(video_t *video)
        video->vga_draw_stride= vga_state.vga_draw_stride;\r
        video->vga_draw_stride_limit=   vga_state.vga_draw_stride_limit;\r
        //sprite render switch\r
-       video->rs=0;\r
+       video->rss=0;\r
 \r
        //setup the buffersize\r
        video->page[0].dx=video->page[0].dy=\r
index df5af21ddfeebf270c86c6ba16b35768287f8bf0..6d0dd00381bd57a23c87a77ce59a0d627347161d 100755 (executable)
@@ -1101,19 +1101,19 @@ void shinku(global_game_variables_t *gv)
        }\r
 }\r
 \r
-void near ZC_drawframe(map_view_t *pip, player_t *player, word pn, sword x, sword y, word sw)\r
+void near ZC_drawframe(map_view_t *pip, entity_t *enti, sword x, sword y)\r
 {\r
-       switch(pip[0].video->rs)\r
+       switch(pip[0].video->rss)\r
        {\r
                case 0:\r
-                       animate_spri(player[pn].ent->spri, pip->video);\r
+                       animate_spri(enti, pip->video);\r
                break;\r
                case 1:\r
-                       oldanimate_spri(player[pn].ent->spri, pip->video);\r
-               break;\r
-               case 2:\r
-                       modexClearRegion(&(pip[0].page[0]), x, y, 16, 32, player[pn].enti.dire);\r
+                       animate_spri(enti, pip->video);\r
                break;\r
+//             case 2:\r
+//                     modexClearRegion(&(pip[0].page[0]), x, y, 16, 32, player[pn].enti.dire);\r
+//             break;\r
        }\r
 }\r
 \r
@@ -1222,7 +1222,6 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr
        sword x = player[pn].enti.x;\r
        sword y = player[pn].enti.y;\r
        sword qq,dd; //scroll offset\r
-       word ls = player[pn].enti.persist_aniframe;\r
        player[pn].enti.dire=10; //direction\r
 \r
        switch(scrollswitch)\r
@@ -1240,8 +1239,7 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr
                        qq = ((player[pn].enti.q)*(player[pn].enti.speed));\r
                break;\r
        }\r
-       if(pip[0].video->rs<2)\r
-               x-=4;\r
+       x-=4;\r
        y-=pip[0].map->tiles->tileHeight;\r
        switch (player[pn].enti.d)\r
        {\r
@@ -1269,40 +1267,22 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr
                break;\r
        }\r
        player[pn].enti.dire+=dd;\r
-       player[pn].ent->spri->delay=1;\r
-       if(player[pn].enti.q==1)\r
-               set_anim_by_id(player[pn].ent->spri, player[pn].enti.dire);\r
-               //pip->video->sprifilei = set_anim_by_id(player[pn].ent->spri, player[pn].enti.dire);   if(pip->video->sprifilei == -1){ printf("ERROR! %u\n", player[pn].enti.dire); return; }\r
-\r
-       //setting xy position\r
-       player[pn].ent->spri->x = x;\r
-       player[pn].ent->spri->y = y;\r
 \r
-       switch(ls)\r
+       if((player[pn].enti.q==1 && player[pn].enti.pred != player[pn].enti.d) || !dd)\r
        {\r
-               case 1:\r
-                       ZC_drawframe(pip, player, pn, x, y, ls);\r
-               break;\r
-               case 2:\r
-                       ZC_drawframe(pip, player, pn, x, y, ls);\r
-               break;\r
-               case 3:\r
-                       ZC_drawframe(pip, player, pn, x, y, ls);\r
-               break;\r
-               case 4:\r
-                       ZC_drawframe(pip, player, pn, x, y, ls);\r
-               break;\r
+               set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire); //pip->video->sprifilei = set_anim_by_id(player[pn].enti.spri, player[pn].enti.dire);       if(pip->video->sprifilei == -1){ printf("ERROR! %u\n", player[pn].enti.dire); return; }\r
+               player[pn].enti.pred = player[pn].enti.d;\r
        }\r
+\r
+       //setting xy position\r
+       player[pn].enti.spri->x = x;\r
+       player[pn].enti.spri->y = y;\r
+\r
+       //draw sprite\r
+       ZC_drawframe(pip, &player[pn].enti, x, y);\r
+\r
        pip->video->r=1;\r
-       if(player[pn].enti.persist_aniframe!=player[pn].enti.q)\r
-       {\r
-               sprintf(global_temp_status_text, "[%u]%u", player[pn].enti.persist_aniframe, player[pn].enti.q);\r
-               modexprint(&(pip->video->page[0]), player[pn].enti.x-(8*player[pn].enti.persist_aniframe), player[pn].enti.y-TILEWH-(8*player[pn].enti.persist_aniframe), 1, 20, 1, global_temp_status_text);\r
-               delay(500);\r
-       }\r
        //WALKTYPE_FRAM_PRINT;\r
-       //sprintf(global_temp_status_text, " %u", player[pn].enti.dire);\r
-       //modexprint(&(pip->video->page[0]), player[pn].enti.x-(8*player[pn].enti.persist_aniframe)+8, player[pn].enti.y-TILEWH-(8*player[pn].enti.persist_aniframe), 1, 20, 1, global_temp_status_text);\r
 }\r
 \r
 /*\r
@@ -1320,12 +1300,12 @@ boolean coll_check(int x, int y, int dx, int dy, map_view_t *map_v)
        return dx && 1;//crossable_tile(x + dx, map_v) || dy && crossable_tile(y + dy, map_v);\r
 }\r
 \r
-boolean ZC_walk2(entity_t *ent, map_view_t *map_v)\r
+boolean ZC_walk2(entity_t *enti, map_view_t *map_v)\r
 {\r
        //return 1;\r
        int dx = 1;\r
        int dy = 1;\r
-       switch(ent->d)\r
+       switch(enti->d)\r
        {\r
                case 2:\r
                        return 0;\r
@@ -1340,7 +1320,7 @@ boolean ZC_walk2(entity_t *ent, map_view_t *map_v)
                        dx = 0;\r
                        break;\r
        }\r
-       if(coll_check(ent->x, ent->y, dx, dy,  map_v))\r
+       if(coll_check(enti->x, enti->y, dx, dy,  map_v))\r
        {\r
                // Allow movement\r
                // Set speed\r
index 396798e0a2c084a25e5b3d94bde9c41957999a13..84a6737d75a4f34b92e4b8303ee14b9ab9dfdfcb 100755 (executable)
@@ -95,6 +95,7 @@ typedef struct {
 //printf("map.width=%d map.height=%d   map.data[0]=%d\n", mv[0].map->width, mv[0].map->height, mv[0].map->data[0]);\r
 //printf("&global_temp_status_text = %Fp\n", &global_temp_status_text);\r
 //print_anim_ids(player[0].ent->spri);\r
+//printf("     tile data value at player trigger position: %d\n\n", mv[0].map->data[(player[0].enti.triggerx-1)+(map.width*(player[0].enti.triggery-1))]);\r
 #define SCROLLEXITMESG         printf("tx: %d  ", mv[0].tx);\\r
        printf("ty: %d\n", mv[0].ty);\\r
        printf("\n");\\r
@@ -104,9 +105,8 @@ typedef struct {
        printf("        tx: %d", player[0].enti.tx); printf("   ty: %d\n", player[0].enti.ty);\\r
        printf("        triggx: %d", player[0].enti.triggerx); printf(" triggy: %d\n", player[0].enti.triggery);\\r
        printf("        hp: %d", (player[0].enti.hp));  printf("        q: %d", player[0].enti.q);      printf("        player.info.dir: %d", player[0].info.dir);      printf("        player.d: %d ", player[0].enti.d);\\r
-               printf("        pdir=%d\n", player[0].pdir); printf("   aniframe=%u", player[0].enti.persist_aniframe);\\r
-       printf("        tile data value at player trigger position: %d\n\n", mv[0].map->data[(player[0].enti.triggerx-1)+(map.width*(player[0].enti.triggery-1))]);\\r
-\\r
+               printf("        pdir=%d\n", player[0].pdir); printf("   aniframe=%u", player[0].enti.persist_aniframe); printf("        delay=%u", player[0].enti.spri->delay);\\r
+printf("\n\n");\\r
        printf("Virtual Screen: %dx", gvar.video.page[0].width);        printf("%d      ", gvar.video.page[0].height);\\r
        printf("Screen: %dx", gvar.video.page[0].sw);   printf("%d\n", gvar.video.page[0].sh);\\r
        printf("virtual tile resolution: %dx", gvar.video.page[0].tilesw);      printf("%d      ", gvar.video.page[0].tilesh);\\r
@@ -158,7 +158,7 @@ void mapDrawWRow(map_view_t *mv, int tx, int ty, word y);
 void mapDrawWCol(map_view_t *mv, int tx, int ty, word x);\r
 //void qclean();\r
 void shinku(global_game_variables_t *gv);\r
-void near ZC_drawframe(map_view_t *pip, player_t *player, word pn, sword x, sword y, word sw);\r
+void near ZC_drawframe(map_view_t *pip, entity_t *enti, sword x, sword y);\r
 void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch);\r
 void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch);\r
 \r
index 1d92d1fb4d6ede1b4f54aa08f55f44eb3d946947..9c532d51af60b62419aa8dd1b59744f060d54c1c 100755 (executable)
@@ -113,17 +113,16 @@ void main(int argc, char *argv[])
        ZC_MVSetup(&mv, &map, &gvar);\r
 \r
        //renderswitch\r
-       gvar.video.rs=2;\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
 \r
        playerXYpos(0, 0, &player, &mv, 0);\r
-       IN_initplayer(&player, 0);\r
-       player[0].ent->spri->x = player[0].enti.x-4;\r
-       player[0].ent->spri->y = player[0].enti.y-16;\r
-       player[0].ent->spri->delay = 1;\r
+       EN_initplayer(&player, 0);\r
+       player[0].enti.spri->x = player[0].enti.x-4;\r
+       player[0].enti.spri->y = player[0].enti.y-16;\r
 \r
 #ifndef        SPRITE\r
        modexClearRegion(mv[0].page, player[0].enti.x, player[0].enti.y-TILEWH, 16, 32, 15);\r
index c933f9534e8aa212f609798e46187cacf58342ed..55db2017830ef7e9a2d5ff3e4222afa16aa4eb61 100755 (executable)
@@ -84,7 +84,7 @@ void main(int argc, char *argv[])
 \r
        //IN_Startup();\r
        IN_Default(0,&player,ctrl_Keyboard1);\r
-       IN_initplayer(&player, 0);\r
+       EN_initplayer(&player, 0);\r
 \r
        VGAmodeX(1, 1, &gvar);\r
        //====modexPalBlack();\r
index b814fe818dd51806ae0501b3350ff212597a4b59..14baca184f71fe280f1b25722aa7ed1547f3dcab 100755 (executable)
@@ -42,7 +42,7 @@ void main()
        word start;\r
        float t1, t2;\r
        //boolean baka;\r
-       struct sprite spri;\r
+       entity_t enti;\r
        //vrl1_vgax_offset_t * off, *off1;\r
        struct vrs_container vrs;\r
        vrl1_vgax_offset_t **vrl_line_offsets;\r
@@ -90,15 +90,15 @@ void main()
 \r
 \r
        //read_vrs(&gvar, "data/spri/chikyuu.vrs", &vrs);\r
-       spri.spritesheet = &vrs;\r
-       spri.sprite_vrl_cont = malloc(sizeof(struct vrl_container));\r
-       i = set_anim_by_id(&spri, 31);\r
+       enti.spri->spritesheet = &vrs;\r
+       enti.spri->sprite_vrl_cont = malloc(sizeof(struct vrl_container));\r
+       i = set_anim_by_id((enti.spri), 31);\r
        if (i == -1)\r
        {\r
                return;\r
        }\r
-       spri.x = TILEWH-4;\r
-       spri.y = TILEWH;\r
+       enti.spri->x = TILEWH-4;\r
+       enti.spri->y = TILEWH;\r
 \r
 //     Uncomment to see broken sprites\r
 /*     sega = mm.bufferseg;\r
@@ -121,13 +121,11 @@ void main()
        modexPalUpdate1(pal);*/\r
        VL_LoadPalFile("data/spri/chikyuu.pal", &palette);\r
        for (i = 0; i < 10; i++){\r
-               spri.delay = 1;\r
+               enti.spri->delay = 1;\r
 \r
-               if(i==5) set_anim_by_id(&spri, 21);\r
-               //else if(i>=10) set_anim_by_id(&spri, 31);\r
-               //else if(i<=15) set_anim_by_id(&spri, 41);\r
+               if(i==5) set_anim_by_id(enti.spri, 21);\r
 \r
-               animate_spri(&spri, &gvar.video);// spri.x += 16;\r
+               animate_spri(&enti, &gvar.video);// enti.spri->x += 16;\r
                delay(500);\r
        }\r
 \r
@@ -150,10 +148,10 @@ FUNCTIONKEYFUNCTIONS;
        MM_DumpData(&gvar);\r
        MM_Report_(&gvar);\r
        Shutdown16(&gvar);\r
-       free(spri.sprite_vrl_cont);\r
+       free(enti.spri->sprite_vrl_cont);\r
        free(vrl_line_offsets);\r
        MM_FreePtr(&bigbuffer, &gvar);\r
-       //MM_FreePtr(&((void __based(sega)*)spri.spritesheet->buffer), &mm);\r
+       //MM_FreePtr(&((void __based(sega)*)enti.spri->spritesheet->buffer), &mm);\r
        //printf("CPU to VGA: %f\n", t1);\r
        //printf("VGA to VGA: %f\n", t2);\r
        heapdump(&gvar);\r
index 71579363d415ee48038832010c0ad4a2c2a68c06..a02ae0da9590a0299568a56e833e35a8c4f925bd 100755 (executable)
@@ -56,9 +56,9 @@ void main(int argc, char *argv[])
 \r
        // OK, this one takes hellova time and needs to be done in farmalloc or MM_...\r
        //IN CA i think you use CAL_SetupGrFile but i do think we should work together on this part --sparky4\r
-       player[0].ent = malloc(sizeof(entity_t));\r
-       player[0].ent->spri = malloc(sizeof(struct sprite));\r
-       player[0].ent->spri->spritesheet = malloc(sizeof(struct vrs_container));\r
+       //player[0].ent = malloc(sizeof(entity_t));\r
+       player[0].enti.spri = malloc(sizeof(struct sprite));\r
+       player[0].enti.spri->spritesheet = malloc(sizeof(struct vrs_container));\r
 \r
        // create the map\r
 //     fprintf(stderr, "testing map load~      ");\r
@@ -68,7 +68,7 @@ void main(int argc, char *argv[])
 //     fprintf(stderr, "yay map loaded~~\n");\r
 \r
        // data\r
-       read_vrs(&gvar, "data/spri/chikyuu.vrs", player[0].ent->spri->spritesheet);\r
+       read_vrs(&gvar, "data/spri/chikyuu.vrs", player[0].enti.spri->spritesheet);\r
        PCXBMP = bitmapLoadPcx("data/chikyuu.pcx", &gvar); // load sprite\r
 \r
        // input!\r
@@ -102,22 +102,20 @@ void main(int argc, char *argv[])
        ZC_MVSetup(&mv, &map, &gvar);\r
 \r
        //renderswitch\r
-       gvar.video.rs=0;\r
-       //player[0].ent->spri->x = player[0].ent->spri->y = TILEWH;\r
+       gvar.video.rss=0;\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
 \r
        playerXYpos(0, 0, &player, &mv, 0);\r
-       IN_initplayer(&player, 0);\r
-       player[0].ent->spri->x = player[0].enti.x-4;\r
-       player[0].ent->spri->y = player[0].enti.y-16;\r
-       player[0].ent->spri->delay = 0;\r
+       EN_initplayer(&player, 0);\r
+       player[0].enti.spri->x = player[0].enti.x-4;\r
+       player[0].enti.spri->y = player[0].enti.y-16;\r
 \r
        player[0].enti.dire=31;\r
-       gvar.video.sprifilei = set_anim_by_id(player[0].ent->spri, player[0].enti.dire);\r
-       //print_anim_ids(player[0].ent->spri);\r
+       gvar.video.sprifilei = set_anim_by_id(player[0].enti.spri, player[0].enti.dire);\r
+       //print_anim_ids(player[0].enti.spri);\r
        if (gvar.video.sprifilei == -1)\r
        {\r
 #ifdef FADE\r
@@ -128,7 +126,7 @@ void main(int argc, char *argv[])
                modexFadeOn(4, dpal);\r
 #endif\r
        }\r
-       animate_spri((player[0].ent->spri), &gvar.video);\r
+       animate_spri(&(player[0].enti), &gvar.video);\r
 \r
        VL_ShowPage(mv[0].page, 0, 0);//modexShowPage(mv[0].page);//!(gvar.video.p)\r
 #ifdef FADE\r
@@ -195,10 +193,10 @@ void main(int argc, char *argv[])
                        {\r
                                case 11:\r
                                        i=0;\r
-                                       player[0].ent->spri->x = TILEWH;\r
+                                       player[0].enti.spri->x = TILEWH;\r
                                default:\r
                                        i++;\r
-                                       player[0].ent->spri->delay = 0; animate_spri((player[0].ent->spri), &gvar.video);// player[0].ent->spri->x += 16;\r
+                                       animate_spri(&(player[0].enti), &gvar.video);// player[0].enti.spri->x += 16;\r
                                break;\r
                        }\r
                }\r