mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
ads-game:: refactored switch_pause
This commit is contained in:
parent
a5a7e8a5fa
commit
9121eb7d72
@ -138,20 +138,7 @@ bool ads_turn(int idelta) {
|
||||
auto& la = multi::lactionpressed;
|
||||
|
||||
if(a[16+4] && !la[16+4] && !paused) fire();
|
||||
if(a[16+5] && !la[16+5]) {
|
||||
paused = !paused;
|
||||
if(paused) {
|
||||
current_ship = current;
|
||||
vctr_ship = vctr;
|
||||
vctrV_ship = vctrV;
|
||||
view_pt = 0;
|
||||
}
|
||||
else {
|
||||
current = current_ship;
|
||||
vctr = new_vctr = vctr_ship;
|
||||
vctrV = new_vctrV = vctrV_ship;
|
||||
}
|
||||
}
|
||||
if(a[16+5] && !la[16+5]) switch_pause();
|
||||
if(a[16+6] && !la[16+6]) view_proper_times = !view_proper_times;
|
||||
if(a[16+7] && !la[16+7]) auto_rotate = !auto_rotate;
|
||||
if(a[16+8] && !la[16+8]) pushScreen(game_menu);
|
||||
|
@ -334,17 +334,7 @@ bool ds_turn(int idelta) {
|
||||
auto& la = multi::lactionpressed;
|
||||
|
||||
if(a[16+4] && !la[16+4] && !paused) ds_fire();
|
||||
if(a[16+5] && !la[16+5]) {
|
||||
paused = !paused;
|
||||
if(paused) {
|
||||
current_ship = current;
|
||||
view_pt = 0;
|
||||
}
|
||||
else {
|
||||
current = current_ship;
|
||||
}
|
||||
}
|
||||
|
||||
if(a[16+5] && !la[16+5]) switch_pause();
|
||||
if(a[16+6] && !la[16+6]) view_proper_times = !view_proper_times;
|
||||
if(a[16+7] && !la[16+7]) auto_rotate = !auto_rotate;
|
||||
if(a[16+8] && !la[16+8]) pushScreen(game_menu);
|
||||
|
@ -128,6 +128,7 @@ void run_ds_game();
|
||||
/** in the replay mode */
|
||||
bool in_replay;
|
||||
void switch_replay();
|
||||
void switch_pause();
|
||||
void replay_animation();
|
||||
|
||||
void switch_underlying();
|
||||
|
@ -6,6 +6,21 @@ namespace ads_game {
|
||||
|
||||
hrmap *map_hyp;
|
||||
|
||||
void switch_pause() {
|
||||
paused = !paused;
|
||||
if(paused) {
|
||||
current_ship = current;
|
||||
vctr_ship = vctr;
|
||||
vctrV_ship = vctrV;
|
||||
view_pt = 0;
|
||||
}
|
||||
else {
|
||||
current = current_ship;
|
||||
vctr = new_vctr = vctr_ship;
|
||||
vctrV = new_vctrV = vctrV_ship;
|
||||
}
|
||||
}
|
||||
|
||||
bool hv_klein = false;
|
||||
|
||||
transmatrix Duality;
|
||||
|
Loading…
Reference in New Issue
Block a user