]> 4ch.mooo.com Git - 16.git/commitdiff
wwww
authorsparky4 <sparky4@cock.li>
Fri, 26 Aug 2016 20:55:36 +0000 (15:55 -0500)
committersparky4 <sparky4@cock.li>
Fri, 26 Aug 2016 20:55:36 +0000 (15:55 -0500)
41 files changed:
0.exe [new file with mode: 0755]
16.exe [new file with mode: 0755]
WBUILD.BAT [new file with mode: 0755]
bakapi.exe [new file with mode: 0755]
data/spri/CHUBACW0.VRL
data/spri/CHUBACW1.VRL
data/spri/CHUBACW2.VRL
data/spri/CHUBFCW0.VRL
data/spri/CHUBFCW1.VRL
data/spri/CHUBFCW2.VRL
data/spri/CHUBLCW0.VRL
data/spri/CHUBLCW1.VRL
data/spri/CHUBLCW2.VRL
data/spri/CHUBRCW0.VRL
data/spri/CHUBRCW1.VRL
data/spri/CHUBRCW2.VRL
data/spri/chikyuu.sht
data/spri/chikyuu.vrs
exmmtest.exe [new file with mode: 0755]
fmemtest.exe [new file with mode: 0755]
fontgfx.exe [new file with mode: 0755]
fonttest.exe [new file with mode: 0755]
inputest.exe [new file with mode: 0755]
makefile
maptest.exe [new file with mode: 0755]
palettec.exe [new file with mode: 0755]
palettel.exe [new file with mode: 0755]
pcxtest.exe [new file with mode: 0755]
pcxtest2.exe [new file with mode: 0755]
scroll.exe [new file with mode: 0755]
src/lib/16_in.h
src/lib/16_sprit.c [new file with mode: 0755]
src/lib/16_sprit.h [new file with mode: 0755]
src/lib/scroll16.c
src/vrstest.c
test.exe [new file with mode: 0755]
test0.exe [new file with mode: 0755]
tesuto.exe [new file with mode: 0755]
vgmtest.exe [new file with mode: 0755]
vrstest.exe [new file with mode: 0755]
wbuild.sh

diff --git a/0.exe b/0.exe
new file mode 100755 (executable)
index 0000000..f046f5f
Binary files /dev/null and b/0.exe differ
diff --git a/16.exe b/16.exe
new file mode 100755 (executable)
index 0000000..b3cc650
Binary files /dev/null and b/16.exe differ
diff --git a/WBUILD.BAT b/WBUILD.BAT
new file mode 100755 (executable)
index 0000000..53eddae
--- /dev/null
@@ -0,0 +1,7 @@
+@echo off
+wmake -h clean
+wmake -h
+rem wmake -h comp
+if exist *.err (wmake vomitchan)
+if exist *.o (del *.o)
+if exist *.obj (del *.obj)
diff --git a/bakapi.exe b/bakapi.exe
new file mode 100755 (executable)
index 0000000..9837b98
Binary files /dev/null and b/bakapi.exe differ
index 0fc2b16eb70ddb5aa226dd9925085bb99e86f756..1034a61dc4a22d6862d5c0e686c6cf1ef88f72ca 100755 (executable)
Binary files a/data/spri/CHUBACW0.VRL and b/data/spri/CHUBACW0.VRL differ
index 12029e8a54edfa7d763a75cc18fc4920d0fb9e3a..aaa6ca5e911d4e6363dae831c7d95bc02935ac11 100755 (executable)
Binary files a/data/spri/CHUBACW1.VRL and b/data/spri/CHUBACW1.VRL differ
index 4b030882e3d6655195bd5e0e19d3f6ef725135ec..171c45c34e379e154e8bf1fbe5d2ceb049447afc 100755 (executable)
Binary files a/data/spri/CHUBACW2.VRL and b/data/spri/CHUBACW2.VRL differ
index e4414b184afbe780a0163f45c171477b989f52fa..cfc4f79554e1c9393c107f9fd23196dc1a609241 100755 (executable)
Binary files a/data/spri/CHUBFCW0.VRL and b/data/spri/CHUBFCW0.VRL differ
index af6575caf08ec42a1e9b20fb507ad95317832d79..f6424ede55bf1bb01be4008120c8ccaa0c1f2cf2 100755 (executable)
Binary files a/data/spri/CHUBFCW1.VRL and b/data/spri/CHUBFCW1.VRL differ
index e13673a5a2bae57616f1443ffb9a2ebb2a16fd33..2b7ce708b88efa53df83f4a24e737bb752e4e5b4 100755 (executable)
Binary files a/data/spri/CHUBFCW2.VRL and b/data/spri/CHUBFCW2.VRL differ
index 45678063e673e845981a93028970b4531812e650..0a10d098a360c1b040198d2b8f57db21d6850414 100755 (executable)
Binary files a/data/spri/CHUBLCW0.VRL and b/data/spri/CHUBLCW0.VRL differ
index 79d3b5b3f5e2d94981d7e6643c1521ac60c0e28d..d8cb40da2c30a021e90cd3f90302dd312021d82a 100755 (executable)
Binary files a/data/spri/CHUBLCW1.VRL and b/data/spri/CHUBLCW1.VRL differ
index 155199c9f73c5f3ad2967312f12ffff191cfe5ae..7d92a3da006f052a6f327cd65284afc6975dead9 100755 (executable)
Binary files a/data/spri/CHUBLCW2.VRL and b/data/spri/CHUBLCW2.VRL differ
index 0360dde913b0ae2057df41e71645f09c7e80528d..85d9565326ea9907b3c483336eb95374994eda8f 100755 (executable)
Binary files a/data/spri/CHUBRCW0.VRL and b/data/spri/CHUBRCW0.VRL differ
index cfe4814b8f2d0e162ecb31b1c2b9eacfd0a2f212..11ad4c94e61a9fca13559928bcd71713d53ec3bc 100755 (executable)
Binary files a/data/spri/CHUBRCW1.VRL and b/data/spri/CHUBRCW1.VRL differ
index c5a1fba4359bd0db64d05b5b9f3b4819896f845b..0c46190a94600a4ec463dfd4ae909095fef8b30d 100755 (executable)
Binary files a/data/spri/CHUBRCW2.VRL and b/data/spri/CHUBRCW2.VRL differ
index adb951de832c4877b76066e76986bda828b6284f..8ae88cf08f11bdcdf2d410e1a870d32ea8da68eb 100755 (executable)
 # player, forward, frame 1/3
 +CHUBFCW0@10
 xy=0,0
