mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-13 22:52:49 +00:00
ads-game:: spacetime functions renamed
This commit is contained in:
parent
17e2a56320
commit
c6dad6ee99
@ -131,7 +131,9 @@ void switch_replay();
|
|||||||
void switch_pause();
|
void switch_pause();
|
||||||
void replay_animation();
|
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);
|
bool ads_draw_cell(cell *c, const shiftmatrix& V);
|
||||||
extern transmatrix Duality;
|
extern transmatrix Duality;
|
||||||
extern int use_duality;
|
extern int use_duality;
|
||||||
|
@ -27,7 +27,15 @@ int use_duality = 2;
|
|||||||
|
|
||||||
transmatrix Duality;
|
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();
|
clearMessages();
|
||||||
|
|
||||||
if(main_rock) {
|
if(main_rock) {
|
||||||
@ -173,6 +181,7 @@ void switch_replay() {
|
|||||||
auto view_hooks =
|
auto view_hooks =
|
||||||
+ arg::add3("-ds-recenter", [] { current = Id; })
|
+ arg::add3("-ds-recenter", [] { current = Id; })
|
||||||
+ arg::add3("-ds-record", switch_replay)
|
+ 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);
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user