2022-09-11 10:16:50 +00:00
|
|
|
namespace hr {
|
|
|
|
|
|
|
|
namespace ads_game {
|
|
|
|
|
2022-09-18 11:45:45 +00:00
|
|
|
void adjust_for_scale() {
|
2022-09-28 20:10:09 +00:00
|
|
|
if(ads_scale < 0.3) max_gen_per_frame = 1, draw_per_frame = 30, ads_missile_rapidity = 1;
|
|
|
|
else if(ads_scale < 0.8) max_gen_per_frame = 2, draw_per_frame = 100, ads_missile_rapidity = 1;
|
|
|
|
else max_gen_per_frame = 3, draw_per_frame = 1000, ads_missile_rapidity = 3;
|
2022-09-18 11:45:45 +00:00
|
|
|
}
|
|
|
|
|
2022-09-18 08:22:25 +00:00
|
|
|
void edit_difficulty() {
|
2022-09-18 08:26:16 +00:00
|
|
|
cmode = sm::SIDE | sm::MAYDARK;
|
|
|
|
gamescreen();
|
|
|
|
|
2022-09-18 08:22:25 +00:00
|
|
|
dialog::init(XLAT("AdS game parameters"), 0xC0C0FFFF, 150, 100);
|
2022-09-28 20:10:09 +00:00
|
|
|
add_edit(DS_(simspeed));
|
|
|
|
add_edit(DS_(accel));
|
|
|
|
add_edit(DS_(how_much_invincibility));
|
|
|
|
add_edit(DS_(scale));
|
|
|
|
|
|
|
|
if(!main_rock) {
|
|
|
|
dialog::addBreak(100);
|
|
|
|
add_edit(rock_max_rapidity);
|
|
|
|
add_edit(rock_density);
|
|
|
|
|
|
|
|
dialog::addBreak(100);
|
|
|
|
add_edit(max_gen_per_frame);
|
|
|
|
add_edit(draw_per_frame);
|
|
|
|
}
|
2022-09-18 08:22:25 +00:00
|
|
|
|
|
|
|
dialog::addBreak(100);
|
|
|
|
edit_rsrc();
|
|
|
|
|
2022-09-28 20:10:09 +00:00
|
|
|
if(!main_rock) {
|
|
|
|
dialog::addBreak(100);
|
|
|
|
dialog::addItem(XLAT("scale everything :2"), '!');
|
|
|
|
dialog::add_action([] {
|
|
|
|
change_scale(1/2.);
|
|
|
|
adjust_for_scale();
|
|
|
|
restart();
|
|
|
|
});
|
|
|
|
dialog::addItem(XLAT("scale everything *2"), '@');
|
|
|
|
dialog::add_action([] {
|
|
|
|
change_scale(2.);
|
|
|
|
adjust_for_scale();
|
|
|
|
restart();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-09-18 08:22:25 +00:00
|
|
|
dialog::addBack();
|
|
|
|
dialog::display();
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:14:46 +00:00
|
|
|
void edit_particles() {
|
|
|
|
cmode = sm::SIDE | sm::MAYDARK;
|
|
|
|
gamescreen();
|
|
|
|
|
2022-09-28 20:10:09 +00:00
|
|
|
dialog::init(XLAT("particle/texture settings"), 0xC0C0FFFF, 150, 100);
|
2022-09-18 11:14:46 +00:00
|
|
|
|
|
|
|
add_edit(crash_particle_rapidity);
|
|
|
|
add_edit(crash_particle_qty);
|
|
|
|
add_edit(crash_particle_life);
|
|
|
|
add_edit(fuel_particle_rapidity);
|
|
|
|
add_edit(fuel_particle_qty);
|
|
|
|
add_edit(fuel_particle_life);
|
|
|
|
|
2022-09-28 20:10:09 +00:00
|
|
|
if(main_rock) {
|
|
|
|
dialog::addBreak(100);
|
|
|
|
add_edit(XSCALE);
|
|
|
|
add_edit(YSCALE);
|
|
|
|
add_edit(talpha);
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:14:46 +00:00
|
|
|
dialog::addBreak(100);
|
|
|
|
dialog::addBack();
|
|
|
|
dialog::display();
|
|
|
|
}
|
|
|
|
|
2022-09-11 10:16:50 +00:00
|
|
|
void game_menu() {
|
2022-09-18 08:26:16 +00:00
|
|
|
cmode = sm::SIDE | sm::MAYDARK;
|
|
|
|
gamescreen();
|
|
|
|
|
2022-09-11 10:16:50 +00:00
|
|
|
dialog::init(XLAT("AdS game settings"), 0xC0C0FFFF, 150, 100);
|
|
|
|
|
2022-09-18 08:22:25 +00:00
|
|
|
dialog::addItem(XLAT("set game parameters"), 'm');
|
|
|
|
dialog::add_action_push(edit_difficulty);
|
|
|
|
|
|
|
|
add_edit(pause_speed);
|
2022-09-11 10:16:50 +00:00
|
|
|
add_edit(view_proper_times);
|
2022-09-28 20:10:09 +00:00
|
|
|
add_edit(DS_(time_unit));
|
|
|
|
if(!main_rock) add_edit(auto_rotate);
|
|
|
|
if(!main_rock) add_edit(auto_angle);
|
2022-09-18 08:22:25 +00:00
|
|
|
|
2022-09-28 20:10:09 +00:00
|
|
|
dialog::addItem(XLAT("particle/texture settings"), 'p');
|
2022-09-18 11:14:46 +00:00
|
|
|
dialog::add_action_push(edit_particles);
|
|
|
|
|
2022-09-18 08:22:25 +00:00
|
|
|
dialog::addItem(XLAT("restart game"), 'r');
|
|
|
|
dialog::add_action([] { ads_game::restart(); popScreen(); });
|
|
|
|
|
|
|
|
dialog::addItem(XLAT("refill cheat"), 'R');
|
|
|
|
dialog::add_action([] { init_rsrc(); popScreen(); });
|
2022-09-11 10:16:50 +00:00
|
|
|
|
|
|
|
dialog::addItem("configure keys", 'k');
|
|
|
|
dialog::add_action_push(multi::get_key_configurer(1, move_names, "Nilrider keys"));
|
|
|
|
|
|
|
|
#if CAP_AUDIO
|
|
|
|
add_edit(effvolume);
|
2022-09-28 23:12:08 +00:00
|
|
|
if(music_available) add_edit(musicvolume);
|
2022-09-11 10:16:50 +00:00
|
|
|
#endif
|
|
|
|
|
2022-09-18 08:22:25 +00:00
|
|
|
dialog::addItem("RogueViz settings", 'v');
|
2022-09-18 08:26:16 +00:00
|
|
|
dialog::add_action([] {
|
2022-09-11 10:16:50 +00:00
|
|
|
pushScreen(showSettings);
|
|
|
|
});
|
|
|
|
|
|
|
|
#if CAP_FILES && !ISWEB
|
|
|
|
dialog::addItem("save the current config", 's');
|
|
|
|
dialog::add_action([] {
|
|
|
|
dynamicval<eGeometry> g(geometry, gNormal);
|
|
|
|
saveConfig();
|
|
|
|
});
|
|
|
|
#endif
|
|
|
|
|
2022-09-18 08:26:16 +00:00
|
|
|
dialog::addItem("quit the game", 'q');
|
|
|
|
dialog::add_action([] {
|
|
|
|
quitmainloop = true;
|
|
|
|
});
|
|
|
|
|
2022-09-11 10:16:50 +00:00
|
|
|
dialog::addBreak(100);
|
|
|
|
dialog::addBack();
|
|
|
|
dialog::display();
|
|
|
|
}
|
|
|
|
|
|
|
|
}}
|