]> 4ch.mooo.com Git - 16.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorJonathan Campbell <jonathan@castus.tv>
Thu, 24 Mar 2016 12:02:59 +0000 (05:02 -0700)
committerJonathan Campbell <jonathan@castus.tv>
Thu, 24 Mar 2016 12:02:59 +0000 (05:02 -0700)
59 files changed:
16/16/src/inputest.c
16/16/src/lib/lib_head.c
16/16/src/lib/lib_head.h
16/16/src/lib/types.h
data/aconita.pal [new file with mode: 0755]
data/aconita.vrl [new file with mode: 0755]
makefile
src/16.c
src/16.h
src/bakapi.c
src/bakapi.h
src/emsdump.c
src/exmmtest.c
src/fmemtest.c
src/fontgfx.c
src/fonttes0.c
src/fonttest.c
src/inputest.c
src/lib/16_hc.c
src/lib/16_hc.h
src/lib/16_head.c
src/lib/16_head.h
src/lib/16_in.c
src/lib/16_snd.c
src/lib/16_snd.h
src/lib/bakapee.c
src/lib/bakapee.h
src/lib/bitmap.c
src/lib/bitmap.h
src/lib/modex16/160x120.h
src/lib/modex16/16planar.c
src/lib/modex16/16planar.h
src/lib/modex16/16render.c
src/lib/modex16/16render.h
src/lib/modex16/192x144.h
src/lib/modex16/192x144_.h
src/lib/modex16/256x192.h
src/lib/modex16/320x200.h
src/lib/modex16/320x240.h
src/lib/planar.c
src/lib/planar.h
src/lib/typdefst.h
src/lib/types.h
src/lib/wcpu/wcpu.c
src/lib/wcpu/wcpu.h
src/maptest.c
src/maptest0.c
src/palettec.c
src/palettel.c
src/pcxtest.c
src/pcxtest2.c
src/planrpcx.c
src/scroll.c
src/sountest.c
src/test.c
src/test2.c
src/tesuto.c
src/tesuto.h
src/vgmtest.c

index c12b19f18d71a11880cbb0e66f2309e04161859b..fd8d3266577767bacfb70e9c49b35e0414487b06 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 pngwen * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 andrius4669 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669  joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 4ca25c9cbc48fe153f5311d45462810c542fb440..1c9b916c2073f25bc2d423722f3e3c0e23254621 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 pngwen * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 andrius4669 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669  joncampbell123
  *
  * This file is part of Project 16.
  *
index cf50054db81d27a97944abb6d3e47069ae66b74c..0f26c1fcd7b9bddad5a06a6a44dacf0ee821e4fd 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 pngwen * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 andrius4669 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669  joncampbell123
  *
  * This file is part of Project 16.
  *
index 2055c20cc4f09c72068d4c8ce35c2679522b2527..b0213bc84be5d073b5c1988eedfa293e6e620a42 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 pngwen * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 andrius4669 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669  joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
diff --git a/data/aconita.pal b/data/aconita.pal
new file mode 100755 (executable)
index 0000000..ef215a2
Binary files /dev/null and b/data/aconita.pal differ
diff --git a/data/aconita.vrl b/data/aconita.vrl
new file mode 100755 (executable)
index 0000000..2c5ef7d
Binary files /dev/null and b/data/aconita.vrl differ
index f1f1e80872a9a795a3b8d93c9977b78b382dd6fd..4eebe67b5e3fe066db2d5c7316d0bb1d9e15c5ce 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -71,7 +71,7 @@ BAKAPIFLAGS=-fh=bakapi.hed
 SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k55808#60000#32768
 DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 $(SFLAGS)
 ZFLAGS=-zk0 -zc -zp8 $(WCLQ) ## -zm
-CFLAGS=$(AFLAGS) $(IFLAGS)-lr -l=dos -wo##wwww
+CFLAGS=$(AFLAGS) $(IFLAGS)-lr -l=dos -wo -i$(DOSLIB)##wwww
 OFLAGS=-obmiler -out -oh -ei -zp8 -fpi87  -onac -ol+ -ok####x
 FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS)
 
@@ -84,29 +84,16 @@ DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
 
 GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) 16planar.$(OBJ)
 
-DOSLIBLIBS=dl_vga.lib dl_cpu.lib dl_dos.lib
+DOSLIBLIBS=$(DOSLIBDIR)/hw/cpu/dos86h/cpu.lib $(DOSLIBDIR)/hw/dos/dos86h/dos.lib $(DOSLIBDIR)/hw/vga/dos86h/vga.lib
 
 TESTEXEC = exmmtest.exe test.exe pcxtest.exe pcxtest2.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe palettel.exe planrpcx.exe
 # tsthimem.exe
 #testemm.exe testemm0.exe fonttes0.exe miditest.exe sega.exe sountest.exe
 EXEC = 16.exe bakapi.exe $(TESTEXEC) tesuto.exe
 
-!include $(DOSLIBDIR)/extdep.mak
-
-all: $(EXEC) datatest
-
-cute.vrl: data/cute.pcx $(PCX2VRL)
-       $(PCX2VRL) -i data/cute.pcx -o cute.vrl -p cute.pal -tc 254
-       # you can then test this against TESUTO.EXE by typing: TESUTO CUTE.VRL CUTE.PAL
-
-datatest: cute.vrl .symbolic
-
-# doslib PCX to VRL converter native host binary
-$(PCX2VRL): $(DOSLIBDIR)/hw/vga/pcx2vrl.c
-       cd $(DOSLIBDIR)/hw/vga && make pcx2vrl
+all: $(EXEC)
 
 #$(16LIBOBJS) => 16.lib bug....
-
 #
 #game and bakapi executables
 #
@@ -125,12 +112,12 @@ scroll.$(OBJ): $(SRC)scroll.c
 
 
 # NOTE: dos86h = 16-bit huge memory model. memory model must match!
-tesuto.exe: tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ)
+tesuto.exe: tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
 #      %write tmp.cmd option quiet option map=tesuto.map $(DOSLIB_LDFLAGS_DOS16H) file tesuto.obj name tesuto.exe
 #      %write tmp.cmd library $(DOSLIBDIR)/hw/cpu/dos86h/cpu.lib
 #      %write tmp.cmd library $(DOSLIBDIR)/hw/dos/dos86h/dos.lib
 #      @wlink @tmp.cmd
-       wcl $(FLAGS) $(WCLQ) tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ)
+       wcl $(FLAGS) $(WCLQ) tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib
 tesuto.$(OBJ): $(SRC)tesuto.c
        wcl $(FLAGS) $(DOSLIB_CINCLUDE) $(WCLQ) -c $(SRC)tesuto.c
 #tesuto.exe: tesuto.$(OBJ)
@@ -302,25 +289,26 @@ vgmtest.$(OBJ): $(SRC)vgmtest.c
 gfx.lib: $(GFXLIBOBJS)
        wlib -b $(WLIBQ) gfx.lib $(GFXLIBOBJS)
 
-doslib.lib: $(DOSLIBOBJ) # $(SRCLIB)cpu.lib
-       wlib -b $(WLIBQ) doslib.lib $(DOSLIBOBJ) # $(SRCLIB)cpu.lib
+#doslib.lib: $(DOSLIBOBJ) # $(SRCLIB)cpu.lib
+#      wlib -b $(WLIBQ) doslib.lib $(DOSLIBOBJ) # $(SRCLIB)cpu.lib
 
 vgmsnd.lib: $(VGMSNDOBJ)
        wlib -b $(WLIBQ) vgmsnd.lib $(VGMSNDOBJ)
 
+# extdep:
+# !include $(DOSLIBDIR)/extdep.mak
 
 # library deps 16-bit huge
