--- /dev/null
+16/keen/id_ca.c:byte _seg *tinf;\r
+16/keen/id_ca.c:unsigned _seg *mapsegs[3];\r
+16/keen/id_ca.c:maptype _seg *mapheaderseg[NUMMAPS];\r
+16/keen/id_ca.c:byte _seg *audiosegs[NUMSNDCHUNKS];\r
+16/keen/id_ca.c:void _seg *grsegs[NUMCHUNKS];\r
+16/keen/id_ca.c:long _seg *grstarts; // array of offsets in egagraph, -1 for sparse\r
+16/keen/id_ca.c:long _seg *audiostarts; // array of offsets in audio / audiot\r
+\r
+16/keen/id_rf.c: spritetype _seg *block;\r
+16/keen/id_rf.c: block = (spritetype _seg *)grsegs[spritenumber];\r
+16/keen/id_rf.c: spritetype _seg *block;\r
+16/keen/id_rf.c: block = (spritetype _seg *)grsegs[spritenumber];\r
+\r
+16/keen/id_vw.c:pictabletype _seg *pictable;\r
+16/keen/id_vw.c:pictabletype _seg *picmtable;\r
+16/keen/id_vw.c:spritetabletype _seg *spritetable;\r
+\r
+16/keen/id_vw.c: spritetype _seg *block;\r
+16/keen/id_vw.c: spritetype _seg *block;\r
+16/keen/id_vw.c: block = (spritetype _seg *)grsegs[chunknum];\r
+\r
+16/keen/kd_keen.c: spritetype _seg *block;\r
+16/keen/kd_keen.c: block = (spritetype _seg *)grsegs[SCOREBOXSPR];\r
+16/keen/kd_keen.c: spritetype _seg *dest;\r
+16/keen/kd_keen.c: dest = (spritetype _seg *)grsegs[SCOREBOXSPR];\r
+16/keen/kd_keen.c: spritetype _seg *block;\r
+16/keen/kd_keen.c: block = (spritetype _seg *)grsegs[SCOREBOXSPR];\r
+16/keen/kd_keen.c: block = (spritetype _seg *)grsegs[SCOREBOXSPR];\r
+16/keen/kd_keen.c: block = (spritetype _seg *)grsegs[SCOREBOXSPR];\r
+16/keen/kd_keen.c: tile = *((unsigned _seg *)mapsegs[2]+mapbwidthtable[y]/2+x);\r
+16/keen/kd_keen.c: map = (unsigned _seg *)mapsegs[1]+\r
+16/keen/kd_keen.c: map = (unsigned _seg *)mapsegs[1]+\r
+16/keen/kd_keen.c: map = (unsigned _seg *)mapsegs[1]+mapbwidthtable[ob->tiletop]/2+ob->temp4;\r
+16/keen/kd_keen.c: map = (unsigned _seg *)mapsegs[1]+mapbwidthtable[ob->tilebottom]/2+ob->temp4;\r
+16/keen/kd_main.c: spritetype _seg *block;\r
+16/keen/kd_main.c: block = (spritetype _seg *)grsegs[sprite];\r
+\r
+\r
+\r
+\r
+16/wf3d8086/contigsc.c:byte _seg *endscalermemory;\r
+16/wf3d8086/contigsc.c: endscalermemory = (void _seg *)(seg+ofs/16);\r
+16/wf3d8086/contigsc.c: t_compshape _seg *shape;\r
+16/wf3d8086/contigsc.c: t_compshape _seg *shape;\r
+16/wf3d8086/id_ca.c:byte _seg *tinf;\r
+16/wf3d8086/id_ca.c:unsigned _seg *mapsegs[MAPPLANES];\r
+16/wf3d8086/id_ca.c:maptype _seg *mapheaderseg[NUMMAPS];\r
+16/wf3d8086/id_ca.c:byte _seg *audiosegs[NUMSNDCHUNKS];\r
+16/wf3d8086/id_ca.c:void _seg *grsegs[NUMCHUNKS];\r
+16/wf3d8086/id_ca.c:long _seg *grstarts; // array of offsets in egagraph, -1 for sparse\r
+16/wf3d8086/id_ca.c:long _seg *audiostarts; // array of offsets in audio / audiot\r
+\r
+16/wf3d8086/id_pm.c: _seg *PMSegPages;\r
+16/wf3d8086/id_pm.c: void _seg *buf;\r
+16/wf3d8086/id_pm.c: MM_FreePtr(&(void _seg *)PMSegPages);\r
+\r
+16/wf3d8086/id_vh.c:pictabletype _seg *pictable;\r
+16/wf3d8086/id_vh.c: byte _seg *temp, far *dest, far *srcline;\r
+16/wf3d8086/id_vh.c: src = (byte _seg *)grsegs[STARTTILE8];\r
+16/wf3d8086/id_vh.c: src = (byte _seg *)grsegs[STARTTILE16];\r
+16/wf3d8086/id_vh.c: src = (byte _seg *)grsegs[STARTTILE16+i];\r
+16/wf3d8086/wl_debug.c: spritetype _seg *block;\r
+16/wf3d8086/wl_debug.c:extern word _seg *DigiList;\r
+16/wf3d8086/wl_menu.c: fontstruct _seg *font;\r
+16/wf3d8086/wl_scale.c:t_compscale _seg *scaledirectory[MAXSCALEHEIGHT+1];\r
+16/wf3d8086/wl_scale.c:t_compscale _seg *work;\r
+16/wf3d8086/wl_scale.c: _fmemcpy ((byte _seg *)(*finalspot),(byte _seg *)work,totalsize);\r
+16/wf3d8086/wl_scale.c: t_compshape _seg *shape;\r
+16/wf3d8086/wl_scale.c: t_compscale _seg *comptable;\r
+16/wf3d8086/wl_scale.c: t_compshape _seg *shape;\r
+16/wf3d8086/wl_scale.c: t_compscale _seg *comptable;\r
+16/wf3d8086/wl_text.c: text = (char _seg *)grsegs[artnum];\r
+16/wf3d8086/wl_text.c: text = (char _seg *)layout;\r
+16/wf3d8086/wl_text.c: text = (char _seg *)grsegs[artnum];\r
+16/wf3d8086/wl_text.c: text = (char _seg *)layout;\r
+16/wolf3d/WOLFSRC/CONTIGSC.C:byte _seg *endscalermemory;\r
+16/wolf3d/WOLFSRC/CONTIGSC.C: endscalermemory = (void _seg *)(seg+ofs/16);\r
+16/wolf3d/WOLFSRC/CONTIGSC.C: t_compshape _seg *shape;\r
+16/wolf3d/WOLFSRC/CONTIGSC.C: t_compshape _seg *shape;\r
+16/wolf3d/WOLFSRC/ID_CA.C:byte _seg *tinf;\r
+16/wolf3d/WOLFSRC/ID_CA.C:unsigned _seg *mapsegs[MAPPLANES];\r
+16/wolf3d/WOLFSRC/ID_CA.C:maptype _seg *mapheaderseg[NUMMAPS];\r
+16/wolf3d/WOLFSRC/ID_CA.C:byte _seg *audiosegs[NUMSNDCHUNKS];\r
+16/wolf3d/WOLFSRC/ID_CA.C:void _seg *grsegs[NUMCHUNKS];\r
+16/wolf3d/WOLFSRC/ID_CA.C:long _seg *grstarts; // array of offsets in egagraph, -1 for sparse\r
+16/wolf3d/WOLFSRC/ID_CA.C:long _seg *audiostarts; // array of offsets in audio / audiot\r
+16/wolf3d/WOLFSRC/ID_CA.C: grstarts = (long _seg *)FP_SEG(&EGAhead);\r
+16/wolf3d/WOLFSRC/ID_CA.C: tinf = (byte _seg *)FP_SEG(&maphead);\r
+16/wolf3d/WOLFSRC/ID_CA.C: pos = ((mapfiletype _seg *)tinf)->headeroffsets[i];\r
+16/wolf3d/WOLFSRC/ID_CA.C: audiostarts = (long _seg *)FP_SEG(&audiohead);\r
+16/wolf3d/WOLFSRC/ID_CA.C: ((mapfiletype _seg *)tinf)->RLEWtag);\r
+16/wolf3d/WOLFSRC/ID_CA.C: ((mapfiletype _seg *)tinf)->RLEWtag);\r
+16/wolf3d/WOLFSRC/ID_CA.C: source = (byte _seg *)bufferseg+(pos-bufferstart);\r
+16/wolf3d/WOLFSRC/ID_IN.C: byte _seg *DemoBuffer;\r
+16/wolf3d/WOLFSRC/ID_PM.C: _seg *PMSegPages;\r
+16/wolf3d/WOLFSRC/ID_PM.C: void _seg *buf;\r
+16/wolf3d/WOLFSRC/ID_PM.C: MM_FreePtr(&(void _seg *)PMSegPages);\r
+16/wolf3d/WOLFSRC/ID_SD.C: word *SoundTable; // Really * _seg *SoundTable, but that don't work\r
+16/wolf3d/WOLFSRC/ID_SD.C: word _seg *DigiList;\r
+16/wolf3d/WOLFSRC/ID_VH.C:pictabletype _seg *pictable;\r
+16/wolf3d/WOLFSRC/ID_VH.C: byte _seg *temp, far *dest, far *srcline;\r
+16/wolf3d/WOLFSRC/ID_VH.C: , fontstruct _seg *font)\r
+16/wolf3d/WOLFSRC/ID_VH.C: VWL_MeasureString(string,width,height,(fontstruct _seg *)grsegs[STARTFONT+fontnumber]);\r
+16/wolf3d/WOLFSRC/ID_VH.C: VWL_MeasureString(string,width,height,(fontstruct _seg *)grsegs[STARTFONTM+fontnumber]);\r
+16/wolf3d/WOLFSRC/ID_VH.C: src = (byte _seg *)grsegs[STARTTILE8];\r
+16/wolf3d/WOLFSRC/ID_VH.C: src = (byte _seg *)grsegs[STARTTILE16];\r
+16/wolf3d/WOLFSRC/ID_VH.C: src = (byte _seg *)grsegs[STARTTILE16+i];\r
+16/wolf3d/WOLFSRC/WL_DEBUG.C: spritetype _seg *block;\r
+16/wolf3d/WOLFSRC/WL_DEBUG.C:extern word _seg *DigiList;\r
+16/wolf3d/WOLFSRC/WL_MENU.C: fontstruct _seg *font;\r
+16/wolf3d/WOLFSRC/WL_SCALE.C:t_compscale _seg *scaledirectory[MAXSCALEHEIGHT+1];\r
+16/wolf3d/WOLFSRC/WL_SCALE.C:t_compscale _seg *work;\r
+16/wolf3d/WOLFSRC/WL_SCALE.C: _fmemcpy ((byte _seg *)(*finalspot),(byte _seg *)work,totalsize);\r
+16/wolf3d/WOLFSRC/WL_SCALE.C: t_compshape _seg *shape;\r
+16/wolf3d/WOLFSRC/WL_SCALE.C: t_compscale _seg *comptable;\r
+16/wolf3d/WOLFSRC/WL_SCALE.C: t_compshape _seg *shape;\r
+16/wolf3d/WOLFSRC/WL_SCALE.C: t_compscale _seg *comptable;\r
+16/wolf3d/WOLFSRC/WL_TEXT.C: text = (char _seg *)grsegs[artnum];\r
+16/wolf3d/WOLFSRC/WL_TEXT.C: text = (char _seg *)layout;\r
+16/wolf3d/WOLFSRC/WL_TEXT.C: text = (char _seg *)grsegs[artnum];\r
+16/wolf3d/WOLFSRC/WL_TEXT.C: text = (char _seg *)layout;\r
+16/Catacomb3D/C3_DEBUG.C: spritetype _seg *block;\r
+16/Catacomb3D/C3_GAME.C: text = (char _seg *)grsegs[LEVEL1TEXT+mapon];\r
+16/Catacomb3D/C3_GAME.C: src = (byte _seg *)grsegs[STARTTILE8];\r
+16/Catacomb3D/C3_GAME.C: src = (byte _seg *)grsegs[STARTTILE16];\r
+16/Catacomb3D/C3_GAME.C: src = (byte _seg *)grsegs[STARTTILE16+i];\r
+16/Catacomb3D/C3_SCALE.C:t_compscale _seg *scaledirectory[MAXSCALE+1];\r
+16/Catacomb3D/C3_SCALE.C:t_compshape _seg *shapedirectory[NUMSCALEPICS];\r
+16/Catacomb3D/C3_SCALE.C: plane0 = (byte _seg *)grsegs[picnum];\r
+16/Catacomb3D/C3_SCALE.C: t_compscale _seg *work;\r
+16/Catacomb3D/C3_SCALE.C: _fmemcpy ((byte _seg *)(*finalspot),(byte _seg *)work,totalsize);\r
+16/Catacomb3D/C3_SCALE.C:unsigned BuildCompShape (t_compshape _seg **finalspot)\r
+16/Catacomb3D/C3_SCALE.C: t_compshape _seg *work;\r
+16/Catacomb3D/C3_SCALE.C: work = (t_compshape _seg *)(0xa000+(buff+15)/16);\r
+16/Catacomb3D/C3_SCALE.C: _fmemcpy ((byte _seg *)(*finalspot),(byte _seg *)work,totalsize);\r
+16/Catacomb3D/C3_SCALE.C:void ScaleShape (int xcenter, t_compshape _seg *compshape, unsigned scale)\r
+16/Catacomb3D/C3_SCALE.C: t_compscale _seg *comptable;\r
+16/Catacomb3D/C3_WIZ.C: text = (char _seg *)grsegs[LEVEL1TEXT+mapon]+textstarts[number];\r
+16/Catacomb3D/ID_CA.C:byte _seg *tinf;\r
+16/Catacomb3D/ID_CA.C:unsigned _seg *mapsegs[3];\r
+16/Catacomb3D/ID_CA.C:maptype _seg *mapheaderseg[NUMMAPS];\r
+16/Catacomb3D/ID_CA.C:byte _seg *audiosegs[NUMSNDCHUNKS];\r
+16/Catacomb3D/ID_CA.C:void _seg *grsegs[NUMCHUNKS];\r
+16/Catacomb3D/ID_CA.C:long _seg *grstarts; // array of offsets in egagraph, -1 for sparse\r
+16/Catacomb3D/ID_CA.C:long _seg *audiostarts; // array of offsets in audio / audiot\r
+16/Catacomb3D/ID_CA.C: grstarts = (long _seg *)FP_SEG(&EGAhead);\r
+16/Catacomb3D/ID_CA.C: grstarts = (long _seg *)FP_SEG(&CGAhead);\r
+16/Catacomb3D/ID_CA.C: tinf = (byte _seg *)FP_SEG(&maphead);\r
+16/Catacomb3D/ID_CA.C: audiostarts = (long _seg *)FP_SEG(&audiohead);\r
+16/Catacomb3D/ID_CA.C: spritetype _seg *dest;\r
+16/Catacomb3D/ID_CA.C: dest = (spritetype _seg *)grsegs[chunk];\r
+16/Catacomb3D/ID_CA.C: dest = (spritetype _seg *)grsegs[chunk];\r
+16/Catacomb3D/ID_CA.C: pos = ((mapfiletype _seg *)tinf)->headeroffsets[mapnum];\r
+16/Catacomb3D/ID_CA.C: ((mapfiletype _seg *)tinf)->RLEWtag);\r
+16/Catacomb3D/ID_CA.C: ((mapfiletype _seg *)tinf)->RLEWtag);\r
+16/Catacomb3D/ID_CA.C: source = (byte _seg *)bufferseg+(pos-bufferstart);\r
+16/Catacomb3D/ID_IN.C: byte _seg *DemoBuffer;\r
+16/Catacomb3D/ID_IN.C:IN_StartDemoPlayback(byte _seg *buffer,word bufsize)\r
+16/Catacomb3D/ID_RF.C: spritetype _seg *block;\r
+16/Catacomb3D/ID_RF.C: block = (spritetype _seg *)grsegs[spritenumber];\r
+16/Catacomb3D/ID_RF.C: spritetype _seg *block;\r
+16/Catacomb3D/ID_RF.C: block = (spritetype _seg *)grsegs[spritenumber];\r
+16/Catacomb3D/ID_SD.C: word *SoundTable; // Really * _seg *SoundTable, but that don't work\r
+16/Catacomb3D/ID_VW.C:pictabletype _seg *pictable;\r
+16/Catacomb3D/ID_VW.C:pictabletype _seg *picmtable;\r
+16/Catacomb3D/ID_VW.C:spritetabletype _seg *spritetable;\r
+16/Catacomb3D/ID_VW.C: fontstruct _seg *font);\r
+16/Catacomb3D/ID_VW.C: spritetype _seg *block;\r
+16/Catacomb3D/ID_VW.C: block = (spritetype _seg *)grsegs[chunknum];\r
+16/Catacomb3D/ID_VW.C:VWL_MeasureString (char far *string, word *width, word *height, fontstruct _seg *font)\r
+16/Catacomb3D/ID_VW.C: VWL_MeasureString(string,width,height,(fontstruct _seg *)grsegs[STARTFONT+fontnumber]);\r
+16/Catacomb3D/ID_VW.C: VWL_MeasureString(string,width,height,(fontstruct _seg *)grsegs[STARTFONTM+fontnumber]);\r
+16/Catacomb3D/ID_VW.C: spritetype _seg *block;\r
+16/Catacomb3D/ID_VW.C: block = (spritetype _seg *)grsegs[chunknum];\r
+16/CatacombApocalypse/C6_GAME.C: text = (char _seg *)grsegs[LEVEL1TEXT+mapon];\r
+16/CatacombApocalypse/C6_GAME.C: src = (byte _seg *)grsegs[STARTTILE8];\r
+16/CatacombApocalypse/C6_GAME.C: src = (byte _seg *)grsegs[STARTTILE16];\r
+16/CatacombApocalypse/C6_GAME.C: src = (byte _seg *)grsegs[STARTTILE16+i];\r
+16/CatacombApocalypse/C6_SCALE.C:t_compscale _seg *scaledirectory[NUMSCALEPICS];\r
+16/CatacombApocalypse/C6_SCALE.C:t_compshape _seg *shapedirectory[NUMSCALEPICS];\r
+16/CatacombApocalypse/C6_SCALE.C: plane0 = (byte _seg *)grsegs[picnum];\r
+16/CatacombApocalypse/C6_SCALE.C: t_compscale _seg *work;\r
+16/CatacombApocalypse/C6_SCALE.C: _fmemcpy ((byte _seg *)(*finalspot),(byte _seg *)work,totalsize);\r
+16/CatacombApocalypse/C6_SCALE.C:unsigned BuildCompShape (t_compshape _seg **finalspot)\r
+16/CatacombApocalypse/C6_SCALE.C: t_compshape _seg *work;\r
+16/CatacombApocalypse/C6_SCALE.C: work = (t_compshape _seg *)(0xa000+(buff+15)/16);\r
+16/CatacombApocalypse/C6_SCALE.C: _fmemcpy ((byte _seg *)(*finalspot),(byte _seg *)work,totalsize);\r
+16/CatacombApocalypse/C6_SCALE.C:void ScaleShape (int xcenter, t_compshape _seg *compshape, unsigned scale)\r
+16/CatacombApocalypse/C6_SCALE.C: t_compscale _seg *comptable;\r
+16/CatacombApocalypse/C6_WIZ.C: text = (char _seg *)grsegs[LEVEL1TEXT+mapon]+textstarts[number];\r
+16/CatacombApocalypse/C6_WIZ.C: txt = (char _seg *)grsegs[SCROLLTEXT];\r
+16/CatacombApocalypse/C6_WIZ.C: txt = (char _seg *)grsegs[SCROLLTEXT]+ofset;\r
+16/CatacombApocalypse/GELIB.C: fontstruct _seg *font = (fontstruct _seg *)grsegs[STARTFONT];\r
+16/CatacombApocalypse/ID_CA.C:byte _seg *tinf;\r
+16/CatacombApocalypse/ID_CA.C:unsigned _seg *mapsegs[3];\r
+16/CatacombApocalypse/ID_CA.C:maptype _seg *mapheaderseg[NUMMAPS];\r
+16/CatacombApocalypse/ID_CA.C:byte _seg *audiosegs[NUMSNDCHUNKS];\r
+16/CatacombApocalypse/ID_CA.C:void _seg *grsegs[NUMCHUNKS];\r
+16/CatacombApocalypse/ID_CA.C:long _seg *grstarts; // array of offsets in egagraph, -1 for sparse\r
+16/CatacombApocalypse/ID_CA.C:long _seg *audiostarts; // array of offsets in audio / audiot\r
+16/CatacombApocalypse/ID_CA.C: grstarts = (long _seg *)FP_SEG(&EGAhead);\r
+16/CatacombApocalypse/ID_CA.C: grstarts = (long _seg *)FP_SEG(&CGAhead);\r
+16/CatacombApocalypse/ID_CA.C: tinf = (byte _seg *)FP_SEG(&maphead);\r
+16/CatacombApocalypse/ID_CA.C: audiostarts = (long _seg *)FP_SEG(&audiohead);\r
+16/CatacombApocalypse/ID_CA.C: spritetype _seg *dest;\r
+16/CatacombApocalypse/ID_CA.C: dest = (spritetype _seg *)grsegs[chunk];\r
+16/CatacombApocalypse/ID_CA.C: dest = (spritetype _seg *)grsegs[chunk];\r
+16/CatacombApocalypse/ID_CA.C: pos = ((mapfiletype _seg *)tinf)->headeroffsets[mapnum];\r
+16/CatacombApocalypse/ID_CA.C: ((mapfiletype _seg *)tinf)->RLEWtag);\r
+16/CatacombApocalypse/ID_CA.C: ((mapfiletype _seg *)tinf)->RLEWtag);\r
+16/CatacombApocalypse/ID_CA.C: source = (byte _seg *)bufferseg+(pos-bufferstart);\r
+16/CatacombApocalypse/ID_IN.C:// byte _seg *DemoBuffer;\r
+16/CatacombApocalypse/ID_IN.C:IN_StartDemoPlayback(byte _seg *buffer,word bufsize)\r
+16/CatacombApocalypse/ID_RF.C: spritetype _seg *block;\r
+16/CatacombApocalypse/ID_RF.C: block = (spritetype _seg *)grsegs[spritenumber];\r
+16/CatacombApocalypse/ID_RF.C: spritetype _seg *block;\r
+16/CatacombApocalypse/ID_RF.C: block = (spritetype _seg *)grsegs[spritenumber];\r
+16/CatacombApocalypse/ID_SD.C: word *SoundTable; // Really * _seg *SoundTable, but that don't work\r
+16/CatacombApocalypse/ID_VW.C:pictabletype _seg *pictable;\r
+16/CatacombApocalypse/ID_VW.C:pictabletype _seg *picmtable;\r
+16/CatacombApocalypse/ID_VW.C:spritetabletype _seg *spritetable;\r
+16/CatacombApocalypse/ID_VW.C: fontstruct _seg *font);\r
+16/CatacombApocalypse/ID_VW.C: spritetype _seg *block;\r
+16/CatacombApocalypse/ID_VW.C: block = (spritetype _seg *)grsegs[chunknum];\r
+16/CatacombApocalypse/ID_VW.C:VWL_MeasureString (char far *string, word *width, word *height, fontstruct _seg *font)\r
+16/CatacombApocalypse/ID_VW.C: VWL_MeasureString(string,width,height,(fontstruct _seg *)grsegs[STARTFONT+fontnumber]);\r
+16/CatacombApocalypse/ID_VW.C: VWL_MeasureString(string,width,height,(fontstruct _seg *)grsegs[STARTFONTM+fontnumber]);\r
+16/CatacombApocalypse/ID_VW.C: spritetype _seg *block;\r
+16/CatacombApocalypse/ID_VW.C: block = (spritetype _seg *)grsegs[chunknum];\r
}\r
#endif\r
\r
+#define EXTENSION "hb1"\r
+\r
/*\r
=============================================================================\r
\r
MM_GetPtr (MEMPTRCONV gvar->ca.tinf,length,gvar);\r
CA_FarRead(handle, gvar->ca.tinf, length,gvar);\r
close(handle);\r
-//#else\r
+#else\r
\r
gvar->ca.tinf = (byte _seg *)FP_SEG(&maphead);\r
\r
CAL_SetupMapFile (gvar);\r
#endif\r
\r
- gvar->ca.camap.mapon = -1;\r
+ gvar->ca.mapon = -1;\r
gvar->ca.ca_levelbit = 1;\r
gvar->ca.ca_levelnum = 0;\r
\r
=\r
======================\r
*/\r
-/*++++ segments!\r
+\r
void CA_CacheMap (global_game_variables_t *gvar)\r
{\r
long pos,compressed;\r
//\r
// free up memory from last map\r
//\r
- if (gvar->ca.camap.mapon>-1 && gvar->ca.camap.mapheaderseg[gvar->ca.camap.mapon])\r
- MM_SetPurge (((memptr)gvar->ca.camap.mapheaderseg[(gvar->ca.camap.mapon)]), 3, gvar);\r
+ if (gvar->ca.mapon>-1 && gvar->ca.mapheaderseg[gvar->ca.mapon])\r
+ MM_SetPurge ((MEMPTRCONV gvar->ca.mapheaderseg[(gvar->ca.mapon)]), 3, gvar);\r
for (plane=0;plane<MAPPLANES;plane++)\r
- if (gvar->ca.camap.mapsegs[plane])\r
- MM_FreePtr ((memptr)gvar->ca.camap.mapsegs[plane], gvar);\r
+ if (gvar->ca.mapsegs[plane])\r
+ MM_FreePtr (MEMPTRCONV gvar->ca.mapsegs[plane], gvar);\r
\r
- gvar->ca.camap.mapon = gvar->ca.camap.mapnum;\r
+ gvar->ca.mapon = gvar->ca.mapnum;\r
\r
\r
//\r
// load map header\r
// The header will be cached if it is still around\r
//\r
-// if (!gvar->ca.camap.mapheaderseg[gvar->ca.camap.mapnum])\r
-// {\r
-// //pos = ((mapfiletype _seg *)tinf)->headeroffsets[mapnum];\r
-// //pos = ((_seg *)gvar->ca.camap.tinf)->headeroffsets[gvar->ca.camap.mapnum];\r
-// pos = ((memptr)gvar->ca.camap.tinf)->headeroffsets[gvar->ca.camap.mapnum];\r
-// if (pos<0) // $FFFFFFFF start is a sparse map\r
-// printf("CA_CacheMap: Tried to load a non existent map!");\r
+ if (!gvar->ca.mapheaderseg[gvar->ca.mapnum])\r
+ {\r
+ pos = ((mapfiletype _seg *)gvar->ca.tinf)->headeroffsets[gvar->ca.mapnum];\r
+ if (pos<0) // $FFFFFFFF start is a sparse map\r
+ Quit (gvar, "CA_CacheMap: Tried to load a non existent map!");\r
\r
-// MM_GetPtr(MEMPTRCONV gvar->ca.camapheaderseg[mapnum],sizeof(maptype));\r
-// lseek(maphandle,pos,SEEK_SET);\r
-// CA_FarRead (maphandle,(memptr)mapheaderseg[mapnum],sizeof(maptype));\r
-// }\r
-// else\r
-// MM_SetPurge (MEMPTRCONV mapheaderseg[mapnum], 0, &(gvar->mm));\r
+ MM_GetPtr(MEMPTRCONV gvar->ca.mapheaderseg[gvar->ca.mapnum],sizeof(maptype), gvar);\r
+ lseek(gvar->ca.file.maphandle,pos,SEEK_SET);\r
+#ifdef MAPHEADERLINKED\r
+//#if BUFFERSIZE < sizeof(maptype)\r
+//The general buffer size is too small!\r
+//#endif\r
+ //\r
+ // load in, then unhuffman to the destination\r
+ //\r
+ CA_FarRead (gvar->ca.file.maphandle,gvar->mm.bufferseg,((mapfiletype _seg *)gvar->ca.tinf)->headersize[gvar->ca.mapnum], gvar);\r
+ CAL_HuffExpand ((byte huge *)bufferseg,\r
+ (byte huge *)gvar->ca.mapheaderseg[gvar->ca.mapnum],sizeof(maptype),maphuffman, gvar);\r
+#else\r
+ CA_FarRead (gvar->ca.file.maphandle,(memptr)gvar->ca.mapheaderseg[gvar->ca.mapnum],sizeof(maptype), gvar);\r
+#endif\r
+ }\r
+ else\r
+ MM_SetPurge (MEMPTRCONV gvar->ca.mapheaderseg[gvar->ca.mapnum], 0, gvar);\r
\r
//\r
// load the planes in\r
// allways reloaded, never cached)\r
//\r
\r
- size = mapheaderseg[mapnum]->width * mapheaderseg[mapnum]->height * 2;\r
+ size = gvar->ca.mapheaderseg[gvar->ca.mapnum]->width * gvar->ca.mapheaderseg[gvar->ca.mapnum]->height * 2;\r
\r
for (plane = 0; plane<MAPPLANES; plane++)\r
{\r
- //pos = mapheaderseg[mapnum]->planestart[plane];\r
- //compressed = mapheaderseg[mapnum]->planelength[plane];\r
+ pos = gvar->ca.mapheaderseg[gvar->ca.mapnum]->planestart[plane];\r
+ compressed = gvar->ca.mapheaderseg[gvar->ca.mapnum]->planelength[plane];\r
\r
if (!compressed)\r
continue; // the plane is not used in this game\r
\r
- dest = MEMPTRCONV mapsegs[plane];\r
- MM_GetPtr(dest,size);\r
+ dest = MEMPTRCONV gvar->ca.mapsegs[plane];\r
+ MM_GetPtr(dest,size, gvar);\r
\r
- lseek(maphandle,pos,SEEK_SET);\r
+ lseek(gvar->ca.file.maphandle,pos,SEEK_SET);\r
if (compressed<=BUFFERSIZE)\r
- source = bufferseg;\r
+ source = gvar->mm.bufferseg;\r
else\r
{\r
- MM_GetPtr(&bigbufferseg,compressed);\r
- MM_SetLock (&bigbufferseg,true);\r
+ MM_GetPtr(&bigbufferseg,compressed, gvar);\r
+ MM_SetLock (&bigbufferseg,true, gvar);\r
source = bigbufferseg;\r
}\r
\r
- CA_FarRead(maphandle,(byte far *)source,compressed);\r
+ CA_FarRead(gvar->ca.file.maphandle,(byte far *)source,compressed, gvar);\r
#ifdef MAPHEADERLINKED\r
//\r
// unhuffman, then unRLEW\r
//\r
expanded = *source;\r
source++;\r
- MM_GetPtr (&buffer2seg,expanded);\r
+ MM_GetPtr (&buffer2seg,expanded, gvar);\r
CAL_CarmackExpand (source, (unsigned far *)buffer2seg,expanded);\r
CA_RLEWexpand (((unsigned far *)buffer2seg)+1,*dest,size,\r
((mapfiletype _seg *)tinf)->RLEWtag);\r
// unRLEW, skipping expanded length\r
//\r
CA_RLEWexpand (source+1, *dest,size,\r
- ((mapfiletype _seg *)tinf)->RLEWtag);\r
+ ((mapfiletype _seg *)gvar->ca.tinf)->RLEWtag);\r
#endif\r
\r
if (compressed>BUFFERSIZE)\r
- MM_FreePtr(&bigbufferseg);\r
+ MM_FreePtr(&bigbufferseg, gvar);\r
}\r
-}//*/\r
+}\r
\r
//===========================================================================\r
\r
//\r
// free map headers and map planes\r
//\r
-// for (i=0;i<NUMMAPS;i++)\r
-// if (gvar->ca.camap.mapheaderseg[i])\r
-// MM_SetPurge (gvar->ca.camap.mapheaderseg[i],3, gvar);\r
+ for (i=0;i<NUMMAPS;i++)\r
+ if (gvar->ca.mapheaderseg[i])\r
+ MM_SetPurge (MEMPTRCONV gvar->ca.mapheaderseg[i],3, gvar);\r
\r
for (i=0;i<3;i++)\r
if (gvar->ca.mapsegs[i])\r
- MM_FreePtr ((memptr *)&gvar->ca.mapsegs[i], gvar);\r
+ MM_FreePtr (MEMPTRCONV gvar->ca.mapsegs[i], gvar);\r
\r
//\r
// free sounds\r
//\r
for (i=0;i<NUMSNDCHUNKS;i++)\r
if (gvar->ca.audiosegs[i])\r
- MM_SetPurge ((memptr *)&gvar->ca.audiosegs[i],3, gvar);\r
+ MM_SetPurge (MEMPTRCONV gvar->ca.audiosegs[i],3, gvar);\r
\r
//\r
// free graphics\r