-wh=16,32
+wh=24,32
 # player, forward, frame 2/3
 +CHUBFCW1@11
-xy=16,0
-wh=16,32
+xy=24,0
+wh=24,32
 # player, forward, frame 3/3
 +CHUBFCW2@12
-xy=32,0
-wh=16,32
+xy=48,0
+wh=24,32
 
 # player, left, frame 1/3
 +CHUBLCW0@20
 xy=0,32
-wh=16,32
+wh=24,32
 # player, left, frame 2/3
 +CHUBLCW1@21
-xy=16,32
-wh=16,32
+xy=24,32
+wh=24,32
 # player, left, frame 3/3
 +CHUBLCW2@22
-xy=32,32
-wh=16,32
+xy=48,32
+wh=24,32
 
 # player, right, frame 1/3
 +CHUBRCW0@30
 xy=0,64
-wh=16,32
+wh=24,32
 # player, right, frame 2/3
 +CHUBRCW1@31
-xy=16,64
-wh=16,32
+xy=24,64
+wh=24,32
 # player, right, frame 3/3
 +CHUBRCW2@32
-xy=32,64
-wh=16,32
+xy=48,64
+wh=24,32
 
 # player, away, frame 1/3
 +CHUBACW0@40
 xy=0,96
-wh=16,32
+wh=24,32
 # player, away, frame 2/3
 +CHUBACW1@41
-xy=16,96
-wh=16,32
+xy=24,96
+wh=24,32
 # player, away, frame 3/3
 +CHUBACW2@42
-xy=32,96
-wh=16,32
+xy=48,96
+wh=24,32
 
 # begin animation list section. must come after sprite sheet
 *animation
index ceacd3de17b457326b966bd124f6f2ff277c88ff..ac1f7c2babb882193959bc1ab57aaf990b3253f6 100755 (executable)
Binary files a/data/spri/chikyuu.vrs and b/data/spri/chikyuu.vrs differ
diff --git a/exmmtest.exe b/exmmtest.exe
new file mode 100755 (executable)
index 0000000..7135435
Binary files /dev/null and b/exmmtest.exe differ
diff --git a/fmemtest.exe b/fmemtest.exe
new file mode 100755 (executable)
index 0000000..e15d50c
Binary files /dev/null and b/fmemtest.exe differ
diff --git a/fontgfx.exe b/fontgfx.exe
new file mode 100755 (executable)
index 0000000..9375cd9
Binary files /dev/null and b/fontgfx.exe differ
diff --git a/fonttest.exe b/fonttest.exe
new file mode 100755 (executable)
index 0000000..ff68b22
Binary files /dev/null and b/fonttest.exe differ
diff --git a/inputest.exe b/inputest.exe
new file mode 100755 (executable)
index 0000000..4a4bb03
Binary files /dev/null and b/inputest.exe differ
index 70f77a3a003a437b5e1e991cf593fe89937dd0b2..6cfd77a922183ff98970436030314dc7765e0e73 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -41,12 +41,18 @@ COPYCOMMAND=cp -f
 DIRSEP=/
 OBJ=o
 DUMP=cat
-!else
-REMOVECOMMAND=del
-COPYCOMMAND=copy /y
+WCL=wcl
+WLIB=wlib
+UPX=upx
+!else          #DOS ^^
+REMOVECOMMAND=*del
+COPYCOMMAND=*copy /y
 DIRSEP=\
 OBJ=OBJ
-DUMP=type
+DUMP=*type
+WCL=*wcl
+WLIB=*wlib
+UPX=*upx
 !endif
 
 TARGET_OS = dos
@@ -83,7 +89,7 @@ DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 $(SFLAGS)
 ZFLAGS=-zk0 -zc -zp8 -zm $(WCLQ)
 LFLAGS=-lr -l=dos
 CFLAGS=$(AFLAGS) $(IFLAGS) -wo -i$(DOSLIB) $(LFLAGS) -fo=.$(OBJ)
-OFLAGS=-obmilr -oe=24 -out -oh -ei -zp8 -fpi87  -onac -ol+ -ok####x
+OFLAGS=-obmilr -oe=24 -out -oh -ei -zp8 -fpi87  -onac -ol+ -ok##x
 FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS)
 
 #
@@ -92,7 +98,7 @@ FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS)
 VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ)
 DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
 16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_timer.$(OBJ)
-GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) $(DOSLIBLIBS) 16_vrs.$(OBJ) 16_sprite.$(OBJ)
+GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) $(DOSLIBLIBS) 16_vrs.$(OBJ) 16_sprit.$(OBJ)
 #planar.$(OBJ) 16planar.$(OBJ)
 DOSLIBLIBS=$(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib
 
@@ -103,7 +109,7 @@ DOSLIBLIBS += $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)8250$(DIRSEP)dos86h$(DIRSEP)8250.l
 !endif
 
 TESTEXEC = test.exe test0.exe pcxtest.exe pcxtest2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe palettel.exe exmmtest.exe vrstest.exe
-#planrpcx.exe test2.exe
+##planrpcx.exe test2.exe
 EXEC = 16.exe bakapi.exe tesuto.exe 0.exe $(TESTEXEC)
 
 all: $(EXEC) joytest.exe
@@ -114,199 +120,188 @@ all: $(EXEC) joytest.exe
 !ifeq DEBUGSERIAL 1
 16LIBOBJS += $(DOSLIBLIBS)
 !endif
+
 #
 #game and bakapi executables
 #
 16.exe: 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
-       wcl $(FLAGS) $(16FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=16.mah
+       $(WCL) $(FLAGS) $(16FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=16.mah
 
 bakapi.exe: bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS)
-       wcl $(FLAGS) $(BAKAPIFLAGS) bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS) -fm=bakapi.mah
-#modex.lib
+       $(WCL) $(FLAGS) $(BAKAPIFLAGS) bakapi.$(OBJ) gfx.lib $(DOSLIBLIBS) -fm=bakapi.mah
+
 #
 #Test Executables!
 #
 scroll.exe: scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
-       wcl $(FLAGS) scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=scroll.mah
+       $(WCL) $(FLAGS) scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=scroll.mah
 scroll.$(OBJ): $(SRC)scroll.c
-       wcl $(FLAGS) -c $(SRC)scroll.c
-
+       $(WCL) $(FLAGS) -c $(SRC)scroll.c
 
-# NOTE: dos86h = 16-bit huge memory model. memory model must match!
 tesuto.exe: tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