-dl_vga.lib:
-       cd $(DOSLIBDIR)/hw/vga && ./make.sh
-       cp $(DOSLIBDIR)/hw/vga/dos86h/vga.lib dl_vga.lib
-
-dl_cpu.lib:
+$(DOSLIBDIR)/hw/cpu/dos86h/cpu.lib:
        cd $(DOSLIBDIR)/hw/cpu && ./make.sh
-       cp $(DOSLIBDIR)/hw/cpu/dos86h/cpu.lib dl_cpu.lib
-
-dl_dos.lib:
+$(DOSLIBDIR)/hw/dos/dos86h/dos.lib:
        cd $(DOSLIBDIR)/hw/dos && ./make.sh
-       cp $(DOSLIBDIR)/hw/dos/dos86h/dos.lib dl_dos.lib
+$(DOSLIBDIR)/hw/vga/dos86h/vga.lib:
+       cd $(DOSLIBDIR)/hw/vga && ./make.sh
+#$(DOSLIBLIBS): .symbolic
+#      @cd $(DOSLIB)
+#      @./buildall.sh
+#      @cd $(PDIR)$(PDIR)$(PDIR)
 
 modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c
        wcl $(FLAGS) -c $(SRCLIB)modex16.c
@@ -436,13 +424,9 @@ clean: .symbolic
        @$(REMOVECOMMAND) 16.lib
        @$(REMOVECOMMAND) gfx.lib
        @$(REMOVECOMMAND) vgmsnd.lib
-       @$(REMOVECOMMAND) $(DOSLIBLIBS)
        @wlib -n $(WLIBQ) 16.lib
        @wlib -n $(WLIBQ) gfx.lib
        @wlib -n $(WLIBQ) vgmsnd.lib
-       @$(REMOVECOMMAND) dl_cpu.lib
-       @$(REMOVECOMMAND) dl_dos.lib
-       @$(REMOVECOMMAND) dl_vga.lib
        @$(REMOVECOMMAND) *.16
        @$(REMOVECOMMAND) *.16W
        @$(REMOVECOMMAND) *.16B
@@ -459,6 +443,7 @@ clean: .symbolic
        @$(REMOVECOMMAND) *.map
        @$(REMOVECOMMAND) *.err
        @$(COPYCOMMAND) .git/config git_con.fig
+       @$(COPYCOMMAND) .gitmodules git_modu.les
 #      @$(COPYCOMMAND) $(SRC)exmmtest.c $(EXMMTESTDIR)$(SRC)
 #      @$(COPYCOMMAND) $(SRCLIB)16_mm.* $(EXMMTESTDIR)$(SRCLIB)
 #      @$(COPYCOMMAND) $(SRCLIB)16_head.* $(EXMMTESTDIR)$(SRCLIB)
@@ -476,8 +461,8 @@ comq: .symbolic
        @upx -9 $(UPXQ) $(EXEC)
 
 www: .symbolic
-#       @rm /var/www/$(EXEC)
-       @cp ./$(EXEC) /var/www/
+       #@rm /var/www/$(EXEC)
+       #@cp ./$(EXEC) /var/www/
        @./z.sh $(EXEC) $(EXEC)
        @scp -r -P 26 *.exe 4ch.mooo.com:/var/www/16/
        @scp -r -P 26 /var/www/*.exe.zip.* 4ch.mooo.com:/var/www/16/
@@ -485,27 +470,32 @@ www: .symbolic
 getwww: .symbolic
        @x4get.bat $(EXEC)
 
+##
+##     External library management~ ^^
+##
 #git submodule add <repo>
-uplibs: .symbolic
-       @wmake -h updatelibs
+mkdl: .symbolic
+       @cd $(DOSLIB)
+       @./buildall.sh
+       @cd $(PDIR)$(PDIR)$(PDIR)
 
-updatelibs: .symbolic
+uplibs: .symbolic
        @cd $(JSMNLIB)
        @git pull
        @cd $(PDIR)$(PDIR)$(PDIR)
        @cd $(DOSLIB)
        @git pull
-       @./buildall.sh
        @cd $(PDIR)$(PDIR)$(PDIR)
 
 reinitlibs: .symbolic
        @rm -rf $(SRCLIB)doslib
        @rm -rf $(SRCLIB)jsmn
-       @mkdir $(SRCLIB)doslib
-       @mkdir $(SRCLIB)jsmn
+       #@mkdir $(SRCLIB)doslib
+       #@mkdir $(SRCLIB)jsmn
        @wmake -h initlibs
 
 initlibs: .symbolic
+       @cp git_modu.les .gitmodules
        @cd $(SRCLIB)
        @git clone https://github.com/joncampbell123/doslib.git
        @git clone https://github.com/zserge/jsmn.git
index 5ee40aa99c7505274a26be3895d0735b6f0d0686..10aad071ee088930de3f96cfc7ff7599e8d325ae 100755 (executable)
--- a/src/16.c
+++ b/src/16.c
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index aa8528dfde78f86c92c23c4520abd9cd5907dfb1..b12b1a7dacdc4d6b0bc08636fbb19a2aea11f674 100755 (executable)
--- a/src/16.h
+++ b/src/16.h
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 9f471fdc1d712f427addf7ec391a9a4bcec21c3d..eccaa3550e504272bceff3ed9a11b4647e2f0ec5 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123
  *
  * This file is part of Project 16.
  *
@@ -54,6 +54,7 @@ main(int argc, char *argvar[])
        bakapee.bakax=0;
        bakapee.bakay=0;
        bakapee.coor=0;
+       bakapee.tile=0;
 
        /* setup camera and screen~ */
        gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);
@@ -82,13 +83,15 @@ main(int argc, char *argvar[])
 #else
                        VGAmodeX(0, &gvar);
 #endif
-                       //modexLeave();
                        // user imput switch
                        fprintf(stderr, "xx=%d  yy=%d\n", bakapee.xx, bakapee.yy);
                        printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 0 to quit.\n", getch());  // prompt the user
-//                     printf("Enter 1, 2, 3, 4, or 6 to run a screensaver, or enter 0 to quit.\n");  // prompt the user
-//                     clrstdin();
-                       scanf("%d", &key);
+                       //scanf("%d", &key);
+                       if(scanf("%d", &key) != 1)
+                       {
+                               printf("%d\n", key);
+                       }
+                       getch();
                        //if(key==3){xx=yy=0;} // crazy screen saver wwww
                        if(key==0){ d=0; }else{
                                gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);
index 6e37157354db1ac805a11313820788a2eb53c500..635d3ee8ef2c291e0b28f1765033cc6b131b71f9 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123
  *
  * This file is part of Project 16.
  *
index 39808b70ad908b3b69eae4e88fc62acd3e564ac7..8be2c2c7913412dffa67d46bcf20d908b330f2f6 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123
  *
  * This file is part of Project 16.
  *
