mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-30 15:39:54 +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;
|
auto& la = multi::lactionpressed;
|
||||||
|
|
||||||
if(a[16+4] && !la[16+4] && !paused) fire();
|
if(a[16+4] && !la[16+4] && !paused) fire();
|
||||||
if(a[16+5] && !la[16+5]) {
|
if(a[16+5] && !la[16+5]) 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(a[16+6] && !la[16+6]) view_proper_times = !view_proper_times;
|
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+7] && !la[16+7]) auto_rotate = !auto_rotate;
|
||||||
if(a[16+8] && !la[16+8]) pushScreen(game_menu);
|
if(a[16+8] && !la[16+8]) pushScreen(game_menu);
|
||||||
|
@ -334,17 +334,7 @@ bool ds_turn(int idelta) {
|
|||||||
auto& la = multi::lactionpressed;
|
auto& la = multi::lactionpressed;
|
||||||
|
|
||||||
if(a[16+4] && !la[16+4] && !paused) ds_fire();
|
if(a[16+4] && !la[16+4] && !paused) ds_fire();
|
||||||
if(a[16+5] && !la[16+5]) {
|
if(a[16+5] && !la[16+5]) switch_pause();
|
||||||
paused = !paused;
|
|
||||||
if(paused) {
|
|
||||||
current_ship = current;
|
|
||||||
view_pt = 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
current = current_ship;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(a[16+6] && !la[16+6]) view_proper_times = !view_proper_times;
|
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+7] && !la[16+7]) auto_rotate = !auto_rotate;
|
||||||
if(a[16+8] && !la[16+8]) pushScreen(game_menu);
|
if(a[16+8] && !la[16+8]) pushScreen(game_menu);
|
||||||
|
@ -128,6 +128,7 @@ void run_ds_game();
|
|||||||
/** in the replay mode */
|
/** in the replay mode */
|
||||||
bool in_replay;
|
bool in_replay;
|
||||||
void switch_replay();
|
void switch_replay();
|
||||||
|
void switch_pause();
|
||||||
void replay_animation();
|
void replay_animation();
|
||||||
|
|
||||||
void switch_underlying();
|
void switch_underlying();
|
||||||
|
@ -6,6 +6,21 @@ namespace ads_game {
|
|||||||
|
|
||||||
hrmap *map_hyp;
|
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;
|
bool hv_klein = false;
|
||||||
|
|
||||||
transmatrix Duality;
|
transmatrix Duality;
|
||||||
|
Loading…
Reference in New Issue
Block a user