1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +00:00

ads-game:: spacetime functions renamed

This commit is contained in:
Zeno Rogue 2022-10-15 14:26:12 +02:00
parent 17e2a56320
commit c6dad6ee99
2 changed files with 14 additions and 3 deletions

View File

@ -131,7 +131,9 @@ void switch_replay();
void switch_pause();
void replay_animation();
void switch_underlying();
bool in_spacetime();
void switch_spacetime();
void switch_spacetime_to(bool);
bool ads_draw_cell(cell *c, const shiftmatrix& V);
extern transmatrix Duality;
extern int use_duality;

View File

@ -27,7 +27,15 @@ int use_duality = 2;
transmatrix Duality;
void switch_underlying() {
void switch_spacetime_to(bool b) {
if(in_spacetime() != b) switch_spacetime();
}
bool in_spacetime() {
return main_rock ? hyperbolic : rotspace;
}
void switch_spacetime() {
clearMessages();
if(main_rock) {
@ -173,6 +181,7 @@ void switch_replay() {
auto view_hooks =
+ arg::add3("-ds-recenter", [] { current = Id; })
+ arg::add3("-ds-record", switch_replay)
+ arg::add3("-ds-switchu", switch_underlying);
+ arg::add3("-ads-duality", [] { arg::shift(); use_duality = arg::argi(); })
+ arg::add3("-ds-switchu", switch_spacetime);
}}