diff options
author | sm0a9f4 <sm0a9f4@1dde52a2-2b62-11df-8484-2f92f965d510> | 2010-04-05 03:08:55 +0000 |
---|---|---|
committer | sm0a9f4 <sm0a9f4@1dde52a2-2b62-11df-8484-2f92f965d510> | 2010-04-05 03:08:55 +0000 |
commit | e1fe50fadc9160b2c4ee09350b781c9b80d54e1f (patch) | |
tree | 74b46dbbccadd5c3bc401b1093eeaa6495b1897a | |
parent | 3c1e67e433728684b5f228c5d4f3e5b1457bb271 (diff) | |
download | replicaisland-e1fe50fadc9160b2c4ee09350b781c9b80d54e1f.tar.gz |
Fixed tilt sensitivity crash on Moment (app code was suspect), added option to turn on debug logging from preferences.
git-svn-id: http://replicaisland.googlecode.com/svn/trunk@5 1dde52a2-2b62-11df-8484-2f92f965d510
-rw-r--r-- | AndroidManifest.xml | 2 | ||||
-rw-r--r-- | res/values/strings.xml | 10 | ||||
-rw-r--r-- | res/xml/preferences.xml | 46 | ||||
-rw-r--r-- | src/com/replica/replicaisland/AndouKun.java | 25 | ||||
-rw-r--r-- | src/com/replica/replicaisland/SliderPreference.java | 8 |
5 files changed, 61 insertions, 30 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 755f286..f383a16 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.replica.replicaisland" android:versionName="1.2" android:versionCode="10"> + package="com.replica.replicaisland" android:versionName="1.21" android:versionCode="12"> <application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" > diff --git a/res/values/strings.xml b/res/values/strings.xml index fd6575b..835e658 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -51,6 +51,7 @@ <string name="preference_enable_statistics">Report Play Statistics</string> <string name="preference_enable_statistics_summary">Sends anonymous play statistics to a server to help us make this game more fun.</string> + <string name="preference_about">About</string> <string name="preference_about_title">About Replica Island</string> <string name="preference_about_summary">Replica Island was made by Chris Pruett and Genki Mine, and produced by Tom Moss.</string> @@ -59,6 +60,9 @@ <string name="preference_thanks_summary">Special Thanks to Adrian Havill, Casey Richardson, Jason Chen, Tim Mansfield, and the Android Team for their support of this project.</string> <string name="preference_licence_title">License</string> <string name="preference_licence_summary">Portions of this game are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.</string> +<string name="preference_misc">More Information</string> +<string name="preference_enable_debug">Debug Log</string> +<string name="preference_enable_debug_summary">Output various logs to logcat. This option will slow the game down.</string> <string name="saved_game_erased_notification">Saved Game Erased</string> @@ -74,6 +78,10 @@ <string name="whats_new_dialog_ok">Rock on!</string> <string name="whats_new_dialog_message">Thanks for downloading Replica Island.\n\n <b>New in this version:</b>\n +\t• Fixed crash when adjusting tilt sensitivity on Samsung Moment.\n +\t• Added debug log option. \n +\n +<b>New in version 1.2:</b>\n \t• Crash fixes and general stability improvements. \n \t• Keyboard configuration for devices with hard keyboards. \n \t• Tilt control sensitivity controls. \n @@ -87,7 +95,7 @@ own games, check out the source at our web site, replicaisland.net. Also note that this game sends anonymous play statistics back to a server. If you’d rather not allow that, you can turn it off in the options screen.</string> -<string name="whats_new_ticker">New in this version: Crash fixes, fixes to the confusing Memory #034 puzzle, configurable controls, configurable tilt sensitivity.</string> +<string name="whats_new_ticker">New in this version: Fix to tilt sensitivity crash on Samsung Moment, debug log options. New in 1.2: Crash fixes, fixes to the confusing Memory #034 puzzle, configurable controls, configurable tilt sensitivity.</string> <!-- Toast Messages --> <string name="memory_playback_start">MEMORY PLAYBACK START</string> diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 9fea04e..9136c5e 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -101,6 +101,7 @@ </PreferenceCategory> + <PreferenceCategory android:title="@string/preference_about"> @@ -112,23 +113,36 @@ </PreferenceScreen> - <Preference - android:title="@string/preference_about_title" - android:summary="@string/preference_about_summary" - android:enabled="false" - android:selectable="false" /> - - <Preference - android:title="@string/preference_thanks_title" - android:summary="@string/preference_thanks_summary" - android:enabled="false" - android:selectable="false" /> + <PreferenceScreen + android:title="@string/preference_misc"> + + <CheckBoxPreference + android:key="enableDebug" + android:title="@string/preference_enable_debug" + android:summaryOn="@string/preference_enable_debug_summary" + android:summaryOff="@string/preference_enable_debug_summary" + android:defaultValue="false" + android:persistent="true" + /> - <Preference - android:title="@string/preference_licence_title" - android:summary="@string/preference_licence_summary" - android:enabled="false" - android:selectable="false" /> + <Preference + android:title="@string/preference_about_title" + android:summary="@string/preference_about_summary" + android:enabled="false" + android:selectable="false" /> + + <Preference + android:title="@string/preference_thanks_title" + android:summary="@string/preference_thanks_summary" + android:enabled="false" + android:selectable="false" /> + + <Preference + android:title="@string/preference_licence_title" + android:summary="@string/preference_licence_summary" + android:enabled="false" + android:selectable="false" /> + </PreferenceScreen> </PreferenceCategory> diff --git a/src/com/replica/replicaisland/AndouKun.java b/src/com/replica/replicaisland/AndouKun.java index eb08bd0..dc29132 100644 --- a/src/com/replica/replicaisland/AndouKun.java +++ b/src/com/replica/replicaisland/AndouKun.java @@ -66,6 +66,7 @@ public class AndouKun extends Activity implements SensorEventListener { public static final String PREFERENCE_CLICK_ATTACK = "enableClickAttack"; public static final String PREFERENCE_TILT_CONTROLS = "enableTiltControls"; public static final String PREFERENCE_TILT_SENSITIVITY = "tiltSensitivity"; + public static final String PREFERENCE_ENABLE_DEBUG = "enableDebug"; public static final String PREFERENCE_LEFT_KEY = "keyLeft"; public static final String PREFERENCE_RIGHT_KEY = "keyRight"; @@ -78,7 +79,7 @@ public class AndouKun extends Activity implements SensorEventListener { // If the version is a negative number, debug features (logging and a debug menu) // are enabled. - public static final int VERSION = 10; + public static final int VERSION = 12; private GLSurfaceView mGLSurfaceView; private Game mGame; @@ -102,7 +103,11 @@ public class AndouKun extends Activity implements SensorEventListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - if (VERSION < 0) { + + SharedPreferences prefs = getSharedPreferences(PREFERENCE_NAME, MODE_PRIVATE); + final boolean debugLogs = prefs.getBoolean(PREFERENCE_ENABLE_DEBUG, false); + + if (VERSION < 0 || debugLogs) { DebugLog.setDebugLogging(true); } else { DebugLog.setDebugLogging(false); @@ -137,7 +142,7 @@ public class AndouKun extends Activity implements SensorEventListener { mLevelRow = 0; mLevelIndex = 0; - SharedPreferences prefs = getSharedPreferences(PREFERENCE_NAME, MODE_PRIVATE); + mPrefsEditor = prefs.edit(); mLevelRow = prefs.getInt(PREFERENCE_LEVEL_ROW, 0); mLevelIndex = prefs.getInt(PREFERENCE_LEVEL_INDEX, 0); @@ -245,12 +250,22 @@ public class AndouKun extends Activity implements SensorEventListener { @Override protected void onResume() { super.onResume(); + + // Preferences may have changed while we were paused. + SharedPreferences prefs = getSharedPreferences(PREFERENCE_NAME, MODE_PRIVATE); + final boolean debugLogs = prefs.getBoolean(PREFERENCE_ENABLE_DEBUG, false); + + if (VERSION < 0 || debugLogs) { + DebugLog.setDebugLogging(true); + } else { + DebugLog.setDebugLogging(false); + } + DebugLog.d("AndouKun", "onResume"); mGLSurfaceView.onResume(); mGame.onResume(this, false); + - // Preferences may have changed while we were paused. - SharedPreferences prefs = getSharedPreferences(PREFERENCE_NAME, MODE_PRIVATE); final boolean soundEnabled = prefs.getBoolean(PREFERENCE_SOUND_ENABLED, true); final boolean clickAttack = prefs.getBoolean(PREFERENCE_CLICK_ATTACK, true); final boolean tiltControls = prefs.getBoolean(PREFERENCE_TILT_CONTROLS, false); diff --git a/src/com/replica/replicaisland/SliderPreference.java b/src/com/replica/replicaisland/SliderPreference.java index 1b02ca5..4e91887 100644 --- a/src/com/replica/replicaisland/SliderPreference.java +++ b/src/com/replica/replicaisland/SliderPreference.java @@ -82,14 +82,8 @@ public class SliderPreference extends Preference implements OnSeekBarChangeListe return shell; } - public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser) { - - if(!callChangeListener(progress)){ - seekBar.setProgress(mValue); - return; - } + public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { - seekBar.setProgress(progress); mValue = progress; persistInt(mValue); |