From: Jonathan Campbell Date: Wed, 6 Apr 2016 16:14:59 +0000 (-0700) Subject: cleanup and consolidate some mode-X code modesetting. X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=6340f73596b16d6b718e3ddca2b09f13ce521f6d;p=16.git cleanup and consolidate some mode-X code modesetting. reminders to self. --- diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 0aa6904b..5c0cab2c 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -90,9 +90,13 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv) { word i; dword far*ptr=(dword far*)VGA; /* used for faster screen clearing */ + struct vga_mode_params cm; int CRTParmCount; - /* common mode X initiation stuff~ */ - modexsetBaseXMode(); + + vgaSetMode(VGA_256_COLOR_MODE); + vga_enable_256color_modex(); + update_state_from_vga(); + vga_read_crtc_mode(&cm); switch(vq) { @@ -102,32 +106,6 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv) 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; ivideo.page[0].sw=120; - gv->video.page[0].sh=160; - - /* send the CRTParms */ - for(i=0; ivideo.page[0].sw=320; - gv->video.page[0].sh=200; - - /* send the CRTParms */ - for(i=0; ivideo.page[0].sw=192; - gv->video.page[0].sh=144; - - /* send the CRTParms */ - for(i=0; ivideo.page[0].sw=256; - gv->video.page[0].sh=192; - - /* send the CRTParms */ - for(i=0; i