#pragma warn -use\r
\r
//file load or read definition\r
-//#define FILEREAD\r
+#define FILEREAD\r
//#define EXMMVERBOSE\r
\r
#define PRINTBB { printf("&main()= %Fp\n", argv[0]);printf("bigbuffer= %Fp\n", bigbuffer);printf("&bigbuffer= %Fp\n", &bigbuffer);printf("bigbuffer= %04x\n", bigbuffer);printf("&bigbuffer= %04x\n", &bigbuffer); }\r
void\r
main(int argc, char *argv[])\r
{\r
+ byte w;\r
global_game_variables_t gvar;\r
#ifdef __WATCOMC__\r
__segment sega;\r
PRINTBB;\r
// printf("press any key to continue!\n");\r
// getch();\r
-\r
+#ifdef FILEREAD\r
+for(w=0;w<2;w++)\r
+{\r
// bakapeehandle = open(bakapee,O_RDONLY | O_BINARY, S_IREAD);\r
// printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer));\r
// 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))\r
-#else\r
- printf(" load\n");\r
- if(CA_LoadFile(bakapee, &bigbuffer, &gvar))\r
+ if(w>0)\r
+ {\r
+ printf(" read\n");\r
+ if(CA_ReadFile(bakapee, &bigbuffer, &gvar)) baka=1; else baka=0;\r
+ }\r
#endif\r
- baka=1;\r
- else\r
- baka=0;\r
+ printf(" load\n");\r
+ if(CA_LoadFile(bakapee, &bigbuffer, &gvar)) baka=1; else baka=0;\r
// close(bakapeehandle);\r
//hmm functions in cache system use the buffered stuff\r
#ifdef __WATCOMC__\r
MM_Report(&gvar);\r
printf("press any key to continue!\n");\r
getch();\r
+#ifdef FILEREAD\r
+}\r
+#endif\r
MM_FreePtr(&bigbuffer, &gvar.mm);\r
//PM_Shutdown();\r
CA_Shutdown(&gvar);\r