index b752ef21785caa57799c7d124d38009f39b67713..280cbf91dc7e3350bd9246f582d55cbb00d75b6b 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 2cdbadd09c05a850db3cdd5de26e250c497b97d1..d666ac76d6f8aa7319a336e476573512ddeb6b5c 100755 (executable)
@@ -1,78 +1,78 @@
-/* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
- *
- * 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 <stdio.h>
-#include "src/lib/16_head.h"
-#include "src/lib/16_ca.h"
-#include "src/lib/16_mm.h"
-#include "src/lib/types.h"
-
-void
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+#include <stdio.h>\r
+#include "src/lib/16_head.h"\r
+#include "src/lib/16_ca.h"\r
+#include "src/lib/16_mm.h"\r
+#include "src/lib/types.h"\r
+\r
+void\r
 main(int argc, char *argv[])\r
-{
-       int x=420;
-       int huge *ptr=&x;
-       int *ptr0=&x;
-       //void __based(__self) *pee;
-       memptr pee;
-       void __near *npee;
-       void __far *fpee;
-       void *dpee;
-       __segment segu;
-       //word csw=0,dsw=0,esw=0,ssw=0,ipw=0;
-
-       _nheapgrow();
-       _fheapgrow();
-       _heapgrow();
-       //ptr=&x;
-       printf("&main()=%Fp\n", *argv[0]);
-       printf("ptr0=%Fp\n", ptr0);
-       //printf("&ptr0=%Fp\n", &ptr0);
-       printf("*ptr0=%d\n", *ptr0);
-       printf("ptr=%Fp\n", ptr);
-       //printf("&ptr=%Fp\n", &ptr);
-       printf("*ptr=%d\n", *ptr);
-       printf("address of *ptr=%Fp\n", *ptr);
-       printf("&x=%Fp\n", &x);
-       printf("x=%d\n", x);
-       printf("\n");
-       /*__asm
-       {
-               //lea csw,cs
-               //lds DS,dsw
-               //les ES,esw
-//             mov ss,ssw
-//             mov ip,ipw
-       }*/
-       //printf("ip=%u\n", ipw);
-       //printf("ss=%u\n", ssw);
-       //printf("cs=%u\n", csw);
-       //printf("ds=%u\n", dsw);
-       //printf("es=%u\n", esw);
-       printf("memavl=%u\n", _memavl());
-       printf("size of based pee~=%u   %FP\n", _bmsize(segu, pee), pee);
-       printf("size of default pee~=%u %FP\n", _msize(dpee), dpee);
-       printf("size of near pee~=%u    %FP\n", _nmsize(npee), npee);
-       printf("size of far pee~=%u     %FP\n", _fmsize(fpee), fpee);
-       printf("pee=%Fp\n", pee);
-       printf("npee=%Fp\n", npee);
-       printf("&main()=%Fp\n", *argv[0]);
-}
+{\r
+       int x=420;\r
+       int huge *ptr=&x;\r
+       int *ptr0=&x;\r
+       //void __based(__self) *pee;\r
+       memptr pee;\r
+       void __near *npee;\r
+       void __far *fpee;\r
+       void *dpee;\r
+       __segment segu;\r
+       //word csw=0,dsw=0,esw=0,ssw=0,ipw=0;\r
+\r
+       _nheapgrow();\r
+       _fheapgrow();\r
+       _heapgrow();\r
+       //ptr=&x;\r
+       printf("&main()=%Fp\n", *argv[0]);\r
+       printf("ptr0=%Fp\n", ptr0);\r
+       //printf("&ptr0=%Fp\n", &ptr0);\r
+       printf("*ptr0=%d\n", *ptr0);\r
+       printf("ptr=%Fp\n", ptr);\r
+       //printf("&ptr=%Fp\n", &ptr);\r
+       printf("*ptr=%d\n", *ptr);\r
+       printf("address of *ptr=%Fp\n", *ptr);\r
+       printf("&x=%Fp\n", &x);\r
+       printf("x=%d\n", x);\r
+       printf("\n");\r
+       /*__asm\r
+       {\r
+               //lea csw,cs\r
+               //lds DS,dsw\r
+               //les ES,esw\r
+//             mov ss,ssw\r
+//             mov ip,ipw\r
+       }*/\r
+       //printf("ip=%u\n", ipw);\r
+       //printf("ss=%u\n", ssw);\r
+       //printf("cs=%u\n", csw);\r
+       //printf("ds=%u\n", dsw);\r
+       //printf("es=%u\n", esw);\r
+       printf("memavl=%u\n", _memavl());\r
+       printf("size of based pee~=%u   %FP\n", _bmsize(segu, pee), pee);\r
+       printf("size of default pee~=%u %FP\n", _msize(dpee), dpee);\r
+       printf("size of near pee~=%u    %FP\n", _nmsize(npee), npee);\r
+       printf("size of far pee~=%u     %FP\n", _fmsize(fpee), fpee);\r
+       printf("pee=%Fp\n", pee);\r
+       printf("npee=%Fp\n", npee);\r
+       printf("&main()=%Fp\n", *argv[0]);\r
+}\r
index 37ec9421a383b16cb00c48dcc5c38d9787e0edde..3edf22d56d576b13ed54387904b405b785974023 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 10832ae5dff6798dfe8e6218a48c041ddba9d54a..30229dae346f4fd674c0438f9f4bc3bf6451e529 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 58dbce85f6262aeec1ec9f74cf0737fde3f573a5..fcfd4d2d48210e0663a3b90f03406ec00b3d58a6 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
@@ -41,9 +41,9 @@ void main(int argc, char near *argv[])
     }\r
 \r
 //     printf("*argv[1]=%d\n", *argv[1]);\r
-
+\r
        printf("Font type: ");\r
-       gets(&ct);
+       gets(&ct);\r
 \r
        printf("Character: ");\r
        gets(&c);\r
@@ -51,37 +51,37 @@ void main(int argc, char near *argv[])
        if(ct!=1)\r
        switch(ct)\r
        {\r
-               case 48:
+               case 48:\r
                        printf("type 0\n");\r
                        t=0;\r
                        w=14;\r
                break;\r
-               case 49:
+               case 49:\r
                        printf("type 1\n");\r
                        t=1;\r
                        w=8;\r
                break;\r
-               case 50:
+               case 50:\r
                        printf("type 2\n");\r
                        t=2;\r
                        w=8;\r
                break;\r
-               case 51:
+               case 51:\r
                        printf("type 3\n");\r
                        t=3;\r
                        w=16;\r
                break;\r
-               default:
+               default:\r
                        printf("type 3\n");\r
                        t=3;\r
                        w=16;\r
                break;\r
        }\r
        else\r
-       {
+       {\r
                printf("type 3\n");\r
                t=3;\r
-               w=16;   \r
+               w=16;\r
        }\r
 \r
 \r
index 03f7a331f48d68f19bfb0103adcd71b90fa1f944..f5a9e8526b1bb685fb16b4201bcb6b3ab629a5c8 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index b3bafefa5e1241080e597b3ed3ef90635766cc00..316b86b90faf716c0466f1a2210116bbfe38c00f 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123
  *
  * This file is part of Project 16.
  *
index 6e947beeab5cb5df542b5775b6946d1bac4fb1b8..86c6ff12e2154670b3096ed8e75e6feba183c89b 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123
  *
  * This file is part of Project 16.
  *
index d7de200ff7ee8d63bfee32bf29a8cc486bf9bf0b..656057fbebd98c0c5d1f9df74f3e27cb087de996 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index a3301f3ff7d99de9e588d2053bcd2ce97e64dae2..3217ea2ed760a07cde59f424e31c3134415776d6 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 1337f5ed593bd1a036e36b83e9eb043c6b81080a..801759ad4757d3fceec5db029144c655b1d42147 100755 (executable)
@@ -867,7 +867,9 @@ register    KeyboardDef     *def;
                                        mx = motion_Left;\r
                                if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]))// || player[pn].pdir != 1)\r
                                        mx = motion_Right;\r
-                       }else{  //2 keys pressed\r
+                       }else\r
+                               //if(mx+my!=1 && mx+my!=-1 && mx!=my!=0)\r
+                               {       //2 keys pressed\r
                                        switch (player[pn].pdir)\r
                                        {\r
                                                case 0:\r
@@ -884,7 +886,7 @@ register    KeyboardDef     *def;
                                                break;\r
                                        }\r
                                        if(testcontrolnoisy > 0){ printf("dir=%c ", dirchar(dir)); printf("pdir=%c      ", dirchar(player[pn].pdir)); }\r
-                               }\r
+                               }//else printf("                                ");\r
                        }\r
                        //input from player\r
                        if (inpu.Keyboard[def->button0])\r
