//\r
// free up memory from last map\r
//\r
-// if (gvar->ca.map.mapon>-1 && gvar->ca.map.mapheaderseg[gvar->ca.map.mapon])\r
-// MM_SetPurge (&(memptr)gvar->ca.map.mapheaderseg[gvar-ca.map.mapon],3);\r
+ if (gvar->ca.map.mapon>-1 && gvar->ca.map.mapheaderseg[gvar->ca.map.mapon])\r
+ MM_SetPurge (&((memptr)gvar->ca.map.mapheaderseg\r
+ [(gvar->ca.map.mapon)]),\r
+\r
+ 3, &(gvar->mm));\r
for (plane=0;plane<MAPPLANES;plane++)\r
if (gvar->ca.map.mapsegs[plane])\r
- MM_FreePtr (&(memptr)gvar->ca.map.mapsegs[plane]);\r
+ MM_FreePtr (&(memptr)gvar->ca.map.mapsegs[plane], &(gvar->mm));\r
\r
gvar->ca.map.mapon = gvar->ca.map.mapnum;\r
\r
//\r
if (!gvar->ca.map.mapheaderseg[gvar->ca.map.mapnum])\r
{\r
- pos = ((__segmement *)tinf)->headeroffsets[gvar->ca.mapnum];\r
+ pos = ((_seg *)gvar->ca.map.tinf)->headeroffsets[gvar->ca.mapnum];\r
if (pos<0) // $FFFFFFFF start is a sparse map\r
printf("CA_CacheMap: Tried to load a non existent map!");\r
\r
CA_FarRead (maphandle,(memptr)mapheaderseg[mapnum],sizeof(maptype));\r
}\r
else\r
- MM_SetPurge (&(memptr)mapheaderseg[mapnum],0);\r
+ MM_SetPurge (&(memptr)mapheaderseg[mapnum], 0, &(gvar->mm));\r
\r
//\r
// load the planes in\r
if (compressed>BUFFERSIZE)\r
MM_FreePtr(&bigbufferseg);\r
}\r
-}*/\r
+}//*/\r
\r
//===========================================================================\r
\r
//\r
// free cursor sprite and background save\r
//\r
- VW_FreeCursor ();\r
+ //VW_FreeCursor ();\r
\r
//\r
// free map headers and map planes\r