2 //===========================================================================
\r
7 #define UNCACHEGRCHUNK(chunk) {MM_FreePtr(&grsegs[chunk]);grneeded[chunk]&=~ca_levelbit;}
\r
9 //===========================================================================
\r
14 unsigned planelength[3];
\r
15 unsigned width,height;
\r
19 //===========================================================================
\r
21 extern char audioname[13];
\r
23 extern byte _seg *tinf;
\r
26 extern unsigned _seg *mapsegs[MAPPLANES];
\r
27 extern maptype _seg *mapheaderseg[NUMMAPS];
\r
28 extern byte _seg *audiosegs[NUMSNDCHUNKS];
\r
29 extern void _seg *grsegs[NUMCHUNKS];
\r
31 extern byte far grneeded[NUMCHUNKS];
\r
32 extern byte ca_levelbit,ca_levelnum;
\r
34 extern char *titleptr[8];
\r
36 extern int profilehandle,debughandle;
\r
38 extern char extension[5],
\r
47 extern long _seg *grstarts; // array of offsets in egagraph, -1 for sparse
\r
48 extern long _seg *audiostarts; // array of offsets in audio / audiot
\r
50 // hooks for custom cache dialogs
\r
52 extern void (*drawcachebox) (char *title, unsigned numcache);
\r
53 extern void (*updatecachebox) (void);
\r
54 extern void (*finishcachebox) (void);
\r
56 //===========================================================================
\r
58 // just for the score box reshifting
\r
60 void CAL_ShiftSprite (unsigned segment,unsigned source,unsigned dest,
\r
61 unsigned width, unsigned height, unsigned pixshift);
\r
63 //===========================================================================
\r
65 void CA_OpenDebug (void);
\r
66 void CA_CloseDebug (void);
\r
67 boolean CA_FarRead (int handle, byte far *dest, long length);
\r
68 boolean CA_FarWrite (int handle, byte far *source, long length);
\r
69 boolean CA_ReadFile (char *filename, memptr *ptr);
\r
70 boolean CA_LoadFile (char *filename, memptr *ptr);
\r
71 boolean CA_WriteFile (char *filename, void far *ptr, long length);
\r
73 long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest,
\r
76 void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length,
\r
79 void CA_Startup (void);
\r
80 void CA_Shutdown (void);
\r
82 void CA_SetGrPurge (void);
\r
83 void CA_CacheAudioChunk (int chunk);
\r
84 void CA_LoadAllSounds (void);
\r
86 void CA_UpLevel (void);
\r
87 void CA_DownLevel (void);
\r
89 void CA_SetAllPurge (void);
\r
91 void CA_ClearMarks (void);
\r
92 void CA_ClearAllMarks (void);
\r
94 #define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit
\r
96 void CA_CacheGrChunk (int chunk);
\r
97 void CA_CacheMap (int mapnum);
\r
99 void CA_CacheMarks (void);
\r
101 void CA_CacheScreen (int chunk);
\r