-#      %write tmp.cmd option quiet option max=tesuto.mah $(DOSLIB_LDFLAGS_DOS16H) file tesuto.obj name tesuto.exe
-#      %write tmp.cmd library $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)cpu$(DIRSEP)dos86h$(DIRSEP)cpu.lib
-#      %write tmp.cmd library $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib
-#      @wlink @tmp.cmd
-
-#
-# add this ww to reduce junk www
-#
-# NTS we have to construct the command line into tmp.cmd because for MS-DOS
-# systems all arguments would exceed the pitiful 128 char command line limit
-#.C.OBJ:
-#      %write temp.cmd $(CFLAGS_THIS) $(CFLAGS_CON) $[@
-#      wcl @temp.cmd
-#
-       wcl $(FLAGS) $(WCLQ) tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
+       $(WCL) $(FLAGS) $(WCLQ) tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
 tesuto.$(OBJ): $(SRC)tesuto.c
-       wcl $(FLAGS) $(WCLQ) -c $(SRC)tesuto.c
+       $(WCL) $(FLAGS) $(WCLQ) -c $(SRC)tesuto.c
 
 0.exe: 0.$(OBJ) $(DOSLIBLIBS) gfx.lib $(16LIB)
-       wcl $(FLAGS) $(WCLQ) 0.$(OBJ) $(DOSLIBLIBS) gfx.lib $(16LIB)
+       $(WCL) $(FLAGS) $(WCLQ) 0.$(OBJ) $(DOSLIBLIBS) gfx.lib $(16LIB)
 0.$(OBJ): $(SRC)0.c
-       wcl $(FLAGS) $(WCLQ) -c $(SRC)0.c
+       $(WCL) $(FLAGS) $(WCLQ) -c $(SRC)0.c
 
 test.exe: test.$(OBJ) gfx.lib $(DOSLIBLIBS) $(16LIB)
-       wcl $(FLAGS) test.$(OBJ) gfx.lib $(DOSLIBLIBS) $(16LIB) -fm=test.mah
+       $(WCL) $(FLAGS) test.$(OBJ) gfx.lib $(DOSLIBLIBS) $(16LIB) -fm=test.mah
 
 #test2.exe: test2.$(OBJ) $(DOSLIBLIBS) gfx.lib
-#      wcl $(FLAGS) test2.$(OBJ) $(DOSLIBLIBS) gfx.lib -fm=test2.mah
+#      $(WCL) $(FLAGS) test2.$(OBJ) $(DOSLIBLIBS) gfx.lib -fm=test2.mah
 
 test0.exe: test0.$(OBJ)
-       wcl $(FLAGS) test0.$(OBJ) -fm=test0.mah
+       $(WCL) $(FLAGS) test0.$(OBJ) -fm=test0.mah
 
 fonttest.exe: fonttest.$(OBJ) $(16LIB) gfx.lib
-       wcl $(FLAGS) fonttest.$(OBJ) $(16LIB) gfx.lib -fm=fonttest.mah
+       $(WCL) $(FLAGS) fonttest.$(OBJ) $(16LIB) gfx.lib -fm=fonttest.mah
 
 #fonttes0.exe: fonttes0.$(OBJ) $(16LIB)
-#      wcl $(FLAGS) fonttes0.$(OBJ) $(16LIB)
+#      $(WCL) $(FLAGS) fonttes0.$(OBJ) $(16LIB)
 
 fontgfx.exe: fontgfx.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
-       wcl $(FLAGS) fontgfx.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS) -fm=fontgfx.mah
+       $(WCL) $(FLAGS) fontgfx.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS) -fm=fontgfx.mah
 
 inputest.exe: inputest.$(OBJ) $(16LIB)
-       wcl $(FLAGS) inputest.$(OBJ) $(16LIB) -fm=inputest.mah
+       $(WCL) $(FLAGS) inputest.$(OBJ) $(16LIB) -fm=inputest.mah
 
 #sountest.exe: sountest.$(OBJ) $(16LIB)
-#      wcl $(FLAGS) sountest.$(OBJ) $(16LIB)
+#      $(WCL) $(FLAGS) sountest.$(OBJ) $(16LIB)
 
 pcxtest.exe: pcxtest.$(OBJ) gfx.lib
-       wcl $(FLAGS) pcxtest.$(OBJ) gfx.lib -fm=pcxtest.mah
+       $(WCL) $(FLAGS) pcxtest.$(OBJ) gfx.lib -fm=pcxtest.mah
 
 vrstest.exe: vrstest.$(OBJ) gfx.lib $(16LIB)
-       wcl $(FLAGS) vrstest.$(OBJ) gfx.lib $(16LIB) -fm=vrstest.mah
+       $(WCL) $(FLAGS) vrstest.$(OBJ) gfx.lib $(16LIB) -fm=vrstest.mah
 
 palettec.exe: palettec.$(OBJ) gfx.lib #$(16LIB)
-       wcl $(FLAGS) palettec.$(OBJ) gfx.lib -fm=palettec.mah #$(16LIB)
+       $(WCL) $(FLAGS) palettec.$(OBJ) gfx.lib -fm=palettec.mah #$(16LIB)
 
 palettel.exe: palettel.$(OBJ) gfx.lib #$(16LIB)
-       wcl $(FLAGS) palettel.$(OBJ) gfx.lib -fm=palettel.mah #$(16LIB)
+       $(WCL) $(FLAGS) palettel.$(OBJ) gfx.lib -fm=palettel.mah #$(16LIB)
 
 pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib
-       wcl $(FLAGS) pcxtest2.$(OBJ) gfx.lib -fm=pcxtest2.mah
+       $(WCL) $(FLAGS) pcxtest2.$(OBJ) gfx.lib -fm=pcxtest2.mah
 
 ##planrpcx.exe: planrpcx.$(OBJ) gfx.lib
-##     wcl $(FLAGS) planrpcx.$(OBJ) gfx.lib -fm=planrpcx.mah
+##     $(WCL) $(FLAGS) planrpcx.$(OBJ) gfx.lib -fm=planrpcx.mah
 
 maptest.exe: maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib
-       wcl $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=maptest.mah
+       $(WCL) $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib -fm=maptest.mah
 
 fmemtest.exe: fmemtest.$(OBJ) $(16LIB)
-       wcl $(FLAGS) fmemtest.$(OBJ) $(16LIB) -fm=fmemtest.mah
+       $(WCL) $(FLAGS) fmemtest.$(OBJ) $(16LIB) -fm=fmemtest.mah
 
 exmmtest.exe: exmmtest.$(OBJ) 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ)
