-static byte tmppal[PAL_SIZE];
-int old_mode;\r
-
-/////////////////////////////////////////////////////////////////////////////
-// //
-// setvideo() - This function Manages the video modes //
-// //
-/////////////////////////////////////////////////////////////////////////////
-void VGAmodeX(sword vq)
-{
- union REGS in, out;
-
- if(!vq)
- { // deinit the video
- // change to the video mode we were in before we switched to mode 13h
- modexLeave();
- //in.h.ah = 0x00;
- //in.h.al = old_mode;
- //int86(0x10, &in, &out);
-
- }
- else if(vq==1)
- { // init the video
- // get old video mode
- //in.h.ah = 0xf;
- //int86(0x10, &in, &out);
- //old_mode = out.h.al;
- // enter mode
- modexEnter();
- }
-}
+static byte tmppal[PAL_SIZE];\r
+//int old_mode;\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+// //\r
+// setvideo() - This function Manages the video modes //\r
+// //\r
+/////////////////////////////////////////////////////////////////////////////\r
+void VGAmodeX(sword vq, global_game_variables_t *gv)\r
+{\r
+ union REGS in, out;\r
+\r
+ if(!vq)\r
+ { // deinit the video\r
+ // change to the video mode we were in before we switched to mode 13h\r
+ modexLeave();\r
+ in.h.ah = 0x00;\r
+ in.h.al = gv->old_mode;\r
+ int86(0x10, &in, &out);\r
+\r
+ }\r
+ else if(vq==1)\r
+ { // 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
+ // enter mode\r
+ modexEnter();\r
+ }\r
+}\r