From 40f6a462ab3580c79bc91e86da49fa5ed37a853c Mon Sep 17 00:00:00 2001 From: sparky4 Date: Tue, 27 Jun 2017 14:59:06 -0500 Subject: [PATCH] EXPERIMENTAL STILL --- DEBUG.16W | 218 +++++++++++++++++++++--------------------- HEAP.16W | 56 ++++++++--- MMDUMP.16W | Bin 1955 -> 2288 bytes makefile | 2 +- src/exmmtest.h | 2 +- src/lib/16_hc.c | 14 +-- src/lib/16_hc.h | 4 +- src/lib/16_in.c | 6 +- src/lib/16_in.h | 4 +- src/lib/16_map.c | 16 ++-- src/lib/16_mm.c | 2 +- src/lib/16_mm.h | 2 +- src/lib/16_spri.c | 4 +- src/lib/nyan/kitten.c | 2 +- 14 files changed, 181 insertions(+), 151 deletions(-) diff --git a/DEBUG.16W b/DEBUG.16W index 4c87f9b6..96a1d638 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,211 +1,209 @@ -Seg:0 Size:9136 Owner:0x0 -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Seg:23b0 Size:256 Owner:0x6dd6 -000 -Seg:2541 Size:68 Owner:0x0 -0 -Seg:2585 Size:256 Owner:0x340e +Seg:0 Size:7869 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Seg:1ebd Size:256 Owner:0x5ddc +0 +Seg:1fbd Size:256 Owner:0x1c12 0 -Seg:2685 Size:256 Owner:0x3410 +Seg:20bd Size:256 Owner:0x1c14 0 -Seg:2785 Size:256 Owner:0x3412 +Seg:21ed Size:76 Owner:0x0 +0 +Seg:2239 Size:256 Owner:0x1c16 0 -Seg:2885 Size:256 Owner:0x3414 +Seg:2339 Size:256 Owner:0x1c18 0 -Seg:2985 Size:256 Owner:0x3416 +Seg:2439 Size:256 Owner:0x1c1a 0 -Seg:2a85 Size:256 Owner:0x3418 +Seg:2539 Size:256 Owner:0x1c1c 0 -Seg:2b85 Size:256 Owner:0x341a +Seg:2639 Size:256 Owner:0x1c1e 0 -Seg:2c85 Size:256 Owner:0x341c +Seg:2739 Size:256 Owner:0x1c20 0 -Seg:2d85 Size:256 Owner:0x341e +Seg:2839 Size:256 Owner:0x1c22 0 -Seg:2e85 Size:256 Owner:0x3420 +Seg:2939 Size:256 Owner:0x1c24 0 -Seg:2f85 Size:256 Owner:0x3422 +Seg:2a39 Size:256 Owner:0x1c26 0 -Seg:3085 Size:256 Owner:0x3424 +Seg:2b39 Size:256 Owner:0x1c28 0 -Seg:3185 Size:256 Owner:0x3426 +Seg:2c39 Size:256 Owner:0x1c2a 0 -Seg:3285 Size:256 Owner:0x3428 +Seg:2d39 Size:256 Owner:0x1c2c 0 -Seg:3385 Size:256 Owner:0x342a +Seg:2e39 Size:256 Owner:0x1c2e 0 -Seg:3485 Size:256 Owner:0x342c +Seg:2f39 Size:256 Owner:0x1c30 0 -Seg:3585 Size:256 Owner:0x342e +Seg:3039 Size:256 Owner:0x1c32 0 -Seg:3685 Size:256 Owner:0x3430 +Seg:3139 Size:256 Owner:0x1c34 0 -Seg:3785 Size:256 Owner:0x3432 +Seg:3239 Size:256 Owner:0x1c36 0 -Seg:3885 Size:256 Owner:0x3434 +Seg:3339 Size:256 Owner:0x1c38 0 -Seg:3985 Size:256 Owner:0x3436 +Seg:3439 Size:256 Owner:0x1c3a 0 -Seg:3a85 Size:256 Owner:0x3438 +Seg:3539 Size:256 Owner:0x1c3c 0 -Seg:3b85 Size:256 Owner:0x343a +Seg:3639 Size:256 Owner:0x1c3e 0 -Seg:3c85 Size:256 Owner:0x343c +Seg:3739 Size:256 Owner:0x1c40 0 -Seg:3d85 Size:256 Owner:0x343e +Seg:3839 Size:256 Owner:0x1c42 0 -Seg:3e85 Size:256 Owner:0x3440 +Seg:3939 Size:256 Owner:0x1c44 0 -Seg:3f85 Size:256 Owner:0x3442 +Seg:3a39 Size:256 Owner:0x1c46 0 -Seg:4085 Size:256 Owner:0x3444 +Seg:3b39 Size:256 Owner:0x1c48 0 -Seg:4185 Size:256 Owner:0x3446 +Seg:3c39 Size:256 Owner:0x1c4a 0 -Seg:4285 Size:256 Owner:0x3448 +Seg:3d39 Size:256 Owner:0x1c4c 0 -Seg:4385 Size:256 Owner:0x344a +Seg:3e39 Size:256 Owner:0x1c4e 0 -Seg:4485 Size:256 Owner:0x344c +Seg:3f39 Size:256 Owner:0x1c50 0 -Seg:4585 Size:256 Owner:0x344e +Seg:4039 Size:256 Owner:0x1c52 0 -Seg:4685 Size:256 Owner:0x3450 +Seg:4139 Size:256 Owner:0x1c54 0 -Seg:4785 Size:256 Owner:0x3452 +Seg:4239 Size:256 Owner:0x1c56 0 -Seg:4885 Size:256 Owner:0x3454 +Seg:4339 Size:256 Owner:0x1c58 0 -Seg:4985 Size:256 Owner:0x3456 +Seg:4439 Size:256 Owner:0x1c5a 0 -Seg:4a85 Size:256 Owner:0x3458 +Seg:4539 Size:256 Owner:0x1c5c 0 -Seg:4b85 Size:256 Owner:0x345a +Seg:4639 Size:256 Owner:0x1c5e 0 -Seg:4c85 Size:256 Owner:0x345c +Seg:4739 Size:256 Owner:0x1c60 0 -Seg:4d85 Size:256 Owner:0x345e +Seg:4839 Size:256 Owner:0x1c62 0 -Seg:4e85 Size:256 Owner:0x3460 +Seg:4939 Size:256 Owner:0x1c64 0 -Seg:4f85 Size:256 Owner:0x3462 +Seg:4a39 Size:256 Owner:0x1c66 0 -Seg:5085 Size:256 Owner:0x3464 +Seg:4b39 Size:256 Owner:0x1c68 0 -Seg:5185 Size:256 Owner:0x3466 +Seg:4c39 Size:256 Owner:0x1c6a 0 -Seg:5285 Size:256 Owner:0x3468 +Seg:4d39 Size:256 Owner:0x1c6c 0 -Seg:5385 Size:256 Owner:0x346a +Seg:4e39 Size:256 Owner:0x1c6e 0 -Seg:5485 Size:256 Owner:0x346c +Seg:4f39 Size:256 Owner:0x1c70 0 -Seg:5585 Size:256 Owner:0x346e +Seg:5039 Size:256 Owner:0x1c72 0 -Seg:5685 Size:256 Owner:0x3470 +Seg:5139 Size:256 Owner:0x1c74 0 -Seg:5785 Size:256 Owner:0x3472 +Seg:5239 Size:256 Owner:0x1c76 0 -Seg:5885 Size:256 Owner:0x3474 +Seg:5339 Size:256 Owner:0x1c78 0 -Seg:5985 Size:256 Owner:0x3476 +Seg:5439 Size:256 Owner:0x1c7a 0 -Seg:5a85 Size:256 Owner:0x3478 +Seg:5539 Size:256 Owner:0x1c7c 0 -Seg:5b85 Size:256 Owner:0x347a +Seg:5639 Size:256 Owner:0x1c7e 0 -Seg:5c85 Size:256 Owner:0x347c +Seg:5739 Size:256 Owner:0x1c80 0 -Seg:5d85 Size:256 Owner:0x347e +Seg:5839 Size:256 Owner:0x1c82 0 -Seg:5e85 Size:256 Owner:0x3480 +Seg:5939 Size:256 Owner:0x1c84 0 -Seg:5f85 Size:256 Owner:0x3482 +Seg:5a39 Size:256 Owner:0x1c86 0 -Seg:6085 Size:256 Owner:0x3484 +Seg:5b39 Size:256 Owner:0x1c88 0 -Seg:6185 Size:256 Owner:0x3486 +Seg:5c39 Size:256 Owner:0x1c8a 0 -Seg:6285 Size:256 Owner:0x3488 +Seg:5d39 Size:256 Owner:0x1c8c 0 -Seg:6385 Size:256 Owner:0x348a +Seg:5e39 Size:256 Owner:0x1c8e 0 -Seg:6485 Size:256 Owner:0x348c +Seg:5f39 Size:256 Owner:0x1c90 0 -Seg:6585 Size:256 Owner:0x348e +Seg:6039 Size:256 Owner:0x1c92 0 -Seg:6685 Size:256 Owner:0x3490 +Seg:6139 Size:256 Owner:0x1c94 0 -Seg:6785 Size:256 Owner:0x3492 +Seg:6239 Size:256 Owner:0x1c96 0 -Seg:6885 Size:256 Owner:0x3494 +Seg:6339 Size:256 Owner:0x1c98 0 -Seg:6985 Size:256 Owner:0x3496 +Seg:6439 Size:256 Owner:0x1c9a 0 -Seg:6a85 Size:256 Owner:0x3498 +Seg:6539 Size:256 Owner:0x1c9c 0 -Seg:6b85 Size:256 Owner:0x349a +Seg:6639 Size:256 Owner:0x1c9e 0 -Seg:6c85 Size:256 Owner:0x349c +Seg:6739 Size:256 Owner:0x1ca0 0 -Seg:6d85 Size:256 Owner:0x349e +Seg:6839 Size:256 Owner:0x1ca2 0 -Seg:6e85 Size:256 Owner:0x34a0 +Seg:6939 Size:256 Owner:0x1ca4 0 -Seg:6f85 Size:256 Owner:0x34a2 +Seg:6a39 Size:256 Owner:0x1ca6 0 -Seg:7085 Size:256 Owner:0x34a4 +Seg:6b39 Size:256 Owner:0x1ca8 0 -Seg:7185 Size:256 Owner:0x34a6 +Seg:6c39 Size:256 Owner:0x1caa 0 -Seg:7285 Size:256 Owner:0x34a8 +Seg:6d39 Size:256 Owner:0x1cac 0 -Seg:7385 Size:256 Owner:0x34aa +Seg:6e39 Size:256 Owner:0x1cae 0 -Seg:7485 Size:256 Owner:0x34ac +Seg:6f39 Size:256 Owner:0x1cb0 0 -Seg:7585 Size:256 Owner:0x34ae +Seg:7039 Size:256 Owner:0x1cb2 0 -Seg:7685 Size:256 Owner:0x34b0 +Seg:7139 Size:256 Owner:0x1cb4 0 -Seg:7785 Size:256 Owner:0x34b2 +Seg:7239 Size:256 Owner:0x1cb6 0 -Seg:7885 Size:256 Owner:0x34b4 +Seg:7339 Size:256 Owner:0x1cb8 0 -Seg:7985 Size:256 Owner:0x34b6 +Seg:7439 Size:256 Owner:0x1cba 0 -Seg:7a85 Size:256 Owner:0x34b8 +Seg:7539 Size:256 Owner:0x1cbc 0 -Seg:7b85 Size:256 Owner:0x34ba +Seg:7639 Size:256 Owner:0x1cbe 0 -Seg:7c85 Size:256 Owner:0x34bc +Seg:7739 Size:256 Owner:0x1cc0 0 -Seg:7d85 Size:256 Owner:0x34be +Seg:7839 Size:256 Owner:0x1cc2 0 -Seg:7e85 Size:256 Owner:0x34c0 +Seg:7939 Size:256 Owner:0x1cc4 0 -Seg:7f85 Size:256 Owner:0x34c2 +Seg:7a39 Size:256 Owner:0x1cc6 0 -Seg:8085 Size:256 Owner:0x34c4 +Seg:7b39 Size:256 Owner:0x1cc8 0 -Seg:8185 Size:256 Owner:0x34c6 +Seg:7c39 Size:256 Owner:0x1cca 0 -Seg:8285 Size:256 Owner:0x34c8 +Seg:7d39 Size:256 Owner:0x1ccc 0 -Seg:8385 Size:256 Owner:0x34ca +Seg:7e39 Size:256 Owner:0x1cce 0 -Seg:8485 Size:256 Owner:0x34cc +Seg:7f39 Size:256 Owner:0x1cd0 0 -Seg:8585 Size:256 Owner:0x34ce +Seg:8039 Size:256 Owner:0x1cd2 0 -Seg:8685 Size:256 Owner:0x34d0 +Seg:8139 Size:256 Owner:0x1cd4 0 -Seg:8785 Size:256 Owner:0x34d2 +Seg:8239 Size:256 Owner:0x1cd6 0 -Seg:8885 Size:256 Owner:0x34d4 +Seg:8339 Size:256 Owner:0x1cd8 0 -Seg:8985 Size:401 Owner:0xe0c6 -0 -Seg:8b16 Size:2 Owner:0x3376 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -Seg:b585 Size:19066 Owner:0x0 +Seg:8439 Size:273 Owner:0x5ddc +00000000000000000000000000000000000000000000000000000000000000000000000000000000 +Seg:9e24 Size:25051 Owner:0x0  \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W index 2c6ec035..d03bd8bc 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,19 +1,51 @@ == near == - USED block at 0f62:d436 of size 8 - USED block at 0f62:d43e of size 322 - USED block at 0f62:d580 of size 32 - USED block at 0f62:d5a0 of size 14 - USED block at 0f62:d5ae of size 16 - USED block at 0f62:d5be of size 14 - USED block at 0f62:d5cc of size 14 - USED block at 0f62:d5da of size 16 - USED block at 0f62:d5ea of size 136 - FREE block at 0f62:d672 of size 10634 + 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 OK - end of heap == far == - FREE block at 1f63:0016 of size 8166 -OK - end of heap + 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 +ERROR - bad node in heap + +Memory Type Total Used Free +---------------- -------- -------- -------- +Near 9718 484 9234 +Far 44076 12452 31624 +---------------- -------- -------- -------- +HC_coreleft = 9232 +HC_farcoreleft = 462576 +coreleft = 9232 +farcoreleft = 462576 +stackavail = 23306 diff --git a/MMDUMP.16W b/MMDUMP.16W index 0471f82c465944499463ca238e500c1ce4dcefbf..88de7f7c7b678e57833f2ab3c80bd27af99aded2 100755 GIT binary patch literal 2288 zcmZwJJ5B>J6hKiVIwbZmWhf$fqQv$fu?M!`@n->4Y=a%+NU1WXy@h>T`00h;5H9U= zO{FZS^UuffwS@P#@Th&i&ieXP$F(k}@0UaEs<*&;VV$=f&%H&~%sO9z6X?Cs8|jVo zMtUQ?k={seq&L!==uPw{dK0~g-b8PrH_@Bv&Gcq^GrgJKOmC())4S2T(Yw*R(Yw*R z(Yw*R(Oc*(^cH#xy@lTU)HwdPLT{mWr+26KK8=pI?ey;S?)2{T?(|lAE4`K8N^hmN z(p%}R^fr1My^Y>RZ=<)-+vsidc6vL#o!(Awr?=DF>Fx9mdI!CO-a+r6chEcN9q?X4 rfOl4SXN7lGcxQ!oR(NNHcUF2=dRKVkx=z{oX)lTEeO90U9^1-4vM$sD literal 1955 zcmZYAy=?+P5P;Dfi5>{;0O{EO4d}rw?C#M6<=Y&QdFdC7o<aQ!>4Vf6Qv8VOl0#L08ZfbOl{OSI`x71zk~B)D?9_T~Sxm z6?H{jNmtU9bR}I$SJIVqC0$up)|GW-U0GMwm33uZMOV>PbQN7iSJ72;6Z-b$uBNN$YVND)YPy=PrmO4fy1K5etLy5zx~{Hk=o-3)uAyt_8oGwA zp=;`zx~8tFYwDW1rmm@L=~}v$uBB_~TDq35rEAx<>)JnEW#3<}_w#-K+Q)WKkCe9C G`Sc6027N&Q diff --git a/makefile b/makefile index 3a187c25..384e0be0 100755 --- a/makefile +++ b/makefile @@ -64,7 +64,7 @@ DOSLIBMAKEALL=.\build.bat !endif TARGET_OS = dos -MEMORYMODE = m +MEMORYMODE = l BUILD_ROOT=$+$(%__CWD__)$- #EXMMTESTDIR=16$(DIRSEP)exmmtest$(DIRSEP) diff --git a/src/exmmtest.h b/src/exmmtest.h index 3666dfd1..4fb8db7d 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 c3ed5373..8a75121b 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* Size) +void __near* HC_LargestFreeBlock(size_t __far* 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* Size) +void __far* HC_LargestFarFreeBlock(dword __far* Size) { dword s0, s1; void __far* p; @@ -340,14 +340,14 @@ size_t HC_GetFreeSize(void) } */ -void HCL_HeapWalking (struct _heapinfo *h_info, hc_use_t *hu, unsigned nearfarswitch) +void HCL_HeapWalking (struct _heapinfo __far*h_info, hc_use_t __far*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( h_info ); - else if(nearfarswitch==1) hu->heap_status = _fheapwalk( h_info ); + if(nearfarswitch==0) hu->heap_status = _nheapwalk( (struct _heapinfo *)h_info ); + else if(nearfarswitch==1) hu->heap_status = _fheapwalk( (struct _heapinfo *)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( &nh_info ); + heap_status = _nheapwalk( (struct _heapinfo *)&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( &fh_info ); + heap_status = _fheapwalk( (struct _heapinfo *)&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); diff --git a/src/lib/16_hc.h b/src/lib/16_hc.h index 36b95841..05774e8c 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* Size); +void __near* HC_LargestFreeBlock(size_t __far* Size); size_t HC_coreleft(void); -void far* HC_LargestFarFreeBlock(dword* Size); +void far* HC_LargestFarFreeBlock(dword __far* Size); unsigned long HC_farcoreleft(void); //size_t HC_GetFreeSize(void); unsigned long HC_GetFarFreeSize(void); diff --git a/src/lib/16_in.c b/src/lib/16_in.c index c543caf9..eb71b1ae 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 *x,int *y) +INL_GetMouseDelta(int __far*x,int __far*y) { union REGS CPURegs; Mouse(MDelta); @@ -298,7 +298,7 @@ INL_GetMouseButtons(void) // /////////////////////////////////////////////////////////////////////////// void -IN_GetJoyAbs(word joy,word *xp,word *yp) +IN_GetJoyAbs(word joy,word __far*xp,word __far*yp) { byte xb,yb, xs,ys; @@ -387,7 +387,7 @@ done: // joystick (from +/-127) // /////////////////////////////////////////////////////////////////////////// -void INL_GetJoyDelta(word joy,int *dx,int *dy/*,boolean adaptive*/, global_game_variables_t *gvar) +void INL_GetJoyDelta(word joy,int __far*dx,int __far*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 c2b4b622..01d7ec1c 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 *xp,word *yp), + IN_GetJoyAbs(word joy,word __far*xp,word __far*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 *dx,int *dy/*,boolean adaptive*/, global_game_variables_t *gvar); +void INL_GetJoyDelta(word joy,int __far*dx,int __far*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 4582bc68..17999219 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(&p); + jsmn_init((jsmn_parser *)&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(&p, js, file_s, NULL, 0); + tokcount = jsmn_parse((jsmn_parser *)&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(&p); - if((status = jsmn_parse(&p, js, file_s, tok, tokcount)) < 0) + jsmn_init((jsmn_parser *)&p); + if((status = jsmn_parse((jsmn_parser *)&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(&p); + jsmn_init((jsmn_parser *)&p); file_s = filesize(fh); CA_LoadFile(mn, MEMPTRCONV MAPSEGINLM, gvar); - tokcount = jsmn_parse(&p, (char const *)MAPSEGINLM, file_s, NULL, 0); + tokcount = jsmn_parse((jsmn_parser *)&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(&p); - if((status = jsmn_parse(&p, (char const *)MAPSEGINLM, file_s, tok, tokcount)) < 0) + jsmn_init((jsmn_parser *)&p); + if((status = jsmn_parse((jsmn_parser *)&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 544d280a..a13060cd 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 *scaninfo, 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) { byte scratch1[4]; unsigned maxq = q; diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index 8f499423..5b7ea51a 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 *scaninfo, 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_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/16_spri.c b/src/lib/16_spri.c index 70ae0e38..82c83c50 100755 --- a/src/lib/16_spri.c +++ b/src/lib/16_spri.c @@ -440,9 +440,9 @@ void animate_spri(entity_t *enti, video_t *video) ( x-rx, y-ry, - (struct vrl1_vgax_header *)enti->spri.sprite_vrl_cont.vrl_header, + enti->spri.sprite_vrl_cont.vrl_header, enti->spri.sprite_vrl_cont.line_offsets, - (byte *)enti->spri.sprite_vrl_cont.buffer + sizeof(struct vrl1_vgax_header), + enti->spri.sprite_vrl_cont.buffer + sizeof(struct vrl1_vgax_header), enti->spri.sprite_vrl_cont.data_size ); #endif diff --git a/src/lib/nyan/kitten.c b/src/lib/nyan/kitten.c index 2e6e87ba..d72ab283 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 *src, int base, int size, int *error) +int mystrtoul(char __far*src, int base, int size, int __far*error) { int ret = 0; -- 2.39.2