]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/modex16.c
scroll turned off sync for xt
[16.git] / src / lib / modex16.c
old mode 100644 (file)
new mode 100755 (executable)
index b1e6d51..e3e7039
@@ -29,14 +29,14 @@ byte far* VGA=(byte far*) 0xA0000000;   /* this points to video memory. */
 \r
 static void fadePalette(sbyte fade, sbyte start, word iter, byte *palette);\r
 static byte tmppal[PAL_SIZE];\r
-int old_mode;\r
+//int old_mode;\r
 \r
 /////////////////////////////////////////////////////////////////////////////\r
 //                                                                                                                                                                                                                                             //\r
 // setvideo() - This function Manages the video modes                                                                                          //\r
 //                                                                                                                                                                                                                                             //\r
 /////////////////////////////////////////////////////////////////////////////\r
-void VGAmodeX(sword vq)\r
+void VGAmodeX(sword vq, global_game_variables_t *gv)\r
 {\r
        union REGS in, out;\r
 \r
@@ -45,7 +45,7 @@ void VGAmodeX(sword vq)
                // 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 = old_mode;\r
+               in.h.al = gv->old_mode;\r
                int86(0x10, &in, &out);\r
 \r
        }\r
@@ -54,7 +54,7 @@ void VGAmodeX(sword vq)
                // get old video mode\r
                in.h.ah = 0xf;\r
                int86(0x10, &in, &out);\r
-               old_mode = out.h.al;\r
+               gv->old_mode = out.h.al;\r
                // enter mode\r
                modexEnter();\r
        }\r
@@ -314,7 +314,7 @@ void
 modexDrawBmpRegion(page_t *page, int x, int y,\r
                    int rx, int ry, int rw, int rh, bitmap_t *bmp) {\r
     word poffset = (word) page->data  + y*(page->width/4) + x/4;\r
-    byte *data = bmp->data;//+bmp->offset;\r
+    byte far *data = bmp->data;//+bmp->offset;\r
     word bmpOffset = (word) data + ry * bmp->width + rx;\r
     word width = rw;\r
     word height = rh;\r
@@ -325,6 +325,10 @@ modexDrawBmpRegion(page_t *page, int x, int y,
     word rowCounter;\r
     byte planeCounter = 4;\r
 \r
+/*     printf("bmp->data=%Fp\n",bmp->data);\r
+       printf("*bmp->data=%Fp\n",*(bmp->data));\r
+       printf("&bmp->data=%Fp\n",&(bmp->data));*/\r
+\r
         //code is a bit slow here\r
     __asm {\r
                 MOV AX, SCREEN_SEG      ; go to the VGA memory\r