1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-14 12:47:10 +00:00

adjusted mobile to the new system

This commit is contained in:
Zeno Rogue
2020-04-06 08:37:22 +02:00
parent 548f1d3c1e
commit 9a84dfb497
10 changed files with 47 additions and 27 deletions

View File

@@ -8,8 +8,6 @@
#include "hyper.h"
namespace hr {
#if CU_INIT
#if ISANDROID
string buildScoreDescription() {
string s;
@@ -50,7 +48,9 @@ string buildScoreDescription() {
int andmode;
bool lclicked = false, clicked = false;
bool lclicked = false;
EX bool clicked = false;
EX bool buttonclicked = false;
string lmouseovers;
bool inmenu = false;
@@ -90,9 +90,9 @@ void handleclick(MOBPAR_FORMAL) {
else if(statkeys && getcstat == 't') {
if(playermoved && items[itStrongWind]) {
cell *c = whirlwind::jumpDestination(cwt.at);
if(c) centerover.at = c, centerover.spin = 0;
if(c) centerover = c;
}
targetRangedOrb(centerover.at, roKeyboard);
targetRangedOrb(centerover, roKeyboard);
getcstat = 0;
}
@@ -112,7 +112,7 @@ void handleclick(MOBPAR_FORMAL) {
ors::reset();
centerpc(INF);
View = Id;
centerover = cwt.at->master;
centerover = cwt.at;
}
andmode = 11;
}
@@ -151,7 +151,7 @@ void handleclick(MOBPAR_FORMAL) {
if(!playerfound) {
centerpc(INF);
View = Id;
centerover = cwt.at->master;
centerover = cwt.at;
}
playermoved = true;
}
@@ -198,7 +198,7 @@ void apply_orientation() {
}
#endif
void mobile_draw(MOBPAR_FORMAL) {
EX void mobile_draw(MOBPAR_FORMAL) {
apply_memory_reserve();
optimizeview();
@@ -358,7 +358,7 @@ void mobile_draw(MOBPAR_FORMAL) {
lticks_rug = ticks;
if(andmode == 1 && lclicked && !clicked && normal_reaction && mouseover)
performMarkCommand(mouseover);
mine::performMarkCommand(mouseover);
if(clicked && andmode == 2 && (mouseover != lmouseover || mouseovers != lmouseovers) && normal_reaction) {
addMessage(mouseovers);
@@ -394,10 +394,4 @@ void mobile_draw(MOBPAR_FORMAL) {
#endif
#if !CAP_AUDIO
void playSound(cell*, const string &s, int vol) { printf("play sound: %s vol %d\n", s.c_str(), vol); }
#endif
#endif
}