--- /dev/null
+\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
--- /dev/null
+\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
--- /dev/null
+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
+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
+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
+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
+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"
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)
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
#! /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 ../../
-
\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
*\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
// word spt; // speed per tile
// } entity_t;
+void EN_initentity(entity_t *enti);
+void EN_initplayer(player_t *player, word pn);
+
#endif
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
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
}\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
// 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
}\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
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
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
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
* 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
#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
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
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
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
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
}\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
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
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
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
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
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
//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
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
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
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
\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
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
\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
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
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
\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
// 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
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
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
{\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