]> 4ch.mooo.com Git - 16.git/commitdiff
engi stuff moved to tdef and textinit is in startup16
authorsparky4 <sparky4@cock.li>
Fri, 16 Dec 2016 14:42:49 +0000 (08:42 -0600)
committersparky4 <sparky4@cock.li>
Fri, 16 Dec 2016 14:42:49 +0000 (08:42 -0600)
14 files changed:
DEBUG.16W [deleted file]
HEAP.16W [deleted file]
MEMINFO.16W [deleted file]
MMDUMP.16W [deleted file]
git_igno.re
makefile
src/16.c
src/16.h
src/fonttest.c
src/lib/16_tail.c
src/lib/16_tail.h
src/lib/16_tdef.h
src/lib/16text.c
src/lib/16text.h

diff --git a/DEBUG.16W b/DEBUG.16W
deleted file mode 100755 (executable)
index 25724d7..0000000
--- a/DEBUG.16W
+++ /dev/null
@@ -1,210 +0,0 @@
-\e[0mSeg:0      Size:10117      Owner:0x0\r
-\e[41;31m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m\e[42;32m0000\r
-\e[0m\e[0mSeg:287e       Size:36 Owner:0x0\r
-\e[41;31m++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:28a2       Size:256        Owner:0x1650\r
-\e[44;34m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:29a2       Size:256        Owner:0x1442\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2aa2       Size:256        Owner:0x1444\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2ba2       Size:256        Owner:0x1446\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2ca2       Size:256        Owner:0x1448\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2da2       Size:256        Owner:0x144a\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2ea2       Size:256        Owner:0x144c\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:2fa2       Size:256        Owner:0x144e\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:30a2       Size:256        Owner:0x1450\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:31a2       Size:256        Owner:0x1452\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:32a2       Size:256        Owner:0x1454\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:33a2       Size:256        Owner:0x1456\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:34a2       Size:256        Owner:0x1458\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:35a2       Size:256        Owner:0x145a\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:36a2       Size:256        Owner:0x145c\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:37a2       Size:256        Owner:0x145e\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:38a2       Size:256        Owner:0x1460\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:39a2       Size:256        Owner:0x1462\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3aa2       Size:256        Owner:0x1464\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3ba2       Size:256        Owner:0x1466\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3ca2       Size:256        Owner:0x1468\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3da2       Size:256        Owner:0x146a\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3ea2       Size:256        Owner:0x146c\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:3fa2       Size:256        Owner:0x146e\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:40a2       Size:256        Owner:0x1470\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:41a2       Size:256        Owner:0x1472\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:42a2       Size:256        Owner:0x1474\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:43a2       Size:256        Owner:0x1476\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:44a2       Size:256        Owner:0x1478\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:45a2       Size:256        Owner:0x147a\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:46a2       Size:256        Owner:0x147c\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:47a2       Size:256        Owner:0x147e\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:48a2       Size:256        Owner:0x1480\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:49a2       Size:256        Owner:0x1482\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4aa2       Size:256        Owner:0x1484\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4ba2       Size:256        Owner:0x1486\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4ca2       Size:256        Owner:0x1488\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4da2       Size:256        Owner:0x148a\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4ea2       Size:256        Owner:0x148c\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:4fa2       Size:256        Owner:0x148e\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:50a2       Size:256        Owner:0x1490\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:51a2       Size:256        Owner:0x1492\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:52a2       Size:256        Owner:0x1494\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:53a2       Size:256        Owner:0x1496\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:54a2       Size:256        Owner:0x1498\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:55a2       Size:256        Owner:0x149a\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:56a2       Size:256        Owner:0x149c\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:57a2       Size:256        Owner:0x149e\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:58a2       Size:256        Owner:0x14a0\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:59a2       Size:256        Owner:0x14a2\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5aa2       Size:256        Owner:0x14a4\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5ba2       Size:256        Owner:0x14a6\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5ca2       Size:256        Owner:0x14a8\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5da2       Size:256        Owner:0x14aa\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5ea2       Size:256        Owner:0x14ac\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:5fa2       Size:256        Owner:0x14ae\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:60a2       Size:256        Owner:0x14b0\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:61a2       Size:256        Owner:0x14b2\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:62a2       Size:256        Owner:0x14b4\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:63a2       Size:256        Owner:0x14b6\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:64a2       Size:256        Owner:0x14b8\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:65a2       Size:256        Owner:0x14ba\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:66a2       Size:256        Owner:0x14bc\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:67a2       Size:256        Owner:0x14be\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:68a2       Size:256        Owner:0x14c0\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:69a2       Size:256        Owner:0x14c2\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6aa2       Size:256        Owner:0x14c4\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6ba2       Size:256        Owner:0x14c6\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6ca2       Size:256        Owner:0x14c8\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6da2       Size:256        Owner:0x14ca\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6ea2       Size:256        Owner:0x14cc\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:6fa2       Size:256        Owner:0x14ce\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:70a2       Size:256        Owner:0x14d0\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:71a2       Size:256        Owner:0x14d2\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:72a2       Size:256        Owner:0x14d4\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:73a2       Size:256        Owner:0x14d6\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:74a2       Size:256        Owner:0x14d8\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:75a2       Size:256        Owner:0x14da\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:76a2       Size:256        Owner:0x14dc\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:77a2       Size:256        Owner:0x14de\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:78a2       Size:256        Owner:0x14e0\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:79a2       Size:256        Owner:0x14e2\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7aa2       Size:256        Owner:0x14e4\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7ba2       Size:256        Owner:0x14e6\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7ca2       Size:256        Owner:0x14e8\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7da2       Size:256        Owner:0x14ea\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7ea2       Size:256        Owner:0x14ec\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:7fa2       Size:256        Owner:0x14ee\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:80a2       Size:256        Owner:0x14f0\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:81a2       Size:256        Owner:0x14f2\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:82a2       Size:256        Owner:0x14f4\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:83a2       Size:256        Owner:0x14f6\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:84a2       Size:256        Owner:0x14f8\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:85a2       Size:256        Owner:0x14fa\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:86a2       Size:256        Owner:0x14fc\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:87a2       Size:256        Owner:0x14fe\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:88a2       Size:256        Owner:0x1500\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:89a2       Size:256        Owner:0x1502\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8aa2       Size:256        Owner:0x1504\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8ba2       Size:256        Owner:0x1506\r
-\e[45;35m+++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8ca2       Size:256        Owner:0x1508\r
-\e[45;35m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:8da2       Size:401        Owner:0xec10\r
-\e[44;34m++++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:b8a2       Size:18269      Owner:0x0\r
-\e[41;31m++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[0m
\ No newline at end of file
diff --git a/HEAP.16W b/HEAP.16W
deleted file mode 100755 (executable)
index 6b92185..0000000
--- a/HEAP.16W
+++ /dev/null
@@ -1,71 +0,0 @@
-\r
-       == default ==\r
-\r
-  FREE block at 28a00016 of size 18\r
-  USED block at 28a00028 of size 50\r
-  USED block at 28a0005a of size 50\r
-  USED block at 28a0008c of size 50\r
-  USED block at 28a000be of size 50\r
-  USED block at 28a000f0 of size 50\r
-  USED block at 28a00122 of size 50\r
-  USED block at 28a00154 of size 50\r
-  USED block at 28a00186 of size 50\r
-  USED block at 28a001b8 of size 50\r
-  USED block at 28a001ea of size 50\r
-  USED block at 28a0021c of size 50\r
-  USED block at 28a0024e of size 50\r
-  USED block at 28a00280 of size 50\r
-  FREE block at 28a002b2 of size 14\r
-  USED block at 28a002c0 of size 20\r
-  USED block at 28a002d4 of size 136\r
-  FREE block at 28a0035c of size 7328\r
-OK - end of heap\r
-\r
-       == near ==\r
-\r
-  USED block at 189fec66 of size 12\r
-  USED block at 189fec72 of size 330\r
-  USED block at 189fedbc of size 52\r
-  USED block at 189fedf0 of size 20\r
-  USED block at 189fee04 of size 20\r
-  USED block at 189fee18 of size 20\r
-  USED block at 189fee2c of size 20\r
-  USED block at 189fee40 of size 20\r
-  USED block at 189fee54 of size 4520\r
-OK - end of heap\r
-\r
-       == far ==\r
-\r
-  USED block at 28a00016 of size 18\r
-  USED block at 28a00028 of size 50\r
-  USED block at 28a0005a of size 50\r
-  USED block at 28a0008c of size 50\r
-  USED block at 28a000be of size 50\r
-  USED block at 28a000f0 of size 50\r
-  USED block at 28a00122 of size 50\r
-  USED block at 28a00154 of size 50\r
-  USED block at 28a00186 of size 50\r
-  USED block at 28a001b8 of size 50\r
-  USED block at 28a001ea of size 50\r
-  USED block at 28a0021c of size 50\r
-  USED block at 28a0024e of size 50\r
-  USED block at 28a00280 of size 50\r
-  USED block at 28a002b2 of size 14\r
-  USED block at 28a002c0 of size 20\r
-  USED block at 28a002d4 of size 136\r
-  USED block at 28a0035c of size 7328\r
-OK - end of heap\r
-\r
-Memory Type         Total      Used       Free\r
-----------------  --------   --------   --------\r
-Default                   8166         806       7360\r
-Near              5014         494       4520\r
-Far               8166         806       7360\r
-----------------  --------   --------   --------\r
-coreleft = 4518\r
-farcoreleft = 28106\r
-GetFreeSize = 23610\r
-GetNearFreeSize = 4520\r
-GetFarFreeSize = 23610\r
-memavl = 4518\r
-stackavail = 31527\r
diff --git a/MEMINFO.16W b/MEMINFO.16W
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/MMDUMP.16W b/MMDUMP.16W
deleted file mode 100755 (executable)
index 9c6a7aa..0000000
Binary files a/MMDUMP.16W and /dev/null differ
index 911e8919fc838372ad0448ec35c8c88e4ace16aa..15ee4357276cf654c9f3b49a0271b631860260eb 100755 (executable)
@@ -19,6 +19,7 @@ TODO~
 LICENCE~\r
 *.mah\r
 *.MAH\r
+__wcl__.lnk\r
 !bcexmm.map\r
 !makefile\r
 !modex.lib\r
index f0374020db1353760c871707171d8a2cb779ac3d..2f4b6e4ebe6d8fbdc0f7a816103282f23c0b811d 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -56,6 +56,7 @@ DOSLIBMAKEALL=.\build.bat
 !endif
 
 TARGET_OS = dos
+MEMORYMODE = l
 
 BUILD_ROOT=$+$(%__CWD__)$-
 #EXMMTESTDIR=16$(DIRSEP)exmmtest$(DIRSEP)
@@ -77,7 +78,7 @@ DOSLIB_DOS=src/lib/doslib/hw/dos
 DOSLIB_VGA=src/lib/doslib/hw/vga
 DOSLIB_8250=src/lib/doslib/hw/8250
 DOSLIB_JOYSTICK=src/lib/doslib/hw/joystick
-DOSLIB_MEMMODE=dos86l
+DOSLIB_MEMMODE=dos86$(MEMORYMODE)
 
 #
 # quiet flags
@@ -92,8 +93,7 @@ UPXQ=-qqq
 S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -zq -k32768#54096#60000
 Z_FLAGS=-zk0 -zc -zp8 -zm
 O_FLAGS=-obmilr -oe=24 -out -oh -ei -onac -ol+ -ok##x
-T_FLAGS=-bt=dos -wx -ml -0 -fpi87 -fo=.$(OBJ) -d1###### -e=65536
-#-mh
+T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 -fo=.$(OBJ) -d1###### -e=65536
 
 CPPFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1
 !ifeq DEBUGSERIAL 1
@@ -101,7 +101,7 @@ CPPFLAGS += -DDEBUGSERIAL
 !endif
 AFLAGS=$(WCLQ) $(T_FLAGS)
 CFLAGS=$(WCLQ) $(T_FLAGS) -wo -i"$(DOSLIB)" $(O_FLAGS) $(S_FLAGS) $(Z_FLAGS)
-LFLAGS=$(WCLQ) -l=dos -fm=$^&.mah $(S_FLAGS)
+LFLAGS=$(WCLQ) -l=dos -fd -fm=$^&.mah $(S_FLAGS)
 LIBFLAGS=$(WLIBQ) -b -n
 
 #
@@ -110,7 +110,7 @@ LIBFLAGS=$(WLIBQ) -b -n
 VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ)
 OLDLIBOBJS=bitmap.$(OBJ) 16render.$(OBJ)
 GFXLIBOBJS = 16_vl.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16_vrs.$(OBJ) 16_sprit.$(OBJ) $(OLDLIBOBJS)
-16LIBOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_head.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ)
+16LIBOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_head.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) wcpu.$(OBJ) 16_timer.$(OBJ) jsmn.$(OBJ) 16_map.$(OBJ) 16text.$(OBJ)
 #16planar.$(OBJ) planar.$(OBJ) mapread.$(OBJ)
 DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
 !ifeq DEBUGSERIAL 1
@@ -294,7 +294,7 @@ bakapee.$(OBJ):$(SRCLIB)/bakapee.c $(SRCLIB)/bakapee.h
 bitmap.$(OBJ): $(SRCLIB)/bitmap.c $(SRCLIB)/bitmap.h
 planar.$(OBJ): $(SRCLIB)/planar.c $(SRCLIB)/planar.h
 scroll16.$(OBJ):$(SRCLIB)/scroll16.c $(SRCLIB)/scroll16.h
-16text.$(OBJ): $(SRCLIB)/16text.c
+16text.$(OBJ): $(SRCLIB)/16text.c $(SRCLIB)/16text.h
 mapread.$(OBJ):$(SRCLIB)/mapread.c $(SRCLIB)/mapread.h
 16_map.$(OBJ):$(SRCLIB)/16_map.c $(SRCLIB)/16_map.h
 16_timer.$(OBJ):$(SRCLIB)/16_timer.c $(SRCLIB)/16_timer.h
index 5dcd6d31fcfed5ffdf5c93eea181ee8666235ee6..8ef4d904a17166c41b7990365d82415b5bb37f37 100755 (executable)
--- a/src/16.c
+++ b/src/16.c
@@ -31,37 +31,9 @@ void
 main(int argc, char *argv[])\r
 {\r
        static global_game_variables_t gvar;\r
-       // DOSLIB: check our environment\r
-       probe_dos();\r
-\r
-       // DOSLIB: what CPU are we using?\r
-       // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS.\r
-       //      So this code by itself shouldn't care too much what CPU it's running on. Except that other\r
-       //      parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for\r
-       //      the CPU to carry out tasks. --J.C.\r
-       cpu_probe();\r
-\r
-       // DOSLIB: check for VGA\r
-       if (!probe_vga()) {\r
-               printf("VGA probe failed\n");\r
-               return;\r
-       }\r
-       // hardware must be VGA or higher!\r
-       if (!(vga_state.vga_flags & VGA_IS_VGA)) {\r
-               printf("This program requires VGA or higher graphics hardware\n");\r
-               return;\r
-       }\r
-\r
-       if (_DEBUG_INIT() == 0) {\r
-#ifdef DEBUGSERIAL\r
-               printf("WARNING: Failed to initialize DEBUG output\n");\r
-#endif\r
-       }\r
-       _DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log\r
-       _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U);\r
+       Startup16(&gvar);\r
 \r
        engi_stat = ENGI_RUN;\r
-       textInit();\r
 \r
        /* save the palette */\r
        dpal = modexNewPal();\r
@@ -72,10 +44,8 @@ main(int argc, char *argv[])
        modexSavePalFile("data/g.pal", gpal);\r
        VGAmodeX(1, 1, &gvar);\r
 //     modexPalBlack();        //so player will not see loadings~\r
-       IN_Startup();\r
        IN_Default(0,&player,ctrl_Joystick);\r
        //modexprint(&screen, 32, 32, 1, 2, 0, "a", 1);\r
-       start_timer(&gvar);\r
        while(ENGI_EXIT != engi_stat)\r
        {\r
                IN_ReadControl(0,&player);\r
@@ -90,10 +60,10 @@ main(int argc, char *argv[])
                case 2: cpus = "386 or newer"; break;\r
                default: cpus = "internal error"; break;\r
        }\r
+       Shutdown16(&gvar);\r
        VGAmodeX(0, 1, &gvar);\r
        printf("Project 16 16.exe. This is supposed to be the actual finished game executable!\n");\r
        printf("version %s\n", VERSION);\r
        printf("detected CPU type: %s\n", cpus);\r
-       IN_Shutdown();\r
        modexFadeOn(4, dpal);\r
 }\r
index 24f180ac48f3308a42a6020fb7348afa678b742f..253cd9e94ce39c2ba5628e2ca1e36acfea0c2ec1 100755 (executable)
--- a/src/16.h
+++ b/src/16.h
 #include "src/lib/16_timer.h"\r
 #include "src/lib/16_dbg.h"\r
 \r
-typedef enum {\r
-       ENGI_EXIT,\r
-       ENGI_QUIT,\r
-       ENGI_RUN,\r
-       ENGI_INPUT,\r
-       ENGI_PAUSE\r
-} engi_stat_t;\r
-\r
 #endif /*__16_H_*/\r
index a7757e47d9cc1343d17e117a707a211392406e93..6ecbdfbd5dafcf06cb87a5b49f5c7dcb34194226 100755 (executable)
@@ -21,7 +21,7 @@
  */\r
 #include <stdio.h>\r
 #include <conio.h>\r
-#include "lib/types.h"\r
+#include "lib/16_t.h"\r
 #include "lib/16text.h"\r
 \r
 void main(int argc, char near *argv[])\r
index 6cd9eb928368bb6256f64cd78fee23f0ead8c186..767ebfcc41875a0a3468eaa26b835ab69a8a2a6d 100755 (executable)
@@ -24,6 +24,7 @@
  */\r
 \r
 #include "src/lib/16_tail.h"\r
+#include "src/lib/16text.h"\r
 \r
 /*\r
 ==========================\r
@@ -68,6 +69,8 @@ void Startup16(global_game_variables_t *gvar)
        }\r
        _DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log\r
        _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U);\r
+\r
+       textInit();\r
 #endif\r
        gvar->mm.mmstarted=0;\r
        gvar->pm.PMStarted=0;\r
index 8cd3009405a887c8eb071e784c1a0c90d10544ff..f268469bdf02cfe66694243fa7a883a3bb4d0c36 100755 (executable)
@@ -24,6 +24,7 @@
 #define        __16_TAIL__\r
 \r
 #include "src/lib/16_head.h"\r
+#include "src/lib/16text.h"\r
 #include "src/lib/16_pm.h"\r
 #include "src/lib/16_mm.h"\r
 #include "src/lib/16_ca.h"\r
index 2ea3f9fe9e39d96d60a1a07de16b70e2923d253d..d38d8a9b2adcfd396a59d0f629d73bee38506567 100755 (executable)
@@ -330,6 +330,14 @@ typedef struct
 //==========================================================================\r
 \r
 //actual global game varables!\r
+typedef enum {\r
+       ENGI_EXIT,\r
+       ENGI_QUIT,\r
+       ENGI_RUN,\r
+       ENGI_INPUT,\r
+       ENGI_PAUSE\r
+} engi_stat_t;\r
+\r
 typedef struct\r
 {\r
        video_t video;  // video settings variable\r
index 0f946510459dd2e5b8896fa9d1360bc1566c2686..d395c02785d7c827d157586343f4a769f6d88a77 100755 (executable)
@@ -20,7 +20,7 @@
  *\r
  */\r
 \r
-#include "16text.h"\r
+#include "src/lib/16text.h"\r
 \r
 /* this array holds the rom font descriptors */\r
 font_t romFonts[4];\r
index ed037ce5215c7828dc8f129065b75e2969c73890..c6f3e36cc6aafaf408cc18a880b64efe55bbf0ba 100755 (executable)
@@ -31,7 +31,6 @@
 #include <jstring.h>\r
 #include <jctype.h>\r
 #endif\r
-//#include "src/lib/16_t.h"\r
 #include "src/lib/16_head.h"\r
 \r
 /* font information type */\r