X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fmodex16.c;h=d5e17a9862221debe792e7ec35a6c8cf6bd13004;hb=6245ae3447f2f001412b05d37dc4482a5256656f;hp=7d7d7631dce9b3a3217de6ac55a465706d075e3f;hpb=2a9ec1a325590c2bc55ecb8e36e376c51c0d3c53;p=16.git diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 7d7d7631..d5e17a98 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -35,7 +35,7 @@ static byte tmppal[PAL_SIZE]; // setvideo() - This function Manages the video modes // // // ///////////////////////////////////////////////////////////////////////////// -void VGAmodeX(sword vq, byte cm, global_game_variables_t *gv) +void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv) { union REGS in, out; @@ -54,7 +54,7 @@ void VGAmodeX(sword vq, byte cm, global_game_variables_t *gv) //int86(0x10, &in, &out); gv->video.old_mode = vgaGetMode();//out.h.al; // enter mode - modexEnter(vq, cm, gv); + modexEnter(vq, cmem, gv); break; } } @@ -86,26 +86,68 @@ vgaGetMode() } /* -========================= Entry Points ==========================- */ -void -modexEnter(sword vq, boolean cm, global_game_variables_t *gv) +void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv) { word i; dword far*ptr=(dword far*)VGA; /* used for faster screen clearing */ int CRTParmCount; /* common mode X initiation stuff~ */ - modexsetBaseXMode(gv->video.page); + modexsetBaseXMode(); switch(vq) { case 1: - CRTParmCount = sizeof(ModeX_320x240regs) / sizeof(ModeX_320x240regs[0]); + //CRTParmCount = sizeof(ModeX_320x240regs) / sizeof(ModeX_320x240regs[0]); /* width and height */ - gv->video.page[0].sw=320; - gv->video.page[0].sh=240; + gv->video.page[0].sw=vga_state.vga_width = 320; // VGA lib currently does not update this + gv->video.page[0].sh=vga_state.vga_height = 240; // VGA lib currently does not update this /* send the CRTParms */ - for(i=0; i