byte far *source;\r
int next;\r
\r
- grneeded[chunk] |= ca_levelbit; // make sure it doesn't get removed\r
+ gvar->video.grneeded[chunk] |= ca_levelbit; // make sure it doesn't get removed\r
if (grsegs[chunk])\r
{\r
MM_SetPurge (&grsegs[chunk],0);\r
=\r
======================\r
*/\r
-/*\r
-void CA_ClearMarks (void)\r
+void CA_ClearMarks (global_game_variables_t *gvar)\r
{\r
int i;\r
\r
for (i=0;i<NUMCHUNKS;i++)\r
- grneeded[i]&=~ca_levelbit;\r
+ gvar->video.grneeded[i]&=~gvar->ca.ca_levelbit;\r
}\r
-*/\r
\r
//===========================================================================\r
\r
=\r
======================\r
*/\r
-/*\r
-void CA_ClearAllMarks (void)\r
+void CA_ClearAllMarks (global_game_variables_t *gvar)\r
{\r
- _fmemset (grneeded,0,sizeof(grneeded));\r
- ca_levelbit = 1;\r
- ca_levelnum = 0;\r
+ _fmemset (gvar->video.grneeded,0,sizeof(gvar->video.grneeded));\r
+ gvar->ca.ca_levelbit = 1;\r
+ gvar->ca.ca_levelnum = 0;\r
}\r
-*/\r
\r
//===========================================================================\r
\r
// go through and make everything not needed purgable\r
//\r
for (i=0;i<NUMCHUNKS;i++)\r
- if (grneeded[i]&ca_levelbit)\r
+ if (gvar->video.grneeded[i]&ca_levelbit)\r
{\r
if (grsegs[i]) // its allready in memory, make\r
MM_SetPurge(&grsegs[i],0); // sure it stays there!\r
bufferstart = bufferend = 0; // nothing good in buffer now\r
\r
for (i=0;i<NUMCHUNKS;i++)\r
- if ( (grneeded[i]&ca_levelbit) && !grsegs[i])\r
+ if ( (gvar->video.grneeded[i]&ca_levelbit) && !grsegs[i])\r
{\r
//\r
// update thermometer\r
while ( next < NUMCHUNKS )\r
{\r
while (next < NUMCHUNKS &&\r
- !(grneeded[next]&ca_levelbit && !grsegs[next]))\r
+ !(gvar->video.grneeded[next]&ca_levelbit && !grsegs[next]))\r
next++;\r
if (next == NUMCHUNKS)\r
continue;\r
void CA_DownLevel (void);\r
\r
void CA_SetGrPurge (void);\r
-void CA_SetAllPurge (void);\r
+void CA_SetAllPurge (void);*/\r
\r
-void CA_ClearMarks (void);\r
-void CA_ClearAllMarks (void);\r
+void CA_ClearMarks (global_game_variables_t *gvar);\r
+void CA_ClearAllMarks (global_game_variables_t *gvar);\r
\r
-#define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit\r
+/*#define CA_MarkGrChunk(chunk) grneeded[chunk]|=ca_levelbit\r
\r
void CA_CacheGrChunk (int chunk);\r
void CA_CacheMap (int mapnum);\r
word pn;\r
} pan_t;\r
\r
+//video\r
+#define NUMCHUNKS 3016 //keen\r
+\r
typedef struct\r
{\r
char old_mode; //old video mode before game!\r
+ byte grneeded[NUMCHUNKS];\r
page_t page[MAXPAGE]; //pointer to root page[0]\r
word vmem_remain; //remaining video memory\r
byte num_of_pages; //number of actual pages\r
\r
//==========================================================================\r
\r
+//16_ca.h\r
+typedef struct\r
+{\r
+ byte ca_levelbit,ca_levelnum;\r
+} ca_t;\r
+\r
//actual global game varables!\r
typedef struct\r
{\r
- video_t video; // video settings variable\r
+ video_t video; // video settings variable\r
+ ca_t ca; // ca stuff\r
byte *pee; // message for fps\r
handle_t handle; //handles for file logging\r
kurokku_t kurokku; //clock struct\r