Android fixes

This commit is contained in:
Zeno Rogue 2017-03-23 14:09:36 +01:00
parent 29719a76e6
commit 2bbb917153
14 changed files with 22 additions and 14 deletions

View File

View File

@ -8306,7 +8306,9 @@ void handlekey(int sym, int uni, extra& ev) {
else if(cmode == emOverview) handleOverview(sym, uni);
else if(cmode == emPickEuclidean) handleEuclidean(sym, uni);
#ifdef MOBILE
#ifdef HAVE_ACHIEVEMENTS
else if(cmode == emLeader) leader::handleKey(sym, uni);
#endif
#endif
else if(cmode == emColor) dialog::handleColor(sym, uni);
else if(cmode == emNumber) dialog::handleNumber(sym, uni);

View File

@ -83,3 +83,15 @@ android {
abortOnError false
}
}
dependencies {
//
// IDE setting pulls in the specific version of v4 support you have installed:
//
//compile 'com.android.support:support-v4:21.0.3'
//
// generic directive pulls in any available version of v4 support:
//
compile 'com.android.support:support-v4:+'
}

View File

@ -332,7 +332,6 @@ public class HyperRogue extends Activity {
fl.addView(glview, lp);
}
if(running) connectGames();
}
MediaPlayer backgroundmusic;

View File

@ -1,11 +1,5 @@
// Hyperbolic Rogue for Android
// Copyright (C) 2012-2016 Zeno Rogue
// number of times compiled since Oct 30: LOTS+5
// Wed Mar 8, 23:16:40
// Wed Mar 9, 01:14:57
// Web Mar 9, ~12:30
// Web Mar 10, 16:43:30
// it took 20 minutes to compile. Now it takes just 5 minutes for an unknown reason!
// HyperRogue for Android
// Copyright (C) 2012-2017 Zeno Rogue
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@ -43,7 +37,7 @@ const char *scorefile, *conffile;
bool settingsChanged = false;
#include "/home/eryx/proj/rogue/hyper/init.cpp"
#include "../../../../../init.cpp"
JNIEnv *whatever;
@ -299,6 +293,9 @@ void uploadAll(JNIEnv *env, jobject thiz) {
env->DeleteLocalRef(cls);
}
void achievement_init() {}
void achievement_close() {}
void achievement_gain(const char* s, char flags) {}
#include <unistd.h>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -534,8 +534,4 @@ void mobile_draw(MOBPAR_FORMAL) {
#endif
}
#ifdef MOBILE
#include "google-games.cpp"
#endif
#endif

View File

@ -1559,8 +1559,10 @@ void displayMenus() {
if(cmode == emHelp) showHelp();
if(cmode == em3D) show3D();
#ifdef MOBILE
#ifdef HAVE_ACHIEVEMENTS
if(cmode == emLeader) leader::showMenu();
#endif
#endif
#ifdef ROGUEVIZ
if(cmode == emRogueviz) rogueviz::showMenu();
#endif