@@ -977,6 +979,7 @@ if((inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->lef
        printf("cpee=%c ", dirchar(conpee));\r
        //printf("(mx)=%d       ", mx);\r
        //printf("(my)=%d       ", my);\r
+       //printf("[%d]  ", mx+my);\r
        printf("pdir=%c d=%c dir=%c ", dirchar(player[pn].pdir), dirchar(player[pn].d), dirchar(player[pn].info.dir));\r
        printf("%c%d %c%d %c%d %c%d\n", dirchar(0), inpu.Keyboard[def->up], dirchar(4), inpu.Keyboard[def->down], dirchar(1), inpu.Keyboard[def->left], dirchar(3), inpu.Keyboard[def->right]);\r
 }\r
index 47cab348332462fb8a4a85e326c22b1888540818..e85fdf9b98683cd1fc27d7b05e08be3f0151874d 100755 (executable)
@@ -1,31 +1,30 @@
-/* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
- *
- * 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.
- * 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_snd.h"
-
-void opl2out(word reg, word data)
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+#include "src/lib/16_snd.h"\r
+\r
+void opl2out(word reg, word data)\r
 {\r
-       __asm
+       __asm\r
        {\r
                mov     ax,reg\r
                mov     dx,word ptr [ADLIB_FM_ADDRESS]\r
@@ -43,12 +42,12 @@ void opl2out(word reg, word data)
                mov     cx,36\r
 @@3:    in      al,dx\r
                loop    @@3\r
-       }
+       }\r
 }\r
 \r
-void opl3out(word reg, word data)
+void opl3out(word reg, word data)\r
 {\r
-       __asm
+       __asm\r
        {\r
                mov     ax,reg\r
                mov     dx,word ptr [ADLIB_FM_ADDRESS]\r
@@ -63,12 +62,12 @@ void opl3out(word reg, word data)
                mov     cx,26\r
 @@2:    in      al,dx\r
                loop    @@2\r
-       }
+       }\r
 }\r
 \r
-void opl3exp(word data)
+void opl3exp(word data)\r
 {\r
-       __asm
+       __asm\r
        {\r
                mov     ax,data\r
                mov     dx,word ptr [ADLIB_FM_ADDRESS]\r
@@ -82,17 +81,17 @@ void opl3exp(word data)
                out     dx,al\r
                mov     cx,36\r
 @@2:    in      al,dx\r
-               loop    @@2
+               loop    @@2\r
        }\r
-}
-
+}\r
+\r
 /* Function: FMResest *******************************************************\r
 *\r
 *     Description:        quick and dirty sound card reset (zeros all\r
 *                         registers).\r
 *\r
 */\r
-void FMReset(void/*int percusiveMode*/)
+void FMReset(void/*int percusiveMode*/)\r
 {\r
        int i;\r
 \r
@@ -106,8 +105,8 @@ void FMReset(void/*int percusiveMode*/)
        opl2out(0xBD, 0x20);\r
 \r
        //FMSetPercusiveMode(percusiveMode);\r
-} /* End of FMReset */
-
+} /* End of FMReset */\r
+\r
 /* Function: FMKeyOff *******************************************************\r
 *\r
 *     Parameters:        voice - which voice to turn off.\r
@@ -115,7 +114,7 @@ void FMReset(void/*int percusiveMode*/)
 *     Description:        turns off the specified voice.\r
 *\r
 */\r
-void FMKeyOff(int voice)
+void FMKeyOff(int voice)\r
 {\r
        int regNum;\r
 \r
@@ -134,17 +133,17 @@ void FMKeyOff(int voice)
 *                         octave.\r
 *\r
 */\r
-void FMKeyOn(int voice, int freq, int octave)
+void FMKeyOn(int voice, int freq, int octave)\r
 {\r
        int regNum, tmp;\r
 \r
        regNum = 0xA0 + voice % 11;//NUMVOICE;\r
        opl2out(regNum, freq & 0xff);\r
        regNum = 0xB0 + voice % 11;//NUMVOICE;\r
-       tmp = (freq >> 8) | (octave << 2) | 0x20;
+       tmp = (freq >> 8) | (octave << 2) | 0x20;\r
        opl2out(regNum, tmp);\r
-} /* End of FMKeyOn */
-
+} /* End of FMKeyOn */\r
+\r
 /* Function: FMSetVoice *****************************************************\r
 *\r
 *     Parameters:        voiceNum - which voice to set.\r
@@ -192,4 +191,4 @@ void FMSetVoice(int voiceNum, FMInstrument *ins){
        /* set Feedback/Selectivity */\r
        opCellNum = (byte)0xC0 + (byte)voiceNum;\r
        opl2out(opCellNum, ins->Feedback);\r
-} /* End of FMSetVoice */
+} /* End of FMSetVoice */\r
index 3242e81418d51d17f4fd7dc41486b6f3dc1e8ef8..583077de0aefacb0c009b5e1928f8c6af27a0110 100755 (executable)
@@ -1,35 +1,35 @@
-/* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
- *
- * 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_SND_H_
-#define __16_SND_H_
-
-#include "src/lib/16_head.h"
-
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+#ifndef __16_SND_H_\r
+#define __16_SND_H_\r
+\r
+#include "src/lib/16_head.h"\r
+\r
 #define MIN_REGISTER                   0x01\r
 #define MAX_REGISTER                   0xF5\r
 #define ADLIB_FM_ADDRESS       0x388   /* adlib address/status register */\r
-#define ADLIB_FM_DATA          0x389   /* adlib data register           */
-
+#define ADLIB_FM_DATA          0x389   /* adlib data register           */\r
+\r
 /*\r
 * FM Instrument definition for .SBI files - SoundBlaster instrument\r
 * - these are the important parts - we will skip the header, but since\r
@@ -45,15 +45,15 @@ typedef struct{
        byte WaveSelect[2];             /* output waveform distortion       */\r
        byte Feedback;                  /* feedback algorithm and strength  */\r
 } FMInstrument;\r
-
-
-void opl2out(word reg, word data);
-void opl3out(word reg, word data);
-void opl3exp(word data);
-
-void FMReset(void/*int percusiveMode*/);
-void FMKeyOff(int voice);
-void FMKeyOn(int voice, int freq, int octave);
-void FMSetVoice(int voiceNum, FMInstrument *ins);
-
-#endif /*__16_SND_H_*/
+\r
+\r
+void opl2out(word reg, word data);\r
+void opl3out(word reg, word data);\r
+void opl3exp(word data);\r
+\r
+void FMReset(void/*int percusiveMode*/);\r
+void FMKeyOff(int voice);\r
+void FMKeyOn(int voice, int freq, int octave);\r
+void FMSetVoice(int voiceNum, FMInstrument *ins);\r
+\r
+#endif /*__16_SND_H_*/\r
index e553e10c2cc8ce587daae059ea3a19022e064f1b..1626fd1dc6fcd1e92d5421e7b3f576ff5d88ff24 100755 (executable)
@@ -1,10 +1,10 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123
  *
  * 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 publipage->shed by
+ * 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.
  *
