1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

disabled game playing if 'renderonce' is on; in Android LR, clicking gives the menu instead of doing something else

This commit is contained in:
Zeno Rogue 2018-03-02 13:05:31 +01:00
parent 166e394e35
commit 7ab6cb3c8b
4 changed files with 21 additions and 7 deletions

View File

@ -402,6 +402,8 @@ void handleKeyNormal(int sym, int uni) {
} }
else if(forcetarget) else if(forcetarget)
; ;
else if(rug::rugged && rug::renderonce)
;
else if(!DEFAULTCONTROL) { else if(!DEFAULTCONTROL) {
if(!shmup::on) if(!shmup::on)
multi::mousemovement(mouseover); multi::mousemovement(mouseover);

View File

@ -5525,7 +5525,7 @@ void gamescreen(int _darken) {
buttonclicked = false; buttonclicked = false;
if(cmode & sm::NORMAL) { if((cmode & sm::NORMAL) && stereo::mode != stereo::sLR) {
if(andmode == 0 && shmup::on) { if(andmode == 0 && shmup::on) {
using namespace shmupballs; using namespace shmupballs;
calc(); calc();

View File

@ -1159,7 +1159,7 @@ bool hasSafeOrb(cell *c);
void placeWater(cell *c, cell *c2); void placeWater(cell *c, cell *c2);
bool againstCurrent(cell *w, cell *from); bool againstCurrent(cell *w, cell *from);
#define DEFAULTCONTROL (multi::players == 1 && !shmup::on && !multi::alwaysuse) #define DEFAULTCONTROL (multi::players == 1 && !shmup::on && !multi::alwaysuse && !(rug::rugged && rug::renderonce))
#define DEFAULTNOR(sym) (DEFAULTCONTROL || multi::notremapped(sym)) #define DEFAULTNOR(sym) (DEFAULTCONTROL || multi::notremapped(sym))
extern bool timerghost; extern bool timerghost;

View File

@ -756,6 +756,18 @@ void mobile_draw(MOBPAR_FORMAL) {
} }
#endif #endif
bool normal_reaction = !inmenu;
if(normal_reaction && stereo::mode == stereo::sLR) {
normal_reaction = false;
if(lclicked && !clicked) {
if(rug::rugged)
rug::select();
else
pushScreen(showStereo);
}
}
if(andmode == 2 && size(screens) != 1) andmode = 12; if(andmode == 2 && size(screens) != 1) andmode = 12;
if((cmode & sm::NORMAL) && getcstat == '-') if((cmode & sm::NORMAL) && getcstat == '-')
@ -769,7 +781,7 @@ void mobile_draw(MOBPAR_FORMAL) {
displayTexts(); displayTexts();
#endif #endif
if(clicked && lclicked && andmode == 1 && (cmode & sm::NORMAL)) { if(clicked && lclicked && andmode == 1 && normal_reaction) {
if(!mouseout2() && mouseoh[2] < 50 && mouseh[2] < 50 && !rug::rugged) { if(!mouseout2() && mouseoh[2] < 50 && mouseh[2] < 50 && !rug::rugged) {
panning(mouseoh, mouseh); panning(mouseoh, mouseh);
} }
@ -778,16 +790,16 @@ void mobile_draw(MOBPAR_FORMAL) {
static int lticks_rug; static int lticks_rug;
#if CAP_RUG #if CAP_RUG
if(andmode == 1 && !inmenu && rug::rugged && clicked) if(andmode == 1 && normal_reaction && rug::rugged && clicked)
rug::move_forward((ticks - lticks_rug) / 2500.); rug::move_forward((ticks - lticks_rug) / 2500.);
#endif #endif
lticks_rug = ticks; lticks_rug = ticks;
if(andmode == 1 && lclicked && !clicked && !inmenu && mouseover) if(andmode == 1 && lclicked && !clicked && normal_reaction && mouseover)
performMarkCommand(mouseover); performMarkCommand(mouseover);
if(clicked && andmode == 2 && (mouseover != lmouseover || mouseovers != lmouseovers) && !inmenu) { if(clicked && andmode == 2 && (mouseover != lmouseover || mouseovers != lmouseovers) && normal_reaction) {
addMessage(mouseovers); addMessage(mouseovers);
lmouseovers = mouseovers; lmouseovers = mouseovers;
} }