From aedfbc6bc6b542aaa113f55c625b9d782d58a2cd Mon Sep 17 00:00:00 2001 From: sparky4 Date: Wed, 1 Mar 2017 19:39:32 -0600 Subject: [PATCH] meh ca needs huge amounts of work and i should remember what needs to be done soon w --- DEBUG.16W | 214 ++++++++++++++++++++++++------------------------ HEAP.16W | 42 +++++----- MMDUMP.16W | Bin 2550 -> 2550 bytes src/lib/16_in.c | 42 ++++++++++ 4 files changed, 170 insertions(+), 128 deletions(-) diff --git a/DEBUG.16W b/DEBUG.16W index b95cd967..a171cd2a 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,210 +1,210 @@ -Seg:0 Size:9027 Owner:0x0 +Seg:0 Size:9033 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 -Seg:2434 Size:39 Owner:0x0 +Seg:243a Size:39 Owner:0x0 ++ -Seg:245b Size:256 Owner:0x1db4 +Seg:2461 Size:256 Owner:0x1db8 ++++ -Seg:255b Size:256 Owner:0x1ba6 +Seg:2561 Size:256 Owner:0x1baa ++++ -Seg:265b Size:256 Owner:0x1ba8 -++++ -Seg:275b Size:256 Owner:0x1baa +Seg:2661 Size:256 Owner:0x1bac +++++ -Seg:285b Size:256 Owner:0x1bac +Seg:2761 Size:256 Owner:0x1bae ++++ -Seg:295b Size:256 Owner:0x1bae +Seg:2861 Size:256 Owner:0x1bb0 ++++ -Seg:2a5b Size:256 Owner:0x1bb0 +Seg:2961 Size:256 Owner:0x1bb2 ++++ -Seg:2b5b Size:256 Owner:0x1bb2 +Seg:2a61 Size:256 Owner:0x1bb4 ++++ -Seg:2c5b Size:256 Owner:0x1bb4 +Seg:2b61 Size:256 Owner:0x1bb6 +++++ -Seg:2d5b Size:256 Owner:0x1bb6 +Seg:2c61 Size:256 Owner:0x1bb8 ++++ -Seg:2e5b Size:256 Owner:0x1bb8 +Seg:2d61 Size:256 Owner:0x1bba ++++ -Seg:2f5b Size:256 Owner:0x1bba +Seg:2e61 Size:256 Owner:0x1bbc ++++ -Seg:305b Size:256 Owner:0x1bbc +Seg:2f61 Size:256 Owner:0x1bbe ++++ -Seg:315b Size:256 Owner:0x1bbe +Seg:3061 Size:256 Owner:0x1bc0 +++++ -Seg:325b Size:256 Owner:0x1bc0 +Seg:3161 Size:256 Owner:0x1bc2 ++++ -Seg:335b Size:256 Owner:0x1bc2 +Seg:3261 Size:256 Owner:0x1bc4 ++++ -Seg:345b Size:256 Owner:0x1bc4 +Seg:3361 Size:256 Owner:0x1bc6 ++++ -Seg:355b Size:256 Owner:0x1bc6 +Seg:3461 Size:256 Owner:0x1bc8 ++++ -Seg:365b Size:256 Owner:0x1bc8 +Seg:3561 Size:256 Owner:0x1bca +++++ -Seg:375b Size:256 Owner:0x1bca +Seg:3661 Size:256 Owner:0x1bcc ++++ -Seg:385b Size:256 Owner:0x1bcc +Seg:3761 Size:256 Owner:0x1bce ++++ -Seg:395b Size:256 Owner:0x1bce +Seg:3861 Size:256 Owner:0x1bd0 ++++ -Seg:3a5b Size:256 Owner:0x1bd0 +Seg:3961 Size:256 Owner:0x1bd2 ++++ -Seg:3b5b Size:256 Owner:0x1bd2 +Seg:3a61 Size:256 Owner:0x1bd4 +++++ -Seg:3c5b Size:256 Owner:0x1bd4 +Seg:3b61 Size:256 Owner:0x1bd6 ++++ -Seg:3d5b Size:256 Owner:0x1bd6 +Seg:3c61 Size:256 Owner:0x1bd8 ++++ -Seg:3e5b Size:256 Owner:0x1bd8 +Seg:3d61 Size:256 Owner:0x1bda ++++ -Seg:3f5b Size:256 Owner:0x1bda +Seg:3e61 Size:256 Owner:0x1bdc ++++ -Seg:405b Size:256 Owner:0x1bdc +Seg:3f61 Size:256 Owner:0x1bde +++++ -Seg:415b Size:256 Owner:0x1bde +Seg:4061 Size:256 Owner:0x1be0 ++++ -Seg:425b Size:256 Owner:0x1be0 +Seg:4161 Size:256 Owner:0x1be2 ++++ -Seg:435b Size:256 Owner:0x1be2 +Seg:4261 Size:256 Owner:0x1be4 ++++ -Seg:445b Size:256 Owner:0x1be4 +Seg:4361 Size:256 Owner:0x1be6 ++++ -Seg:455b Size:256 Owner:0x1be6 +Seg:4461 Size:256 Owner:0x1be8 +++++ -Seg:465b Size:256 Owner:0x1be8 +Seg:4561 Size:256 Owner:0x1bea ++++ -Seg:475b Size:256 Owner:0x1bea +Seg:4661 Size:256 Owner:0x1bec ++++ -Seg:485b Size:256 Owner:0x1bec +Seg:4761 Size:256 Owner:0x1bee ++++ -Seg:495b Size:256 Owner:0x1bee +Seg:4861 Size:256 Owner:0x1bf0 ++++ -Seg:4a5b Size:256 Owner:0x1bf0 +Seg:4961 Size:256 Owner:0x1bf2 +++++ -Seg:4b5b Size:256 Owner:0x1bf2 +Seg:4a61 Size:256 Owner:0x1bf4 ++++ -Seg:4c5b Size:256 Owner:0x1bf4 +Seg:4b61 Size:256 Owner:0x1bf6 ++++ -Seg:4d5b Size:256 Owner:0x1bf6 +Seg:4c61 Size:256 Owner:0x1bf8 ++++ -Seg:4e5b Size:256 Owner:0x1bf8 +Seg:4d61 Size:256 Owner:0x1bfa ++++ -Seg:4f5b Size:256 Owner:0x1bfa +Seg:4e61 Size:256 Owner:0x1bfc +++++ -Seg:505b Size:256 Owner:0x1bfc +Seg:4f61 Size:256 Owner:0x1bfe ++++ -Seg:515b Size:256 Owner:0x1bfe +Seg:5061 Size:256 Owner:0x1c00 ++++ -Seg:525b Size:256 Owner:0x1c00 +Seg:5161 Size:256 Owner:0x1c02 ++++ -Seg:535b Size:256 Owner:0x1c02 +Seg:5261 Size:256 Owner:0x1c04 ++++ -Seg:545b Size:256 Owner:0x1c04 +Seg:5361 Size:256 Owner:0x1c06 +++++ -Seg:555b Size:256 Owner:0x1c06 +Seg:5461 Size:256 Owner:0x1c08 ++++ -Seg:565b Size:256 Owner:0x1c08 +Seg:5561 Size:256 Owner:0x1c0a ++++ -Seg:575b Size:256 Owner:0x1c0a +Seg:5661 Size:256 Owner:0x1c0c ++++ -Seg:585b Size:256 Owner:0x1c0c +Seg:5761 Size:256 Owner:0x1c0e ++++ -Seg:595b Size:256 Owner:0x1c0e +Seg:5861 Size:256 Owner:0x1c10 +++++ -Seg:5a5b Size:256 Owner:0x1c10 +Seg:5961 Size:256 Owner:0x1c12 ++++ -Seg:5b5b Size:256 Owner:0x1c12 +Seg:5a61 Size:256 Owner:0x1c14 ++++ -Seg:5c5b Size:256 Owner:0x1c14 +Seg:5b61 Size:256 Owner:0x1c16 ++++ -Seg:5d5b Size:256 Owner:0x1c16 +Seg:5c61 Size:256 Owner:0x1c18 ++++ -Seg:5e5b Size:256 Owner:0x1c18 +Seg:5d61 Size:256 Owner:0x1c1a +++++ -Seg:5f5b Size:256 Owner:0x1c1a +Seg:5e61 Size:256 Owner:0x1c1c ++++ -Seg:605b Size:256 Owner:0x1c1c +Seg:5f61 Size:256 Owner:0x1c1e ++++ -Seg:615b Size:256 Owner:0x1c1e +Seg:6061 Size:256 Owner:0x1c20 ++++ -Seg:625b Size:256 Owner:0x1c20 +Seg:6161 Size:256 Owner:0x1c22 ++++ -Seg:635b Size:256 Owner:0x1c22 +Seg:6261 Size:256 Owner:0x1c24 +++++ -Seg:645b Size:256 Owner:0x1c24 +Seg:6361 Size:256 Owner:0x1c26 ++++ -Seg:655b Size:256 Owner:0x1c26 +Seg:6461 Size:256 Owner:0x1c28 ++++ -Seg:665b Size:256 Owner:0x1c28 +Seg:6561 Size:256 Owner:0x1c2a ++++ -Seg:675b Size:256 Owner:0x1c2a +Seg:6661 Size:256 Owner:0x1c2c ++++ -Seg:685b Size:256 Owner:0x1c2c +Seg:6761 Size:256 Owner:0x1c2e +++++ -Seg:695b Size:256 Owner:0x1c2e +Seg:6861 Size:256 Owner:0x1c30 ++++ -Seg:6a5b Size:256 Owner:0x1c30 +Seg:6961 Size:256 Owner:0x1c32 ++++ -Seg:6b5b Size:256 Owner:0x1c32 +Seg:6a61 Size:256 Owner:0x1c34 ++++ -Seg:6c5b Size:256 Owner:0x1c34 +Seg:6b61 Size:256 Owner:0x1c36 ++++ -Seg:6d5b Size:256 Owner:0x1c36 +Seg:6c61 Size:256 Owner:0x1c38 +++++ -Seg:6e5b Size:256 Owner:0x1c38 +Seg:6d61 Size:256 Owner:0x1c3a ++++ -Seg:6f5b Size:256 Owner:0x1c3a +Seg:6e61 Size:256 Owner:0x1c3c ++++ -Seg:705b Size:256 Owner:0x1c3c +Seg:6f61 Size:256 Owner:0x1c3e ++++ -Seg:715b Size:256 Owner:0x1c3e +Seg:7061 Size:256 Owner:0x1c40 ++++ -Seg:725b Size:256 Owner:0x1c40 +Seg:7161 Size:256 Owner:0x1c42 +++++ -Seg:735b Size:256 Owner:0x1c42 +Seg:7261 Size:256 Owner:0x1c44 ++++ -Seg:745b Size:256 Owner:0x1c44 +Seg:7361 Size:256 Owner:0x1c46 ++++ -Seg:755b Size:256 Owner:0x1c46 +Seg:7461 Size:256 Owner:0x1c48 ++++ -Seg:765b Size:256 Owner:0x1c48 +Seg:7561 Size:256 Owner:0x1c4a ++++ -Seg:775b Size:256 Owner:0x1c4a +Seg:7661 Size:256 Owner:0x1c4c +++++ -Seg:785b Size:256 Owner:0x1c4c +Seg:7761 Size:256 Owner:0x1c4e ++++ -Seg:795b Size:256 Owner:0x1c4e +Seg:7861 Size:256 Owner:0x1c50 ++++ -Seg:7a5b Size:256 Owner:0x1c50 +Seg:7961 Size:256 Owner:0x1c52 ++++ -Seg:7b5b Size:256 Owner:0x1c52 +Seg:7a61 Size:256 Owner:0x1c54 ++++ -Seg:7c5b Size:256 Owner:0x1c54 +Seg:7b61 Size:256 Owner:0x1c56 +++++ -Seg:7d5b Size:256 Owner:0x1c56 +Seg:7c61 Size:256 Owner:0x1c58 ++++ -Seg:7e5b Size:256 Owner:0x1c58 +Seg:7d61 Size:256 Owner:0x1c5a ++++ -Seg:7f5b Size:256 Owner:0x1c5a +Seg:7e61 Size:256 Owner:0x1c5c ++++ -Seg:805b Size:256 Owner:0x1c5c +Seg:7f61 Size:256 Owner:0x1c5e ++++ -Seg:815b Size:256 Owner:0x1c5e +Seg:8061 Size:256 Owner:0x1c60 +++++ -Seg:825b Size:256 Owner:0x1c60 +Seg:8161 Size:256 Owner:0x1c62 ++++ -Seg:835b Size:256 Owner:0x1c62 +Seg:8261 Size:256 Owner:0x1c64 ++++ -Seg:845b Size:256 Owner:0x1c64 +Seg:8361 Size:256 Owner:0x1c66 ++++ -Seg:855b Size:256 Owner:0x1c66 +Seg:8461 Size:256 Owner:0x1c68 ++++ -Seg:865b Size:256 Owner:0x1c68 +Seg:8561 Size:256 Owner:0x1c6a +++++ -Seg:875b Size:256 Owner:0x1c6a +Seg:8661 Size:256 Owner:0x1c6c ++++ -Seg:885b Size:256 Owner:0x1c6c +Seg:8761 Size:256 Owner:0x1c6e ++++ -Seg:895b Size:273 Owner:0x1b78 -++++ -Seg:9d9a Size:25189 Owner:0x0 +Seg:8861 Size:256 Owner:0x1c70 +++++ +Seg:8961 Size:273 Owner:0x1b7c ++++++ +Seg:9da0 Size:25183 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W index 34017833..eae0553f 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,35 +1,35 @@ == default == - USED block at 24560016 of size 26 - USED block at 24560030 of size 26 - FREE block at 2456004a of size 38914 - USED block at 2456984c of size 136 - USED block at 245698d4 of size 20 - FREE block at 245698e8 of size 7972 + USED block at 245c0016 of size 26 + USED block at 245c0030 of size 26 + FREE block at 245c004a of size 38914 + USED block at 245c984c of size 136 + USED block at 245c98d4 of size 20 + FREE block at 245c98e8 of size 7972 OK - end of heap == near == - USED block at 1455ece6 of size 12 - USED block at 1455ecf2 of size 332 - USED block at 1455ee3e of size 52 - USED block at 1455ee72 of size 20 - USED block at 1455ee86 of size 20 - USED block at 1455ee9a of size 20 - USED block at 1455eeae of size 20 - USED block at 1455eec2 of size 20 - USED block at 1455eed6 of size 4390 + USED block at 145bece6 of size 12 + USED block at 145becf2 of size 332 + USED block at 145bee3e of size 52 + USED block at 145bee72 of size 20 + USED block at 145bee86 of size 20 + USED block at 145bee9a of size 20 + USED block at 145beeae of size 20 + USED block at 145beec2 of size 20 + USED block at 145beed6 of size 4390 OK - end of heap == far == - USED block at 24560016 of size 26 - USED block at 24560030 of size 26 - USED block at 2456004a of size 38914 - USED block at 2456984c of size 136 - USED block at 245698d4 of size 20 - USED block at 245698e8 of size 7972 + USED block at 245c0016 of size 26 + USED block at 245c0030 of size 26 + USED block at 245c004a of size 38914 + USED block at 245c984c of size 136 + USED block at 245c98d4 of size 20 + USED block at 245c98e8 of size 7972 OK - end of heap Memory Type Total Used Free diff --git a/MMDUMP.16W b/MMDUMP.16W index 58be92ad3f58bfffafe267b54965e950d6186fcc..f86357eab403a06dd16af23616592c7a1b55be79 100755 GIT binary patch literal 2550 zcmZ|RJxWAD5QR}=!N487a0~|ee?)K(Zed<^_ZnQjlL!W$_~TNXtkQQ%Wq#!I7RTlK z`gVLCz2yAzoPNXoeq6qu{tJ)A|6w7VNuek-g`x1SAjc`kDM!c=a)cZqN5~O!gd8Eq zlw-;<<(P6zIi?&_jw#2IW681PSaK{mmK;ltCC8Ry%dzFya%?%a99xbJM+#BIl3HOjxNWLW5_Y&7;+3bh8#nVA;%4l Lc|ML`|NL-2MF$6l literal 2550 zcmZ|RJxWAD5QR}=!N487a0~|eUlH7cTbNhfy#|->B!a=5_~TNXtkO?PWq#)K{o}Y? zU*C?eqnFfQp3`5rjpOqD^eEgHkHbwN6c)mn6pBJqkmHo&l;f1+lq2K_IYN$*BjgA< zLXMDQ$}#1ba!fg<98-=d$CP8qvE*2CEIF1OOO7SSl4HxU<=Ap;Ikp^IjxEQABN7~u z;D`iABse0$5ebe+a723^|4zLyiH* LJnzS^|9-e%GV=(v diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 44c6aac1..a6b43dfb 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -1251,6 +1251,48 @@ IN_UserInput(dword delay,boolean clear) return(false); } +//=========================================================================== + +/* +=================== += += IN_MouseButtons += +=================== +*/ + +byte IN_MouseButtons (void) +{ + union REGS CPURegs; + if (inpu.MousePresent) + { + Mouse(MButtons); + return CPURegs.x.bx; + } + else + return 0; +} + + +/* +=================== += += IN_JoyButtons += +=================== +*/ + +byte IN_JoyButtons (void) +{ + byte joybits; + + joybits = inp(0x201); // Get all the joystick buttons + joybits >>= 4; // only the high bits are useful + joybits ^= 15; // return with 1=pressed + + return joybits; +} + boolean IN_KeyDown(byte code) { #ifdef __DEBUG_InputMgr__ -- 2.39.5