mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
moved more settings from config.cpp to shot and racing
This commit is contained in:
parent
a59ddc6c31
commit
b28b2cc5c4
33
config.cpp
33
config.cpp
@ -499,19 +499,6 @@ EX void initConfig() {
|
||||
#if CAP_FILES && CAP_SHOT && CAP_ANIMATIONS
|
||||
addsaver(anims::animfile, "animation file format");
|
||||
#endif
|
||||
#if CAP_ANIMATIONS
|
||||
addparamsaver(anims::period, "aperiod", "animation period");
|
||||
addsaver(anims::noframes, "animation frames");
|
||||
addparamsaver(anims::cycle_length, "acycle", "animation cycle length");
|
||||
addparamsaver(anims::parabolic_length, "aparabolic", "animation parabolic length");
|
||||
addparamsaver(anims::rug_angle, "arugangle", "animation rug angle");
|
||||
addparamsaver(anims::circle_radius, "acradius", "animation circle radius");
|
||||
addparamsaver(anims::circle_spins, "acspins", "animation circle spins");
|
||||
addsaver(anims::rug_movement_angle, "rug forward movement angle", 90);
|
||||
addsaver(anims::rug_shift_angle, "rug forward shift angle", 0);
|
||||
addsaver(anims::a, "a", 0);
|
||||
addsaver(anims::b, "b", 0);
|
||||
#endif
|
||||
|
||||
#if CAP_RUG
|
||||
addsaver(rug::move_on_touch, "rug move on touch");
|
||||
@ -522,16 +509,6 @@ EX void initConfig() {
|
||||
addsaver(crystal::view_coordinates, "crystal-coordinates");
|
||||
#endif
|
||||
|
||||
#if CAP_SHOT
|
||||
addsaver(shot::shotx, "shotx");
|
||||
addsaver(shot::shoty, "shoty");
|
||||
addsaverenum(shot::format, "shotsvg");
|
||||
addsaver(shot::transparent, "shottransparent");
|
||||
addparamsaver(shot::gamma, "shotgamma");
|
||||
addsaver(shot::caption, "shotcaption");
|
||||
addparamsaver(shot::fade, "shotfade");
|
||||
#endif
|
||||
|
||||
#if CAP_TEXTURE
|
||||
addsaver(texture::texture_aura, "texture-aura", false);
|
||||
#endif
|
||||
@ -619,16 +596,6 @@ EX void initConfig() {
|
||||
|
||||
addsaver(vid.consider_shader_projection, "shader-projection", true);
|
||||
|
||||
#if CAP_RACING
|
||||
addsaver(racing::race_advance, "race_advance");
|
||||
addsaver(racing::race_angle, "race_angle");
|
||||
addsaver(racing::ghosts_to_show, "race_ghosts_to_show");
|
||||
addsaver(racing::ghosts_to_save, "race_ghosts_to_save");
|
||||
addsaver(racing::guiding, "race_guiding");
|
||||
addsaver(racing::player_relative, "race_player_relative");
|
||||
addsaver(racing::standard_centering, "race_standard_centering");
|
||||
#endif
|
||||
|
||||
addsaver(tortoise::shading_enabled, "tortoise_shading", true);
|
||||
|
||||
addsaver(bounded_mine_percentage, "bounded_mine_percentage");
|
||||
|
13
racing.cpp
13
racing.cpp
@ -851,9 +851,10 @@ int readArgs() {
|
||||
int tstart, tstop;
|
||||
heptspin sview;
|
||||
|
||||
#if CAP_COMMANDLINE
|
||||
auto hook =
|
||||
#if CAP_COMMANDLINE
|
||||
addHook(hooks_args, 100, readArgs)
|
||||
#endif
|
||||
+ addHook(hooks_clearmemory, 0, []() {
|
||||
track_ready = false;
|
||||
track.clear();
|
||||
@ -861,9 +862,17 @@ auto hook =
|
||||
rti_id.clear();
|
||||
for(auto &ch: current_history) ch.clear();
|
||||
})
|
||||
+ addHook(hooks_config, 100, [] {
|
||||
addsaver(racing::race_advance, "race_advance");
|
||||
addsaver(racing::race_angle, "race_angle");
|
||||
addsaver(racing::ghosts_to_show, "race_ghosts_to_show");
|
||||
addsaver(racing::ghosts_to_save, "race_ghosts_to_save");
|
||||
addsaver(racing::guiding, "race_guiding");
|
||||
addsaver(racing::player_relative, "race_player_relative");
|
||||
addsaver(racing::standard_centering, "race_standard_centering");
|
||||
})
|
||||
// + addHook(hooks_handleKey, 120, akh);
|
||||
;
|
||||
#endif
|
||||
|
||||
EX vector<eLand> race_lands = {
|
||||
laHunting,
|
||||
|
@ -233,6 +233,17 @@ int read_args() {
|
||||
|
||||
auto ah = addHook(hooks_args, 0, read_args);
|
||||
#endif
|
||||
auto ah2 = addHook(hooks_config, 100, [] {
|
||||
addsaver(shot::shotx, "shotx");
|
||||
addsaver(shot::shoty, "shoty");
|
||||
addsaverenum(shot::format, "shotsvg");
|
||||
addsaver(shot::transparent, "shottransparent");
|
||||
addparamsaver(shot::gamma, "shotgamma");
|
||||
addsaver(shot::caption, "shotcaption");
|
||||
addparamsaver(shot::fade, "shotfade");
|
||||
#endif
|
||||
});
|
||||
|
||||
#endif
|
||||
EX }
|
||||
|
||||
@ -1790,7 +1801,19 @@ auto animhook = addHook(hooks_frame, 100, display_animation)
|
||||
#if CAP_COMMANDLINE
|
||||
+ addHook(hooks_args, 100, readArgs)
|
||||
#endif
|
||||
;
|
||||
+ addHook(hooks_config, 100, [] {
|
||||
addparamsaver(anims::period, "aperiod", "animation period");
|
||||
addsaver(anims::noframes, "animation frames");
|
||||
addparamsaver(anims::cycle_length, "acycle", "animation cycle length");
|
||||
addparamsaver(anims::parabolic_length, "aparabolic", "animation parabolic length");
|
||||
addparamsaver(anims::rug_angle, "arugangle", "animation rug angle");
|
||||
addparamsaver(anims::circle_radius, "acradius", "animation circle radius");
|
||||
addparamsaver(anims::circle_spins, "acspins", "animation circle spins");
|
||||
addsaver(anims::rug_movement_angle, "rug forward movement angle", 90);
|
||||
addsaver(anims::rug_shift_angle, "rug forward shift angle", 0);
|
||||
addsaver(anims::a, "a", 0);
|
||||
addsaver(anims::b, "b", 0);
|
||||
});
|
||||
|
||||
EX bool any_animation() {
|
||||
if(history::on) return true;
|
||||
|
Loading…
Reference in New Issue
Block a user