1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 17:10:36 +00:00

nilrider: simulation_speed editable

This commit is contained in:
Zeno Rogue 2024-08-18 16:18:40 +02:00
parent ef2b7007de
commit b27cf6eb51
2 changed files with 8 additions and 1 deletions

View File

@ -321,6 +321,8 @@ void pick_game() {
dialog::addItem("change the track", 't'); dialog::addItem("change the track", 't');
dialog::add_action_push(pick_level); dialog::add_action_push(pick_level);
dialog::addBreak(100); dialog::addBreak(100);
add_edit(simulation_speed);
dialog::addBreak(100);
add_edit(planning_mode); add_edit(planning_mode);
dialog::addItem(XLAT("play this track"), SDLK_ESCAPE); dialog::addItem(XLAT("play this track"), SDLK_ESCAPE);
dialog::addItem(XLAT("quit Nil Rider"), 'q'); dialog::addItem(XLAT("quit Nil Rider"), 'q');
@ -621,6 +623,11 @@ void initialize() {
param_i(nilrider_tempo, "nilrider_tempo"); param_i(nilrider_tempo, "nilrider_tempo");
param_i(nilrider_shift, "nilrider_shift"); param_i(nilrider_shift, "nilrider_shift");
param_f(simulation_speed, "nilrider_simulation_speed")
-> editable(0.1, 5, 0, "Nil Rider simulation speed",
"If you want to go faster, make this higher.", 'z')
-> set_sets([] { dialog::bound_low(0); dialog::scaleLog(); });
rv_hook(hooks_frame, 100, frame); rv_hook(hooks_frame, 100, frame);
rv_hook(shmup::hooks_turn, 100, turn); rv_hook(shmup::hooks_turn, 100, turn);
rv_hook(hooks_resetGL, 100, cleanup_textures); rv_hook(hooks_resetGL, 100, cleanup_textures);

View File

@ -233,7 +233,7 @@ inline ld gfx_slope = 0;
inline double dft_block = 1; inline double dft_block = 1;
/** default block unit */ /** default block unit */
inline double simulation_speed = 2; inline double simulation_speed = 1;
extern map<char, color_t> bcols; extern map<char, color_t> bcols;
extern map<char, array<string, 16> > submaps; extern map<char, array<string, 16> > submaps;