void toggle_fullscreen() { BITMAP *bmp = set_screen(is_windowed_mode()); if (bmp->w == virt_screen->w) destroy_bitmap(bmp); else { if (bmp->w > virt_screen->w) { int h = 400; if (in_menu) { blit(virt_screen, screen, 0, 384, 0, 464, 512, 16); h = 384; } blit(virt_screen, bmp, 0, 0, 64, 0, 512, h); curs_x += 8; } else { blit(virt_screen, bmp, 64, 0, 0, 0, 512, 400); curs_x -= 8; } margin_x = getmargin_x(); destroy_bitmap(virt_screen); virt_screen = bmp; } refresh_needed = 1; refreshscreen(); }
void textgfx_entergame() { if (menuheight) { menuheight = 0; clearwin(0); margin_x = getmargin_x(); } }
void textgfx_entermenu() { while (curs_y < 4) newln(0); menuheight = 4; margin_x = getmargin_x(); draw_tetris_logo(0, 0); }