1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-07-26 20:42:49 +00:00

rogueviz::ads:: correctly restart the ads game

This commit is contained in:
Zeno Rogue 2025-04-06 09:46:07 +02:00
parent aa6727c564
commit c42d457c56

View File

@ -2,6 +2,11 @@ namespace hr {
namespace ads_game { namespace ads_game {
void restart() {
if(main_rock) ds_restart();
else ads_restart();
}
void adjust_for_scale() { void adjust_for_scale() {
ld ads_scale = get_scale(); ld ads_scale = get_scale();
if(ads_scale < 0.3) max_gen_per_frame = 1, draw_per_frame = 30; if(ads_scale < 0.3) max_gen_per_frame = 1, draw_per_frame = 30;
@ -211,8 +216,7 @@ void game_menu() {
dialog::add_action([] { dialog::add_action([] {
game_over_with_message("restarted"); game_over_with_message("restarted");
save_to_hiscores(); save_to_hiscores();
if(main_rock) ds_restart(); restart();
else restart();
popScreen(); }); popScreen(); });
dialog::addItem(XLAT("highscores"), 'h'); dialog::addItem(XLAT("highscores"), 'h');