-       wcl $(FLAGS) exmmtest.$(OBJ) -fm=exmmtest.mah $(16LIB)
-####0000       ./wlink32 @__wcl__.lnk
+       $(WCL) $(FLAGS) exmmtest.$(OBJ) -fm=exmmtest.mah $(16LIB)
 
 vgmtest.exe: vgmtest.$(OBJ) vgmsnd.lib $(16LIB)
-       wcl $(FLAGS) vgmtest.$(OBJ) vgmsnd.lib -fm=vgmtest.mah $(16LIB)
-       #====wcl -mc vgmtest.$(OBJ) $(VGMSNDOBJ) -fm=vgmtest.mah
+       $(WCL) $(FLAGS) vgmtest.$(OBJ) vgmsnd.lib -fm=vgmtest.mah $(16LIB)
 
 
 #
 #executable's objects
 #
+#!ifndef __LINUX__
+#{$(SRC)}.c.$(OBJ) :
+{src}.c.$(OBJ) :
+       $(WCL) $(FLAGS) -c $[*
+#!endif
+
 16.$(OBJ): $(SRC)16.h $(SRC)16.c
-       wcl $(FLAGS) -c $(SRC)16.c
+       $(WCL) $(FLAGS) -c $(SRC)16.c
 
 bakapi.$(OBJ): $(SRC)bakapi.h $(SRC)bakapi.c
-       wcl $(FLAGS) -c $(SRC)bakapi.c
+       $(WCL) $(FLAGS) -c $(SRC)bakapi.c
 
 test.$(OBJ): $(SRC)test.c $(SRCLIB)modex16.h
-       wcl $(FLAGS) -c $(SRC)test.c
+       $(WCL) $(FLAGS) -c $(SRC)test.c
 
 #test2.$(OBJ): $(SRC)test2.c $(SRCLIB)modex16.h
-#      wcl $(FLAGS) -c $(SRC)test2.c
+#      $(WCL) $(FLAGS) -c $(SRC)test2.c
 
 test0.$(OBJ): $(SRC)test0.c
-       wcl $(FLAGS) -c $(SRC)test0.c
+       $(WCL) $(FLAGS) -c $(SRC)test0.c
 
 pcxtest.$(OBJ): $(SRC)pcxtest.c $(SRCLIB)modex16.h
-       wcl $(FLAGS) -c $(SRC)pcxtest.c
+       $(WCL) $(FLAGS) -c $(SRC)pcxtest.c
 
 vrstest.$(OBJ): $(SRC)vrstest.c $(SRCLIB)modex16.h
-       wcl $(FLAGS) -c $(SRC)vrstest.c
+       $(WCL) $(FLAGS) -c $(SRC)vrstest.c
 
 ##planrpcx.$(OBJ): $(SRC)planrpcx.c $(SRCLIB)modex16.h
-##     wcl $(FLAGS) -c $(SRC)planrpcx.c
+##     $(WCL) $(FLAGS) -c $(SRC)planrpcx.c
 
 pcxtest2.$(OBJ): $(SRC)pcxtest2.c $(SRCLIB)modex16.h
-       wcl $(FLAGS) -c $(SRC)pcxtest2.c
+       $(WCL) $(FLAGS) -c $(SRC)pcxtest2.c
 
 palettec.$(OBJ): $(SRC)palettec.c
-       wcl $(FLAGS) -c $(SRC)palettec.c
+       $(WCL) $(FLAGS) -c $(SRC)palettec.c
 
 palettel.$(OBJ): $(SRC)palettel.c
-       wcl $(FLAGS) -c $(SRC)palettel.c
+       $(WCL) $(FLAGS) -c $(SRC)palettel.c
 
 maptest.$(OBJ): $(SRC)maptest.c $(SRCLIB)modex16.h
-       wcl $(FLAGS) -c $(SRC)maptest.c
+       $(WCL) $(FLAGS) -c $(SRC)maptest.c
 
 #emmtest.$(OBJ): $(SRC)emmtest.c
-#      wcl $(FLAGS) $(MFLAGS) -c $(SRC)emmtest.c
+#      $(WCL) $(FLAGS) $(MFLAGS) -c $(SRC)emmtest.c
 
 #emsdump.$(OBJ): $(SRC)emsdump.c
-#      wcl $(FLAGS) $(MFLAGS) -c $(SRC)emsdump.c
+#      $(WCL) $(FLAGS) $(MFLAGS) -c $(SRC)emsdump.c
 
 fmemtest.$(OBJ): $(SRC)fmemtest.c
-       wcl $(FLAGS) -c $(SRC)fmemtest.c
+       $(WCL) $(FLAGS) -c $(SRC)fmemtest.c
 
 fonttest.$(OBJ): $(SRC)fonttest.c
-       wcl $(FLAGS) -c $(SRC)fonttest.c
+       $(WCL) $(FLAGS) -c $(SRC)fonttest.c
 
 #fonttes0.$(OBJ): $(SRC)fonttes0.c
-#      wcl $(FLAGS) -c $(SRC)fonttes0.c
+#      $(WCL) $(FLAGS) -c $(SRC)fonttes0.c
 
 fontgfx.$(OBJ): $(SRC)fontgfx.c
-       wcl $(FLAGS) -c $(SRC)fontgfx.c
+       $(WCL) $(FLAGS) -c $(SRC)fontgfx.c
 
 inputest.$(OBJ): $(SRC)inputest.c
-       wcl $(FLAGS) -c $(SRC)inputest.c
+       $(WCL) $(FLAGS) -c $(SRC)inputest.c
 
 #sountest.$(OBJ): $(SRC)sountest.c
-#      wcl $(FLAGS) -c $(SRC)sountest.c
+#      $(WCL) $(FLAGS) -c $(SRC)sountest.c
 
 #miditest.$(OBJ): $(SRC)miditest.c
-#      wcl $(FLAGS) -c $(SRC)miditest.c
+#      $(WCL) $(FLAGS) -c $(SRC)miditest.c
 
 #testemm.$(OBJ): $(SRC)testemm.c
-#      wcl $(FLAGS) -c $(SRC)testemm.c
+#      $(WCL) $(FLAGS) -c $(SRC)testemm.c
 
 #testemm0.$(OBJ): $(SRC)testemm0.c
-#      wcl $(FLAGS) -c $(SRC)testemm0.c
+#      $(WCL) $(FLAGS) -c $(SRC)testemm0.c
 
 tsthimem.$(OBJ): $(SRC)tsthimem.c
-       wcl $(FLAGS) -c $(SRC)tsthimem.c
+       $(WCL) $(FLAGS) -c $(SRC)tsthimem.c
 
 exmmtest.$(OBJ): $(SRC)exmmtest.c
-       wcl $(FLAGS) -c $(SRC)exmmtest.c 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ)
+       $(WCL) $(FLAGS) -c $(SRC)exmmtest.c 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ)
 
 vgmtest.$(OBJ): $(SRC)vgmtest.c