@@ -13,7 +13,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You page->should have received a copy of the GNU General Public License
+ * 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.
@@ -73,31 +73,35 @@ void ssd(page_t *page, bakapee_t *pee, word svq)
 //plot pixel or plot tile
 void dingpp(page_t *page, bakapee_t *pee)
 {
-#ifdef TILE
+       if(pee->tile)
+       {
 #ifndef MXLIB
        //fill_block(pee->xx, pee->yy, pee->xx+TILEWH, pee->yy+TILEWH, pee->coor);
-       mxFillBox(pee->xx, pee->yy, TILEWH, TILEWH, pee->coor, OP_SET);
-#else
-       modexClearRegion(page, pee->xx, pee->yy, TILEWH, TILEWH, pee->coor);
-#endif
+               mxFillBox(pee->xx, pee->yy, TILEWH, TILEWH, pee->coor, OP_SET);
 #else
-       modexputPixel(page, pee->xx, pee->yy, pee->coor);
+               modexClearRegion(page, pee->xx, pee->yy, TILEWH, TILEWH, pee->coor);
 #endif
+       }
+       else
+               modexputPixel(page, pee->xx, pee->yy, pee->coor);
 }
 
 void dingo(page_t *page, bakapee_t *pee)
 {
-       #ifdef TILE
-       if(pee->xx<0) pee->xx=(page->sw-TILEWH);
-       if(pee->yy<0) pee->yy=(page->sh-TILEWH);
-       if(pee->xx>(page->sw-TILEWH)) pee->xx=0;
-       if(pee->yy>(page->sh-TILEWH)/*+(TILEWH*BUFFMX)*/) pee->yy=0;
-       #else
-       if(pee->xx<0) pee->xx=page->sw;
-       if(pee->yy<0) pee->yy=page->sh;
-       if(pee->xx>page->sw) pee->xx=0;
-       if(pee->yy>page->sh) pee->yy=0;
-       #endif
+       if(pee->tile)
+       {
+               if(pee->xx<0) pee->xx=(page->sw-TILEWH);
+               if(pee->yy<0) pee->yy=(page->sh-TILEWH);
+               if(pee->xx>(page->sw-TILEWH)) pee->xx=0;
+               if(pee->yy>(page->sh-TILEWH)/*+(TILEWH*BUFFMX)*/) pee->yy=0;
+       }
+               else
+       {
+               if(pee->xx<0) pee->xx=page->sw;
+               if(pee->yy<0) pee->yy=page->sh;
+               if(pee->xx>page->sw) pee->xx=0;
+               if(pee->yy>page->sh) pee->yy=0;
+       }
 }
 
 //assigning values from randomizer
@@ -106,35 +110,27 @@ void dingas(bakapee_t *pee)
        if(pee->gq == BONK) dingu(pee);
        if(!pee->bakax)
        {
-               #ifdef TILE
+               if(pee->tile)
                pee->xx-=TILEWH;
-               #else
-               pee->xx--;
-               #endif
+               else pee->xx--;
        }
        else if(pee->bakax>1)
        {
-               #ifdef TILE
+               if(pee->tile)
                pee->xx+=TILEWH;
-               #else
-               pee->xx++;
-               #endif
+               else pee->xx++;
        }
        if(!pee->bakay)
        {
-               #ifdef TILE
+               if(pee->tile)
                pee->yy-=TILEWH;
-               #else
-               pee->yy--;
-               #endif
+               else pee->yy--;
        }
        else if(pee->bakay>1)
        {
-               #ifdef TILE
+               if(pee->tile)
                pee->yy+=TILEWH;
-               #else
-               pee->yy++;
-               #endif
+               else pee->yy++;
        }
 }
 
@@ -184,11 +180,10 @@ void ding(page_t *page, bakapee_t *pee, word q)
                        dingas(pee);
                        dingo(page, pee);
                        dingpp(page, pee);      //plot the pixel/tile
-#ifdef TILE
+                       if(pee->tile)
                        modexClearRegion(page, (rand()*TILEWH)%page->width, (rand()*TILEWH)%(page->height), TILEWH, TILEWH, 0);
-#else
+                       else
                        modexputPixel(page, rand()%page->width, rand()%page->height, 0);
-#endif
                break;
                case 3:
                        dingq(pee);
@@ -270,11 +265,10 @@ void ding(page_t *page, bakapee_t *pee, word q)
                        tx+=pee->xx+TILEWH+4;
                        ty+=pee->yy+TILEWH+4;
                        modexClearRegion(page, tx, ty, 4, 4, pee->coor);
-#ifdef TILE
+                       if(pee->tile)
                        modexClearRegion(page, (rand()*TILEWH)%page->width, (rand()*TILEWH)%(page->height), TILEWH, TILEWH, 0);
-#else
+                       else
                        modexputPixel(page, rand()%page->width, rand()%(page->height), 0);
-#endif
                        //printf("%d %d %d %d %d %d\n", pee->xx, pee->yy, tx, ty, TILEWH);
                break;
                default:
index 1f9c94e59af0f063ad11d201ff598137deef7bde..c7f352661e9c06a7ddc72b0c40e4ea3b178c13ac 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
@@ -44,6 +44,7 @@ typedef struct {
        sword bakax, bakay;\r
        sword xx, yy, sx, sy;\r
        byte coor;\r
+       boolean tile;\r
 } bakapee_t;\r
 \r
 void clrstdin();\r
index d43411699873b2fca5119cc26a7752b2466813fa..433217337db99d0ef0856bcb80037e54873a62e8 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index fd112658910e64970a4c407faf2e25e1c3ed877d..06570a9a4851cfdb6918e3b8bbe5876e89bb2ecb 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 04253da677613e32f8b6dbe42854e10997ff480f..735909ec22c766956c49664e89a40d803392793c 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index c8d3b54e5dd19e88c4df1f6b6ddc7f6b9ba49030..f29c92d52c00db0ff5ca4e1881f0308f78590d7d 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index bd47e08886cd110279b442ab8a8d6cc7068e1f0b..51777811ff46a84fc64b1987c21ee895faa91266 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index e3c6aec90885307627e36f7dce0b50c5ffd0fbaf..0399a7771738f489fe3a77a936387183319ab571 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 23d507ac1248c29aff47ac1daf06c2a437e47340..308944c34e9a02cb0780bc941c4d6218e380e04b 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 74800c06601c6a0f977033aca7257f811dd5dc1d..69ccc81fed2538ca5dbe097ca22a7f2ac2e206b2 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index a6f645e68bb16c575df56f54c1f5cf9697de7de5..89221ad58646e50cc27caae1e6eb224246830ef0 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index d59ae7011775d6a9b7495046b8cbcb7873419276..2f946e616b3df08ee4cda4fdf607d9cdc12b00e6 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 9c1093e16c4387a633c374ef3a256e5332913d7e..0a2d0a69edcc864e0fb5744473e6b18093a5167b 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index abf4e0e0c186e5d951353f94cabd43271962e0aa..5655254a2835bf428c09098cef48e85ceaf8ac3a 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index c15c39c5d3e92d9106970d984233861a891ed890..3fd1c5ed2b25b85ac5a5849bf9d282ea2d010cf2 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index c4b67307d801c8b7b1b9fd510a3c3206346e8a36..6e5806651dae592f31e7859d9e669445f5b9a4a4 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 &  joncampbell123
  *
  * This file is part of Project 16.
  *
index 3d0fb2c674916ec112a3c29b9e0e32e0777eb6c2..772f30660bf4f0eb04a4b3598c05980ef47f2cea 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 &  joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index bb09ff19acc74ab50cda2234c3e7129be4279c27..c01eeef35b57f1268f5a855659be619235772244 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index ea76843ad60dde9d7508818e4b28fb4d836d13c6..a5cdd665cb81341c97d8d68f2531a6fefbeea286 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123
  *
  * This file is part of Project 16.
  *
index ba69b686b1c4212670162b82ba0cc71f3f1af963..9409a8b0326b4329511c8b0bf7120806e1f7fc41 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123
  *
  * This file is part of Project 16.
  *
index 90996a9fe748fdd419037a0742d1ec83e20fd451..972d7db6c7b3424182d5f3448f55e2b05db70a46 100755 (executable)
@@ -1,53 +1,53 @@
-/* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
- *
- * 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.
- *
- */
-
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
 #include "src/lib/mapread.h"\r
