]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/modex16.c
====scroll.exe coverted and bakapi.exe converted!! this is a major commit!
[16.git] / src / lib / modex16.c
index 2bb0a34842ef6a5390c8f41b23c740d3f59e9a11..a0ffccb4b9f29e8acc25208507311f059bea6cc7 100644 (file)
 byte far* VGA=(byte far*) 0xA0000000;   /* this points to video memory. */\r
 \r
 static void fadePalette(sbyte fade, sbyte start, word iter, byte *palette);\r
-static byte tmppal[PAL_SIZE];\r
+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();
+       }
+}
 \r
 static void\r
 vgaSetMode(byte mode)\r
@@ -647,7 +677,7 @@ modexPalWhite() {
 }\r
 \r
 \r
-/* utility */\r
+/* utility */
 void\r
 modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqoffset)\r
 {\r