From: sparky4 Date: Tue, 27 Jun 2017 20:31:10 +0000 (-0500) Subject: reverted compleately because i need to dissscuss this with the other devs of p16 X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=4b957f5e39b063de7e50121ce333b84413407820;p=16.git reverted compleately because i need to dissscuss this with the other devs of p16 --- diff --git a/DEBUG.16W b/DEBUG.16W index 96a1d638..7ef64269 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,209 +1,209 @@ -Seg:0 Size:7869 Owner:0x0 -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Seg:1ebd Size:256 Owner:0x5ddc +Seg:0 Size:8025 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Seg:1f59 Size:256 Owner:0x5ddc 0 -Seg:1fbd Size:256 Owner:0x1c12 +Seg:2059 Size:256 Owner:0x1c12 0 -Seg:20bd Size:256 Owner:0x1c14 +Seg:2159 Size:256 Owner:0x1c14 0 -Seg:21ed Size:76 Owner:0x0 +Seg:2289 Size:76 Owner:0x0 0 -Seg:2239 Size:256 Owner:0x1c16 +Seg:22d5 Size:256 Owner:0x1c16 0 -Seg:2339 Size:256 Owner:0x1c18 +Seg:23d5 Size:256 Owner:0x1c18 0 -Seg:2439 Size:256 Owner:0x1c1a +Seg:24d5 Size:256 Owner:0x1c1a 0 -Seg:2539 Size:256 Owner:0x1c1c +Seg:25d5 Size:256 Owner:0x1c1c 0 -Seg:2639 Size:256 Owner:0x1c1e +Seg:26d5 Size:256 Owner:0x1c1e 0 -Seg:2739 Size:256 Owner:0x1c20 +Seg:27d5 Size:256 Owner:0x1c20 0 -Seg:2839 Size:256 Owner:0x1c22 +Seg:28d5 Size:256 Owner:0x1c22 0 -Seg:2939 Size:256 Owner:0x1c24 +Seg:29d5 Size:256 Owner:0x1c24 0 -Seg:2a39 Size:256 Owner:0x1c26 +Seg:2ad5 Size:256 Owner:0x1c26 0 -Seg:2b39 Size:256 Owner:0x1c28 +Seg:2bd5 Size:256 Owner:0x1c28 0 -Seg:2c39 Size:256 Owner:0x1c2a +Seg:2cd5 Size:256 Owner:0x1c2a 0 -Seg:2d39 Size:256 Owner:0x1c2c +Seg:2dd5 Size:256 Owner:0x1c2c 0 -Seg:2e39 Size:256 Owner:0x1c2e +Seg:2ed5 Size:256 Owner:0x1c2e 0 -Seg:2f39 Size:256 Owner:0x1c30 +Seg:2fd5 Size:256 Owner:0x1c30 0 -Seg:3039 Size:256 Owner:0x1c32 +Seg:30d5 Size:256 Owner:0x1c32 0 -Seg:3139 Size:256 Owner:0x1c34 +Seg:31d5 Size:256 Owner:0x1c34 0 -Seg:3239 Size:256 Owner:0x1c36 +Seg:32d5 Size:256 Owner:0x1c36 0 -Seg:3339 Size:256 Owner:0x1c38 +Seg:33d5 Size:256 Owner:0x1c38 0 -Seg:3439 Size:256 Owner:0x1c3a +Seg:34d5 Size:256 Owner:0x1c3a 0 -Seg:3539 Size:256 Owner:0x1c3c +Seg:35d5 Size:256 Owner:0x1c3c 0 -Seg:3639 Size:256 Owner:0x1c3e +Seg:36d5 Size:256 Owner:0x1c3e 0 -Seg:3739 Size:256 Owner:0x1c40 +Seg:37d5 Size:256 Owner:0x1c40 0 -Seg:3839 Size:256 Owner:0x1c42 +Seg:38d5 Size:256 Owner:0x1c42 0 -Seg:3939 Size:256 Owner:0x1c44 +Seg:39d5 Size:256 Owner:0x1c44 0 -Seg:3a39 Size:256 Owner:0x1c46 +Seg:3ad5 Size:256 Owner:0x1c46 0 -Seg:3b39 Size:256 Owner:0x1c48 +Seg:3bd5 Size:256 Owner:0x1c48 0 -Seg:3c39 Size:256 Owner:0x1c4a +Seg:3cd5 Size:256 Owner:0x1c4a 0 -Seg:3d39 Size:256 Owner:0x1c4c +Seg:3dd5 Size:256 Owner:0x1c4c 0 -Seg:3e39 Size:256 Owner:0x1c4e +Seg:3ed5 Size:256 Owner:0x1c4e 0 -Seg:3f39 Size:256 Owner:0x1c50 +Seg:3fd5 Size:256 Owner:0x1c50 0 -Seg:4039 Size:256 Owner:0x1c52 +Seg:40d5 Size:256 Owner:0x1c52 0 -Seg:4139 Size:256 Owner:0x1c54 +Seg:41d5 Size:256 Owner:0x1c54 0 -Seg:4239 Size:256 Owner:0x1c56 +Seg:42d5 Size:256 Owner:0x1c56 0 -Seg:4339 Size:256 Owner:0x1c58 +Seg:43d5 Size:256 Owner:0x1c58 0 -Seg:4439 Size:256 Owner:0x1c5a +Seg:44d5 Size:256 Owner:0x1c5a 0 -Seg:4539 Size:256 Owner:0x1c5c +Seg:45d5 Size:256 Owner:0x1c5c 0 -Seg:4639 Size:256 Owner:0x1c5e +Seg:46d5 Size:256 Owner:0x1c5e 0 -Seg:4739 Size:256 Owner:0x1c60 +Seg:47d5 Size:256 Owner:0x1c60 0 -Seg:4839 Size:256 Owner:0x1c62 +Seg:48d5 Size:256 Owner:0x1c62 0 -Seg:4939 Size:256 Owner:0x1c64 +Seg:49d5 Size:256 Owner:0x1c64 0 -Seg:4a39 Size:256 Owner:0x1c66 +Seg:4ad5 Size:256 Owner:0x1c66 0 -Seg:4b39 Size:256 Owner:0x1c68 +Seg:4bd5 Size:256 Owner:0x1c68 0 -Seg:4c39 Size:256 Owner:0x1c6a +Seg:4cd5 Size:256 Owner:0x1c6a 0 -Seg:4d39 Size:256 Owner:0x1c6c +Seg:4dd5 Size:256 Owner:0x1c6c 0 -Seg:4e39 Size:256 Owner:0x1c6e +Seg:4ed5 Size:256 Owner:0x1c6e 0 -Seg:4f39 Size:256 Owner:0x1c70 +Seg:4fd5 Size:256 Owner:0x1c70 0 -Seg:5039 Size:256 Owner:0x1c72 +Seg:50d5 Size:256 Owner:0x1c72 0 -Seg:5139 Size:256 Owner:0x1c74 +Seg:51d5 Size:256 Owner:0x1c74 0 -Seg:5239 Size:256 Owner:0x1c76 +Seg:52d5 Size:256 Owner:0x1c76 0 -Seg:5339 Size:256 Owner:0x1c78 +Seg:53d5 Size:256 Owner:0x1c78 0 -Seg:5439 Size:256 Owner:0x1c7a +Seg:54d5 Size:256 Owner:0x1c7a 0 -Seg:5539 Size:256 Owner:0x1c7c +Seg:55d5 Size:256 Owner:0x1c7c 0 -Seg:5639 Size:256 Owner:0x1c7e +Seg:56d5 Size:256 Owner:0x1c7e 0 -Seg:5739 Size:256 Owner:0x1c80 +Seg:57d5 Size:256 Owner:0x1c80 0 -Seg:5839 Size:256 Owner:0x1c82 +Seg:58d5 Size:256 Owner:0x1c82 0 -Seg:5939 Size:256 Owner:0x1c84 +Seg:59d5 Size:256 Owner:0x1c84 0 -Seg:5a39 Size:256 Owner:0x1c86 +Seg:5ad5 Size:256 Owner:0x1c86 0 -Seg:5b39 Size:256 Owner:0x1c88 +Seg:5bd5 Size:256 Owner:0x1c88 0 -Seg:5c39 Size:256 Owner:0x1c8a +Seg:5cd5 Size:256 Owner:0x1c8a 0 -Seg:5d39 Size:256 Owner:0x1c8c +Seg:5dd5 Size:256 Owner:0x1c8c 0 -Seg:5e39 Size:256 Owner:0x1c8e +Seg:5ed5 Size:256 Owner:0x1c8e 0 -Seg:5f39 Size:256 Owner:0x1c90 +Seg:5fd5 Size:256 Owner:0x1c90 0 -Seg:6039 Size:256 Owner:0x1c92 +Seg:60d5 Size:256 Owner:0x1c92 0 -Seg:6139 Size:256 Owner:0x1c94 +Seg:61d5 Size:256 Owner:0x1c94 0 -Seg:6239 Size:256 Owner:0x1c96 +Seg:62d5 Size:256 Owner:0x1c96 0 -Seg:6339 Size:256 Owner:0x1c98 +Seg:63d5 Size:256 Owner:0x1c98 0 -Seg:6439 Size:256 Owner:0x1c9a +Seg:64d5 Size:256 Owner:0x1c9a 0 -Seg:6539 Size:256 Owner:0x1c9c +Seg:65d5 Size:256 Owner:0x1c9c 0 -Seg:6639 Size:256 Owner:0x1c9e +Seg:66d5 Size:256 Owner:0x1c9e 0 -Seg:6739 Size:256 Owner:0x1ca0 +Seg:67d5 Size:256 Owner:0x1ca0 0 -Seg:6839 Size:256 Owner:0x1ca2 +Seg:68d5 Size:256 Owner:0x1ca2 0 -Seg:6939 Size:256 Owner:0x1ca4 +Seg:69d5 Size:256 Owner:0x1ca4 0 -Seg:6a39 Size:256 Owner:0x1ca6 +Seg:6ad5 Size:256 Owner:0x1ca6 0 -Seg:6b39 Size:256 Owner:0x1ca8 +Seg:6bd5 Size:256 Owner:0x1ca8 0 -Seg:6c39 Size:256 Owner:0x1caa +Seg:6cd5 Size:256 Owner:0x1caa 0 -Seg:6d39 Size:256 Owner:0x1cac +Seg:6dd5 Size:256 Owner:0x1cac 0 -Seg:6e39 Size:256 Owner:0x1cae +Seg:6ed5 Size:256 Owner:0x1cae 0 -Seg:6f39 Size:256 Owner:0x1cb0 +Seg:6fd5 Size:256 Owner:0x1cb0 0 -Seg:7039 Size:256 Owner:0x1cb2 +Seg:70d5 Size:256 Owner:0x1cb2 0 -Seg:7139 Size:256 Owner:0x1cb4 +Seg:71d5 Size:256 Owner:0x1cb4 0 -Seg:7239 Size:256 Owner:0x1cb6 +Seg:72d5 Size:256 Owner:0x1cb6 0 -Seg:7339 Size:256 Owner:0x1cb8 +Seg:73d5 Size:256 Owner:0x1cb8 0 -Seg:7439 Size:256 Owner:0x1cba +Seg:74d5 Size:256 Owner:0x1cba 0 -Seg:7539 Size:256 Owner:0x1cbc +Seg:75d5 Size:256 Owner:0x1cbc 0 -Seg:7639 Size:256 Owner:0x1cbe +Seg:76d5 Size:256 Owner:0x1cbe 0 -Seg:7739 Size:256 Owner:0x1cc0 +Seg:77d5 Size:256 Owner:0x1cc0 0 -Seg:7839 Size:256 Owner:0x1cc2 +Seg:78d5 Size:256 Owner:0x1cc2 0 -Seg:7939 Size:256 Owner:0x1cc4 +Seg:79d5 Size:256 Owner:0x1cc4 0 -Seg:7a39 Size:256 Owner:0x1cc6 +Seg:7ad5 Size:256 Owner:0x1cc6 0 -Seg:7b39 Size:256 Owner:0x1cc8 +Seg:7bd5 Size:256 Owner:0x1cc8 0 -Seg:7c39 Size:256 Owner:0x1cca +Seg:7cd5 Size:256 Owner:0x1cca 0 -Seg:7d39 Size:256 Owner:0x1ccc +Seg:7dd5 Size:256 Owner:0x1ccc 0 -Seg:7e39 Size:256 Owner:0x1cce +Seg:7ed5 Size:256 Owner:0x1cce 0 -Seg:7f39 Size:256 Owner:0x1cd0 +Seg:7fd5 Size:256 Owner:0x1cd0 0 -Seg:8039 Size:256 Owner:0x1cd2 +Seg:80d5 Size:256 Owner:0x1cd2 0 -Seg:8139 Size:256 Owner:0x1cd4 +Seg:81d5 Size:256 Owner:0x1cd4 0 -Seg:8239 Size:256 Owner:0x1cd6 +Seg:82d5 Size:256 Owner:0x1cd6 0 -Seg:8339 Size:256 Owner:0x1cd8 +Seg:83d5 Size:256 Owner:0x1cd8 0 -Seg:8439 Size:273 Owner:0x5ddc +Seg:84d5 Size:273 Owner:0x5ddc 00000000000000000000000000000000000000000000000000000000000000000000000000000000 -Seg:9e24 Size:25051 Owner:0x0 +Seg:9ec1 Size:24894 Owner:0x0  \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W index d03bd8bc..35aa4f0d 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,51 +1,55 @@ == near == - USED block at 1d37:da06 of size 12 - USED block at 1d37:da12 of size 320 - USED block at 1d37:db52 of size 52 - USED block at 1d37:db86 of size 20 - USED block at 1d37:db9a of size 20 - USED block at 1d37:dbae of size 20 - USED block at 1d37:dbc2 of size 20 - USED block at 1d37:dbd6 of size 20 - FREE block at 1d37:dbea of size 9234 + USED block at 1e27:da06 of size 12 + USED block at 1e27:da12 of size 320 + USED block at 1e27:db52 of size 52 + USED block at 1e27:db86 of size 20 + USED block at 1e27:db9a of size 20 + USED block at 1e27:dbae of size 20 + USED block at 1e27:dbc2 of size 20 + USED block at 1e27:dbd6 of size 20 + FREE block at 1e27:dbea of size 9234 OK - end of heap == far == - USED block at 2d38:0016 of size 8002 - USED block at 2d38:1f58 of size 20 - USED block at 2d38:1f6c of size 66 - USED block at 2d38:1fae of size 50 - USED block at 2d38:1fe0 of size 50 - USED block at 2d38:2012 of size 50 - USED block at 2d38:2044 of size 50 - USED block at 2d38:2076 of size 50 - USED block at 2d38:20a8 of size 50 - USED block at 2d38:20da of size 50 - USED block at 2d38:210c of size 50 - USED block at 2d38:213e of size 50 - USED block at 2d38:2170 of size 50 - USED block at 2d38:21a2 of size 50 - USED block at 2d38:21d4 of size 50 - FREE block at 2d38:2206 of size 29552 - USED block at 2d38:9576 of size 1202 - USED block at 2d38:9a28 of size 1202 - USED block at 2d38:9eda of size 1202 - USED block at 2d38:a38c of size 136 - USED block at 2d38:a414 of size 22 - FREE block at 2d38:a42a of size 8202 - FREE block at 2d38:c434 of size 59406 + USED block at 2e28:0016 of size 65342 + USED block at 2e28:ff54 of size 20 + USED block at 2e28:ff68 of size 136 + FREE block at 2e28:fff0 of size 12 + USED block at 3e29:0016 of size 66 + USED block at 3e29:0058 of size 50 + USED block at 3e29:008a of size 50 + USED block at 3e29:00bc of size 50 + USED block at 3e29:00ee of size 50 + USED block at 3e29:0120 of size 50 + USED block at 3e29:0152 of size 50 + USED block at 3e29:0184 of size 50 + USED block at 3e29:01b6 of size 50 + USED block at 3e29:01e8 of size 50 + USED block at 3e29:021a of size 50 + USED block at 3e29:024c of size 50 + USED block at 3e29:027e of size 50 + FREE block at 3e29:02b0 of size 29552 + USED block at 3e29:7620 of size 1202 + USED block at 3e29:7ad2 of size 1202 + USED block at 3e29:7f84 of size 1202 + USED block at 3e29:8436 of size 22 + FREE block at 3e29:844c of size 8202 + FREE block at 3e29:a456 of size 3148 + FREE block at 3e29:b0a2 of size 0 ERROR - bad node in heap Memory Type Total Used Free ---------------- -------- -------- -------- Near 9718 484 9234 -Far 44076 12452 31624 +Far 45170 4256 40914 ---------------- -------- -------- -------- HC_coreleft = 9232 -HC_farcoreleft = 462576 +HC_farcoreleft = 396888 +HC_GetNearFreeSize = 9234 +HC_GetFarFreeSize = 40914 coreleft = 9232 -farcoreleft = 462576 -stackavail = 23306 +farcoreleft = 396888 +stackavail = 23262 diff --git a/INPUTEST.16W b/INPUTEST.16W deleted file mode 100755 index e69de29b..00000000 diff --git a/ps.exe b/ps.exe index 670342e2..27626767 100755 Binary files a/ps.exe and b/ps.exe differ diff --git a/src/exmmtest.h b/src/exmmtest.h index 4fb8db7d..3666dfd1 100755 --- a/src/exmmtest.h +++ b/src/exmmtest.h @@ -43,7 +43,7 @@ #define FILEREAD //#define EXMMVERBOSE //#define BUFFDUMPPAUSE -#define EXMMVERBOSE__ +//#define EXMMVERBOSE__ // #define PRINTBBDUMP #define BUFFDUMP diff --git a/src/lib/16_hc.c b/src/lib/16_hc.c index 8a75121b..3c73c6e0 100755 --- a/src/lib/16_hc.c +++ b/src/lib/16_hc.c @@ -52,7 +52,7 @@ long HC_Newfarcoreleft() #endif //from: https://stackoverflow.com/questions/14386856/c-check-available-ram -void __near* HC_LargestFreeBlock(size_t __far* Size) +void __near* HC_LargestFreeBlock(size_t* Size) { size_t s0, s1; void __near* p; @@ -117,7 +117,7 @@ size_t HC_coreleft(void) } //far version of above -void __far* HC_LargestFarFreeBlock(dword __far* Size) +void __far* HC_LargestFarFreeBlock(dword* Size) { dword s0, s1; void __far* p; @@ -340,14 +340,14 @@ size_t HC_GetFreeSize(void) } */ -void HCL_HeapWalking (struct _heapinfo __far*h_info, hc_use_t __far*hu, unsigned nearfarswitch) +void HCL_HeapWalking (struct _heapinfo *h_info, hc_use_t *hu, unsigned nearfarswitch) { hu->h_free=0; hu->h_total=0; hu->h_used=0; h_info->_pentry = NULL; for(;;) { - if(nearfarswitch==0) hu->heap_status = _nheapwalk( (struct _heapinfo *)h_info ); - else if(nearfarswitch==1) hu->heap_status = _fheapwalk( (struct _heapinfo *)h_info ); + if(nearfarswitch==0) hu->heap_status = _nheapwalk( h_info ); + else if(nearfarswitch==1) hu->heap_status = _fheapwalk( h_info ); if( hu->heap_status != _HEAPOK ) break; if((h_info->_useflag == _USEDENTRY ? "USED" : "FREE")=="FREE") hu->h_free += h_info->_size; if((h_info->_useflag == _USEDENTRY ? "USED" : "FREE")=="USED") hu->h_used += h_info->_size; @@ -438,7 +438,7 @@ void HC_heapdump(global_game_variables_t *gvar) nh_info._pentry = NULL; nh_free=0; nh_total=0; nh_used=0; for(;;) { - heap_status = _nheapwalk( (struct _heapinfo *)&nh_info ); + heap_status = _nheapwalk( &nh_info ); if( heap_status != _HEAPOK ) break; strcpy(scratch," "); strcat(scratch,(nh_info._useflag == _USEDENTRY ? "USED" : "FREE")); strcat(scratch," block at "); sprintf(str, "%Fp", nh_info._pentry); //ultoa((dword)nh_info._pentry,str,16); @@ -459,7 +459,7 @@ nh_info._pentry, nh_info._size );*/ fh_info._pentry = NULL; fh_free=0; fh_total=0; fh_used=0; for(;;) { - heap_status = _fheapwalk( (struct _heapinfo *)&fh_info ); + heap_status = _fheapwalk( &fh_info ); if( heap_status != _HEAPOK ) break; strcpy(scratch," "); strcat(scratch,(fh_info._useflag == _USEDENTRY ? "USED" : "FREE")); strcat(scratch," block at "); sprintf(str, "%Fp", fh_info._pentry); //ultoa((dword)fh_info._pentry,str,16); @@ -549,15 +549,11 @@ dword farcoreleft() // return 0x90000UL-16UL; // #endif -#if !defined(__LARGE__) && !defined(__COMPACT__) && !defined(__HUGE__) -//---- - return 0x90000UL+16UL; +//---- return 0x90000UL+16UL; //---- return 589824UL+16UL; -#else //++++ return HC_farcoreleft(); //stack overflows return HC_GetFarFreeSize(); -#endif } dword coreleft() diff --git a/src/lib/16_hc.h b/src/lib/16_hc.h index 05774e8c..36b95841 100755 --- a/src/lib/16_hc.h +++ b/src/lib/16_hc.h @@ -50,9 +50,9 @@ typedef struct heapusage #endif //long HC_Newfarcoreleft(); -void __near* HC_LargestFreeBlock(size_t __far* Size); +void __near* HC_LargestFreeBlock(size_t* Size); size_t HC_coreleft(void); -void far* HC_LargestFarFreeBlock(dword __far* Size); +void far* HC_LargestFarFreeBlock(dword* Size); unsigned long HC_farcoreleft(void); //size_t HC_GetFreeSize(void); unsigned long HC_GetFarFreeSize(void); diff --git a/src/lib/16_head.h b/src/lib/16_head.h index 0d86cd24..1c95d512 100755 --- a/src/lib/16_head.h +++ b/src/lib/16_head.h @@ -162,6 +162,7 @@ extern int profilehandle,debughandle; //make it into game global #define nil ((void *)0) #ifdef __WATCOMC__ +//#define _FCORELEFT 0x90000UL+16UL /*static union REGS CPURegs; #define _AX CPURegs.x.ax diff --git a/src/lib/16_in.c b/src/lib/16_in.c index eb71b1ae..c543caf9 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -267,7 +267,7 @@ void INL_Mouse(int x) // /////////////////////////////////////////////////////////////////////////// static void -INL_GetMouseDelta(int __far*x,int __far*y) +INL_GetMouseDelta(int *x,int *y) { union REGS CPURegs; Mouse(MDelta); @@ -298,7 +298,7 @@ INL_GetMouseButtons(void) // /////////////////////////////////////////////////////////////////////////// void -IN_GetJoyAbs(word joy,word __far*xp,word __far*yp) +IN_GetJoyAbs(word joy,word *xp,word *yp) { byte xb,yb, xs,ys; @@ -387,7 +387,7 @@ done: // joystick (from +/-127) // /////////////////////////////////////////////////////////////////////////// -void INL_GetJoyDelta(word joy,int __far*dx,int __far*dy/*,boolean adaptive*/, global_game_variables_t *gvar) +void INL_GetJoyDelta(word joy,int *dx,int *dy/*,boolean adaptive*/, global_game_variables_t *gvar) { word x,y; word TimeCount = *clockw; diff --git a/src/lib/16_in.h b/src/lib/16_in.h index 01d7ec1c..c2b4b622 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -224,7 +224,7 @@ extern void IN_Startup(global_game_variables_t *gvar),IN_Shutdown(global_game_v IN_ReadCursor(CursorInfo *, global_game_variables_t *gvar), IN_ReadControl(player_t *player, global_game_variables_t *gvar), IN_SetControlType(player_t *player,ControlType type), - IN_GetJoyAbs(word joy,word __far*xp,word __far*yp), + IN_GetJoyAbs(word joy,word *xp,word *yp), IN_SetupJoy(word joy,word minx,word maxx, word miny,word maxy, global_game_variables_t *gvar), #if DEMO0 @@ -241,7 +241,7 @@ extern byte *IN_GetScanName(ScanCode); byte IN_MouseButtons (global_game_variables_t *gvar); byte IN_JoyButtons (void); -void INL_GetJoyDelta(word joy,int __far*dx,int __far*dy/*,boolean adaptive*/, global_game_variables_t *gvar); +void INL_GetJoyDelta(word joy,int *dx,int *dy/*,boolean adaptive*/, global_game_variables_t *gvar); void IN_StartAck(global_game_variables_t *gvar); boolean IN_CheckAck (global_game_variables_t *gvar); boolean IN_IsUserInput(global_game_variables_t *gvar); diff --git a/src/lib/16_map.c b/src/lib/16_map.c index 17999219..4582bc68 100755 --- a/src/lib/16_map.c +++ b/src/lib/16_map.c @@ -180,7 +180,7 @@ int newloadmap(char *mn, map_t *map) { int status; /* Prepare parser */ - jsmn_init((jsmn_parser *)&p); + jsmn_init(&p); file_s = filesize(fh); js = malloc(file_s);//TODO: USE MM_ CA_ AND PM_ @@ -195,11 +195,11 @@ int newloadmap(char *mn, map_t *map) { fclose(fh); return 1; } - tokcount = jsmn_parse((jsmn_parser *)&p, js, file_s, NULL, 0); + tokcount = jsmn_parse(&p, js, file_s, NULL, 0); tok = malloc(tokcount*sizeof(jsmntok_t));//TODO: USE MM_ CA_ AND PM_ printf("Allocated %d tokens", tokcount); - jsmn_init((jsmn_parser *)&p); - if((status = jsmn_parse((jsmn_parser *)&p, js, file_s, tok, tokcount)) < 0) + jsmn_init(&p); + if((status = jsmn_parse(&p, js, file_s, tok, tokcount)) < 0) { printf("Error: %d\n", status); return status; @@ -228,15 +228,15 @@ int CA_loadmap(char *mn, map_t *map, global_game_variables_t *gvar) int status; /* Prepare parser */ - jsmn_init((jsmn_parser *)&p); + jsmn_init(&p); file_s = filesize(fh); CA_LoadFile(mn, MEMPTRCONV MAPSEGINLM, gvar); - tokcount = jsmn_parse((jsmn_parser *)&p, (char const *)MAPSEGINLM, file_s, NULL, 0); + tokcount = jsmn_parse(&p, (char const *)MAPSEGINLM, file_s, NULL, 0); tok = malloc(tokcount*sizeof(jsmntok_t));//TODO: USE MM_ CA_ AND PM_ // printf("Allocated %d tokens", tokcount); - jsmn_init((jsmn_parser *)&p); - if((status = jsmn_parse((jsmn_parser *)&p, (char const *)MAPSEGINLM, file_s, tok, tokcount)) < 0) + jsmn_init(&p); + if((status = jsmn_parse(&p, (char const *)MAPSEGINLM, file_s, tok, tokcount)) < 0) { printf("Error: %d\n", status); return status; diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 34e6ccb1..544d280a 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -1531,7 +1531,7 @@ void MM_ShowMemory (global_game_variables_t *gvar) } #ifdef MMSMSCANINFO -void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t __far*scaninfo, global_game_variables_t *gvar) +void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar) { byte scratch1[4]; unsigned maxq = q; @@ -1631,7 +1631,8 @@ void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword printf("%s", AARESET); printf("\n"); } -//0000 fprintf(stdout, "q=%u maxq=%u\n", q, maxq); +//0000printf("%s", AABLACK); fprintf(stdout, "q=%u maxq=%u\n", q, maxq); printf("%s", AARESET); +fprintf(stdout, ""); //this is a HAX to make it decrement and increment properly when it is at 0 and qmax while (!(scancode = gvar->in.inst->LastScan)){} IN_ClearKey(scancode); diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index 5b7ea51a..8f499423 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -201,7 +201,7 @@ void MM_SetPurge (memptr *baseptr, int purge, global_game_variables_t *gvar); void MM_SetLock (memptr *baseptr, boolean locked, global_game_variables_t *gvar); void MM_SortMem (global_game_variables_t *gvar); void MM_ShowMemory (global_game_variables_t *gvar); -void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t __far*scaninfo, global_game_variables_t *gvar); +void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar); void MM_DumpData (global_game_variables_t *gvar); dword MM_UnusedMemory (global_game_variables_t *gvar); dword MM_TotalFree (global_game_variables_t *gvar); diff --git a/src/lib/nyan/kitten.c b/src/lib/nyan/kitten.c index d72ab283..2e6e87ba 100755 --- a/src/lib/nyan/kitten.c +++ b/src/lib/nyan/kitten.c @@ -386,7 +386,7 @@ kittenclose (void) * Returns a pointer to input string. */ -int mystrtoul(char __far*src, int base, int size, int __far*error) +int mystrtoul(char *src, int base, int size, int *error) { int ret = 0;