-
-#define DUMP
-//#define DUMP_MAP
-
-void
+\r
+#define DUMP\r
+//#define DUMP_MAP\r
+\r
+void\r
 main(int argc, char *argv[])\r
 {\r
-       map_t map;
-       short i;
-       loadmap("data/test.map", &map);
-       #ifdef DUMP
-       fprintf(stdout, "map.width=     %d\n", map.width);
-       fprintf(stdout, "map.height=    %d\n", map.height);
-       #ifdef DUMP_MAP
-       for(i=0; i<(map.width*map.height); i++)
-       {
-               fprintf(stdout, "%04d[%02d]", i, map.data[i]);
-               if(i && !(i%map.width)) fprintf(stdout, "\n");
-       }
-       fprintf(stdout, "\n");
-       #endif
-       fprintf(stdout, "&main()=%Fp\n", *argv[0]);
-       fprintf(stdout, "&map==%Fp\n", &map);
-       fprintf(stdout, "&map.tiles==%Fp\n", map.tiles);
-       fprintf(stdout, "&map.width==%Fp\n", map.width);
+       map_t map;\r
+       short i;\r
+       loadmap("data/test.map", &map);\r
+       #ifdef DUMP\r
+       fprintf(stdout, "map.width=     %d\n", map.width);\r
+       fprintf(stdout, "map.height=    %d\n", map.height);\r
+       #ifdef DUMP_MAP\r
+       for(i=0; i<(map.width*map.height); i++)\r
+       {\r
+               fprintf(stdout, "%04d[%02d]", i, map.data[i]);\r
+               if(i && !(i%map.width)) fprintf(stdout, "\n");\r
+       }\r
+       fprintf(stdout, "\n");\r
+       #endif\r
+       fprintf(stdout, "&main()=%Fp\n", *argv[0]);\r
+       fprintf(stdout, "&map==%Fp\n", &map);\r
+       fprintf(stdout, "&map.tiles==%Fp\n", map.tiles);\r
+       fprintf(stdout, "&map.width==%Fp\n", map.width);\r
        fprintf(stdout, "&map.height==%Fp\n", map.height);\r
-       fprintf(stdout, "&map.data==%Fp\n", map.data);
-       #endif
-       fprintf(stdout, "okies~\n");
+       fprintf(stdout, "&map.data==%Fp\n", map.data);\r
+       #endif\r
+       fprintf(stdout, "okies~\n");\r
 }\r
index e035015080c290fef607d158092602d878d602a2..3a05abdddf2c0d6640c437cc4261b1a12dbf3d7b 100755 (executable)
@@ -1,65 +1,65 @@
-/* Project 16 Source Code~
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
- *
- * 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 <conio.h>
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+#include <conio.h>\r
 #include "src/lib/fmapread.h"\r
-
-#define DUMP
-//#define DUMP_MAP
-
-void
+\r
+#define DUMP\r
+//#define DUMP_MAP\r
+\r
+void\r
 main(int argc, char *argv[])\r
 {\r
-       map_t map;
-       short i;
-       char *fmt = "Memory available = %u\n";
-       char *fmt0 = "Largest Contiguous Block of Memory available = %u\n";
-
-       fprintf(stderr, fmt, _memavl());
-       fprintf(stderr, fmt0, _memmax());
-       fprintf(stderr, "Size of map var = %u\n", _msize(&map));
-       fprintf(stderr, "program always crashes for some reason....");
-       getch();
-
-       fprintf(stderr, "loading~\n\n");
-       loadmap("data/tes0.map", &map);
-       fprintf(stderr, "\nokies~\n");
-       #ifdef DUMP
-       fprintf(stdout, "map.width=     %d\n", map.width);
-       fprintf(stdout, "map.height=    %d\n", map.height);
-       #ifdef DUMP_MAP
-       for(i=0; i<(map.width*map.height); i++)
-       {
-               fprintf(stdout, "%04d[%02d]", i, map.data[i]);
-               if(i && !(i%map.width)) fprintf(stdout, "\n");
-       }
-       fprintf(stdout, "\n");
-       #endif
-       fprintf(stdout, "&main()=%Fp\n", *argv[0]);
-       fprintf(stdout, "&map==%Fp\n", &map);
-       fprintf(stdout, "&map.tiles==%Fp\n", map.tiles);
-       fprintf(stdout, "&map.width==%Fp\n", map.width);
+       map_t map;\r
+       short i;\r
+       char *fmt = "Memory available = %u\n";\r
+       char *fmt0 = "Largest Contiguous Block of Memory available = %u\n";\r
+\r
+       fprintf(stderr, fmt, _memavl());\r
+       fprintf(stderr, fmt0, _memmax());\r
+       fprintf(stderr, "Size of map var = %u\n", _msize(&map));\r
+       fprintf(stderr, "program always crashes for some reason....");\r
+       getch();\r
+\r
+       fprintf(stderr, "loading~\n\n");\r
+       loadmap("data/tes0.map", &map);\r
+       fprintf(stderr, "\nokies~\n");\r
+       #ifdef DUMP\r
+       fprintf(stdout, "map.width=     %d\n", map.width);\r
+       fprintf(stdout, "map.height=    %d\n", map.height);\r
+       #ifdef DUMP_MAP\r
+       for(i=0; i<(map.width*map.height); i++)\r
+       {\r
+               fprintf(stdout, "%04d[%02d]", i, map.data[i]);\r
+               if(i && !(i%map.width)) fprintf(stdout, "\n");\r
+       }\r
+       fprintf(stdout, "\n");\r
+       #endif\r
+       fprintf(stdout, "&main()=%Fp\n", *argv[0]);\r
+       fprintf(stdout, "&map==%Fp\n", &map);\r
+       fprintf(stdout, "&map.tiles==%Fp\n", map.tiles);\r
+       fprintf(stdout, "&map.width==%Fp\n", map.width);\r
        fprintf(stdout, "&map.height==%Fp\n", map.height);\r
-       fprintf(stdout, "&map.data==%Fp\n", map.data);
-       #endif
-       fprintf(stdout, "okies~\n");
+       fprintf(stdout, "&map.data==%Fp\n", map.data);\r
+       #endif\r
+       fprintf(stdout, "okies~\n");\r
 }\r
index ca9e54290a12ac02b9ff7b9a69847a9286d7b3be..f1057dc015c707d3873a3602f9c1c534d3076fc3 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 7ed33b843e1593c8f27c0775b82eb16384f78727..a40bd3fd7a8f5cc2f205011fa5b6c442aa9208d8 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index f423b6a522b7042aebfb8fda2359832dfecbcdcf..0392b5cb3937f64e3cc44e244d97a7aaaa6a79a3 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index f5efc3c7fbd77096a09f075b64a501912236d416..3b83c53dfff92ee8fa67e72233f06381a2f4d04d 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index ce44cb4d53d01e032fa82efa254c15399fcc3a67..9ed1096db65f89f936b6a3b9daf9ecbe11d2d380 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index e7987762f78ec3b587e2c3432cac78c45130493f..7d68b45d6e3e65d32d30bd1a9b723b904f5f98d8 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123
  *
  * This file is part of Project 16.
  *
index 8fd5b0258bad32564014a153e8dcf493b598df9b..5bcdccf6aee889c8761a642088732f6d2ddcab8e 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
  * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
  * Fifth Floor, Boston, MA 02110-1301 USA.\r
  *\r
- */
-
-#include <stdio.h>
-
-#include "src/lib/16_in.h"
-//#include "src/lib/16_snd.h"
-#include "src/lib/doslib/adlib.h"
-#include "src/lib/doslib/8254.h"               /* 8254 timer */
-
-static unsigned int musical_scale[18] = {
-       0x1B0,                  /* E */
-       0x1CA,                  /* F */
-       0x1E5,                  /* f# */
-       0x202,                  /* G */
-       0x220,                  /* G# */
-       0x241,                  /* A */
-       0x263,                  /* A# */
-       0x287,                  /* B */
-       0x2AE,                  /* C */
-
-       0x2B0,                  /* E */
-       0x2CA,                  /* F */
-       0x2E5,                  /* f# */
-       0x302,                  /* G */
-       0x320,                  /* G# */
-       0x341,                  /* A */
-       0x363,                  /* A# */
-       0x387,                  /* B */
-       0x3AE,                  /* C */
-};
-
+ */\r
+\r
+#include <stdio.h>\r
+\r
+#include "src/lib/16_in.h"\r
+//#include "src/lib/16_snd.h"\r
+#include "src/lib/doslib/adlib.h"\r
+#include "src/lib/doslib/8254.h"               /* 8254 timer */\r
+\r
+static unsigned int musical_scale[18] = {\r
+       0x1B0,                  /* E */\r
+       0x1CA,                  /* F */\r
+       0x1E5,                  /* f# */\r
+       0x202,                  /* G */\r
+       0x220,                  /* G# */\r
+       0x241,                  /* A */\r
+       0x263,                  /* A# */\r
+       0x287,                  /* B */\r
+       0x2AE,                  /* C */\r
+\r
+       0x2B0,                  /* E */\r
+       0x2CA,                  /* F */\r
+       0x2E5,                  /* f# */\r
+       0x302,                  /* G */\r
+       0x320,                  /* G# */\r
+       0x341,                  /* A */\r
+       0x363,                  /* A# */\r
+       0x387,                  /* B */\r
+       0x3AE,                  /* C */\r
+};\r
+\r
 void main(int argc, char near *argv[])\r
