From: sparky4 Date: Thu, 8 Sep 2016 15:42:05 +0000 (-0500) Subject: wwww yakuji wwww ca use to load maps w hmmm cachemap is hard to translate X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=0024fc033f62f0784cfeb40fbed8379372146825;p=16.git wwww yakuji wwww ca use to load maps w hmmm cachemap is hard to translate --- diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c index c85c3a7a..5934c5ae 100755 --- a/src/lib/16_ca.c +++ b/src/lib/16_ca.c @@ -1857,11 +1857,14 @@ void CA_CacheMap (global_game_variables_t *gvar) // // free up memory from last map // -// if (gvar->ca.map.mapon>-1 && gvar->ca.map.mapheaderseg[gvar->ca.map.mapon]) -// MM_SetPurge (&(memptr)gvar->ca.map.mapheaderseg[gvar-ca.map.mapon],3); + if (gvar->ca.map.mapon>-1 && gvar->ca.map.mapheaderseg[gvar->ca.map.mapon]) + MM_SetPurge (&((memptr)gvar->ca.map.mapheaderseg + [(gvar->ca.map.mapon)]), + + 3, &(gvar->mm)); for (plane=0;planeca.map.mapsegs[plane]) - MM_FreePtr (&(memptr)gvar->ca.map.mapsegs[plane]); + MM_FreePtr (&(memptr)gvar->ca.map.mapsegs[plane], &(gvar->mm)); gvar->ca.map.mapon = gvar->ca.map.mapnum; @@ -1872,7 +1875,7 @@ void CA_CacheMap (global_game_variables_t *gvar) // if (!gvar->ca.map.mapheaderseg[gvar->ca.map.mapnum]) { - pos = ((__segmement *)tinf)->headeroffsets[gvar->ca.mapnum]; + pos = ((_seg *)gvar->ca.map.tinf)->headeroffsets[gvar->ca.mapnum]; if (pos<0) // $FFFFFFFF start is a sparse map printf("CA_CacheMap: Tried to load a non existent map!"); @@ -1881,7 +1884,7 @@ void CA_CacheMap (global_game_variables_t *gvar) CA_FarRead (maphandle,(memptr)mapheaderseg[mapnum],sizeof(maptype)); } else - MM_SetPurge (&(memptr)mapheaderseg[mapnum],0); + MM_SetPurge (&(memptr)mapheaderseg[mapnum], 0, &(gvar->mm)); // // load the planes in @@ -1939,7 +1942,7 @@ void CA_CacheMap (global_game_variables_t *gvar) if (compressed>BUFFERSIZE) MM_FreePtr(&bigbufferseg); } -}*/ +}//*/ //=========================================================================== @@ -2068,7 +2071,7 @@ void CA_SetAllPurge (void) // // free cursor sprite and background save // - VW_FreeCursor (); + //VW_FreeCursor (); // // free map headers and map planes