-       wcl $(FLAGS) -c $(SRC)vgmtest.c
-       #====wcl -mc -c $(SRC)vgmtest.c
+       $(WCL) $(FLAGS) -c $(SRC)vgmtest.c
+       #====$(WCL) -mc -c $(SRC)vgmtest.c
 
 #
 #non executable objects libraries
 #
 16.lib: $(16LIBOBJS)# doslib.lib vgmsnd.lib
-       wlib -b $(WLIBQ) 16.lib $(16LIBOBJS)# doslib.lib vgmsnd.lib
+       $(WLIB) -b $(WLIBQ) 16.lib $(16LIBOBJS)# doslib.lib vgmsnd.lib
 
 gfx.lib: $(GFXLIBOBJS)
-       wlib -b $(WLIBQ) gfx.lib $(GFXLIBOBJS)
+       $(WLIB) -b $(WLIBQ) gfx.lib $(GFXLIBOBJS)
 
 vgmsnd.lib: $(VGMSNDOBJ)
-       wlib -b $(WLIBQ) vgmsnd.lib $(VGMSNDOBJ)
+       $(WLIB) -b $(WLIBQ) vgmsnd.lib $(VGMSNDOBJ)
 
 # extdep:
 # !include $(DOSLIBDIR)$(DIRSEP)extdep.mak
@@ -331,86 +326,86 @@ joytest.exe:
 #      @cd $(PDIR)$(PDIR)$(PDIR)
 
 modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c
-       wcl $(FLAGS) -c $(SRCLIB)modex16.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)modex16.c
 
 bakapee.$(OBJ): $(SRCLIB)bakapee.h $(SRCLIB)bakapee.c
-       wcl $(FLAGS) -c $(SRCLIB)bakapee.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)bakapee.c
 
 16render.$(OBJ): $(MODEXLIB)16render.h $(MODEXLIB)16render.c
-       wcl $(FLAGS) -c $(MODEXLIB)16render.c
+       $(WCL) $(FLAGS) -c $(MODEXLIB)16render.c
 
 ##16planar.$(OBJ): $(MODEXLIB)16planar.h $(MODEXLIB)16planar.c
-##     wcl $(FLAGS) -c $(MODEXLIB)16planar.c
+##     $(WCL) $(FLAGS) -c $(MODEXLIB)16planar.c
 
 16_vrs.$(OBJ): $(SRCLIB)16_vrs.h $(SRCLIB)16_vrs.c $(DOSLIBLIBS)
-       wcl $(FLAGS) -c $(SRCLIB)16_vrs.c $(DOSLIBLIBS)
-16_sprite.$(OBJ): $(SRCLIB)16_sprite.h $(SRCLIB)16_sprite.c
-       wcl $(FLAGS) -c $(SRCLIB)16_sprite.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)16_vrs.c $(DOSLIBLIBS)
+16_sprit.$(OBJ): $(SRCLIB)16_sprit.h $(SRCLIB)16_sprit.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)16_sprit.c
 
 
 bitmap.$(OBJ): $(SRCLIB)bitmap.h $(SRCLIB)bitmap.c
-       wcl $(FLAGS) -c $(SRCLIB)bitmap.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)bitmap.c
 
 ##planar.$(OBJ): $(SRCLIB)planar.h $(SRCLIB)planar.c
-##     wcl $(FLAGS) -c $(SRCLIB)planar.c
+##     $(WCL) $(FLAGS) -c $(SRCLIB)planar.c
 
 scroll16.$(OBJ): $(SRCLIB)scroll16.h $(SRCLIB)scroll16.c
-       wcl $(FLAGS) -c $(SRCLIB)scroll16.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)scroll16.c
 
 wcpu.$(OBJ): $(WCPULIB)wcpu.h $(WCPULIB)wcpu.c
-       wcl $(FLAGS) -c $(WCPULIB)wcpu.c
+       $(WCL) $(FLAGS) -c $(WCPULIB)wcpu.c
 
 16text.$(OBJ): $(SRCLIB)16text.c
-       wcl $(FLAGS) -c $(SRCLIB)16text.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)16text.c
 
 mapread.$(OBJ): $(SRCLIB)mapread.h $(SRCLIB)mapread.c
-       wcl $(FLAGS) -c $(SRCLIB)mapread.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)mapread.c
 
 16_timer.$(OBJ): $(SRCLIB)16_timer.h $(SRCLIB)16_timer.c
-       wcl $(FLAGS) -c $(SRCLIB)16_timer.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)16_timer.c
 
 16_in.$(OBJ): $(SRCLIB)16_in.h $(SRCLIB)16_in.c
-       wcl $(FLAGS) -c $(SRCLIB)16_in.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)16_in.c
 
 16_mm.$(OBJ): $(SRCLIB)16_mm.h $(SRCLIB)16_mm.c
-       wcl $(FLAGS) -c $(SRCLIB)16_mm.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)16_mm.c
 
 16_ca.$(OBJ): $(SRCLIB)16_ca.h $(SRCLIB)16_ca.c
-       wcl $(FLAGS) -c $(SRCLIB)16_ca.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)16_ca.c
 
 16_dbg.$(OBJ): $(SRCLIB)16_dbg.h $(SRCLIB)16_dbg.c
-       wcl $(FLAGS) -c $(SRCLIB)16_dbg.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)16_dbg.c
 
 midi.$(OBJ): $(SRCLIB)midi.h $(SRCLIB)midi.c
-       wcl $(FLAGS) -c $(SRCLIB)midi.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)midi.c
 
 16_head.$(OBJ): $(SRCLIB)16_head.h $(SRCLIB)16_head.c
-       wcl $(FLAGS) -c $(SRCLIB)16_head.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)16_head.c
 
 16_hc.$(OBJ): $(SRCLIB)16_hc.h $(SRCLIB)16_hc.c
