for (i=0; i < gr_saved_screen.width*gr_saved_screen.height; i++ )
gr_saved_screen.video_memory[i] = pTextMemory[i];
}
if (gr_show_screen_info ) {
printf( "Current video mode 0x%x:\n", gr_saved_screen.video_mode );
if (gr_saved_screen.is_graphics)
printf( "Graphics mode\n" );
else {
printf( "Text mode\n" );
printf( "( %d columns by %d rows)\n", gr_saved_screen.width, gr_saved_screen.height );
printf( "Char height is %d pixel rows\n", gr_saved_screen.char_height );
printf( "Cursor of type 0x%x,0x%x is at (%d, %d)\n", gr_saved_screen.cursor_sline, gr_saved_screen.cursor_eline,gr_saved_screen.cursor_x, gr_saved_screen.cursor_y );
}
}
return 0;
}
int isvga()
{
union REGS regs;
memset( ®s, 0, sizeof(regs) );
regs.w.ax = 0x1a00;
int386( 0x10, ®s, ®s );
if ( regs.h.al == 0x1a )
return 1;
return 0;
}
void gr_restore_mode()
{
int i;
//gr_set_text_25();
gr_palette_fade_out( gr_palette, 32, 0 );
gr_palette_set_gamma(0);
if ( gr_saved_screen.video_mode == 3 ) {
switch( gr_saved_screen.height ) {
case 43: gr_set_text_43(); break;
case 50: gr_set_text_50(); break;
default: gr_set_text_25(); break;
}
} else {
gr_set_misc_mode(gr_saved_screen.video_mode);
}
if (gr_saved_screen.is_graphics==0) {
gr_sync_display();
gr_sync_display();
gr_palette_read( gr_pal_default );
gr_palette_clear();
for (i=0; i < gr_saved_screen.width*gr_saved_screen.height; i++ )