mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +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
|
#if CAP_FILES && CAP_SHOT && CAP_ANIMATIONS
|
||||||
addsaver(anims::animfile, "animation file format");
|
addsaver(anims::animfile, "animation file format");
|
||||||
#endif
|
#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
|
#if CAP_RUG
|
||||||
addsaver(rug::move_on_touch, "rug move on touch");
|
addsaver(rug::move_on_touch, "rug move on touch");
|
||||||
@ -522,16 +509,6 @@ EX void initConfig() {
|
|||||||
addsaver(crystal::view_coordinates, "crystal-coordinates");
|
addsaver(crystal::view_coordinates, "crystal-coordinates");
|
||||||
#endif
|
#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
|
#if CAP_TEXTURE
|
||||||
addsaver(texture::texture_aura, "texture-aura", false);
|
addsaver(texture::texture_aura, "texture-aura", false);
|
||||||
#endif
|
#endif
|
||||||
@ -619,16 +596,6 @@ EX void initConfig() {
|
|||||||
|
|
||||||
addsaver(vid.consider_shader_projection, "shader-projection", true);
|
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(tortoise::shading_enabled, "tortoise_shading", true);
|
||||||
|
|
||||||
addsaver(bounded_mine_percentage, "bounded_mine_percentage");
|
addsaver(bounded_mine_percentage, "bounded_mine_percentage");
|
||||||
|
13
racing.cpp
13
racing.cpp
@ -851,9 +851,10 @@ int readArgs() {
|
|||||||
int tstart, tstop;
|
int tstart, tstop;
|
||||||
heptspin sview;
|
heptspin sview;
|
||||||
|
|
||||||
#if CAP_COMMANDLINE
|
|
||||||
auto hook =
|
auto hook =
|
||||||
|
#if CAP_COMMANDLINE
|
||||||
addHook(hooks_args, 100, readArgs)
|
addHook(hooks_args, 100, readArgs)
|
||||||
|
#endif
|
||||||
+ addHook(hooks_clearmemory, 0, []() {
|
+ addHook(hooks_clearmemory, 0, []() {
|
||||||
track_ready = false;
|
track_ready = false;
|
||||||
track.clear();
|
track.clear();
|
||||||
@ -861,9 +862,17 @@ auto hook =
|
|||||||
rti_id.clear();
|
rti_id.clear();
|
||||||
for(auto &ch: current_history) ch.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);
|
// + addHook(hooks_handleKey, 120, akh);
|
||||||
;
|
;
|
||||||
#endif
|
|
||||||
|
|
||||||
EX vector<eLand> race_lands = {
|
EX vector<eLand> race_lands = {
|
||||||
laHunting,
|
laHunting,
|
||||||
|
@ -233,6 +233,17 @@ int read_args() {
|
|||||||
|
|
||||||
auto ah = addHook(hooks_args, 0, read_args);
|
auto ah = addHook(hooks_args, 0, read_args);
|
||||||
#endif
|
#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
|
#endif
|
||||||
EX }
|
EX }
|
||||||
|
|
||||||
@ -1790,7 +1801,19 @@ auto animhook = addHook(hooks_frame, 100, display_animation)
|
|||||||
#if CAP_COMMANDLINE
|
#if CAP_COMMANDLINE
|
||||||
+ addHook(hooks_args, 100, readArgs)
|
+ addHook(hooks_args, 100, readArgs)
|
||||||
#endif
|
#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() {
|
EX bool any_animation() {
|
||||||
if(history::on) return true;
|
if(history::on) return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user