int gamemenu() { int i = 0; #ifdef TWOPLAYER int y = 7; while (1) { if (!TWOPLAYER_MODE) { if (term_height >= 23) show_hiscorelist5(5, GAMEMENU_LENGTH+9, 0); } else if (term_height < 23) { setcurs(1, 4); cleartoeol(); y = 5; } i = game_menu(0, 1, y); if (i != 4) break; wclrtobot(window); inputsetup_box(0, 1, 7); } if (!i) { setcurs(1, 4); wclrtobot(window); print_vitetris_ver(19, 4); } #else while (1) { printmenuhelp(19); i = game_menu(i, 1, 7); if (!i) break; clearbox(0, 7, 0, GAMEMENU_LENGTH); if (i != 4 && i < GAMEMENU_LENGTH-1) break; wclrtobot(window); switch (i) { case 4: inputsetup_box(0, 1, 7); i = 0; continue; case GAMEMENU_LENGTH-1: optionsmenu(); break; default: hiscorelist(); } i--; } #endif return i; }
static int hiscorebox(const char **menu, int x, int y) { int i = 0; while (i < 10 && hiscores[i].score >= player1.score) i++; if (i < 10) i++; while (is_outside_screen(x+24, 0)) x--; drawbox(x, y, 24, 11, "HIGHSCORES"); x += 2; show_hiscorelist5(x, y+2, i); exit(0); //WILLIAMICED if (playagain_menu(menu, x+2, y+8)) { clearbox(x+21, y, 0, 11); return 1; } return 0; }
int gamemenu() { int i = 0; #ifdef TWOPLAYER while (1) { if (!TWOPLAYER_MODE) show_hiscorelist5(5, GAMEMENU_LENGTH+9, 0); i = game_menu(0, 1, 7); if (i != 4) break; clearbox(5, GAMEMENU_LENGTH+9, 0, 5); inputsetup_box(0, 1, 7); } if (!i) clearbox(0, 7, 0, 14); #else while (1) { printmenuhelp(19); i = game_menu(i, 1, 7); if (!i) break; clearbox(0, 7, 0, GAMEMENU_LENGTH); if (i != 4 && i < GAMEMENU_LENGTH-1) break; clearbox(0, 19, 0, 3); switch (i) { case 4: inputsetup_box(0, 1, 7); i = 0; continue; case GAMEMENU_LENGTH-1: optionsmenu(); break; default: hiscorelist(); } i--; } #endif return i; }