-       wcl $(FLAGS) -c $(SRCLIB)16_hc.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)16_hc.c
 
 16_snd.$(OBJ): $(SRCLIB)16_snd.h $(SRCLIB)16_snd.c
-       wcl $(FLAGS) -c $(SRCLIB)16_snd.c
-       #====wcl -mc -c $(SRCLIB)16_snd.c
+       $(WCL) $(FLAGS) -c $(SRCLIB)16_snd.c
+       #====$(WCL) -mc -c $(SRCLIB)16_snd.c
 
 jsmn.$(OBJ): $(JSMNLIB)jsmn.h $(JSMNLIB)jsmn.c
-       wcl $(FLAGS) -c $(JSMNLIB)jsmn.c
+       $(WCL) $(FLAGS) -c $(JSMNLIB)jsmn.c
 
 kitten.$(OBJ): $(NYANLIB)kitten.h $(NYANLIB)kitten.c
-       wcl $(FLAGS) -c $(NYANLIB)kitten.c
+       $(WCL) $(FLAGS) -c $(NYANLIB)kitten.c
 
 vgmSnd.$(OBJ): $(VGMSNDLIB)vgmSnd.h $(VGMSNDLIB)vgmSnd.c
-       wcl $(FLAGS) -c $(VGMSNDLIB)vgmSnd.c
-       #====wcl -c -mc $(VGMSNDLIB)vgmSnd.c
+       $(WCL) $(FLAGS) -c $(VGMSNDLIB)vgmSnd.c
+       #====$(WCL) -c -mc $(VGMSNDLIB)vgmSnd.c
 
 #memory.$(OBJ): $(EXMMLIB)memory.h $(EXMMLIB)memory.c
-#      wcl $(FLAGS) $(MFLAGS) -c $(EXMMLIB)memory.c
+#      $(WCL) $(FLAGS) $(MFLAGS) -c $(EXMMLIB)memory.c
 
 c_utils.$(OBJ): $(MODEXLIB_)c_utils.asm
-       wcl -c $(AFLAGS) $(MODEXLIB_)c_utils.asm
+       $(WCL) -c $(AFLAGS) $(MODEXLIB_)c_utils.asm
 modex.$(OBJ): $(MODEXLIB_)modex.asm
-       wcl -c $(AFLAGS) $(MODEXLIB_)modex.asm
+       $(WCL) -c $(AFLAGS) $(MODEXLIB_)modex.asm
 
 #
 #other~
@@ -421,17 +416,17 @@ clean: .symbolic
        @$(REMOVECOMMAND) 16.lib
        @$(REMOVECOMMAND) gfx.lib
        @$(REMOVECOMMAND) vgmsnd.lib
-       @wlib -n $(WLIBQ) 16.lib
-       @wlib -n $(WLIBQ) gfx.lib
-       @wlib -n $(WLIBQ) vgmsnd.lib
-       @$(REMOVECOMMAND) *.16
+       @$(REMOVECOMMAND) *.LIB #dos
+       @$(WLIB) -n $(WLIBQ) 16.lib
+       @$(WLIB) -n $(WLIBQ) gfx.lib
+       @$(WLIB) -n $(WLIBQ) vgmsnd.lib
        @$(REMOVECOMMAND) *.16W
        @$(REMOVECOMMAND) *.16B
        @$(REMOVECOMMAND) *.OBJ
-       @$(REMOVECOMMAND) *.o
+       @$(REMOVECOMMAND) *.$(OBJ)
        @$(REMOVECOMMAND) *.BCO
-       @$(REMOVECOMMAND) makefi~1
-       @$(REMOVECOMMAND) makefile~
+       #@$(REMOVECOMMAND) makefi~1
+       #@$(REMOVECOMMAND) makefile~
        @$(REMOVECOMMAND) __wcl__.LNK
 #      @$(REMOVECOMMAND) *.smp
        @$(REMOVECOMMAND) *.SMP
@@ -458,10 +453,10 @@ backupconfig: .symbolic
        @$(COPYCOMMAND) .gitignore git_igno.re
 
 comp: .symbolic
-       @upx -9 $(EXEC)
+       @$(UPX) -9 $(EXEC)
 
 comq: .symbolic
-       @upx -9 $(UPXQ) $(EXEC)
+       @$(UPX) -9 $(UPXQ) $(EXEC)
 
 www: .symbolic
        @ssh -p 26 sparky4@4ch.mooo.com 'rm -f /var/www/16/*exe*'
