\r
typedef struct\r
{\r
- int old_mode; //old video mode before game!\r
+ long old_mode; //old video mode before game!\r
byte *pee; // message for fps\r
handle_t handle; //handles for file logging\r
kurokku_t kurokku; //clock struct\r
break;\r
case 1: // init the video\r
// get old video mode\r
- in.h.ah = 0xf;\r
- int86(0x10, &in, &out);\r
- gv->old_mode = out.h.al;\r
+ //in.h.ah = 0xf;\r
+ //int86(0x10, &in, &out);\r
+ gv->old_mode = vgaGetMode();//out.h.al;\r
// enter mode\r
modex__320x240_256__Enter(gv);\r
break;\r
int86(VIDEO_INT, ®s, ®s);\r
}\r
\r
+//---------------------------------------------------\r
+//\r
+// Use the bios to get the current video mode\r
+//\r
+\r
+long\r
+vgaGetMode()\r
+{\r
+ union REGS rg;\r
+\r
+ rg.h.ah = 0x0f;\r
+ int86(VIDEO_INT, &rg, &rg);\r
+\r
+ return rg.h.al;\r
+}\r
+\r
/* -========================= Entry Points ==========================- */\r
void\r
modex__320x240_256__Enter(global_game_variables_t *gv)\r
void VGAmodeX(sword vq, global_game_variables_t *gv);
void modex__320x240_256__Enter(global_game_variables_t *gv);
void modex__192x144_256__Enter(global_game_variables_t *gv);
+long vgaGetMode();
void modexLeave();
void modexsetBaseXMode(void);
page_t modexDefaultPage();