// if(CA_FarRead(bakapeehandle,(void far *)&bigbuffer,sizeof(bigbuffer),&gvar.mm))\r
#ifdef FILEREAD\r
printf(" read\n");\r
- if(CA_ReadFile(bakapee, &bigbuffer, &gvar.mm))\r
+ if(CA_ReadFile(bakapee, &bigbuffer, &gvar))\r
#else\r
printf(" load\n");\r
- if(CA_LoadFile(bakapee, &bigbuffer, &gvar.mm, &gvar.mmi))\r
+ if(CA_LoadFile(bakapee, &bigbuffer, &gvar))\r
#endif\r
baka=1;\r
else\r
==========================\r
*/\r
\r
-boolean CA_FarRead(int handle, byte huge *dest, dword length, mminfo_t *mm)\r
+boolean CA_FarRead(int handle, byte huge *dest, dword length, global_game_variables_t *gvar)\r
{\r
boolean flag;\r
//dword fat=0;\r
//word segm=0;\r
- if(mm->EMSVer<0x40)\r
+ if(gvar->mm.EMSVer<0x40)\r
if(length>0xfffflu)\r
{\r
printf("File is a fat bakapee\n");\r
==========================\r
*/\r
\r
-boolean CA_FarWrite(int handle, byte huge *source, dword length, mminfo_t *mm)\r
+boolean CA_FarWrite(int handle, byte huge *source, dword length, global_game_variables_t *gvar)\r
{\r
boolean flag;\r
//dword fat=0;\r
//word segm=0;\r
- if(mm->EMSVer<0x40)\r
+ if(gvar->mm.EMSVer<0x40)\r
if(length>0xfffflu)\r
{\r
printf("File is a fat bakapee\n");\r
==========================\r
*/\r
\r
-boolean CA_ReadFile(char *filename, memptr *ptr, mminfo_t *mm)\r
+boolean CA_ReadFile(char *filename, memptr *ptr, global_game_variables_t *gvar)\r
{\r
int handle;\r
sdword size;\r
return false;\r
\r
size = filelength(handle);\r
- if(!CA_FarRead(handle,*ptr,size, mm))\r
+ if(!CA_FarRead(handle,*ptr,size, gvar))\r
{\r
close (handle);\r
return false;\r
==========================\r
*/\r
\r
-boolean CA_WriteFile (char *filename, void far *ptr, long length, mminfo_t *mm)\r
+boolean CA_WriteFile (char *filename, void far *ptr, long length, global_game_variables_t *gvar)\r
{\r
int handle;\r
sdword size;\r
if (handle == -1)\r
return false;\r
\r
- if (!CA_FarWrite (handle,ptr,length, mm))\r
+ if (!CA_FarWrite (handle,ptr,length, gvar))\r
{\r
close(handle);\r
return false;\r
==========================\r
*/\r
\r
-boolean CA_LoadFile(char *filename, memptr *ptr, mminfo_t *mm, mminfotype *mmi)\r
+boolean CA_LoadFile(char *filename, memptr *ptr, global_game_variables_t *gvar)\r
{\r
int handle;\r
sdword size;\r
return false;\r
\r
size = filelength (handle);\r
- MM_GetPtr(ptr,size, mm, mmi);\r
- if(!CA_FarRead(handle,*ptr,size, mm))\r
+ MM_GetPtr(ptr,size, &(gvar->mm), &(gvar->mmi)); //TODO: gvar parameters\r
+ if(!CA_FarRead(handle,*ptr,size, gvar))\r
{\r
close(handle);\r
return false;\r
\r
void CA_OpenDebug (global_game_variables_t *gvar);\r
void CA_CloseDebug (global_game_variables_t *gvar);\r
-boolean CA_FarRead (int handle, byte huge *dest, dword length, mminfo_t *mm);\r
-boolean CA_FarWrite (int handle, byte huge *source, dword length, mminfo_t *mm);\r
+boolean CA_FarRead (int handle, byte huge *dest, dword length, global_game_variables_t *gvar);\r
+boolean CA_FarWrite (int handle, byte huge *source, dword length, global_game_variables_t *gvar);\r
\r
-boolean CA_ReadFile (char *filename, memptr *ptr, mminfo_t *mm);\r
-boolean CA_WriteFile (char *filename, void far *ptr, long length, mminfo_t *mm);\r
-boolean CA_LoadFile (char *filename, memptr *ptr, mminfo_t *mm, mminfotype *mmi);\r
+boolean CA_ReadFile (char *filename, memptr *ptr, global_game_variables_t *gvar);\r
+boolean CA_WriteFile (char *filename, void far *ptr, long length, global_game_variables_t *gvar);\r
+boolean CA_LoadFile (char *filename, memptr *ptr, global_game_variables_t *gvar);\r
\r
long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest,unsigned rlewtag);\r
\r