@@ -474,7 +469,7 @@ www: .symbolic
        @scp -r -P 26 /var/www/*.exe.zip.* 4ch.mooo.com:/var/www/16/
 
 getwww: .symbolic
-       @x4get.bat $(EXEC)
+       *x4get.bat $(EXEC)
 
 vomitchan: .symbolic
        @$(DUMP) *.err
diff --git a/maptest.exe b/maptest.exe
new file mode 100755 (executable)
index 0000000..183592d
Binary files /dev/null and b/maptest.exe differ
diff --git a/palettec.exe b/palettec.exe
new file mode 100755 (executable)
index 0000000..58d55f0
Binary files /dev/null and b/palettec.exe differ
diff --git a/palettel.exe b/palettel.exe
new file mode 100755 (executable)
index 0000000..f819caa
Binary files /dev/null and b/palettel.exe differ
diff --git a/pcxtest.exe b/pcxtest.exe
new file mode 100755 (executable)
index 0000000..6684cf9
Binary files /dev/null and b/pcxtest.exe differ
diff --git a/pcxtest2.exe b/pcxtest2.exe
new file mode 100755 (executable)
index 0000000..b43f1e5
Binary files /dev/null and b/pcxtest2.exe differ
diff --git a/scroll.exe b/scroll.exe
new file mode 100755 (executable)
index 0000000..4e6d60f
Binary files /dev/null and b/scroll.exe differ
index 0fef713203fb71810994414f023ba6b66ab40a0a..d2dfb54a2e1b02ee9985a4029179178a58990629 100755 (executable)
@@ -30,7 +30,7 @@
 #include <string.h>\r
 #include "src/lib/16_head.h"\r
 #include "src/lib/16_timer.h"\r
-#include "src/lib/16_sprite.h"\r
+#include "src/lib/16_sprit.h"\r
 #include "src/lib/bitmap.h"    //old format\r
 #ifdef __WATCOMC__\r
 #include "src/lib/16_dbg.h"\r
diff --git a/src/lib/16_sprit.c b/src/lib/16_sprit.c
new file mode 100755 (executable)
index 0000000..ab6e337
--- /dev/null
@@ -0,0 +1,134 @@
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover
+ *
+ * This file is part of Project 16.
+ *
+ * Project 16 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Project 16 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+#include "src/lib/16_sprit.h"
+
+char* get_curr_anim_name(struct sprite *spri)
+{
+       // Retrive animation name list
+       struct vrs_header huge *vrs = spri->spritesheet->vrs_hdr;
+       uint32_t huge *anim_names_offsets =     (uint32_t huge *)
+                                               ((byte huge *)vrs +
+                                                vrs->offset_table[VRS_HEADER_OFFSET_ANIMATION_NAME_LIST]);
+
+       return (char *)(vrs + anim_names_offsets[spri->curr_anim]);
+}
+
+void init_anim(struct sprite *spri, int anim_index)
+{
+       struct vrs_header huge *vrs = spri->spritesheet->vrs_hdr;
+       uint32_t huge *anim_lists_offsets =     (uint32_t huge *)
+                                               ((byte huge *)vrs +
+                                                vrs->offset_table[VRS_HEADER_OFFSET_ANIMATION_LIST]);
+       struct vrs_animation_list_entry_t *anim_list =  (struct vrs_animation_list_entry_t huge *)
+                                                       ((byte huge *)vrs +
+                                                        anim_lists_offsets[anim_index]);
+
+       // Upon new animation, start from the first sprite in it
+       spri->curr_anim = anim_index;
+       spri->curr_anim_spri = 0;
+       spri->curr_spri_id = anim_list[0].sprite_id;
+       spri->delay = anim_list[0].delay;
+
+       spri->curr_anim_list = anim_list;
+}
+
+
+int set_anim_by_id(struct sprite *spri, int anim_id)
+{
+       int new_anim_index = 0;
+       int iter_id;
+       struct vrs_header huge *vrs = spri->spritesheet->vrs_hdr;
+       // Retruve animation ids list
+        uint16_t huge *anim_ids =      (uint16_t huge *)
+                                       ((byte huge *)vrs +
+                                        vrs->offset_table[VRS_HEADER_OFFSET_ANIMATION_ID_LIST]);
+
+       // Loop through animation id untill match or end of list
+       while(iter_id = anim_ids[new_anim_index])
+       {
+               // Return on successful match
+               if (iter_id == anim_id)
+               {
+                       init_anim(spri, new_anim_index);
+                       return 0;
+               }
+               new_anim_index++;
+       }
+       return -1;
+}
+
+void print_anim_ids(struct sprite *spri)
+{
+       int new_anim_index = 0;
+       int iter_id;
+       struct vrs_header huge *vrs = spri->spritesheet->vrs_hdr;
+       // Retruve animation ids list
+        uint16_t huge *anim_ids =      (uint16_t huge *)
+                                       ((byte huge *)vrs +
+                                        vrs->offset_table[VRS_HEADER_OFFSET_ANIMATION_ID_LIST]);
+
+       if(!anim_ids[new_anim_index])
+               exit(3);
+       // Loop through animation id untill match or end of list
+       while(iter_id = anim_ids[new_anim_index])
+       {
+               // Return on successful match
+               new_anim_index++;
+               printf("%d, ", iter_id);
+       }
+}
+
+
+void animate_spri(struct sprite *spri)
+{
+       // Events go here
+
+       // Draw sprite
+       get_vrl_by_id(spri->spritesheet, spri->curr_spri_id, spri->sprite_vrl_cont);
+       draw_vrl1_vgax_modex(   spri->x, spri->y,
+                               spri->sprite_vrl_cont->vrl_header, spri->sprite_vrl_cont->line_offsets,
+                               spri->sprite_vrl_cont->buffer + sizeof(struct vrl1_vgax_header),
+                               spri->sprite_vrl_cont->data_size);
+
+       // Depending on delay, update indices
+       switch(spri->delay){
+               // Delay = 0 means that sprite should loop. Nothing to change here
+               case 0:
+                       break;
+
+               // Delay = 1 means that on next time unit sprite should be changed
+               case 1:
+                       spri->curr_anim_spri++;
+
+                       // If we hit the end of an animation sequence, restart it
+                       if(!(spri->curr_spri_id = spri->curr_anim_list[spri->curr_anim_spri].sprite_id)){
+                               spri->curr_anim_spri = 0;
+                               spri->curr_spri_id = spri->curr_anim_list[spri->curr_anim_spri].sprite_id;
+                       }
+                       spri->delay = spri->curr_anim_list[spri->curr_anim_spri].delay;
+
+               // Delay > 1 means that we should not change sprite yet. Decrease delay
+               default:
+                       spri->delay--;
+                       break;
+       }
+}
diff --git a/src/lib/16_sprit.h b/src/lib/16_sprit.h
new file mode 100755 (executable)
index 0000000..a93838a
--- /dev/null
@@ -0,0 +1,74 @@
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover
+ *
+ * This file is part of Project 16.
+ *
+ * Project 16 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Project 16 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+#ifndef __16_SPRI__
+#define __16_SPRI__
+
+#include "src/lib/16_vrs.h"
+#include "src/lib/typdefst.h"
+
+struct sprite
+{
+       // VRS container from which we will extract animation and image data
+       struct vrs_container *spritesheet;
+       // Container for a vrl sprite
+       struct vrl_container *sprite_vrl_cont;
+       // Current sprite id
+       int curr_spri_id;
+       // Index of a current sprite in an animation sequence
+       int curr_anim_spri;
+       // Current animation sequence
+       struct vrs_animation_list_entry_t *curr_anim_list;
+       // Index of current animation in relevant VRS offsets table
+       int curr_anim;
+       // Delay in time units untill we should change sprite
+       int delay;
+       // Position of sprite on screen
+       int x, y;
+};
+
+/* Retrive current animation name of sprite
+* In:
+* + struct sprite *spri - sprite to retrive current animation sequence name from
+* Out:
+* + char* - animation sequence name
+*/
+char* get_curr_anim_name(struct sprite *spri);
+
+/* Change sprite's current animation to the one given by id
+ * In:
+ * struct sprite *spri - sprite to manipulate on
+ * int id - id of a new animation sequence of th sprite
+ * Out:
+ * int - 0 on success, -1 on error
+ */
+int set_anim_by_id(struct sprite *spri, int id);
+
+/* Animate sprite, triggering any events and changing indices if necessary
+ * NB: if you want to change animation sequence after a specific sprite is shown, you should call animate_spri first
+ * In:
+ * + struct sprite *spri - sprite to animate
+ */
+void animate_spri(struct sprite *spri);
+
+void print_anim_ids(struct sprite *spri);
+
+#endif
index a6d531b46da57025f058357f2349b766f940c854..eca613a8ccfbc1bdf60f5a4a0b837813c3dc3953 100755 (executable)
@@ -66,11 +66,11 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        }
                        else
                        {
-                               if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 16, 32);
+                               if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 24, 32);
 #ifdef SPRITE
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 16, 32, 16, 32, PLAYERBMPDATA);
+                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATA);
 #else
