mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-06-15 01:39:57 +00:00
updated Android to 11.3i
This commit is contained in:
parent
5dbbf233fa
commit
348f1afcb0
4
hyper.h
4
hyper.h
|
@ -13,8 +13,8 @@
|
||||||
#define _HYPER_H_
|
#define _HYPER_H_
|
||||||
|
|
||||||
// version numbers
|
// version numbers
|
||||||
#define VER "11.3h"
|
#define VER "11.3i"
|
||||||
#define VERNUM_HEX 0xA828
|
#define VERNUM_HEX 0xA829
|
||||||
|
|
||||||
#include "sysconfig.h"
|
#include "sysconfig.h"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.roguetemple.hyperroid"
|
package="com.roguetemple.hyperroid"
|
||||||
android:versionCode="11308" android:versionName="11.3h"
|
android:versionCode="11309" android:versionName="11.3i"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -->
|
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -->
|
||||||
<!-- <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="9" /> -->
|
<!-- <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="9" /> -->
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class GLText {
|
||||||
allchars = new StringBuffer();
|
allchars = new StringBuffer();
|
||||||
for(char c=32; c<=126; c++)
|
for(char c=32; c<=126; c++)
|
||||||
allchars.append(c);
|
allchars.append(c);
|
||||||
allchars.append("°²´½ÁÄÇÈÉÍÎÖÚÜßàáâãäçèéêìíîïòóôõöøùúüýąćČčĎďĘęĚěğİıŁłńňŘřŚśŞşŠšŤťůŹźŻżŽžδϕЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяёᵈ∞");
|
allchars.append("°²´½ÁÄÇÈÉÍÎÖÚÜßàáâãäçèéêìíîïòóôõöøùúüýąćČčĎďĘęĚěğİıŁłńňŘřŚśŞşŠšŤťůŹźŻżŽžΘδλπϕЁАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяёᵈ←→∞⌫⏎");
|
||||||
}
|
}
|
||||||
|
|
||||||
int numChars() {
|
int numChars() {
|
||||||
|
|
|
@ -635,8 +635,8 @@ public class HyperRogue extends Activity implements SensorEventListener {
|
||||||
|
|
||||||
Sensor mRotation; // mAccelerometer, mMagneticField;
|
Sensor mRotation; // mAccelerometer, mMagneticField;
|
||||||
|
|
||||||
final int[] msgn = {1, 1, -1};
|
final int[] msgn = {1, 1, 1};
|
||||||
final int[] msgnl = {1, -1, 1};
|
final int[] msgnl = {1, 1, -1};
|
||||||
final int[] lsc = {1, 0, 2};
|
final int[] lsc = {1, 0, 2};
|
||||||
|
|
||||||
double getOrientation(int i, int j) {
|
double getOrientation(int i, int j) {
|
||||||
|
@ -656,11 +656,23 @@ public class HyperRogue extends Activity implements SensorEventListener {
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
int rotation = getWindowManager().getDefaultDisplay().getRotation();
|
int rotation = getWindowManager().getDefaultDisplay().getRotation();
|
||||||
if((rotation & 1) == 1)
|
|
||||||
return mRotationMatrix[lsc[j]+3*lsc[i]]*msgnl[i]*msgnl[j];
|
|
||||||
|
|
||||||
|
switch(rotation) {
|
||||||
|
case android.view.Surface.ROTATION_0:
|
||||||
|
return mRotationMatrix[j+3*i];
|
||||||
|
|
||||||
return mRotationMatrix[j+3*i]*msgn[i]*msgn[j];
|
case android.view.Surface.ROTATION_90:
|
||||||
|
return mRotationMatrix[lsc[j]+3*i] * (j==0?-1:1);
|
||||||
|
|
||||||
|
case android.view.Surface.ROTATION_270:
|
||||||
|
return mRotationMatrix[lsc[j]+3*i]*(j==1?-1:1);
|
||||||
|
|
||||||
|
case android.view.Surface.ROTATION_180:
|
||||||
|
return mRotationMatrix[j+3*i]*(j<2?-1:1);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return mRotationMatrix[j+3*i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -705,6 +717,7 @@ class HRConfigChooser implements EGLConfigChooser {
|
||||||
EGL10.EGL_GREEN_SIZE, 6,
|
EGL10.EGL_GREEN_SIZE, 6,
|
||||||
EGL10.EGL_BLUE_SIZE, 5,
|
EGL10.EGL_BLUE_SIZE, 5,
|
||||||
EGL10.EGL_STENCIL_SIZE, 1,
|
EGL10.EGL_STENCIL_SIZE, 1,
|
||||||
|
EGL10.EGL_DEPTH_SIZE, 8,
|
||||||
EGL10.EGL_NONE
|
EGL10.EGL_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -730,9 +743,10 @@ class HRConfigChooser implements EGLConfigChooser {
|
||||||
int b = getValue(egl, display, config, EGL10.EGL_BLUE_SIZE);
|
int b = getValue(egl, display, config, EGL10.EGL_BLUE_SIZE);
|
||||||
int a = getValue(egl, display, config, EGL10.EGL_ALPHA_SIZE);
|
int a = getValue(egl, display, config, EGL10.EGL_ALPHA_SIZE);
|
||||||
int score = 10000;
|
int score = 10000;
|
||||||
if (s == 0) score -= 1000;
|
if (s == 0) score -= 2000;
|
||||||
score -= s;
|
score -= s;
|
||||||
score -= d;
|
if (d < 8) score -= 1000;
|
||||||
|
score += d;
|
||||||
score -= a;
|
score -= a;
|
||||||
int all = r + g + b;
|
int all = r + g + b;
|
||||||
if (all < 24) score -= 10 * (24 - all);
|
if (all < 24) score -= 10 * (24 - all);
|
||||||
|
|
|
@ -35,18 +35,11 @@
|
||||||
char android_log_buf[1000000];
|
char android_log_buf[1000000];
|
||||||
int android_log_bufpos = 0;
|
int android_log_bufpos = 0;
|
||||||
|
|
||||||
|
FILE *slog;
|
||||||
|
|
||||||
#define SPECIAL_LOGGER
|
#define SPECIAL_LOGGER
|
||||||
|
|
||||||
void special_log(char c) {
|
void special_log(char c);
|
||||||
if(c == 10 || android_log_bufpos == 999999) {
|
|
||||||
android_log_buf[android_log_bufpos] = 0;
|
|
||||||
__android_log_print(ANDROID_LOG_VERBOSE, "HRLOG", "%s", android_log_buf);
|
|
||||||
android_log_bufpos = 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
android_log_buf[android_log_bufpos++] = c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -56,15 +49,28 @@ void gdpush(int t);
|
||||||
|
|
||||||
void shareScore(MOBPAR_FORMAL);
|
void shareScore(MOBPAR_FORMAL);
|
||||||
|
|
||||||
bool settingsChanged = false;
|
|
||||||
|
|
||||||
const char *scorefile;
|
const char *scorefile;
|
||||||
|
|
||||||
|
bool settingsChanged = false;
|
||||||
|
|
||||||
struct transmatrix getOrientation();
|
struct transmatrix getOrientation();
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "../../../../../hyper.cpp"
|
#include "../../../../../hyper.cpp"
|
||||||
|
|
||||||
|
void special_log(char c) {
|
||||||
|
if(slog) fprintf(slog, "%c", c), fflush(slog); /*
|
||||||
|
if(c == 10 || android_log_bufpos == 999999) {
|
||||||
|
android_log_buf[android_log_bufpos] = 0;
|
||||||
|
__android_log_print(ANDROID_LOG_VERBOSE, "HRLOG", "%s", android_log_buf);
|
||||||
|
android_log_bufpos = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
android_log_buf[android_log_bufpos++] = c;
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace hr {
|
namespace hr {
|
||||||
|
|
||||||
// #define delref env->DeleteLocalRef(_thiz)
|
// #define delref env->DeleteLocalRef(_thiz)
|
||||||
|
@ -204,6 +210,7 @@ Java_com_roguetemple_hyperroid_HyperRogue_setFilesDir(MOBPAR_FORMAL, jstring dir
|
||||||
chmod(scorefile, 0777);
|
chmod(scorefile, 0777);
|
||||||
chmod(conffile, 0777);
|
chmod(conffile, 0777);
|
||||||
chmod(nativeString, 0777);
|
chmod(nativeString, 0777);
|
||||||
|
chmod((string(nativeString)+"/..").c_str(), 0777);
|
||||||
env->ReleaseStringUTFChars(dir, nativeString);
|
env->ReleaseStringUTFChars(dir, nativeString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,7 +308,9 @@ extern "C" void Java_com_roguetemple_hyperroid_HyperRogue_draw(MOBPAR_FORMAL) {
|
||||||
|
|
||||||
#if HNEW
|
#if HNEW
|
||||||
// text is drawn with 'textured'
|
// text is drawn with 'textured'
|
||||||
glhr::be_textured();
|
dynamicval<eModel> p(pmodel, mdManual);
|
||||||
|
current_display->next_shader_flags = GF_TEXTURE;
|
||||||
|
current_display->set_all(0);
|
||||||
glhr::set_depthtest(false);
|
glhr::set_depthtest(false);
|
||||||
current_display->set_viewport(0);
|
current_display->set_viewport(0);
|
||||||
current_display->set_mask(0);
|
current_display->set_mask(0);
|
||||||
|
@ -344,7 +353,6 @@ extern "C" void Java_com_roguetemple_hyperroid_HyperRogue_update
|
||||||
mousex = _mousex;
|
mousex = _mousex;
|
||||||
mousey = _mousey;
|
mousey = _mousey;
|
||||||
clicked = _clicked;
|
clicked = _clicked;
|
||||||
// ticks = _ticks;
|
|
||||||
uploadAll(MOBPAR_ACTUAL);
|
uploadAll(MOBPAR_ACTUAL);
|
||||||
UNLOCK
|
UNLOCK
|
||||||
// delref;
|
// delref;
|
||||||
|
@ -358,7 +366,7 @@ void playSound(cell *c, const string& fname, int vol) {
|
||||||
soundsToPlay.push_back(make_pair(fname, vol));
|
soundsToPlay.push_back(make_pair(fname, vol));
|
||||||
}
|
}
|
||||||
|
|
||||||
transmatrix orientation;
|
transmatrix orientation = Id;
|
||||||
bool orientation_requested;
|
bool orientation_requested;
|
||||||
|
|
||||||
transmatrix getOrientation() {
|
transmatrix getOrientation() {
|
||||||
|
@ -375,6 +383,9 @@ void uploadAll(JNIEnv *env, jobject thiz) {
|
||||||
for(int i=0; i<3; i++)
|
for(int i=0; i<3; i++)
|
||||||
for(int j=0; j<3; j++)
|
for(int j=0; j<3; j++)
|
||||||
orientation[i][j] = env->CallDoubleMethod(thiz, mid, i, j);
|
orientation[i][j] = env->CallDoubleMethod(thiz, mid, i, j);
|
||||||
|
for(int i=0; i<3; i++)
|
||||||
|
orientation[i][3] = orientation[3][i] = 0;
|
||||||
|
orientation[3][3] = 1;
|
||||||
orientation_requested = false;
|
orientation_requested = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,6 +163,7 @@ void snow_slide(vector<tour::slide>& v, string title, string desc, reaction_t t)
|
||||||
tour::slide_backup<ld>(snow_lambda, 1);
|
tour::slide_backup<ld>(snow_lambda, 1);
|
||||||
tour::slide_backup(snow_color, 0xC0C0C0FF);
|
tour::slide_backup(snow_color, 0xC0C0C0FF);
|
||||||
tour::slide_backup(snow_intense, true);
|
tour::slide_backup(snow_intense, true);
|
||||||
|
tour::slide_backup(smooth_scrolling, true);
|
||||||
t();
|
t();
|
||||||
start_game();
|
start_game();
|
||||||
playermoved = false;
|
playermoved = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user