Teeworlds: updated
This commit is contained in:
@@ -7,10 +7,10 @@ AppName="TeeWorlds"
|
||||
AppFullName=com.teeworlds
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=06325
|
||||
AppVersionCode=06327
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="0.6.3.25"
|
||||
AppVersionName="0.6.3.27"
|
||||
|
||||
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
|
||||
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
|
||||
@@ -21,10 +21,10 @@ AppVersionName="0.6.3.25"
|
||||
AppDataDownloadUrl="!!Game data|data.zip^!!Server config|:server-config.txt:server-config.txt"
|
||||
|
||||
# Reset SDL config when updating application to the new version (y) / (n)
|
||||
ResetSdlConfigForThisVersion=y
|
||||
ResetSdlConfigForThisVersion=n
|
||||
|
||||
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
|
||||
DeleteFilesOnUpgrade="%"
|
||||
DeleteFilesOnUpgrade="libsdl-DownloadFinished-1.flag"
|
||||
|
||||
# Here you may type readme text, which will be shown during startup. Format is:
|
||||
# Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/
|
||||
@@ -143,10 +143,10 @@ AppUsesSecondJoystick=y
|
||||
AppUsesThirdJoystick=y
|
||||
|
||||
# Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7
|
||||
AppUsesAccelerometer=n
|
||||
AppUsesAccelerometer=y
|
||||
|
||||
# Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4
|
||||
AppUsesGyroscope=y
|
||||
AppUsesGyroscope=n
|
||||
|
||||
# Application uses orientation sensor (y) or (n), reported as joystick 1 axes 8-10
|
||||
AppUsesOrientationSensor=n
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
diff --git a/project/java/Accelerometer.java b/project/java/Accelerometer.java
|
||||
index 3e93b82..9796355 100644
|
||||
--- a/project/java/Accelerometer.java
|
||||
+++ b/project/java/Accelerometer.java
|
||||
@@ -45,6 +45,7 @@ class AccelerometerReader implements SensorEventListener
|
||||
public boolean openedBySDL = false;
|
||||
public static final GyroscopeListener gyro = new GyroscopeListener();
|
||||
public static final OrientationListener orientation = new OrientationListener();
|
||||
+ public static final ProximityListener proximity = new ProximityListener();
|
||||
|
||||
public AccelerometerReader(Activity context)
|
||||
{
|
||||
@@ -59,6 +60,7 @@ class AccelerometerReader implements SensorEventListener
|
||||
_manager.unregisterListener(this);
|
||||
_manager.unregisterListener(gyro);
|
||||
_manager.unregisterListener(orientation);
|
||||
+ _manager.unregisterListener(proximity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +86,11 @@ class AccelerometerReader implements SensorEventListener
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 ? Sensor.TYPE_GAME_ROTATION_VECTOR : Sensor.TYPE_ROTATION_VECTOR),
|
||||
SensorManager.SENSOR_DELAY_GAME);
|
||||
}
|
||||
+ if( _manager != null && _manager.getDefaultSensor(Sensor.TYPE_PROXIMITY) != null )
|
||||
+ {
|
||||
+ Log.i("SDL", "libSDL: starting proximity sensor");
|
||||
+ _manager.registerListener(proximity, _manager.getDefaultSensor(Sensor.TYPE_PROXIMITY), SensorManager.SENSOR_DELAY_GAME);
|
||||
+ }
|
||||
}
|
||||
|
||||
public void onSensorChanged(SensorEvent event)
|
||||
@@ -168,7 +175,22 @@ class AccelerometerReader implements SensorEventListener
|
||||
}
|
||||
}
|
||||
|
||||
+ static class ProximityListener implements SensorEventListener
|
||||
+ {
|
||||
+ public ProximityListener()
|
||||
+ {
|
||||
+ }
|
||||
+ public void onSensorChanged(SensorEvent event)
|
||||
+ {
|
||||
+ nativeProximity(event.values[0]);
|
||||
+ }
|
||||
+ public void onAccuracyChanged(Sensor s, int a)
|
||||
+ {
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
private static native void nativeAccelerometer(float accX, float accY, float accZ);
|
||||
private static native void nativeGyroscope(float X, float Y, float Z);
|
||||
private static native void nativeOrientation(float X, float Y, float Z);
|
||||
+ private static native void nativeProximity(float X);
|
||||
}
|
||||
@@ -9,3 +9,7 @@ then launch commands:
|
||||
android update project -p project
|
||||
./build.sh
|
||||
That should do it.
|
||||
|
||||
Bot sources are not available, because of cheaters that use aimbot client.
|
||||
They are available on request from here:
|
||||
https://www.teeworlds.com/forum/viewtopic.php?id=11397
|
||||
|
||||
Reference in New Issue
Block a user