-                               modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 16, 32, 14);
+                               modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 14);
 #endif
                                if(!pageflipflop) modexShowPage(pip[1].page);
                                player[pn].d = 2;
@@ -110,11 +110,11 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        }
                        else
                        {
-                               if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 16, 32);
+                               if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 24, 32);
 #ifdef SPRITE
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 16, 96, 16, 32, PLAYERBMPDATA);
+                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATA);
 #else
-                               modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 16, 32, 10);
+                               modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 10);
 #endif
                                if(!pageflipflop) modexShowPage(pip[1].page);
                                player[pn].d = 2;
@@ -154,11 +154,11 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        }
                        else
                        {
-                               if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 16, 32);
+                               if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 24, 32);
 #ifdef SPRITE
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 16, 64, 16, 32, PLAYERBMPDATA);
+                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATA);
 #else
-                               modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 16, 32, 9);
+                               modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 9);
 #endif
                                if(!pageflipflop) modexShowPage(pip[1].page);
                                player[pn].d = 2;
@@ -198,11 +198,11 @@ void walk(map_view_t *pip, player_t *player, word pn)
                        }
                        else
                        {
-                               if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 16, 32);
+                               if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x, player[pn].y-TILEWH, player[pn].x, player[pn].y-TILEWH, 24, 32);
 #ifdef SPRITE
-                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 16, 0, 16, 32, PLAYERBMPDATA);
+                               PBUFSFUN(pip[0].page, player[pn].x, player[pn].y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATA);
 #else
-                               modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 16, 32, 12);
+                               modexClearRegion(pip[1].page, player[pn].x, player[pn].y-TILEWH, 24, 32, 12);
 #endif
                                if(!pageflipflop) modexShowPage(pip[1].page);
                                player[pn].d = 2;
@@ -626,7 +626,7 @@ void mapGoTo(map_view_t *mv, int tx, int ty)
 //                                     vga_state.vga_graphics_ram[o] = (k^j)&15; // VRL samples put all colors in first 15!
 //             }
 //     }
-       modexCopyPageRegion(mv[3].page, mv[0].page, 0/**/, 0/**/, 0, 0, 16, 32);
+       modexCopyPageRegion(mv[3].page, mv[0].page, 0/**/, 0/**/, 0, 0, 24, 32);
 }
 
 void near
@@ -868,15 +868,15 @@ void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scroll
        }
 
 #ifdef SPRITE
-#define FRAME1 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 32, dire, 16, 32,        PLAYERBMPDATA);
-#define FRAME2 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 16, dire, 16, 32,        PLAYERBMPDATA);
-#define FRAME3 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 0, dire, 16, 32, PLAYERBMPDATA);
-#define FRAME4 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 16, dire, 16, 32,        PLAYERBMPDATA);
+#define FRAME1 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 48, dire, 24, 32,        PLAYERBMPDATA);
+#define FRAME2 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 24, dire, 24, 32,        PLAYERBMPDATA);
+#define FRAME3 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 0, dire, 24, 32, PLAYERBMPDATA);
+#define FRAME4 PBUFSFUN(pip[/*!*/(pip->video->p)].page, x, y, 24, dire, 24, 32,        PLAYERBMPDATA);
 #else
-#define FRAME1 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 2+dire);
-#define FRAME2 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 1+dire);
-#define FRAME3 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, dire);
-#define FRAME4 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 1+dire);
+#define FRAME1 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, 2+dire);
+#define FRAME2 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, 1+dire);
+#define FRAME3 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, dire);
+#define FRAME4 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, 1+dire);
 #endif
        if(!pageflipflop)
                modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 36);
@@ -910,7 +910,7 @@ void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scroll
 //     if(3>ls && ls>=2) { FRAME2 }else
 //     if(4>ls && ls>=3) { FRAME3 }else
 //     if(5>ls && ls>=4) { FRAME4 }
-       //modexCopyPageRegion(pip[0].page, pip[3].page, 0, 0, x, y, 16, 32);
+       //modexCopyPageRegion(pip[0].page, pip[3].page, 0, 0, x, y, 24, 32);
        //printf("x=%d  y=%d    bx=%d           by=%d\n", x, y, bx, by);
        pip->video->r=1;
 }
index f9e0988556d87a6802f5da1fb1fb159faa12e4b9..b168b3d1be562d3bca55fc683be6ee291810dad7 100755 (executable)
@@ -24,7 +24,7 @@
 #include <dos.h>
 #include <string.h>
 #include "src/lib/modex16.h"
-#include "src/lib/16_sprite.h"
+#include "src/lib/16_sprit.h"
 #include "src/lib/16_ca.h"
 #include "src/lib/16_mm.h"
 
diff --git a/test.exe b/test.exe
new file mode 100755 (executable)
index 0000000..7bf584d
Binary files /dev/null and b/test.exe differ
diff --git a/test0.exe b/test0.exe
new file mode 100755 (executable)
index 0000000..81c9648
Binary files /dev/null and b/test0.exe differ
diff --git a/tesuto.exe b/tesuto.exe
new file mode 100755 (executable)
index 0000000..d0ea552
Binary files /dev/null and b/tesuto.exe differ
diff --git a/vgmtest.exe b/vgmtest.exe
new file mode 100755 (executable)
index 0000000..1b6061d
Binary files /dev/null and b/vgmtest.exe differ
diff --git a/vrstest.exe b/vrstest.exe
new file mode 100755 (executable)
index 0000000..b54f134
Binary files /dev/null and b/vrstest.exe differ
index 4a2290e30c1576d62813965d777bc5481e6bfd81..31b9539442eaedfd6175f5e55357fb243bd2a7d6 100755 (executable)
--- a/wbuild.sh
+++ b/wbuild.sh
@@ -5,7 +5,7 @@ wmake -h comp
 if [ -f *.err ]
 then
        echo dumping *.err
-       cat *.err
+       wmake vomitchan
 fi
 if [ -f 16_head.o ]
 then