-{
-       word i;
+{\r
+       word i;\r
 //     static FMInstrument testInst =\r
 //{\r
 //0x00, 0x01,  /* modulator frequency multiple... 0x20 */\r
@@ -60,77 +60,77 @@ void main(int argc, char near *argv[])
 //0x73, 0x73,  /* modulator sustain/release...    0x80 */\r
 //0x03, 0x00,  /* output waveform distortion      0xE0 */\r
 //0x36,                                /* feedback algorithm and strength 0xC0 */\r
-//};
-
-       IN_Startup();
-       //FMReset();
-       //FMSetVoice(0, &testInst);
-       if(!init_adlib())
-       {
-               printf("Cannot init library\n");
-               exit(-5);
-       }
-
-       if (adlib_fm_voices > 9)
-               printf("OPL3!\n");
-//             vga_bios_set_80x50_text();
-
-       memset(adlib_fm,0,sizeof(adlib_fm));
-       memset(&adlib_reg_bd,0,sizeof(adlib_reg_bd));
-       for (i=0;i < adlib_fm_voices;i++) {
-               struct adlib_fm_operator *f;
-               f = &adlib_fm[i].mod;
-               f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;
-               f = &adlib_fm[i].car;
-               f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;
-       }
-
-       for (i=0;i < /*adlib_fm_voices*/1;i++) {
-               struct adlib_fm_operator *f;
-
-               f = &adlib_fm[i].mod;
-               f->mod_multiple = 1;
-               f->total_level = 63 - 16;
-               f->attack_rate = 15;
-               f->decay_rate = 0;
-               f->sustain_level = 7;
-               f->release_rate = 7;
-               f->f_number = musical_scale[i%18];
-               f->octave = 4;
-               f->key_on = 0;
-
-               f = &adlib_fm[i].car;
-               f->mod_multiple = 1;
-               f->total_level = 63 - 16;
-               f->attack_rate = 15;
-               f->decay_rate = 0;
-               f->sustain_level = 7;
-               f->release_rate = 7;
-               f->f_number = 0;
-               f->octave = 0;
-               f->key_on = 0;
-       }
-
-       adlib_apply_all();
-
-       printf("press Z!  to noise\npress ESC to quit");
-       printf("p");
-       while(!IN_qb(1))
-       {
-               if(IN_qb(44))
-               {
-                       printf("e");
+//};\r
+\r
+       IN_Startup();\r
+       //FMReset();\r
+       //FMSetVoice(0, &testInst);\r
+       if(!init_adlib())\r
+       {\r
+               printf("Cannot init library\n");\r
+               exit(-5);\r
+       }\r
+\r
+       if (adlib_fm_voices > 9)\r
+               printf("OPL3!\n");\r
+//             vga_bios_set_80x50_text();\r
+\r
+       memset(adlib_fm,0,sizeof(adlib_fm));\r
+       memset(&adlib_reg_bd,0,sizeof(adlib_reg_bd));\r
+       for (i=0;i < adlib_fm_voices;i++) {\r
+               struct adlib_fm_operator *f;\r
+               f = &adlib_fm[i].mod;\r
+               f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;\r
+               f = &adlib_fm[i].car;\r
+               f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;\r
+       }\r
+\r
+       for (i=0;i < /*adlib_fm_voices*/1;i++) {\r
+               struct adlib_fm_operator *f;\r
+\r
+               f = &adlib_fm[i].mod;\r
+               f->mod_multiple = 1;\r
+               f->total_level = 63 - 16;\r
+               f->attack_rate = 15;\r
+               f->decay_rate = 0;\r
+               f->sustain_level = 7;\r
+               f->release_rate = 7;\r
+               f->f_number = musical_scale[i%18];\r
+               f->octave = 4;\r
+               f->key_on = 0;\r
+\r
+               f = &adlib_fm[i].car;\r
+               f->mod_multiple = 1;\r
+               f->total_level = 63 - 16;\r
+               f->attack_rate = 15;\r
+               f->decay_rate = 0;\r
+               f->sustain_level = 7;\r
+               f->release_rate = 7;\r
+               f->f_number = 0;\r
+               f->octave = 0;\r
+               f->key_on = 0;\r
+       }\r
+\r
+       adlib_apply_all();\r
+\r
+       printf("press Z!  to noise\npress ESC to quit");\r
+       printf("p");\r
+       while(!IN_qb(1))\r
+       {\r
+               if(IN_qb(44))\r
+               {\r
+                       printf("e");\r
                        adlib_fm[0].mod.key_on = 1;\r
-                       //FMKeyOn(0, 0x106, 4);
-               }
-               else
-               {
-                       adlib_fm[0].mod.key_on = 0;
-                       //FMKeyOff(0);
-               }
+                       //FMKeyOn(0, 0x106, 4);\r
+               }\r
+               else\r
+               {\r
+                       adlib_fm[0].mod.key_on = 0;\r
+                       //FMKeyOff(0);\r
+               }\r
                adlib_update_groupA0(0,&adlib_fm[0]);\r
-       }
-       printf("!\n");
-       shutdown_adlib();
-       IN_Shutdown();
-}
+       }\r
+       printf("!\n");\r
+       shutdown_adlib();\r
+       IN_Shutdown();\r
+}\r
index 23b99826e1138697f27c0ad7ea3a191e65dc65c8..df0af6152a78a5777d4fa77f30ee57af5a009438 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index 94121e8a2ba249ccbe3953c82d9d394a959c36b2..8fa3a4e2b80997c019cdc186a3762e6fe16795be 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r
index f309c143405349b6f9d2191995a1d41ef8a2c81f..4c328fda160cdf8e90f7caac26d2869ce0c87a13 100755 (executable)
-#include "src/tesuto.h"\r
-\r
-static unsigned char palette[768];\r
-\r
-int main(int argc,char **argv) {\r
-       struct vrl1_vgax_header *vrl_header;\r
-       vrl1_vgax_offset_t *vrl_lineoffs;\r
-       unsigned char *buffer;\r
-       unsigned int bufsz;\r
-       int fd;\r
-\r
-       if (argc < 3) {\r
-               fprintf(stderr,"drawvrl <VRL file> <palette file>\n");\r
-               return 1;\r
-       }\r
-\r
-       fd = open(argv[1],O_RDONLY|O_BINARY);\r
-       if (fd < 0) {\r
-               fprintf(stderr,"Unable to open '%s'\n",argv[1]);\r
-               return 1;\r
-       }\r
-       {\r
-               unsigned long sz = lseek(fd,0,SEEK_END);\r
-               if (sz < sizeof(*vrl_header)) return 1;\r
-               if (sz >= 65535UL) return 1;\r
-\r
-               bufsz = (unsigned int)sz;\r
-               buffer = malloc(bufsz);\r
-               if (buffer == NULL) return 1;\r
-\r
-               lseek(fd,0,SEEK_SET);\r
-               if ((unsigned int)read(fd,buffer,bufsz) < bufsz) return 1;\r
-\r
-               vrl_header = (struct vrl1_vgax_header*)buffer;\r
-               if (memcmp(vrl_header->vrl_sig,"VRL1",4) || memcmp(vrl_header->fmt_sig,"VGAX",4)) return 1;\r
-               if (vrl_header->width == 0 || vrl_header->height == 0) return 1;\r
-       }\r
-       close(fd);\r
-\r
-       probe_dos();\r
-       if (!probe_vga()) {\r
-               printf("VGA probe failed\n");\r
-               return 1;\r
-       }\r
-       int10_setmode(19);\r
-       update_state_from_vga();\r
-       vga_enable_256color_modex(); // VGA mode X\r
-\r
-       /* load color palette */\r
-       fd = open(argv[2],O_RDONLY|O_BINARY);\r
-       if (fd >= 0) {\r
-               unsigned int i;\r
-\r
-               read(fd,palette,768);\r
-               close(fd);\r
-\r
-               vga_palette_lseek(0);\r
-               for (i=0;i < 256;i++) vga_palette_write(palette[(i*3)+0]>>2,palette[(i*3)+1]>>2,palette[(i*3)+2]>>2);\r
-       }\r
-\r
-       /* preprocess the sprite to generate line offsets */\r
-       vrl_lineoffs = vrl1_vgax_genlineoffsets(vrl_header,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
-       if (vrl_lineoffs == NULL) return 1;\r
-\r
-       draw_vrl1_vgax_modex(0,0,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
-       while (getch() != 13);\r
-\r
-       {\r
-               unsigned int i;\r
-\r
-               for (i=1;i < 320;i++)\r
-                       draw_vrl1_vgax_modex(i,0,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
-       }\r
-       while (getch() != 13);\r
-\r
-       {\r
-               unsigned int i;\r
-\r
-               for (i=1;i < 200;i++)\r
-                       draw_vrl1_vgax_modex(i,i,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
-       }\r
-       while (getch() != 13);\r
-\r
-       {\r
-               unsigned int i;\r
-\r
-               for (i=(2 << 6)/*200%*/;i >= (1 << 4)/*25%*/;i--)\r
-                       draw_vrl1_vgax_modexstretch(0,0,i,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
-       }\r
-       while (getch() != 13);\r
-       {\r
-               unsigned int i;\r
-\r
-               for (i=(2 << 6)/*200%*/;i >= (1 << 4)/*25%*/;i--)\r
-                       draw_vrl1_vgax_modexystretch(0,0,i,i,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
-       }\r
-       while (getch() != 13);\r
-\r
-       int10_setmode(3);\r
-       free(vrl_lineoffs);\r
-       buffer = NULL;\r
-       free(buffer);\r
-       bufsz = 0;\r
-       return 0;\r
-}\r
-\r
+#include "src/tesuto.h"
+
+static unsigned char palette[768];
+global_game_variables_t gvar;
+
+int main(int argc,char **argv) {
+       struct vrl1_vgax_header *vrl_header;
+       vrl1_vgax_offset_t *vrl_lineoffs;
+       unsigned char *buffer;
+       unsigned int bufsz;
+       int fd;
+
+       if (argc < 3) {
+               fprintf(stderr,"drawvrl <VRL file> <palette file>\n");
+               return 1;
+       }
+
+       fd = open(argv[1],O_RDONLY|O_BINARY);
+       if (fd < 0) {
+               fprintf(stderr,"Unable to open '%s'\n",argv[1]);
+               return 1;
+       }
+       {
+               unsigned long sz = lseek(fd,0,SEEK_END);
+               if (sz < sizeof(*vrl_header)) return 1;
+               if (sz >= 65535UL) return 1;
+
+               bufsz = (unsigned int)sz;
+               buffer = malloc(bufsz);
+               if (buffer == NULL) return 1;
+
+               lseek(fd,0,SEEK_SET);
+               if ((unsigned int)read(fd,buffer,bufsz) < bufsz) return 1;
+
+               vrl_header = (struct vrl1_vgax_header*)buffer;
+               if (memcmp(vrl_header->vrl_sig,"VRL1",4) || memcmp(vrl_header->fmt_sig,"VGAX",4)) return 1;
+               if (vrl_header->width == 0 || vrl_header->height == 0) return 1;
+       }
+       close(fd);
+
+       probe_dos();
+       if (!probe_vga()) {
+               printf("VGA probe failed\n");
+               return 1;
+       }
+       int10_setmode(19);
+       update_state_from_vga();
+       VGAmodeX(1, &gvar);
+       //vga_enable_256color_modex(); // VGA mode X
+
+
+       /* load color palette */
+       fd = open(argv[2],O_RDONLY|O_BINARY);
+       if (fd >= 0) {
+               unsigned int i;
+
+               read(fd,palette,768);
+               close(fd);
+
+               vga_palette_lseek(0);
+               for (i=0;i < 256;i++) vga_palette_write(palette[(i*3)+0]>>2,palette[(i*3)+1]>>2,palette[(i*3)+2]>>2);
+       }
+
+       /* preprocess the sprite to generate line offsets */
+       vrl_lineoffs = vrl1_vgax_genlineoffsets(vrl_header,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));
+       if (vrl_lineoffs == NULL) return 1;
+
+       draw_vrl1_vgax_modex(0,0,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));
+       while (getch() != 13);
+
+       {
+               unsigned int i;
+
+               for (i=1;i < 320;i++)
+                       draw_vrl1_vgax_modex(i,0,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));
+       }
+       while (getch() != 13);
+
+       {
+               unsigned int i;
+
+               for (i=1;i < 200;i++)
+                       draw_vrl1_vgax_modex(i,i,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));
+       }
+       while (getch() != 13);
+
+       {
+               unsigned int i;
+
+               for (i=(2 << 6)/*200%*/;i >= (1 << 4)/*25%*/;i--)
+                       draw_vrl1_vgax_modexstretch(0,0,i,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));
+       }
+       while (getch() != 13);
+       {
+               unsigned int i;
+
+               for (i=(2 << 6)/*200%*/;i >= (1 << 4)/*25%*/;i--)
+                       draw_vrl1_vgax_modexystretch(0,0,i,i,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));
+       }
+       while (getch() != 13);
+
+       int10_setmode(3);
+       //VGAmodeX(0, &gvar);
+       free(vrl_lineoffs);
+       buffer = NULL;
+       free(buffer);
+       bufsz = 0;
+       return 0;
+}
+
index ffa164042e0c64f4a4d75191c45b22496dffec17..2464962f7889afc8b34ba5bf5fb009c3a06d928c 100755 (executable)
@@ -2,9 +2,18 @@
 #define __TESUTO_H__
 
 #include "src/lib/16_head.h"
-#include "src/lib/doslib/hw/cpu/cpu.h"
-#include "src/lib/doslib/hw/dos/dos.h"
-#include "src/lib/doslib/hw/vga/vga.h"
-#include "src/lib/doslib/hw/vga/vrl.h"
+#include "src/lib/modex16.h"
+#include <hw/cpu/cpu.h>
+#include <hw/dos/dos.h>
+#include <hw/vga/vga.h>
+#include <hw/vga/vrl.h>
 
+typedef unsigned char far *VGA_RAM_PTR;
+//VGA_RAM_PTR vga_graphics_ram = (VGA_RAM_PTR)MK_FP(0xA000,0x0000);
+//unsigned char vga_stride = 80; // 80 x 4 = 320 for 320-pixel wide modes
+
+/*static inline void vga_write_sequencer(unsigned char i,unsigned char c) {
+    outp(0x3C4,i);
+    outp(0x3C5,c);
+}*/
 #endif
index d1bc1a1e7ce9cdef995dea609467374974475eb0..49752222de381b0f9ec6f1f10c8ced6226562451 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
  *\r
  * This file is part of Project 16.\r
  *\r