From: sparky4 Date: Wed, 4 Jan 2017 15:21:23 +0000 (-0600) Subject: wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=63fe6f02c681d5afb8c32f6eadaacfc5f67d27cc;p=16.git wwww --- diff --git a/16/Catacomb3D b/16/Catacomb3D deleted file mode 160000 index aa97f499..00000000 --- a/16/Catacomb3D +++ /dev/null @@ -1 +0,0 @@ -Subproject commit aa97f4995dc7dbea3ecc1794a2d4d4354839cad4 diff --git a/16/CatacombApocalypse b/16/CatacombApocalypse deleted file mode 160000 index 374403ea..00000000 --- a/16/CatacombApocalypse +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 374403ea47e9f6d69829c518c6ebee779b314703 diff --git a/16/keen b/16/keen deleted file mode 160000 index 4348b471..00000000 --- a/16/keen +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4348b4719be87a0b873f5f4f77b4de82ddf7050c diff --git a/16/wolf3d b/16/wolf3d deleted file mode 160000 index 05167784..00000000 --- a/16/wolf3d +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 05167784ef009d0d0daefe8d012b027f39dc8541 diff --git a/DEBUG.16W b/DEBUG.16W index 46a5385a..937d20e6 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,210 +1,210 @@ -Seg:0 Size:10100 Owner:0x0 -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 -Seg:286d Size:44 Owner:0x0 -+ -Seg:2899 Size:256 Owner:0x1650 -+++++ -Seg:2999 Size:256 Owner:0x1442 +Seg:0 Size:10238 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 +Seg:28e9 Size:45 Owner:0x0 +++ +Seg:2916 Size:256 Owner:0x1650 +++++ +Seg:2a16 Size:256 Owner:0x1442 ++++ -Seg:2a99 Size:256 Owner:0x1444 +Seg:2b16 Size:256 Owner:0x1444 ++++++ +Seg:2c16 Size:256 Owner:0x1446 +++++ +Seg:2d16 Size:256 Owner:0x1448 ++++ -Seg:2b99 Size:256 Owner:0x1446 +Seg:2e16 Size:256 Owner:0x144a ++++ -Seg:2c99 Size:256 Owner:0x1448 +Seg:2f16 Size:256 Owner:0x144c ++++ -Seg:2d99 Size:256 Owner:0x144a +Seg:3016 Size:256 Owner:0x144e +++++ -Seg:2e99 Size:256 Owner:0x144c +Seg:3116 Size:256 Owner:0x1450 ++++ -Seg:2f99 Size:256 Owner:0x144e +Seg:3216 Size:256 Owner:0x1452 ++++ -Seg:3099 Size:256 Owner:0x1450 +Seg:3316 Size:256 Owner:0x1454 ++++ -Seg:3199 Size:256 Owner:0x1452 +Seg:3416 Size:256 Owner:0x1456 ++++ -Seg:3299 Size:256 Owner:0x1454 +Seg:3516 Size:256 Owner:0x1458 +++++ -Seg:3399 Size:256 Owner:0x1456 +Seg:3616 Size:256 Owner:0x145a ++++ -Seg:3499 Size:256 Owner:0x1458 +Seg:3716 Size:256 Owner:0x145c ++++ -Seg:3599 Size:256 Owner:0x145a +Seg:3816 Size:256 Owner:0x145e ++++ -Seg:3699 Size:256 Owner:0x145c +Seg:3916 Size:256 Owner:0x1460 ++++ -Seg:3799 Size:256 Owner:0x145e +Seg:3a16 Size:256 Owner:0x1462 +++++ -Seg:3899 Size:256 Owner:0x1460 +Seg:3b16 Size:256 Owner:0x1464 ++++ -Seg:3999 Size:256 Owner:0x1462 +Seg:3c16 Size:256 Owner:0x1466 ++++ -Seg:3a99 Size:256 Owner:0x1464 +Seg:3d16 Size:256 Owner:0x1468 ++++ -Seg:3b99 Size:256 Owner:0x1466 +Seg:3e16 Size:256 Owner:0x146a ++++ -Seg:3c99 Size:256 Owner:0x1468 +Seg:3f16 Size:256 Owner:0x146c +++++ -Seg:3d99 Size:256 Owner:0x146a +Seg:4016 Size:256 Owner:0x146e ++++ -Seg:3e99 Size:256 Owner:0x146c +Seg:4116 Size:256 Owner:0x1470 ++++ -Seg:3f99 Size:256 Owner:0x146e +Seg:4216 Size:256 Owner:0x1472 ++++ -Seg:4099 Size:256 Owner:0x1470 +Seg:4316 Size:256 Owner:0x1474 ++++ -Seg:4199 Size:256 Owner:0x1472 +Seg:4416 Size:256 Owner:0x1476 +++++ -Seg:4299 Size:256 Owner:0x1474 +Seg:4516 Size:256 Owner:0x1478 ++++ -Seg:4399 Size:256 Owner:0x1476 +Seg:4616 Size:256 Owner:0x147a ++++ -Seg:4499 Size:256 Owner:0x1478 +Seg:4716 Size:256 Owner:0x147c ++++ -Seg:4599 Size:256 Owner:0x147a +Seg:4816 Size:256 Owner:0x147e ++++ -Seg:4699 Size:256 Owner:0x147c +Seg:4916 Size:256 Owner:0x1480 +++++ -Seg:4799 Size:256 Owner:0x147e +Seg:4a16 Size:256 Owner:0x1482 ++++ -Seg:4899 Size:256 Owner:0x1480 +Seg:4b16 Size:256 Owner:0x1484 ++++ -Seg:4999 Size:256 Owner:0x1482 +Seg:4c16 Size:256 Owner:0x1486 ++++ -Seg:4a99 Size:256 Owner:0x1484 +Seg:4d16 Size:256 Owner:0x1488 ++++ -Seg:4b99 Size:256 Owner:0x1486 +Seg:4e16 Size:256 Owner:0x148a +++++ -Seg:4c99 Size:256 Owner:0x1488 +Seg:4f16 Size:256 Owner:0x148c ++++ -Seg:4d99 Size:256 Owner:0x148a +Seg:5016 Size:256 Owner:0x148e ++++ -Seg:4e99 Size:256 Owner:0x148c +Seg:5116 Size:256 Owner:0x1490 ++++ -Seg:4f99 Size:256 Owner:0x148e +Seg:5216 Size:256 Owner:0x1492 ++++ -Seg:5099 Size:256 Owner:0x1490 +Seg:5316 Size:256 Owner:0x1494 +++++ -Seg:5199 Size:256 Owner:0x1492 +Seg:5416 Size:256 Owner:0x1496 ++++ -Seg:5299 Size:256 Owner:0x1494 +Seg:5516 Size:256 Owner:0x1498 ++++ -Seg:5399 Size:256 Owner:0x1496 +Seg:5616 Size:256 Owner:0x149a ++++ -Seg:5499 Size:256 Owner:0x1498 +Seg:5716 Size:256 Owner:0x149c ++++ -Seg:5599 Size:256 Owner:0x149a +Seg:5816 Size:256 Owner:0x149e +++++ -Seg:5699 Size:256 Owner:0x149c +Seg:5916 Size:256 Owner:0x14a0 ++++ -Seg:5799 Size:256 Owner:0x149e +Seg:5a16 Size:256 Owner:0x14a2 ++++ -Seg:5899 Size:256 Owner:0x14a0 +Seg:5b16 Size:256 Owner:0x14a4 ++++ -Seg:5999 Size:256 Owner:0x14a2 +Seg:5c16 Size:256 Owner:0x14a6 ++++ -Seg:5a99 Size:256 Owner:0x14a4 +Seg:5d16 Size:256 Owner:0x14a8 +++++ -Seg:5b99 Size:256 Owner:0x14a6 +Seg:5e16 Size:256 Owner:0x14aa ++++ -Seg:5c99 Size:256 Owner:0x14a8 +Seg:5f16 Size:256 Owner:0x14ac ++++ -Seg:5d99 Size:256 Owner:0x14aa +Seg:6016 Size:256 Owner:0x14ae ++++ -Seg:5e99 Size:256 Owner:0x14ac +Seg:6116 Size:256 Owner:0x14b0 ++++ -Seg:5f99 Size:256 Owner:0x14ae +Seg:6216 Size:256 Owner:0x14b2 +++++ -Seg:6099 Size:256 Owner:0x14b0 +Seg:6316 Size:256 Owner:0x14b4 ++++ -Seg:6199 Size:256 Owner:0x14b2 +Seg:6416 Size:256 Owner:0x14b6 ++++ -Seg:6299 Size:256 Owner:0x14b4 +Seg:6516 Size:256 Owner:0x14b8 ++++ -Seg:6399 Size:256 Owner:0x14b6 +Seg:6616 Size:256 Owner:0x14ba ++++ -Seg:6499 Size:256 Owner:0x14b8 +Seg:6716 Size:256 Owner:0x14bc +++++ -Seg:6599 Size:256 Owner:0x14ba +Seg:6816 Size:256 Owner:0x14be ++++ -Seg:6699 Size:256 Owner:0x14bc +Seg:6916 Size:256 Owner:0x14c0 ++++ -Seg:6799 Size:256 Owner:0x14be +Seg:6a16 Size:256 Owner:0x14c2 ++++ -Seg:6899 Size:256 Owner:0x14c0 +Seg:6b16 Size:256 Owner:0x14c4 ++++ -Seg:6999 Size:256 Owner:0x14c2 +Seg:6c16 Size:256 Owner:0x14c6 +++++ -Seg:6a99 Size:256 Owner:0x14c4 +Seg:6d16 Size:256 Owner:0x14c8 ++++ -Seg:6b99 Size:256 Owner:0x14c6 +Seg:6e16 Size:256 Owner:0x14ca ++++ -Seg:6c99 Size:256 Owner:0x14c8 +Seg:6f16 Size:256 Owner:0x14cc ++++ -Seg:6d99 Size:256 Owner:0x14ca +Seg:7016 Size:256 Owner:0x14ce ++++ -Seg:6e99 Size:256 Owner:0x14cc +Seg:7116 Size:256 Owner:0x14d0 +++++ -Seg:6f99 Size:256 Owner:0x14ce +Seg:7216 Size:256 Owner:0x14d2 ++++ -Seg:7099 Size:256 Owner:0x14d0 +Seg:7316 Size:256 Owner:0x14d4 ++++ -Seg:7199 Size:256 Owner:0x14d2 +Seg:7416 Size:256 Owner:0x14d6 ++++ -Seg:7299 Size:256 Owner:0x14d4 +Seg:7516 Size:256 Owner:0x14d8 ++++ -Seg:7399 Size:256 Owner:0x14d6 +Seg:7616 Size:256 Owner:0x14da +++++ -Seg:7499 Size:256 Owner:0x14d8 +Seg:7716 Size:256 Owner:0x14dc ++++ -Seg:7599 Size:256 Owner:0x14da +Seg:7816 Size:256 Owner:0x14de ++++ -Seg:7699 Size:256 Owner:0x14dc +Seg:7916 Size:256 Owner:0x14e0 ++++ -Seg:7799 Size:256 Owner:0x14de +Seg:7a16 Size:256 Owner:0x14e2 ++++ -Seg:7899 Size:256 Owner:0x14e0 +Seg:7b16 Size:256 Owner:0x14e4 +++++ -Seg:7999 Size:256 Owner:0x14e2 +Seg:7c16 Size:256 Owner:0x14e6 ++++ -Seg:7a99 Size:256 Owner:0x14e4 +Seg:7d16 Size:256 Owner:0x14e8 ++++ -Seg:7b99 Size:256 Owner:0x14e6 +Seg:7e16 Size:256 Owner:0x14ea ++++ -Seg:7c99 Size:256 Owner:0x14e8 +Seg:7f16 Size:256 Owner:0x14ec ++++ -Seg:7d99 Size:256 Owner:0x14ea +Seg:8016 Size:256 Owner:0x14ee +++++ -Seg:7e99 Size:256 Owner:0x14ec +Seg:8116 Size:256 Owner:0x14f0 ++++ -Seg:7f99 Size:256 Owner:0x14ee +Seg:8216 Size:256 Owner:0x14f2 ++++ -Seg:8099 Size:256 Owner:0x14f0 +Seg:8316 Size:256 Owner:0x14f4 ++++ -Seg:8199 Size:256 Owner:0x14f2 +Seg:8416 Size:256 Owner:0x14f6 ++++ -Seg:8299 Size:256 Owner:0x14f4 +Seg:8516 Size:256 Owner:0x14f8 +++++ -Seg:8399 Size:256 Owner:0x14f6 +Seg:8616 Size:256 Owner:0x14fa ++++ -Seg:8499 Size:256 Owner:0x14f8 +Seg:8716 Size:256 Owner:0x14fc ++++ -Seg:8599 Size:256 Owner:0x14fa +Seg:8816 Size:256 Owner:0x14fe ++++ -Seg:8699 Size:256 Owner:0x14fc +Seg:8916 Size:256 Owner:0x1500 ++++ -Seg:8799 Size:256 Owner:0x14fe +Seg:8a16 Size:256 Owner:0x1502 +++++ -Seg:8899 Size:256 Owner:0x1500 +Seg:8b16 Size:256 Owner:0x1504 ++++ -Seg:8999 Size:256 Owner:0x1502 +Seg:8c16 Size:256 Owner:0x1506 ++++ -Seg:8a99 Size:256 Owner:0x1504 +Seg:8d16 Size:256 Owner:0x1508 ++++ -Seg:8b99 Size:256 Owner:0x1506 -++++ -Seg:8c99 Size:256 Owner:0x1508 -+++++ -Seg:8d99 Size:401 Owner:0xec12 +Seg:8e16 Size:401 Owner:0xec1c ++++++ -Seg:b899 Size:18278 Owner:0x0 -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file +Seg:b916 Size:18153 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W index b238d529..b8122796 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,69 +1,69 @@ == default == - USED block at 288f0016 of size 136 - FREE block at 288f009e of size 68 - USED block at 288f00e2 of size 50 - USED block at 288f0114 of size 50 - USED block at 288f0146 of size 50 - USED block at 288f0178 of size 50 - USED block at 288f01aa of size 50 - USED block at 288f01dc of size 50 - USED block at 288f020e of size 50 - USED block at 288f0240 of size 50 - USED block at 288f0272 of size 50 - USED block at 288f02a4 of size 50 - USED block at 288f02d6 of size 50 - USED block at 288f0308 of size 50 - FREE block at 288f033a of size 14 - USED block at 288f0348 of size 20 - FREE block at 288f035c of size 7328 + USED block at 290c0016 of size 136 + FREE block at 290c009e of size 68 + USED block at 290c00e2 of size 50 + USED block at 290c0114 of size 50 + USED block at 290c0146 of size 50 + USED block at 290c0178 of size 50 + USED block at 290c01aa of size 50 + USED block at 290c01dc of size 50 + USED block at 290c020e of size 50 + USED block at 290c0240 of size 50 + USED block at 290c0272 of size 50 + USED block at 290c02a4 of size 50 + USED block at 290c02d6 of size 50 + USED block at 290c0308 of size 50 + FREE block at 290c033a of size 14 + USED block at 290c0348 of size 20 + FREE block at 290c035c of size 7328 OK - end of heap == near == - USED block at 188eec66 of size 12 - USED block at 188eec72 of size 330 - USED block at 188eedbc of size 52 - USED block at 188eedf0 of size 20 - USED block at 188eee04 of size 20 - USED block at 188eee18 of size 20 - USED block at 188eee2c of size 20 - USED block at 188eee40 of size 20 - USED block at 188eee54 of size 4520 + USED block at 190bec66 of size 12 + USED block at 190bec72 of size 528 + USED block at 190bee82 of size 72 + USED block at 190beeca of size 20 + USED block at 190beede of size 20 + USED block at 190beef2 of size 20 + USED block at 190bef06 of size 20 + USED block at 190bef1a of size 20 + USED block at 190bef2e of size 4302 OK - end of heap == far == - USED block at 288f0016 of size 136 - USED block at 288f009e of size 68 - USED block at 288f00e2 of size 50 - USED block at 288f0114 of size 50 - USED block at 288f0146 of size 50 - USED block at 288f0178 of size 50 - USED block at 288f01aa of size 50 - USED block at 288f01dc of size 50 - USED block at 288f020e of size 50 - USED block at 288f0240 of size 50 - USED block at 288f0272 of size 50 - USED block at 288f02a4 of size 50 - USED block at 288f02d6 of size 50 - USED block at 288f0308 of size 50 - USED block at 288f033a of size 14 - USED block at 288f0348 of size 20 - USED block at 288f035c of size 7328 + USED block at 290c0016 of size 136 + USED block at 290c009e of size 68 + USED block at 290c00e2 of size 50 + USED block at 290c0114 of size 50 + USED block at 290c0146 of size 50 + USED block at 290c0178 of size 50 + USED block at 290c01aa of size 50 + USED block at 290c01dc of size 50 + USED block at 290c020e of size 50 + USED block at 290c0240 of size 50 + USED block at 290c0272 of size 50 + USED block at 290c02a4 of size 50 + USED block at 290c02d6 of size 50 + USED block at 290c0308 of size 50 + USED block at 290c033a of size 14 + USED block at 290c0348 of size 20 + USED block at 290c035c of size 7328 OK - end of heap Memory Type Total Used Free ---------------- -------- -------- -------- Default 8166 756 7410 -Near 5014 494 4520 +Near 5014 712 4302 Far 8166 756 7410 ---------------- -------- -------- -------- -coreleft = 4518 -farcoreleft = 28156 +coreleft = 4300 +farcoreleft = 27938 GetFreeSize = 23660 -GetNearFreeSize = 4520 +GetNearFreeSize = 4302 GetFarFreeSize = 23660 -memavl = 4518 -stackavail = 31529 +memavl = 4300 +stackavail = 31539 diff --git a/MMDUMP.16W b/MMDUMP.16W index 72c45a4e..dc496375 100755 Binary files a/MMDUMP.16W and b/MMDUMP.16W differ diff --git a/lq.sh b/lq.sh new file mode 100755 index 00000000..6f87828c --- /dev/null +++ b/lq.sh @@ -0,0 +1 @@ +grep -i "$1" src/lib/* diff --git a/makefile b/makefile index ab1dc97b..d754f957 100755 --- a/makefile +++ b/makefile @@ -396,6 +396,7 @@ mkdl: .symbolic cldl: .symbolic @cd $(DOSLIB:$(to_os_path)) @$(DOSLIBMAKEALL) $(DOSLIB_MEMMODE) clean + @$(REMOVECOMMAND) -rf ext/README @cd $(BUILD_ROOT) uplibs: .symbolic @@ -419,10 +420,8 @@ initlibs: .symbolic @$(COPYCOMMAND) git_con.fig .git/config @$(COPYCOMMAND) git_modu.les .gitmodules @$(COPYCOMMAND) git_igno.re .gitignore - @cd $(SRCLIB:$(to_os_path)) - @git clone https://github.com/joncampbell123/doslib.git - @git clone https://github.com/zserge/jsmn.git - @cd $(BUILD_ROOT) + @wmake -h cldl + @wmake -h jmdl @cd 16 @git clone https://github.com/FlatRockSoft/CatacombApocalypse.git @git clone https://github.com/id-Software/wolf3d.git @@ -431,6 +430,16 @@ initlibs: .symbolic @cd $(BUILD_ROOT) @$(COPYCOMMAND) $(DOSLIB)/make-lowercase . +dlcl: .symbolic + @cd $(SRCLIB:$(to_os_path)) + @git clone https://github.com/joncampbell123/doslib.git + @cd $(BUILD_ROOT) + +jmcl: .symbolic + @cd $(SRCLIB:$(to_os_path)) + @git clone https://github.com/zserge/jsmn.git + @cd $(BUILD_ROOT) + ## ## experimental libs ## diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c index 61838010..8b9aab83 100755 --- a/src/lib/16_ca.c +++ b/src/lib/16_ca.c @@ -221,7 +221,7 @@ void CAL_GetGrChunkLength (int chunk) ========================== */ -boolean CA_FarRead(int handle, byte huge *dest, dword length, global_game_variables_t *gvar) +boolean CA_FarRead(int handle, byte far *dest, dword length, global_game_variables_t *gvar) { boolean flag=0; //dword fat=0; @@ -293,7 +293,7 @@ End: ========================== */ -boolean CA_FarWrite(int handle, byte huge *source, dword length, global_game_variables_t *gvar) +boolean CA_FarWrite(int handle, byte far *source, dword length, global_game_variables_t *gvar) { boolean flag=0; //dword fat=0; @@ -498,7 +498,7 @@ void CAL_OptimizeNodes(huffnode *table) ====================== */ -void CAL_HuffExpand (byte huge *source, byte huge *dest, +void CAL_HuffExpand (byte far *source, byte far *dest, long length,huffnode *hufftable) { // unsigned bit,byte,node,code; @@ -795,12 +795,12 @@ void CAL_CarmackExpand (unsigned far *source, unsigned far *dest, unsigned lengt ====================== */ -long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest, +long CA_RLEWCompress (unsigned far *source, long length, unsigned far *dest, unsigned rlewtag) { long complength; unsigned value,count,i; - unsigned huge *start,huge *end; + unsigned far *start,far *end; start = dest; @@ -852,11 +852,11 @@ long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest, ====================== */ -void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length, +void CA_RLEWexpand (unsigned far *source, unsigned far *dest,long length, unsigned rlewtag) { // unsigned value,count,i; - unsigned huge *end; + unsigned far *end; unsigned sourceseg,sourceoff,destseg,destoff,endseg,endoff; @@ -1065,7 +1065,7 @@ dinorm: CAL_GetGrChunkLength(STRUCTPIC); // position file pointer MM_GetPtr(&compseg,chunkcomplen); CA_FarRead (grhandle,compseg,chunkcomplen); - CAL_HuffExpand (compseg, (byte huge *)pictable,NUMPICS*sizeof(pictabletype),grhuffman); + CAL_HuffExpand (compseg, (byte far *)pictable,NUMPICS*sizeof(pictabletype),grhuffman); MM_FreePtr(&compseg); #endif @@ -1074,7 +1074,7 @@ dinorm: CAL_GetGrChunkLength(STRUCTPICM); // position file pointer MM_GetPtr(&compseg,chunkcomplen); CA_FarRead (grhandle,compseg,chunkcomplen); - CAL_HuffExpand (compseg, (byte huge *)picmtable,NUMPICS*sizeof(pictabletype),grhuffman); + CAL_HuffExpand (compseg, (byte far *)picmtable,NUMPICS*sizeof(pictabletype),grhuffman); MM_FreePtr(&compseg); #endif @@ -1083,7 +1083,7 @@ dinorm: CAL_GetGrChunkLength(STRUCTSPRITE); // position file pointer MM_GetPtr(&compseg,chunkcomplen); CA_FarRead (grhandle,compseg,chunkcomplen); - CAL_HuffExpand (compseg, (byte huge *)spritetable,NUMSPRITES*sizeof(spritetabletype),grhuffman); + CAL_HuffExpand (compseg, (byte far *)spritetable,NUMSPRITES*sizeof(spritetabletype),grhuffman); MM_FreePtr(&compseg); #endif diff --git a/src/lib/16_ca.h b/src/lib/16_ca.h index 203cce95..471a4517 100755 --- a/src/lib/16_ca.h +++ b/src/lib/16_ca.h @@ -90,16 +90,16 @@ extern void (*finishcachebox) (void); void CA_OpenDebug (global_game_variables_t *gvar); void CA_CloseDebug (global_game_variables_t *gvar); -boolean CA_FarRead (int handle, byte huge *dest, dword length, global_game_variables_t *gvar); -boolean CA_FarWrite (int handle, byte huge *source, dword length, global_game_variables_t *gvar); +boolean CA_FarRead (int handle, byte far *dest, dword length, global_game_variables_t *gvar); +boolean CA_FarWrite (int handle, byte far *source, dword length, global_game_variables_t *gvar); boolean CA_ReadFile (char *filename, memptr *ptr, global_game_variables_t *gvar); boolean CA_WriteFile (char *filename, void far *ptr, long length, global_game_variables_t *gvar); boolean CA_LoadFile (char *filename, memptr *ptr, global_game_variables_t *gvar); -long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest,unsigned rlewtag); +long CA_RLEWCompress (unsigned far *source, long length, unsigned far *dest,unsigned rlewtag); -void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length,unsigned rlewtag); +void CA_RLEWexpand (unsigned far *source, unsigned far *dest,long length,unsigned rlewtag); void CA_Startup (global_game_variables_t *gvar); void CA_Shutdown (global_game_variables_t *gvar); diff --git a/src/lib/16_dbg.c b/src/lib/16_dbg.c index 7f34624b..d7b14159 100755 --- a/src/lib/16_dbg.c +++ b/src/lib/16_dbg.c @@ -1,13 +1,11 @@ #include "src/lib/16_dbg.h" -//#include "src/16.h" - #ifdef __DEBUG__ #ifdef __DEBUG_PM__ boolean dbg_debugpm=0; #endif #ifdef __DEBUG_InputMgr__ -boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0; +boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0,dbg_notest=0; #endif #endif diff --git a/src/lib/16_dbg.h b/src/lib/16_dbg.h index 06c3fccf..ddec1684 100755 --- a/src/lib/16_dbg.h +++ b/src/lib/16_dbg.h @@ -16,7 +16,7 @@ extern boolean dbg_debugpm; #endif #ifdef __DEBUG_InputMgr__ -extern boolean dbg_testkeyin,dbg_testcontrolnoisy; +extern boolean dbg_testkeyin,dbg_testcontrolnoisy,dbg_notest; #endif #endif diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 9adfe42a..3b7584ac 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -1247,7 +1247,13 @@ IN_UserInput(dword delay,boolean clear) boolean IN_KeyDown(byte code) { +#ifdef __DEBUG_InputMgr__ + if(!dbg_notest) +#endif return inpu.Keyboard[code]; +#ifdef __DEBUG_InputMgr__ + else return kbhit(); +#endif } void IN_ClearKey(byte code) @@ -1260,7 +1266,7 @@ void IN_ClearKey(byte code) boolean IN_qb(byte kee) { #ifdef __DEBUG_InputMgr__ -// if(dbg_testkeyin > 0) printf("%u\n", inpu.Keyboard[kee]); + if(dbg_testkeyin) printf("%u\n", inpu.Keyboard[kee]); #endif if(inpu.Keyboard[kee]==true) return 1; else return 0; diff --git a/src/lib/16_map.h b/src/lib/16_map.h index 512a81af..103ff763 100755 --- a/src/lib/16_map.h +++ b/src/lib/16_map.h @@ -38,8 +38,8 @@ //TODO: 16_mm and 16_ca must handle this typedef struct { - bitmap_t huge *btdata; //old - planar_buf_t huge *data; //old + bitmap_t far *btdata; //old + planar_buf_t far *data; //old word tileHeight, tileWidth; unsigned int rows, cols; #ifdef __DEBUG__ @@ -54,9 +54,9 @@ typedef struct { //long planestart[3]; //unsigned planelength[3]; byte *data; //TODO: 16_mm and 16_ca must handle this - byte * huge *layerdata; //TODO: 16_mm and 16_ca must handle this + byte * far *layerdata; //TODO: 16_mm and 16_ca must handle this tiles_t *tiles; //TODO: 16_mm and 16_ca must handle this - tiles_t * huge *layertile; //TODO: 16_mm and 16_ca must handle this + tiles_t * far *layertile; //TODO: 16_mm and 16_ca must handle this int width, height; //this has to be signed! char name[16]; } map_t; diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 98d0c43f..f894464e 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -563,7 +563,7 @@ void MML_ShutdownXMS(global_game_variables_t *gvar) /*void MML_UseSpace(word segstart, dword seglength, global_game_variables_t *gvar) { - //huge mmblocktype huge *scan,huge *last; + mmblocktype far *scan,far *last; word segm=1; word oldend; dword segmlen; @@ -716,8 +716,7 @@ void MML_UseSpace(word segstart, dword seglength, global_game_variables_t *gvar) void MML_ClearBlock(global_game_variables_t *gvar) { - //huge mmblocktype huge *scan,huge *last; - mmblocktype __far *scan;//,far *last; + mmblocktype far *scan;//,far *last; scan = gvar->mm.mmhead->next; @@ -753,7 +752,6 @@ void MM_Startup(global_game_variables_t *gvar) int i; //dword length,seglength; dword length; word seglength; - //huge void huge *start; void far *start; word segstart;//,endfree; @@ -789,12 +787,10 @@ void MM_Startup(global_game_variables_t *gvar) #ifdef __WATCOMC__ _nheapgrow(); length=(dword)_memavl();//(dword)GetFreeSize(); - //huge start = (void huge *)(gvar->mm.nearheap = _nmalloc(length)); start = (void far *)(gvar->mm.nearheap = _nmalloc(length)); #endif #ifdef __BORLANDC__ length=coreleft(); - //huge start = (void huge *)(gvar->mm.nearheap = malloc(length)); start = (void far *)(gvar->mm.nearheap = malloc(length)); #endif length -= 16-(FP_OFF(start)&15); @@ -930,7 +926,6 @@ void MM_Shutdown(global_game_variables_t *gvar) void MM_GetPtr (memptr *baseptr, dword size, global_game_variables_t *gvar) { - //huge mmblocktype huge *scan,huge *lastscan,huge *endscan,huge *purge,huge *next; mmblocktype far *scan,far *lastscan,far *endscan,far *purge,far *next; int search; unsigned needed,startseg; @@ -1049,7 +1044,6 @@ void MM_GetPtr (memptr *baseptr, dword size, global_game_variables_t *gvar) void MM_FreePtr(memptr *baseptr, global_game_variables_t *gvar) { - //huge mmblocktype huge *scan,huge *last; mmblocktype far *scan,far *last; last = gvar->mm.mmhead; @@ -1089,7 +1083,6 @@ void MM_FreePtr(memptr *baseptr, global_game_variables_t *gvar) void MM_SetPurge(memptr *baseptr, int purge, global_game_variables_t *gvar) { - //huge mmblocktype huge *start; mmblocktype far *start; start = gvar->mm.mmrover; @@ -1129,7 +1122,6 @@ void MM_SetPurge(memptr *baseptr, int purge, global_game_variables_t *gvar) void MM_SetLock(memptr *baseptr, boolean locked, global_game_variables_t *gvar) { - //huge mmblocktype huge *start; mmblocktype far *start; start = gvar->mm.mmrover; @@ -1169,7 +1161,6 @@ void MM_SetLock(memptr *baseptr, boolean locked, global_game_variables_t *gvar) void MM_SortMem(global_game_variables_t *gvar) { - //huge mmblocktype huge *scan,huge *last,huge *next; mmblocktype far *scan,far *last,far *next; unsigned start,length,source,dest;//++++,oldborder; //++++int playing; @@ -1280,7 +1271,6 @@ void MM_SortMem(global_game_variables_t *gvar) void MM_ShowMemory(global_game_variables_t *gvar) { - //huge mmblocktype huge *scan; mmblocktype far *scan; //word temp; sdword end,owner; @@ -1443,7 +1433,6 @@ void MM_ShowMemory(global_game_variables_t *gvar) void MM_DumpData(global_game_variables_t *gvar) { - //huge mmblocktype huge *scan,huge *best; mmblocktype far *scan,far *best; long lowest,oldlowest; word owner; @@ -1518,7 +1507,6 @@ void MM_DumpData(global_game_variables_t *gvar) dword MM_UnusedMemory(global_game_variables_t *gvar) { dword free; - //huge mmblocktype huge *scan; mmblocktype far *scan; free = 0; @@ -1550,7 +1538,6 @@ dword MM_UnusedMemory(global_game_variables_t *gvar) dword MM_TotalFree(global_game_variables_t *gvar) { dword free; - //huge mmblocktype huge *scan; mmblocktype far *scan; free = 0; diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index b160ac65..abcf48aa 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -136,7 +136,6 @@ extern word XMSVer; word blob; //for data larger than 64k unsigned attributes; memptr *useptr; // pointer to the segment start - //huge struct mmblockstruct huge *next; struct mmblockstruct far *next; } mmblocktype; @@ -145,7 +144,6 @@ typedef struct { memptr bufferseg; boolean mmstarted, bombonerror, mmerror; - //huge void huge *farheap; void far *farheap; #ifdef __BORLANDC__ void *nearheap; @@ -158,7 +156,6 @@ typedef struct unsigned int EMSVer; word numUMBs,UMBbase[MAXUMBS]; //dword numUMBs,UMBbase[MAXUMBS]; - //huge mmblocktype huge mmblocks[MAXBLOCKS],huge *mmhead,huge *mmfree,huge *mmrover,huge *mmnew; mmblocktype far mmblocks[MAXBLOCKS],far *mmhead,far *mmfree,far *mmrover,far *mmnew; } mminfo_t;*/ diff --git a/src/lib/16_sprit.c b/src/lib/16_sprit.c index d4daf597..3bfd3f1c 100755 --- a/src/lib/16_sprit.c +++ b/src/lib/16_sprit.c @@ -25,9 +25,9 @@ char* get_curr_anim_name(struct sprite *spri) { // Retrive animation name list - struct vrs_header huge *vrs = spri->spritesheet->vrs_hdr; - uint32_t huge *anim_names_offsets = (uint32_t huge *) - ((byte huge *)vrs + + struct vrs_header far *vrs = spri->spritesheet->vrs_hdr; + uint32_t far *anim_names_offsets = (uint32_t far *) + ((byte far *)vrs + vrs->offset_table[VRS_HEADER_OFFSET_ANIMATION_NAME_LIST]); return (char *)(vrs + anim_names_offsets[spri->curr_anim]); @@ -35,12 +35,12 @@ char* get_curr_anim_name(struct sprite *spri) void init_anim(struct sprite *spri, int anim_index) { - struct vrs_header huge *vrs = spri->spritesheet->vrs_hdr; - uint32_t huge *anim_lists_offsets = (uint32_t huge *) - ((byte huge *)vrs + + struct vrs_header far *vrs = spri->spritesheet->vrs_hdr; + uint32_t far *anim_lists_offsets = (uint32_t far *) + ((byte far *)vrs + vrs->offset_table[VRS_HEADER_OFFSET_ANIMATION_LIST]); - struct vrs_animation_list_entry_t huge *anim_list = (struct vrs_animation_list_entry_t huge *) - ((byte huge *)vrs + + struct vrs_animation_list_entry_t far *anim_list = (struct vrs_animation_list_entry_t far *) + ((byte far *)vrs + anim_lists_offsets[anim_index]); // Upon new animation, start from the first sprite in it @@ -57,10 +57,10 @@ int set_anim_by_id(struct sprite *spri, int anim_id) { int new_anim_index = 0; int iter_id; - struct vrs_header huge *vrs = spri->spritesheet->vrs_hdr; + struct vrs_header far *vrs = spri->spritesheet->vrs_hdr; // Retruve animation ids list - uint16_t huge *anim_ids = (uint16_t huge *) - ((byte huge *)vrs + + uint16_t far *anim_ids = (uint16_t far *) + ((byte far *)vrs + vrs->offset_table[VRS_HEADER_OFFSET_ANIMATION_ID_LIST]); // Loop through animation id untill match or end of list @@ -81,10 +81,10 @@ void print_anim_ids(struct sprite *spri) { int new_anim_index = 0; int iter_id; - struct vrs_header huge *vrs = spri->spritesheet->vrs_hdr; + struct vrs_header far *vrs = spri->spritesheet->vrs_hdr; // Retruve animation ids list - uint16_t huge *anim_ids = (uint16_t huge *) - ((byte huge *)vrs + + uint16_t far *anim_ids = (uint16_t far *) + ((byte far *)vrs + vrs->offset_table[VRS_HEADER_OFFSET_ANIMATION_ID_LIST]); if(!anim_ids[new_anim_index]) @@ -98,7 +98,7 @@ void print_anim_ids(struct sprite *spri) } -void animate_spri(struct sprite *spri) +void animate_spri(struct sprite *spri, global_game_variables_t *gvar) { int i; // Events go here @@ -107,8 +107,7 @@ void animate_spri(struct sprite *spri) i = get_vrl_by_id(spri->spritesheet, spri->curr_spri_id, spri->sprite_vrl_cont); if(i < 0) { - printf("Error retriving required sprite"); - exit(-1); + Quit (gvar, "Error retriving required sprite"); } draw_vrl1_vgax_modex( spri->x, spri->y, spri->sprite_vrl_cont->vrl_header, spri->sprite_vrl_cont->line_offsets, diff --git a/src/lib/16_sprit.h b/src/lib/16_sprit.h index 107cb3e5..9ef500e5 100755 --- a/src/lib/16_sprit.h +++ b/src/lib/16_sprit.h @@ -66,7 +66,7 @@ int set_anim_by_id(struct sprite *spri, int id); * In: * + struct sprite *spri - sprite to animate */ -void animate_spri(struct sprite *spri); +void animate_spri(struct sprite *spri, global_game_variables_t *gvar); void print_anim_ids(struct sprite *spri); diff --git a/src/lib/16_tail.c b/src/lib/16_tail.c index b64d2ff5..d7a86f56 100755 --- a/src/lib/16_tail.c +++ b/src/lib/16_tail.c @@ -76,6 +76,9 @@ void Startup16(global_game_variables_t *gvar) gvar->pm.PMStarted=0; MM_Startup(gvar); #ifdef __WATCOMC__ +#ifdef __DEBUG_InputMgr__ + if(!dbg_notest) +#endif IN_Startup(gvar); #endif PM_Startup(gvar); @@ -99,6 +102,9 @@ void Shutdown16(global_game_variables_t *gvar) { PM_Shutdown(gvar); #ifdef __WATCOMC__ +#ifdef __DEBUG_InputMgr__ + if(!dbg_notest) +#endif IN_Shutdown(gvar); #endif CA_Shutdown(gvar); diff --git a/src/lib/16_vrs.c b/src/lib/16_vrs.c index d8a43bf5..f77119af 100755 --- a/src/lib/16_vrs.c +++ b/src/lib/16_vrs.c @@ -25,13 +25,13 @@ int read_vrs(global_game_variables_t *gvar, char *filename, struct vrs_container *vrs_cont){ int fd; dword size; - byte huge *buffer; + byte far *buffer; vrl1_vgax_offset_t **vrl_line_offsets; - uint32_t huge *vrl_headers_offsets; - uint16_t huge *vrl_id_iter; + uint32_t far *vrl_headers_offsets; + uint16_t far *vrl_id_iter; uint32_t vrl_size; int num_of_vrl=0, i; - struct vrl1_vgax_header huge *curr_vrl; + struct vrl1_vgax_header far *curr_vrl; int success=1; // Open filename, get size of file, @@ -54,17 +54,17 @@ int read_vrs(global_game_variables_t *gvar, char *filename, struct vrs_container // Calculate vrl offsets // Count sprites - vrl_id_iter = (uint16_t huge *)(buffer + vrs_cont->vrs_hdr->offset_table[VRS_HEADER_OFFSET_SPRITE_ID_LIST]); + vrl_id_iter = (uint16_t far *)(buffer + vrs_cont->vrs_hdr->offset_table[VRS_HEADER_OFFSET_SPRITE_ID_LIST]); while(vrl_id_iter[num_of_vrl]){ num_of_vrl++; } // Allocate memory for vrl line offsets table vrl_line_offsets = malloc(sizeof(vrl1_vgax_offset_t *)*num_of_vrl); - vrl_headers_offsets = (uint32_t huge *)(buffer + vrs_cont->vrs_hdr->offset_table[VRS_HEADER_OFFSET_VRS_LIST]); + vrl_headers_offsets = (uint32_t far *)(buffer + vrs_cont->vrs_hdr->offset_table[VRS_HEADER_OFFSET_VRS_LIST]); // Calculate line offsets for each vrl for(i = 0; i < num_of_vrl; i++){ - curr_vrl = (struct vrl1_vgax_header huge *)(buffer + vrl_headers_offsets[i]); + curr_vrl = (struct vrl1_vgax_header far *)(buffer + vrl_headers_offsets[i]); // Calc. vrl size as (next_offset - curr_offset) if (i != num_of_vrl - 1){ @@ -81,9 +81,9 @@ int read_vrs(global_game_variables_t *gvar, char *filename, struct vrs_container } // Seek and return a specified .vrl blob from .vrs blob in far memory -int get_vrl_by_id(struct vrs_container /*huge*/ *vrs_cont, uint16_t id, struct vrl_container *vrl_cont){ - uint16_t huge *ids; - uint32_t huge *vrl_offs_list; +int get_vrl_by_id(struct vrs_container far *vrs_cont, uint16_t id, struct vrl_container *vrl_cont){ + uint16_t far *ids; + uint32_t far *vrl_offs_list; int counter = 0; // If id is invalid, return -1 @@ -93,7 +93,7 @@ int get_vrl_by_id(struct vrs_container /*huge*/ *vrs_cont, uint16_t id, struct v } // Get id list from .vrs blob (base + offset) - ids = (uint16_t huge*)(vrs_cont->buffer + + ids = (uint16_t far*)(vrs_cont->buffer + vrs_cont->vrs_hdr->offset_table[VRS_HEADER_OFFSET_SPRITE_ID_LIST]); // Loop through the id list until we found the right one or hit the end of the list @@ -108,12 +108,12 @@ int get_vrl_by_id(struct vrs_container /*huge*/ *vrs_cont, uint16_t id, struct v } // Get vrl offsets list from .vrs blob (base + offset) - vrl_offs_list = (uint32_t huge *)(vrs_cont->buffer + + vrl_offs_list = (uint32_t far *)(vrs_cont->buffer + vrs_cont->vrs_hdr->offset_table[VRS_HEADER_OFFSET_VRS_LIST]); // Get vrl_header from .vrs (base + offset from vrl_list) // Counter is number of vrls to skip (ids and vrls are aligned according to the .vrs specification) - vrl_cont->vrl_header = (struct vrl1_vgax_header huge *)(vrs_cont->buffer + vrl_offs_list[counter]); + vrl_cont->vrl_header = (struct vrl1_vgax_header far *)(vrs_cont->buffer + vrl_offs_list[counter]); // Get .vrl size by integer arithmetics (next vrl offset - current vrl offset) if(ids[counter+1]){ diff --git a/src/lib/16_vrs.h b/src/lib/16_vrs.h index 49da2f6b..054377b1 100755 --- a/src/lib/16_vrs.h +++ b/src/lib/16_vrs.h @@ -34,8 +34,8 @@ struct vrs_container{ // minus header dword data_size; union{ - byte huge *buffer; - struct vrs_header huge *vrs_hdr; + byte far *buffer; + struct vrs_header far *vrs_hdr; }; // Array of corresponding vrl line offsets vrl1_vgax_offset_t **vrl_line_offsets; @@ -46,8 +46,8 @@ struct vrl_container{ // minus header dword data_size; union{ - byte huge *buffer; - struct vrl1_vgax_header huge *vrl_header; + byte far *buffer; + struct vrl1_vgax_header far *vrl_header; }; // Pointer to a corresponding vrl line offsets struct vrl1_vgax_offset_t *line_offsets; diff --git a/src/lib/doslib b/src/lib/doslib index 49704010..912a2929 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit 4970401064ed7de41b406dfad32c7095ae1cbfab +Subproject commit 912a29296248429f341b4727b441fb36c3e823a5 diff --git a/src/scroll.c b/src/scroll.c index 00c672ca..131b0435 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -30,7 +30,6 @@ //bitmap_t p; static map_t map; -player_t player[MaxPlayers]; map_view_t mv[4]; //word pn=0; //i forgot ww float t; @@ -56,6 +55,7 @@ boolean panswitch=0;//1 void main(int argc, char *argv[]) { static global_game_variables_t gvar; + static player_t player[MaxPlayers]; if(argv[1]) bakapee = atoi(argv[1]); else bakapee = 1; diff --git a/src/vrstest.c b/src/vrstest.c index d0e2b411..03220799 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -21,13 +21,15 @@ */ #include "src/lib/16_head.h" +#include "src/lib/16_tail.h" #include "src/lib/16_vl.h" #include "src/lib/16_sprit.h" -#include "src/lib/16_tail.h" #include "src/lib/16_pm.h" -#include "src/lib/16_ca.h" +//#include "src/lib/16_ca.h" #include "src/lib/16_mm.h" +extern boolean dbg_notest; + static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ void main() { @@ -44,12 +46,13 @@ void main() { //vrl1_vgax_offset_t * off, *off1; struct vrs_container vrs; vrl1_vgax_offset_t **vrl_line_offsets; - uint32_t huge *vrl_headers_offsets; - uint16_t huge *vrl_id_iter; + uint32_t far *vrl_headers_offsets; + uint16_t far *vrl_id_iter; uint32_t vrl_size; int num_of_vrl; - struct vrl1_vgax_header huge *curr_vrl; + struct vrl1_vgax_header far *curr_vrl; word w=0; + dbg_notest=1; Startup16(&gvar); @@ -62,7 +65,7 @@ void main() { vrs.buffer = bigbuffer; vrs.data_size = size - sizeof(struct vrl1_vgax_header); num_of_vrl = 0; - vrl_id_iter = (uint16_t huge *)(vrs.buffer + vrs.vrs_hdr->offset_table[VRS_HEADER_OFFSET_SPRITE_ID_LIST]); + vrl_id_iter = (uint16_t far *)(vrs.buffer + vrs.vrs_hdr->offset_table[VRS_HEADER_OFFSET_SPRITE_ID_LIST]); while(vrl_id_iter[num_of_vrl]){ num_of_vrl++; } @@ -70,10 +73,10 @@ void main() { // Allocate memory for vrl line offsets table vrl_line_offsets = malloc(sizeof(vrl1_vgax_offset_t *)*num_of_vrl); - vrl_headers_offsets = (uint32_t huge *)(vrs.buffer + vrs.vrs_hdr->offset_table[VRS_HEADER_OFFSET_VRS_LIST]); + vrl_headers_offsets = (uint32_t far *)(vrs.buffer + vrs.vrs_hdr->offset_table[VRS_HEADER_OFFSET_VRS_LIST]); // Calculate line offsets for each vrl for(i = 0; i < num_of_vrl; i++){ - curr_vrl = (struct vrl1_vgax_header huge *)(vrs.buffer + vrl_headers_offsets[i]); + curr_vrl = (struct vrl1_vgax_header far *)(vrs.buffer + vrl_headers_offsets[i]); // Calc. vrl size as (next_offset - curr_offset) if (i != num_of_vrl - 1){ @@ -119,7 +122,7 @@ void main() { /*modexLoadPalFile("data/spri/chikyuu.pal", &pal); modexPalUpdate1(pal);*/ for (i = 0; i < 5; i++){ - spri.delay = 1; animate_spri(&spri); spri.x += 20; /*sleep(1);*/ } + spri.delay = 1; animate_spri(&spri, &gvar); spri.x += 20; /*sleep(1);*/ } while(!IN_KeyDown(sc_Escape)) { diff --git a/src/zcroll.c b/src/zcroll.c index 90c72add..29f329c8 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -30,7 +30,6 @@ //bitmap_t p; static map_t map; -player_t player[MaxPlayers]; map_view_t mv[4]; float t; sword bakapee; @@ -55,12 +54,17 @@ memptr pal; void main(int argc, char *argv[]) { static global_game_variables_t gvar; + static player_t player[MaxPlayers]; if(argv[1]) bakapee = atoi(argv[1]); else bakapee = 1; + player[0].data = _fmalloc(72*128); //TODO use exmm + *player[0].data = bitmapLoadPcx("data/chikyuu.pcx", &gvar); // load sprite + Startup16(&gvar); pan.pn=0; + // OK, this one takes hellova time and needs to be done in farmalloc or MM_... //IN CA i think you use CAL_SetupGrFile but i do think we should work together on this part --sparky4 player[0].ent = malloc(sizeof(entity_t)); @@ -76,8 +80,8 @@ void main(int argc, char *argv[]) // data read_vrs(&gvar, "data/spri/chikyuu.vrs", player[0].ent->spri->spritesheet); - player[0].data = malloc(72*128); //TODO use exmm - *player[0].data = bitmapLoadPcx("data/chikyuu.pcx", &gvar); // load sprite +// player[0].data = malloc(72*128); //TODO use exmm +// *player[0].data = bitmapLoadPcx("data/chikyuu.pcx", &gvar); // load sprite // input! IN_Default(0, &player,ctrl_Keyboard1); @@ -145,6 +149,7 @@ void main(int argc, char *argv[]) #ifdef FADE modexFadeOn(4, gpal); #endif + modexDrawSprite(mv[0].page, 16, 16, (player[0].data)); /*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 @@ -226,7 +231,6 @@ void main(int argc, char *argv[]) /* fade back to text mode */ /* but 1st lets save the game palette~ */ - //quit: #ifdef FADE modexPalSave(gpal); modexSavePalFile("data/g.pal", gpal);