From: sparky4 Date: Tue, 31 Jan 2017 00:52:45 +0000 (-0600) Subject: ====----==== this is a messed up build that contains a busted 0.exe pan page system X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=fa252ebd82649e4f3bab4a53228828766713ad6c;p=16.git ====----==== this is a messed up build that contains a busted 0.exe pan page system --- diff --git a/src/bakapi4b.c b/16/src/bakapi4b.c similarity index 100% rename from src/bakapi4b.c rename to 16/src/bakapi4b.c diff --git a/src/planrpcx.c b/16/src/planrpcx.c similarity index 100% rename from src/planrpcx.c rename to 16/src/planrpcx.c diff --git a/src/vgacamm.c b/16/src/vgacamm.c similarity index 100% rename from src/vgacamm.c rename to 16/src/vgacamm.c diff --git a/DEBUG.16B b/DEBUG.16B new file mode 100755 index 00000000..6b4d34fc --- /dev/null +++ b/DEBUG.16B @@ -0,0 +1,210 @@ +Seg:0 Size:4620 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0 +Seg:120c Size:256 Owner:0x24e5 +++++ +Seg:130c Size:256 Owner:0x22ea ++++++ +Seg:140c Size:256 Owner:0x22ec +++++ +Seg:150c Size:256 Owner:0x22ee +++++ +Seg:160c Size:256 Owner:0x22f0 +++++ +Seg:170c Size:256 Owner:0x22f2 +++++ +Seg:180c Size:256 Owner:0x22f4 ++++++ +Seg:190c Size:256 Owner:0x22f6 +++++ +Seg:1a0c Size:256 Owner:0x22f8 +++++ +Seg:1b0c Size:256 Owner:0x22fa +++++ +Seg:1c0c Size:256 Owner:0x22fc +++++ +Seg:1d0c Size:256 Owner:0x22fe ++++++ +Seg:1e0c Size:256 Owner:0x2300 +++++ +Seg:1f0c Size:256 Owner:0x2302 +++++ +Seg:200c Size:256 Owner:0x2304 +++++ +Seg:210c Size:256 Owner:0x2306 +++++ +Seg:220c Size:256 Owner:0x2308 ++++++ +Seg:230c Size:256 Owner:0x230a +++++ +Seg:240c Size:256 Owner:0x230c +++++ +Seg:250c Size:256 Owner:0x230e +++++ +Seg:260c Size:256 Owner:0x2310 +++++ +Seg:270c Size:256 Owner:0x2312 ++++++ +Seg:280c Size:256 Owner:0x2314 +++++ +Seg:290c Size:256 Owner:0x2316 +++++ +Seg:2a0c Size:256 Owner:0x2318 +++++ +Seg:2b0c Size:256 Owner:0x231a +++++ +Seg:2c0c Size:256 Owner:0x231c ++++++ +Seg:2d0c Size:256 Owner:0x231e +++++ +Seg:2e0c Size:256 Owner:0x2320 +++++ +Seg:2f0c Size:256 Owner:0x2322 +++++ +Seg:300c Size:256 Owner:0x2324 +++++ +Seg:310c Size:256 Owner:0x2326 ++++++ +Seg:320c Size:256 Owner:0x2328 +++++ +Seg:330c Size:256 Owner:0x232a +++++ +Seg:340c Size:256 Owner:0x232c +++++ +Seg:350c Size:256 Owner:0x232e +++++ +Seg:360c Size:256 Owner:0x2330 ++++++ +Seg:370c Size:256 Owner:0x2332 +++++ +Seg:380c Size:256 Owner:0x2334 +++++ +Seg:390c Size:256 Owner:0x2336 +++++ +Seg:3a0c Size:256 Owner:0x2338 +++++ +Seg:3b0c Size:256 Owner:0x233a ++++++ +Seg:3c0c Size:256 Owner:0x233c +++++ +Seg:3d0c Size:256 Owner:0x233e +++++ +Seg:3e0c Size:256 Owner:0x2340 +++++ +Seg:3f0c Size:256 Owner:0x2342 +++++ +Seg:400c Size:256 Owner:0x2344 ++++++ +Seg:410c Size:256 Owner:0x2346 +++++ +Seg:420c Size:256 Owner:0x2348 +++++ +Seg:430c Size:256 Owner:0x234a +++++ +Seg:440c Size:256 Owner:0x234c +++++ +Seg:450c Size:256 Owner:0x234e ++++++ +Seg:460c Size:256 Owner:0x2350 +++++ +Seg:470c Size:256 Owner:0x2352 +++++ +Seg:480c Size:256 Owner:0x2354 +++++ +Seg:490c Size:256 Owner:0x2356 +++++ +Seg:4a0c Size:256 Owner:0x2358 ++++++ +Seg:4b0c Size:256 Owner:0x235a +++++ +Seg:4c0c Size:256 Owner:0x235c +++++ +Seg:4d0c Size:256 Owner:0x235e +++++ +Seg:4e0c Size:256 Owner:0x2360 +++++ +Seg:4f0c Size:256 Owner:0x2362 ++++++ +Seg:500c Size:256 Owner:0x2364 +++++ +Seg:510c Size:256 Owner:0x2366 +++++ +Seg:520c Size:256 Owner:0x2368 +++++ +Seg:530c Size:256 Owner:0x236a +++++ +Seg:540c Size:256 Owner:0x236c ++++++ +Seg:550c Size:256 Owner:0x236e +++++ +Seg:560c Size:256 Owner:0x2370 +++++ +Seg:570c Size:256 Owner:0x2372 +++++ +Seg:580c Size:256 Owner:0x2374 +++++ +Seg:590c Size:256 Owner:0x2376 ++++++ +Seg:5a0c Size:256 Owner:0x2378 +++++ +Seg:5b0c Size:256 Owner:0x237a +++++ +Seg:5c0c Size:256 Owner:0x237c +++++ +Seg:5d0c Size:256 Owner:0x237e +++++ +Seg:5e0c Size:256 Owner:0x2380 ++++++ +Seg:5f0c Size:256 Owner:0x2382 +++++ +Seg:600c Size:256 Owner:0x2384 +++++ +Seg:610c Size:256 Owner:0x2386 +++++ +Seg:620c Size:256 Owner:0x2388 +++++ +Seg:630c Size:256 Owner:0x238a ++++++ +Seg:640c Size:256 Owner:0x238c +++++ +Seg:650c Size:256 Owner:0x238e +++++ +Seg:660c Size:256 Owner:0x2390 +++++ +Seg:670c Size:256 Owner:0x2392 +++++ +Seg:680c Size:256 Owner:0x2394 ++++++ +Seg:690c Size:256 Owner:0x2396 +++++ +Seg:6a0c Size:256 Owner:0x2398 +++++ +Seg:6b0c Size:256 Owner:0x239a +++++ +Seg:6c0c Size:256 Owner:0x239c +++++ +Seg:6d0c Size:256 Owner:0x239e ++++++ +Seg:6e0c Size:256 Owner:0x23a0 +++++ +Seg:6f0c Size:256 Owner:0x23a2 +++++ +Seg:700c Size:256 Owner:0x23a4 +++++ +Seg:710c Size:256 Owner:0x23a6 +++++ +Seg:720c Size:256 Owner:0x23a8 ++++++ +Seg:730c Size:256 Owner:0x23aa +++++ +Seg:740c Size:256 Owner:0x23ac +++++ +Seg:750c Size:256 Owner:0x23ae +++++ +Seg:760c Size:256 Owner:0x23b0 +++++ +Seg:770c Size:273 Owner:0xfde ++++++ +Seg:9fde Size:32802 Owner:0x0 + +Seg:9ffe Size:24577 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/DEBUG.16W b/DEBUG.16W new file mode 100755 index 00000000..78d43b40 --- /dev/null +++ b/DEBUG.16W @@ -0,0 +1,210 @@ +Seg:0 Size:8801 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0 +Seg:2261 Size:256 Owner:0x1958 +++++ +Seg:23bb Size:44 Owner:0x0 ++ +Seg:23e7 Size:256 Owner:0x174a ++++++ +Seg:24e7 Size:256 Owner:0x174c +++++ +Seg:25e7 Size:256 Owner:0x174e +++++ +Seg:26e7 Size:256 Owner:0x1750 +++++ +Seg:27e7 Size:256 Owner:0x1752 +++++ +Seg:28e7 Size:256 Owner:0x1754 ++++++ +Seg:29e7 Size:256 Owner:0x1756 +++++ +Seg:2ae7 Size:256 Owner:0x1758 +++++ +Seg:2be7 Size:256 Owner:0x175a +++++ +Seg:2ce7 Size:256 Owner:0x175c +++++ +Seg:2de7 Size:256 Owner:0x175e ++++++ +Seg:2ee7 Size:256 Owner:0x1760 +++++ +Seg:2fe7 Size:256 Owner:0x1762 +++++ +Seg:30e7 Size:256 Owner:0x1764 +++++ +Seg:31e7 Size:256 Owner:0x1766 +++++ +Seg:32e7 Size:256 Owner:0x1768 ++++++ +Seg:33e7 Size:256 Owner:0x176a +++++ +Seg:34e7 Size:256 Owner:0x176c +++++ +Seg:35e7 Size:256 Owner:0x176e +++++ +Seg:36e7 Size:256 Owner:0x1770 +++++ +Seg:37e7 Size:256 Owner:0x1772 ++++++ +Seg:38e7 Size:256 Owner:0x1774 +++++ +Seg:39e7 Size:256 Owner:0x1776 +++++ +Seg:3ae7 Size:256 Owner:0x1778 +++++ +Seg:3be7 Size:256 Owner:0x177a +++++ +Seg:3ce7 Size:256 Owner:0x177c ++++++ +Seg:3de7 Size:256 Owner:0x177e +++++ +Seg:3ee7 Size:256 Owner:0x1780 +++++ +Seg:3fe7 Size:256 Owner:0x1782 +++++ +Seg:40e7 Size:256 Owner:0x1784 +++++ +Seg:41e7 Size:256 Owner:0x1786 ++++++ +Seg:42e7 Size:256 Owner:0x1788 +++++ +Seg:43e7 Size:256 Owner:0x178a +++++ +Seg:44e7 Size:256 Owner:0x178c +++++ +Seg:45e7 Size:256 Owner:0x178e +++++ +Seg:46e7 Size:256 Owner:0x1790 ++++++ +Seg:47e7 Size:256 Owner:0x1792 +++++ +Seg:48e7 Size:256 Owner:0x1794 +++++ +Seg:49e7 Size:256 Owner:0x1796 +++++ +Seg:4ae7 Size:256 Owner:0x1798 +++++ +Seg:4be7 Size:256 Owner:0x179a ++++++ +Seg:4ce7 Size:256 Owner:0x179c +++++ +Seg:4de7 Size:256 Owner:0x179e +++++ +Seg:4ee7 Size:256 Owner:0x17a0 +++++ +Seg:4fe7 Size:256 Owner:0x17a2 +++++ +Seg:50e7 Size:256 Owner:0x17a4 ++++++ +Seg:51e7 Size:256 Owner:0x17a6 +++++ +Seg:52e7 Size:256 Owner:0x17a8 +++++ +Seg:53e7 Size:256 Owner:0x17aa +++++ +Seg:54e7 Size:256 Owner:0x17ac +++++ +Seg:55e7 Size:256 Owner:0x17ae ++++++ +Seg:56e7 Size:256 Owner:0x17b0 +++++ +Seg:57e7 Size:256 Owner:0x17b2 +++++ +Seg:58e7 Size:256 Owner:0x17b4 +++++ +Seg:59e7 Size:256 Owner:0x17b6 +++++ +Seg:5ae7 Size:256 Owner:0x17b8 ++++++ +Seg:5be7 Size:256 Owner:0x17ba +++++ +Seg:5ce7 Size:256 Owner:0x17bc +++++ +Seg:5de7 Size:256 Owner:0x17be +++++ +Seg:5ee7 Size:256 Owner:0x17c0 +++++ +Seg:5fe7 Size:256 Owner:0x17c2 ++++++ +Seg:60e7 Size:256 Owner:0x17c4 +++++ +Seg:61e7 Size:256 Owner:0x17c6 +++++ +Seg:62e7 Size:256 Owner:0x17c8 +++++ +Seg:63e7 Size:256 Owner:0x17ca +++++ +Seg:64e7 Size:256 Owner:0x17cc ++++++ +Seg:65e7 Size:256 Owner:0x17ce +++++ +Seg:66e7 Size:256 Owner:0x17d0 +++++ +Seg:67e7 Size:256 Owner:0x17d2 +++++ +Seg:68e7 Size:256 Owner:0x17d4 +++++ +Seg:69e7 Size:256 Owner:0x17d6 ++++++ +Seg:6ae7 Size:256 Owner:0x17d8 +++++ +Seg:6be7 Size:256 Owner:0x17da +++++ +Seg:6ce7 Size:256 Owner:0x17dc +++++ +Seg:6de7 Size:256 Owner:0x17de +++++ +Seg:6ee7 Size:256 Owner:0x17e0 ++++++ +Seg:6fe7 Size:256 Owner:0x17e2 +++++ +Seg:70e7 Size:256 Owner:0x17e4 +++++ +Seg:71e7 Size:256 Owner:0x17e6 +++++ +Seg:72e7 Size:256 Owner:0x17e8 +++++ +Seg:73e7 Size:256 Owner:0x17ea ++++++ +Seg:74e7 Size:256 Owner:0x17ec +++++ +Seg:75e7 Size:256 Owner:0x17ee +++++ +Seg:76e7 Size:256 Owner:0x17f0 +++++ +Seg:77e7 Size:256 Owner:0x17f2 +++++ +Seg:78e7 Size:256 Owner:0x17f4 ++++++ +Seg:79e7 Size:256 Owner:0x17f6 +++++ +Seg:7ae7 Size:256 Owner:0x17f8 +++++ +Seg:7be7 Size:256 Owner:0x17fa +++++ +Seg:7ce7 Size:256 Owner:0x17fc +++++ +Seg:7de7 Size:256 Owner:0x17fe ++++++ +Seg:7ee7 Size:256 Owner:0x1800 +++++ +Seg:7fe7 Size:256 Owner:0x1802 +++++ +Seg:80e7 Size:256 Owner:0x1804 +++++ +Seg:81e7 Size:256 Owner:0x1806 +++++ +Seg:82e7 Size:256 Owner:0x1808 ++++++ +Seg:83e7 Size:256 Owner:0x180a +++++ +Seg:84e7 Size:256 Owner:0x180c +++++ +Seg:85e7 Size:256 Owner:0x180e +++++ +Seg:86e7 Size:256 Owner:0x1810 +++++ +Seg:87e7 Size:273 Owner:0xe622 ++++++ +Seg:b3e7 Size:19480 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W new file mode 100755 index 00000000..13dd057a --- /dev/null +++ b/HEAP.16W @@ -0,0 +1,47 @@ + + == default == + + USED block at 23dd0016 of size 66 + USED block at 23dd0058 of size 66 + FREE block at 23dd009a of size 18 + USED block at 23dd00ac of size 136 + USED block at 23dd0134 of size 20 + FREE block at 23dd0148 of size 7860 +OK - end of heap + + == near == + + USED block at 13dce656 of size 12 + USED block at 13dce662 of size 332 + USED block at 13dce7ae of size 52 + USED block at 13dce7e2 of size 20 + USED block at 13dce7f6 of size 20 + USED block at 13dce80a of size 20 + USED block at 13dce81e of size 20 + USED block at 13dce832 of size 20 + USED block at 13dce846 of size 6070 +OK - end of heap + + == far == + + USED block at 23dd0016 of size 66 + USED block at 23dd0058 of size 66 + USED block at 23dd009a of size 18 + USED block at 23dd00ac of size 136 + USED block at 23dd0134 of size 20 + USED block at 23dd0148 of size 7860 +OK - end of heap + +Memory Type Total Used Free +---------------- -------- -------- -------- +Default 8166 288 7878 +Near 6566 496 6070 +Far 8166 288 7878 +---------------- -------- -------- -------- +coreleft = 6068 +farcoreleft = 54752 +GetFreeSize = 48704 +GetNearFreeSize = 6070 +GetFarFreeSize = 48704 +memavl = 6068 +stackavail = 31604 diff --git a/MEMINFO.16B b/MEMINFO.16B new file mode 100755 index 00000000..e69de29b diff --git a/MMDUMP.16B b/MMDUMP.16B new file mode 100755 index 00000000..8609c212 Binary files /dev/null and b/MMDUMP.16B differ diff --git a/MMDUMP.16W b/MMDUMP.16W new file mode 100755 index 00000000..db214e41 Binary files /dev/null and b/MMDUMP.16W differ diff --git a/bcexmm.dsk b/bcexmm.dsk index 47bc095d..0cb42ac1 100755 Binary files a/bcexmm.dsk and b/bcexmm.dsk differ diff --git a/bcexmm.exe b/bcexmm.exe index 623f94b2..89419f23 100755 Binary files a/bcexmm.exe and b/bcexmm.exe differ diff --git a/bcexmm.prj b/bcexmm.prj index 5737634b..d6b18657 100755 Binary files a/bcexmm.prj and b/bcexmm.prj differ diff --git a/makefile b/makefile index 580bfec2..c0546833 100755 --- a/makefile +++ b/makefile @@ -379,6 +379,7 @@ clean: .symbolic @if exist *.mah $(REMOVECOMMAND) *.mah @if exist *.MAH $(REMOVECOMMAND) *.MAH @if exist *.err $(REMOVECOMMAND) *.err + @if exist TC*.SWP $(REMOVECOMMAND) TC*.SWP # @if exist *.16W $(REMOVECOMMAND) *.16W # @if exist *.16B $(REMOVECOMMAND) *.16B diff --git a/src/0.c b/src/0.c index 31d1952e..8734bb65 100755 --- a/src/0.c +++ b/src/0.c @@ -1,3 +1,25 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + #include #include #include diff --git a/src/16.c b/src/16.c index b3fa0673..d2072fcb 100755 --- a/src/16.c +++ b/src/16.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/16.h b/src/16.h index c39155d2..dd35aa6e 100755 --- a/src/16.h +++ b/src/16.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/bakapi.h b/src/bakapi.h index 7c1fb1ab..54af8984 100755 --- a/src/bakapi.h +++ b/src/bakapi.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/emsdump.c b/src/emsdump.c index 45069863..b45b4c48 100755 --- a/src/emsdump.c +++ b/src/emsdump.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/exmmtest.c b/src/exmmtest.c index 8a17839c..25436f81 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/fmemtest.c b/src/fmemtest.c index df0efd65..db9ec17f 100755 --- a/src/fmemtest.c +++ b/src/fmemtest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/fontgfx.c b/src/fontgfx.c index 0589a493..1fc19b24 100755 --- a/src/fontgfx.c +++ b/src/fontgfx.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/fonttest.c b/src/fonttest.c index ffa6d0c7..a46466cc 100755 --- a/src/fonttest.c +++ b/src/fonttest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/inputest.c b/src/inputest.c index 30cb8598..1f88a3cc 100755 --- a/src/inputest.c +++ b/src/inputest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_hc.c b/src/lib/16_hc.c index 13dd3f0e..0f77772c 100755 --- a/src/lib/16_hc.c +++ b/src/lib/16_hc.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_hc.h b/src/lib/16_hc.h index 870d50c7..8285ff4f 100755 --- a/src/lib/16_hc.h +++ b/src/lib/16_hc.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_head.c b/src/lib/16_head.c index 7c25afa5..f48a09c8 100755 --- a/src/lib/16_head.c +++ b/src/lib/16_head.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_head.h b/src/lib/16_head.h index 7fd72c44..aad7a554 100755 --- a/src/lib/16_head.h +++ b/src/lib/16_head.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_map.c b/src/lib/16_map.c index 895e4d68..d5744b9a 100755 --- a/src/lib/16_map.c +++ b/src/lib/16_map.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_map.h b/src/lib/16_map.h index 5cf56c2c..84cfd923 100755 --- a/src/lib/16_map.h +++ b/src/lib/16_map.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_pm.c b/src/lib/16_pm.c index 4cf50396..ac77de42 100755 --- a/src/lib/16_pm.c +++ b/src/lib/16_pm.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_pm.h b/src/lib/16_pm.h index 5caf88c7..2ce5fc10 100755 --- a/src/lib/16_pm.h +++ b/src/lib/16_pm.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_snd.c b/src/lib/16_snd.c index 544b4944..e814c148 100755 --- a/src/lib/16_snd.c +++ b/src/lib/16_snd.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_snd.h b/src/lib/16_snd.h index 7b0d04ec..1d274eab 100755 --- a/src/lib/16_snd.h +++ b/src/lib/16_snd.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_sprit.c b/src/lib/16_sprit.c index 66797e3d..35143db4 100755 --- a/src/lib/16_sprit.c +++ b/src/lib/16_sprit.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_sprit.h b/src/lib/16_sprit.h index 8fede666..0e29ebeb 100755 --- a/src/lib/16_sprit.h +++ b/src/lib/16_sprit.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -25,28 +25,26 @@ #include "src/lib/16_vrs.h" #include "src/lib/scroll16.h" -//#define VMEMPAGESIZE2 video->page[0].pagesize+video->page[1].pagesize -//#define VMEMPAGEDATA2 video->page[2].data - -struct sprite -{ - // VRS container from which we will extract animation and image data - struct vrs_container *spritesheet; - // Container for a vrl sprite - struct vrl_container *sprite_vrl_cont; - // Current sprite id - int curr_spri_id; - // Index of a current sprite in an animation sequence - int curr_anim_spri; - // Current animation sequence - struct vrs_animation_list_entry_t *curr_anim_list; - // Index of current animation in relevant VRS offsets table - int curr_anim; - // Delay in time units untill we should change sprite - int delay; - // Position of sprite on screen - int x, y; -}; +//moved to 16_tdef.h +// struct sprite +// { +// // VRS container from which we will extract animation and image data +// struct vrs_container *spritesheet; +// // Container for a vrl sprite +// struct vrl_container *sprite_vrl_cont; +// // Current sprite id +// int curr_spri_id; +// // Index of a current sprite in an animation sequence +// int curr_anim_spri; +// // Current animation sequence +// struct vrs_animation_list_entry_t *curr_anim_list; +// // Index of current animation in relevant VRS offsets table +// int curr_anim; +// // Delay in time units untill we should change sprite +// int delay; +// // Position of sprite on screen +// int x, y; +// }; /* Retrive current animation name of sprite * In: diff --git a/src/lib/16_t.h b/src/lib/16_t.h index 35eb2f4b..4c5abf5f 100755 --- a/src/lib/16_t.h +++ b/src/lib/16_t.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_tail.c b/src/lib/16_tail.c index 7cfd84e1..4e8c2d10 100755 --- a/src/lib/16_tail.c +++ b/src/lib/16_tail.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -371,23 +371,9 @@ void Quit (global_game_variables_t *gvar, char *error) } //=========================================================================== - -void walktypeinfo(player_t *player, word pn) -{ - switch(player[pn].walktype) - { - case 0: //bump - sprintf(global_temp_status_text, "%s", "b"); - break; - case 1: //walk no scroll - sprintf(global_temp_status_text, "%s", "w"); - break; - case 2: //scrolling walk - sprintf(global_temp_status_text, "%s", "s"); - break; - } -} - +#ifndef __WATCOMC__ +char global_temp_status_text[512]; +#else // // for mary4 (XT) // this is from my XT's BIOS @@ -399,36 +385,37 @@ void turboXT(byte bakapee) push ax push bx push cx - in al, 61h ; Read equipment flags - xor al, bakapee ; toggle speed - out 61h, al ; Write new flags back + in al, 61h //; Read equipment flags + xor al, bakapee //; toggle speed + out 61h, al //; Write new flags back - mov bx, 0F89h ; low pitch blip - and al, 4 ; Is turbo mode set? + mov bx, 0F89h //; low pitch blip + and al, 4 //; Is turbo mode set? jz @@do_beep - mov bx, 52Eh ; high pitch blip + mov bx, 52Eh //; high pitch blip @@do_beep: - mov al, 10110110b ; Timer IC 8253 square waves - out 43h, al ; channel 2, speaker + mov al, 10110110b //; Timer IC 8253 square waves + out 43h, al //; channel 2, speaker mov ax, bx - out 42h, al ; send low order - mov al, ah ; load high order - out 42h, al ; send high order - in al, 61h ; Read IC 8255 machine status + out 42h, al //; send low order + mov al, ah //; load high order + out 42h, al //; send high order + in al, 61h //; Read IC 8255 machine status push ax or al, 00000011b - out 61h, al ; Turn speaker on + out 61h, al //; Turn speaker on mov cx, 2000h @@delay: loop @@delay pop ax - out 61h, al ; Turn speaker off + out 61h, al //; Turn speaker off pop cx pop bx pop ax } } +#endif const char *nibble_to_binary(nibble x) { diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index 984ad365..e91b4eb6 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -78,7 +78,6 @@ void Startup16(global_game_variables_t *gvar); void ClearMemory (global_game_variables_t *gvar); void Quit (global_game_variables_t *gvar, char *error); void turboXT(byte bakapee); -void walktypeinfo(player_t *player, word pn); void nibbletest(); void booleantest(); diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 0a4248ba..9a225c8f 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -119,6 +119,29 @@ typedef struct { sword delta; // How much should we shift the page for smooth scrolling } page_t; +//from 16_sprit.h +#ifdef __WATCOMC__ +typedef struct sprite +{ + // VRS container from which we will extract animation and image data + struct vrs_container *spritesheet; + // Container for a vrl sprite + struct vrl_container *sprite_vrl_cont; + // Current sprite id + int curr_spri_id; + // Index of a current sprite in an animation sequence + int curr_anim_spri; + // Current animation sequence + struct vrs_animation_list_entry_t *curr_anim_list; + // Index of current animation in relevant VRS offsets table + int curr_anim; + // Delay in time units untill we should change sprite + int delay; + // Position of sprite on screen + int x, y; +} sprite_t; +#endif + //newer structs typedef struct { @@ -128,35 +151,23 @@ typedef struct int ty; //entity tile position on the viewable map int triggerx; //entity's trigger box tile position on the viewable map int triggery; //entity's trigger box tile position on the viewable map - int sheetsetx; //NOT USED YET! entity sprite sheet set on the image x - int sheetsety; //NOT USED YET! entity sprite sheet set on the image y +// int sheetsetx; //NOT USED YET! entity sprite sheet set on the image x +// int sheetsety; //NOT USED YET! entity sprite sheet set on the image y nibble d; //direction to render sprite!! wwww nibble pred; //prev. direction for animation changing word dire; //sprite in use nibble q; //loop variable for anumation and locking the playing to compleate the animation cycle to prevent issues with misalignment www word speed; //entity speed! word spt; //speed per tile - struct sprite *spri; // sprite used by entity +#ifdef __WATCOMC__ + sprite_t *spri; // sprite used by entity +#endif sword hp; //hitpoints of the entity nibble overdraww, overdrawh; // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks. // if the sprite's edge pixels are clear anyway, you can set this to 0. nibble /*int*/ persist_aniframe; // gonna be increased to 1 before being used, so 0 is ok for default } entity_t; -//TODO: MAKE THIS WWWW -typedef struct -{ - //sprite .... - boolean wwww; -} spri_t; - -//TODO: MAKE THIS TO WWWW -typedef struct -{ - //vrs with sprite .... - spri_t *spri; -} vrs_t; - //from 16_in //========================================================================== typedef byte ScanCode; @@ -526,8 +537,8 @@ typedef struct mminfo_t mm; mminfotype mmi; } global_game_variables_t; -extern char global_temp_status_text[512]; #ifdef __WATCOMC__ +extern char global_temp_status_text[512]; #define EINVFMT EMFILE #endif #endif /* _TYPEDEFSTRUCT_H_ */ diff --git a/src/lib/16_timer.c b/src/lib/16_timer.c index 86220b33..6a0c7a47 100755 --- a/src/lib/16_timer.c +++ b/src/lib/16_timer.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_timer.h b/src/lib/16_timer.h index fb2335ce..ec25af51 100755 --- a/src/lib/16_timer.h +++ b/src/lib/16_timer.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_vl.c b/src/lib/16_vl.c index 083e2124..057e763c 100755 --- a/src/lib/16_vl.c +++ b/src/lib/16_vl.c @@ -1340,7 +1340,7 @@ void VL_PrintmodexmemInfo(video_t *v) printf("VL_PrintmodexmemInfo:\n"); // printf("========================================\n"); printf(" Virtual Screen: %dx", v->page[0].width); printf("%d ", v->page[0].height); printf("Tile: %dx", v->page[0].ti.tilesw); printf("%d", v->page[0].ti.tilesh); printf("=((Virtual Screen)/16)\n"); - printf(" Screen: %dx", v->page[0].sw); printf("%d ", v->page[0].sh); printf("Tile: %dx", v->page[0].ti.tw); printf("%d", v->page[0].ti.th); printf("=((Screen)/16)\n"); + printf(" Screen: %dx", v->page[0].sw); printf("%d ", v->page[0].sh); printf("Tile: %dx", v->page[0].ti.tw); printf("%d", v->page[0].ti.th); printf("=((Screen)/16)\n"); printf(" Free Video Memory: %u\n", v->vmem_remain); printf(" page"); diff --git a/src/lib/16_vrs.c b/src/lib/16_vrs.c index 41ef537e..75908ace 100755 --- a/src/lib/16_vrs.c +++ b/src/lib/16_vrs.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16_vrs.h b/src/lib/16_vrs.h index cb5495bb..068f569f 100755 --- a/src/lib/16_vrs.h +++ b/src/lib/16_vrs.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16render.c b/src/lib/16render.c index 3a3a7a74..56abfb8f 100755 --- a/src/lib/16render.c +++ b/src/lib/16render.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16render.h b/src/lib/16render.h index 32cb7e0f..7287bf1e 100755 --- a/src/lib/16render.h +++ b/src/lib/16render.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16text.c b/src/lib/16text.c index d395c027..65620d7f 100755 --- a/src/lib/16text.c +++ b/src/lib/16text.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/16text.h b/src/lib/16text.h index c6f3e36c..c4c81e4f 100755 --- a/src/lib/16text.h +++ b/src/lib/16text.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index e8ad461c..22bad981 100755 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/bitmap.h b/src/lib/bitmap.h index 25537645..b35996d2 100755 --- a/src/lib/bitmap.h +++ b/src/lib/bitmap.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/lib/doslib b/src/lib/doslib index e6fba71d..3bb67471 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit e6fba71d59fad9b5e5bce6115f38dfb61c299a32 +Subproject commit 3bb67471d6e782d6b77309e39eaf63a330ad83a7 diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index dd37e3fe..d48f9214 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -285,15 +285,16 @@ void ZC_MVInit(map_view_t *pip, int tx, int ty) void ZC_ShowMV(map_view_t *moo, boolean vsync, boolean sr) { - word high_address, low_address, offset; + VL_ShowPage(moo[moo[0].video->sp].page, vsync, sr); + /*word high_address, low_address, offset; byte crtcOffset; - /* calculate offset */ + // calculate offset offset = (word) moo[moo[0].video->sp].page->data; offset += moo[0].page->dy * (moo[0].page->width >> 2 ); offset += moo[0].page->dx >> 2; - /* calculate crtcOffset according to virtual width */ + // calculate crtcOffset according to virtual width switch(sr) { case 1: @@ -308,19 +309,19 @@ void ZC_ShowMV(map_view_t *moo, boolean vsync, boolean sr) high_address = HIGH_ADDRESS | (offset & 0xff00); low_address = LOW_ADDRESS | (offset << 8); - /* wait for appropriate timing and then program CRTC */ + // wait for appropriate timing and then program CRTC if(vsync) while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE)); outpw(CRTC_INDEX, high_address); outpw(CRTC_INDEX, low_address); outp(CRTC_INDEX, 0x13); outp(CRTC_DATA, crtcOffset); - /* wait for one retrace */ + // wait for one retrace if(vsync) while (!(inp(INPUT_STATUS_1) & VRETRACE)); - /* do PEL panning here */ + // do PEL panning here outp(AC_INDEX, 0x33); - outp(AC_INDEX, (moo[0].page->dx & 0x03) << 1); + outp(AC_INDEX, (moo[0].page->dx & 0x03) << 1);*/ } /*map_t @@ -410,23 +411,12 @@ initMap(map_t *map) { } } + void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid) { word x;//, y; /* coordinate for drawing */ - /* increment the pixel position and update the page */ - mv[id].page[0].dx += player[plid].enti.speed; - - /* check to see if this changes the tile */ - if(mv[id].page[0].dx >= mv[id].dxThresh ) - { - /* go forward one tile */ - mv[id].tx++; - /* Snap the origin forward */ - mv[id].page->data += 4; - - mv[id].page[0].dx = mv[id].map->tiles->tileWidth; - } + ScrollRight(mv, player, id, plid); /* draw the next column */ x= mv[0].page->sw + mv[id].map->tiles->tileWidth; @@ -448,19 +438,7 @@ void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid) { word x;//,y; /* coordinate for drawing */ - /* decrement the pixel position and update the page */ - mv[id].page[0].dx -= player[plid].enti.speed; - - /* check to see if this changes the tile */ - if(mv[id].page[0].dx == 0) - { - /* go backward one tile */ - mv[id].tx--; - /* Snap the origin backward */ - mv[id].page->data -= 4; - - mv[id].page[0].dx = mv[id].map->tiles->tileWidth; - } + ScrollLeft(mv, player, id, plid); /* draw the next column */ x= 0; @@ -482,19 +460,7 @@ void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid) { word y;//x, /* coordinate for drawing */ - /* decrement the pixel position and update the page */ - mv[id].page[0].dy -= player[plid].enti.speed; - - /* check to see if this changes the tile */ - if(mv[id].page[0].dy == 0 ) - { - /* go up one tile */ - mv[id].ty--; - /* Snap the origin upward */ - mv[id].page->data -= mv[id].page->pi; - - mv[id].page[0].dy = mv[id].map->tiles->tileHeight; - } + ScrollUp(mv, player, id, plid); /* draw the next row */ y= 0; @@ -516,19 +482,7 @@ void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid) { word y;//x, /* coordinate for drawing */ - /* increment the pixel position and update the page */ - mv[id].page[0].dy += player[plid].enti.speed; - - /* check to see if this changes the tile */ - if(mv[id].page[0].dy >= mv[id].dyThresh ) - { - /* go down one tile */ - mv[id].ty++; - /* Snap the origin downward */ - mv[id].page->data += mv[id].page->pi; - - mv[id].page[0].dy = mv[id].map->tiles->tileHeight; - } + ScrollDown(mv, player, id, plid); /* draw the next row */ y= mv[0].page->sh + mv[id].map->tiles->tileHeight; @@ -546,79 +500,11 @@ void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid) } -//TODO finish this wwww -void near ScrollRight(map_view_t *mv, player_t *player, word id, word plid) -{ - /* increment the pixel position and update the page */ - mv[id].page->dx += player[plid].enti.speed; - - /* check to see if this changes the tile */ - if(mv[id].page->dx >= mv[0].dxThresh ) - { -// vga_setup_wm1_block_copy(); -// _fmemmove(mv[id].page->data+4, mv[id].page->data, mv[id].page->pagesize); -// vga_restore_rm0wm0(); - /* Snap the origin forward */ - mv[id].page->data += 4; - mv[id].page->dx = mv[0].map->tiles->tileWidth; - } -} - -void near ScrollLeft(map_view_t *mv, player_t *player, word id, word plid) -{ - /* decrement the pixel position and update the page */ - mv[id].page->dx -= player[plid].enti.speed; - - /* check to see if this changes the tile */ - if(mv[id].page->dx == 0) - { -// vga_setup_wm1_block_copy(); -// _fmemmove(mv[id].page->data-4, mv[id].page->data, mv[id].page->pagesize); -// vga_restore_rm0wm0(); - /* Snap the origin backward */ - mv[id].page->data -= 4; - mv[id].page->dx = mv[0].map->tiles->tileWidth; - } -} - -void near ScrollUp(map_view_t *mv, player_t *player, word id, word plid) -{ - /* decrement the pixel position and update the page */ - mv[id].page->dy -= player[plid].enti.speed; - - /* check to see if this changes the tile */ - if(mv[id].page->dy == 0) - { -// vga_setup_wm1_block_copy(); -// _fmemmove(mv[id].page->data-mv[id].page->pi, mv[id].page->data, mv[id].page->pagesize); -// vga_restore_rm0wm0(); - /* Snap the origin backward */ - mv[id].page->data -= mv[id].page->pi; - mv[id].page->dy = mv[0].map->tiles->tileWidth; - } -} - -void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid) -{ - /* increment the pixel position and update the page */ - mv[id].page->dy += player[plid].enti.speed; - - /* check to see if this changes the tile */ - if(mv[id].page->dy >= mv[0].dxThresh ) - { -// vga_setup_wm1_block_copy(); -// _fmemmove(mv[id].page->data+mv[id].page->pi, mv[id].page->data, mv[id].page->pagesize); -// vga_restore_rm0wm0(); - /* Snap the origin forward */ - mv[id].page->data += mv[id].page->pi; - mv[id].page->dy = mv[0].map->tiles->tileWidth; - } -} //=========================================================================== //TODO: put player in starting position of assigned spot on map //default player position on the viewable map -void playerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn) +void ZC_playerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn) { player[pn].enti.tx = x + pip[0].tx + pip[0].page->ti.tilemidposscreenx; player[pn].enti.ty = y + pip[0].ty + pip[0].page->ti.tilemidposscreeny; @@ -704,7 +590,7 @@ void mapinitmapview(map_view_t *mv, int tx, int ty) /* set up the thresholds */ mv[0].dxThresh = mv[1].dxThresh = mv[2].dxThresh = mv[3].dxThresh = mv->map->tiles->tileWidth * 2; - mv[0].dyThresh = mv[1].dyThresh = mv[2].dxThresh = mv[3].dxThresh = mv->map->tiles->tileHeight * 2; + mv[0].dyThresh = mv[1].dyThresh = mv[2].dyThresh = mv[3].dyThresh = mv->map->tiles->tileHeight * 2; } void near diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index c3260f78..1262b9ac 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -81,7 +81,7 @@ printf("\n");\ printf("player vars:\n");\ printf(" xy: %dx%d", player[0].enti.x, player[0].enti.y); printf(" txy: %dx%d", player[0].enti.tx, player[0].enti.ty); printf(" triggxy: %dx%d", player[0].enti.triggerx, player[0].enti.triggery); printf(" value: %d\n", mv[0].map->data[(player[0].enti.triggerx-1)+(map.width*(player[0].enti.triggery-1))]);\ - printf(" hp: %d", (player[0].enti.hp)); printf(" q: %d", player[0].enti.q); printf(" player.info.dir: %d", player[0].info.dir); printf(" player.d: %d ", player[0].enti.d);\ + printf(" hp: %d", (player[0].enti.hp)); printf(" q: %d", player[0].enti.q); printf(" info.dir: %d", player[0].info.dir); printf(" d: %d ", player[0].enti.d);\ printf(" pdir: %d\n", player[0].pdir); printf(" delay=%u", player[0].enti.spri->delay);\ printf("\n\n");\ VL_PrintmodexmemInfo(&gvar.video);\ @@ -106,11 +106,75 @@ void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid); void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid); void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid); void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid); -void near ScrollRight(map_view_t *mv, player_t *player, word id, word plid); -void near ScrollLeft(map_view_t *mv, player_t *player, word id, word plid); -void near ScrollUp(map_view_t *mv, player_t *player, word id, word plid); -void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid); -void playerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn); +inline void near ScrollRight(map_view_t *mv, player_t *player, word id, word plid) +{ + /* increment the pixel position and update the page */ + mv[id].page->dx += player[plid].enti.speed; + + /* check to see if this changes the tile */ + if(mv[id].page->dx >= mv[id].dxThresh ) + { + /* go forward one tile */ + if(id==0) mv[id].tx++; + /* Snap the origin forward */ + mv[id].page->data += 4; + + mv[id].page->dx = mv[id].map->tiles->tileWidth; + } +} + +inline void near ScrollLeft(map_view_t *mv, player_t *player, word id, word plid) +{ + /* decrement the pixel position and update the page */ + mv[id].page->dx -= player[plid].enti.speed; + + /* check to see if this changes the tile */ + if(mv[id].page->dx == 0) + { + /* go backward one tile */ + if(id==0) mv[id].tx--; + /* Snap the origin backward */ + mv[id].page->data -= 4; + + mv[id].page->dx = mv[id].map->tiles->tileWidth; + } +} + +inline void near ScrollUp(map_view_t *mv, player_t *player, word id, word plid) +{ + /* decrement the pixel position and update the page */ + mv[id].page->dy -= player[plid].enti.speed; + + /* check to see if this changes the tile */ + if(mv[id].page->dy == 0 ) + { + /* go up one tile */ + if(id==0) mv[id].ty--; + /* Snap the origin upward */ + mv[id].page->data -= mv[id].page->pi; + + mv[id].page->dy = mv[id].map->tiles->tileHeight; + } +} + +inline void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid) +{ + /* increment the pixel position and update the page */ + mv[id].page->dy += player[plid].enti.speed; + + /* check to see if this changes the tile */ + if(mv[id].page->dy >= mv[id].dyThresh ) + { + /* go down one tile */ + if(id==0) mv[id].ty++; + /* Snap the origin downward */ + mv[id].page->data += mv[id].page->pi; + + mv[id].page->dy = mv[id].map->tiles->tileHeight; + } +} + +void ZC_playerXYpos(int x, int y, player_t *player, map_view_t *pip, nibble pn); sword chkmap(map_t *map, word q); void mapGoTo(map_view_t *mv, int tx, int ty); void mapinitmapview(map_view_t *mv, int tx, int ty); diff --git a/src/maptest.c b/src/maptest.c index 33016249..7649898e 100755 --- a/src/maptest.c +++ b/src/maptest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/palettec.c b/src/palettec.c index df89b454..3864b677 100755 --- a/src/palettec.c +++ b/src/palettec.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/palettel.c b/src/palettel.c index 6ec55683..f2ff1944 100755 --- a/src/palettel.c +++ b/src/palettel.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/palllist.c b/src/palllist.c index e15d8625..3e8bb2f7 100755 --- a/src/palllist.c +++ b/src/palllist.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/pcxtest.c b/src/pcxtest.c index a7cb7cc7..357e2cae 100755 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/pcxtest2.c b/src/pcxtest2.c index 2ab48632..efebd168 100755 --- a/src/pcxtest2.c +++ b/src/pcxtest2.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/scroll.c b/src/scroll.c index 98e5a160..810ccf35 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -118,7 +118,7 @@ void main(int argc, char *argv[]) //TODO: LOAD map data and position the map in the middle of the screen if smaller then screen mapGoTo(&mv, 0, 0); - playerXYpos(0, 0, &player, &mv, 0); + ZC_playerXYpos(0, 0, &player, &mv, 0); EN_initplayer(&player, 0, &gvar.video); player[0].enti.spri->x = player[0].enti.x-4; player[0].enti.spri->y = player[0].enti.y-16; diff --git a/src/sountest.c b/src/sountest.c index f2726fcf..ac8908c3 100755 --- a/src/sountest.c +++ b/src/sountest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/test2.c b/src/test2.c index b4c33ee3..e33a676e 100755 --- a/src/test2.c +++ b/src/test2.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/vgmtest.c b/src/vgmtest.c index b86eaa7b..3aa5cd0c 100755 --- a/src/vgmtest.c +++ b/src/vgmtest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/vrstest.c b/src/vrstest.c index d879f659..8e20a4cf 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * diff --git a/src/zcroll.c b/src/zcroll.c index 6cdba594..557cc9a3 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -25,6 +25,8 @@ #include "src/lib/16render.h" #include "src/lib/16_dbg.h" +#define FADE + static map_t map; map_view_t mv[4]; float t; @@ -36,15 +38,13 @@ boolean pagenorendermap = 0; //default: 0 unsigned int i; #ifdef FADE -static word paloffset=0; +//static word paloffset=0; byte *dpal; #endif byte *gpal; byte *ptr; memptr pal; -//bitmap_t *ptmpdata; - #define FILENAME_1 "data/spri/chikyuu.vrs" #define FILENAME_1P "data/spri/chikyuu.pal" #define FILENAME_2 "data/spri/ptmp.vrs" @@ -89,7 +89,6 @@ void main(int argc, char *argv[]) // fprintf(stderr, "yay map loaded~~\n"); // data - //read_vrs(&gvar, , .spri->spritesheet); VRS_LoadVRS(bakapee1, &player[0].enti, &gvar); // input! @@ -124,14 +123,11 @@ void main(int argc, char *argv[]) modexHiganbanaPageSetup(&gvar.video); ZC_MVSetup(&mv, &map, &gvar); - //renderswitch - gvar.video.rss=0; - // set up paging //TODO: LOAD map data and position the map in the middle of the screen if smaller then screen mapGoTo(&mv, 0, 0); - playerXYpos(0, 0, &player, &mv, 0); + ZC_playerXYpos(0, 0, &player, &mv, 0); EN_initplayer(&player, 0, &gvar.video); player[0].enti.spri->x = player[0].enti.x-4; player[0].enti.spri->y = player[0].enti.y-16; @@ -151,14 +147,11 @@ void main(int argc, char *argv[]) } // while(!IN_KeyDown(sc_Escape) && !IN_KeyDown(sc_Space) && !IN_KeyDown(sc_Enter)){ FUNCTIONKEYSHOWMV } - VL_ShowPage(mv[0].page, 0, 0);//modexShowPage(mv[0].page);//!(gvar.video.p) + VL_ShowPage(mv[0].page, 0, 0); animate_spri(&(player[0].enti), &gvar.video); #ifdef FADE modexFadeOn(4, gpal); #endif - /*strcpy(global_temp_status_text, "press enter for the loop of zcroll\nescape to quit"); - modexprint(&gvar.video.page[0], 144, 72, 1, 7, 0, global_temp_status_text); - while(!IN_KeyDown(sc_Enter)){ if(IN_KeyDown(sc_Escape)) goto quit; } IN_UserInput(1,1);*///wwww while(!IN_KeyDown(sc_Escape) && player[0].enti.hp>0) { shinku(&gvar);