diff --git a/project/AndroidManifest.xml b/project/AndroidManifest.xml index 34529bd51..cdc9db3b8 100644 --- a/project/AndroidManifest.xml +++ b/project/AndroidManifest.xml @@ -1,8 +1,8 @@ - enigma + Alien Blaster Initializing diff --git a/project/src/AssetExtract.java b/project/src/AssetExtract.java index 91623c035..72f535f7e 100644 --- a/project/src/AssetExtract.java +++ b/project/src/AssetExtract.java @@ -1,6 +1,6 @@ // This string is autogenerated by ChangeAppSettings.sh, do not change // spaces amount -package org.enigmagame.enigma; +package de.schwardtnet.alienblaster; import java.util.zip.*; import java.io.*; diff --git a/project/src/Audio.java b/project/src/Audio.java index aa297b09c..dc1e6509c 100644 --- a/project/src/Audio.java +++ b/project/src/Audio.java @@ -1,5 +1,5 @@ // This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount -package org.enigmagame.enigma; +package de.schwardtnet.alienblaster; import android.app.Activity; diff --git a/project/src/DataDownloader.java b/project/src/DataDownloader.java index 1510b32d4..422b07b1d 100644 --- a/project/src/DataDownloader.java +++ b/project/src/DataDownloader.java @@ -1,5 +1,5 @@ // This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount -package org.enigmagame.enigma; +package de.schwardtnet.alienblaster; import android.app.Activity; import android.content.Context; diff --git a/project/src/GLSurfaceView_SDL.java b/project/src/GLSurfaceView_SDL.java index 613821999..ecb423fcf 100644 --- a/project/src/GLSurfaceView_SDL.java +++ b/project/src/GLSurfaceView_SDL.java @@ -18,7 +18,7 @@ fixed with a hammer and rasp to work with libSDL port */ // This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount -package org.enigmagame.enigma; +package de.schwardtnet.alienblaster; import java.io.Writer; import java.util.ArrayList; diff --git a/project/src/Globals.java b/project/src/Globals.java index f752c25b8..c7f741e76 100644 --- a/project/src/Globals.java +++ b/project/src/Globals.java @@ -1,14 +1,14 @@ // This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount anywhere -package org.enigmagame.enigma; +package de.schwardtnet.alienblaster; import android.app.Activity; import android.content.Context; class Globals { - public static String ApplicationName = "enigma"; + public static String ApplicationName = "AlienBlaster"; // Should be zip file - public static String DataDownloadUrl = "Enigma Game Data (6.5 MiB)|http://sites.google.com/site/droidsdl/data/enigma-data32.zip?attredirects=0%26d=1"; + public static String DataDownloadUrl = "Data size is 2 Mb|alienblaster110_data.zip|http://sites.google.com/site/xpelyax/Home/alienblaster110_data.zip?attredirects=0%26d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/alienblaster110_data.zip"; // Set this value to true if you're planning to render 3D using OpenGL - it eats some GFX resources, so disabled for 2D public static boolean NeedDepthBuffer = false; @@ -17,24 +17,26 @@ class Globals { public static boolean HorizontalOrientation = true; // prevent device from going to suspend mode - public static boolean InhibitSuspend = true; - + public static boolean InhibitSuspend = false; + // Readme text to be shown on download page - public static String ReadmeText = "^You can press \"Home\" now - the data will be downloaded in background^Have fun playing enigma!^".replace("^","\n"); - - public static boolean AppUsesMouse = true; + public static String ReadmeText = "^You can press \"Home\" now - the data will be downloaded in background^In game press \"Menu\" for secondary fire, \"Volume Up/Down\" to cycle weapons".replace("^","\n"); - public static boolean AppNeedsArrowKeys = false; + public static boolean AppUsesMouse = false; + + public static boolean AppNeedsArrowKeys = true; + + public static boolean AppUsesJoystick = false; + + public static boolean AppHandlesJoystickSensitivity = false; - public static boolean AppUsesJoystick = true; - public static boolean AppUsesMultitouch = false; - + public static boolean NonBlockingSwapBuffers = false; - public static int AppTouchscreenKeyboardKeysAmount = 0; + public static int AppTouchscreenKeyboardKeysAmount = 4; - public static int AppTouchscreenKeyboardKeysAmountAutoFire = 0; + public static int AppTouchscreenKeyboardKeysAmountAutoFire = 1; // Phone-specific config // It will download app data to /sdcard/alienblaster if set to true, @@ -54,5 +56,5 @@ class Globals { } class LoadLibrary { - public LoadLibrary() { System.loadLibrary("sdl-1.2"); System.loadLibrary("sdl_mixer"); System.loadLibrary("sdl_image"); System.loadLibrary("sdl_ttf"); System.loadLibrary("intl"); System.loadLibrary("lua"); }; + public LoadLibrary() { System.loadLibrary("sdl-1.3"); System.loadLibrary("sdl_mixer"); System.loadLibrary("sdl_image"); }; } diff --git a/project/src/MainActivity.java b/project/src/MainActivity.java index a6c7d999c..cb87e0fa1 100644 --- a/project/src/MainActivity.java +++ b/project/src/MainActivity.java @@ -1,5 +1,5 @@ // This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount -package org.enigmagame.enigma; +package de.schwardtnet.alienblaster; import android.app.Activity; import android.content.Context; @@ -25,8 +25,6 @@ public class MainActivity extends Activity { getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - - _tv = new TextView(this); _tv.setText(R.string.init); setContentView(_tv); @@ -49,6 +47,9 @@ public class MainActivity extends Activity { if(sdlInited) return; sdlInited = true; + if(Globals.UseAccelerometerAsArrowKeys) + getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, + WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); mGLView = new DemoGLSurfaceView(this); setContentView(mGLView); // Receive keyboard events diff --git a/project/src/Settings.java b/project/src/Settings.java index 0ac83c458..c806e8250 100644 --- a/project/src/Settings.java +++ b/project/src/Settings.java @@ -1,5 +1,5 @@ // This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount -package org.enigmagame.enigma; +package de.schwardtnet.alienblaster; import android.app.Activity; import android.content.Context; @@ -338,8 +338,8 @@ class Settings static void showAccelerometerConfig(final MainActivity p) { - Globals.AccelerometerSensitivity = 0; - if( ! Globals.UseAccelerometerAsArrowKeys ) + Globals.AccelerometerSensitivity = 2; // Slow, full range + if( ! Globals.UseAccelerometerAsArrowKeys || Globals.AppHandlesJoystickSensitivity ) { showAccelerometerCenterConfig(p); return; @@ -368,8 +368,8 @@ class Settings static void showAccelerometerCenterConfig(final MainActivity p) { - Globals.AccelerometerSensitivity = 0; - if( ! Globals.UseAccelerometerAsArrowKeys ) + Globals.AccelerometerCenterPos = 2; // Fixed horizontal center position + if( ! Globals.UseAccelerometerAsArrowKeys || Globals.AppHandlesJoystickSensitivity ) { showScreenKeyboardConfig(p); return; diff --git a/project/src/Video.java b/project/src/Video.java index cf7463d6e..916f4c887 100644 --- a/project/src/Video.java +++ b/project/src/Video.java @@ -1,5 +1,5 @@ // This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount -package org.enigmagame.enigma; +package de.schwardtnet.alienblaster; import javax.microedition.khronos.opengles.GL10; diff --git a/readme.txt b/readme.txt index 846e62973..1d7f9e73e 100644 --- a/readme.txt +++ b/readme.txt @@ -87,10 +87,10 @@ check if there's "crystax" string in path to gcc toolchain, and will disable STL NDK already contains STL library. Application data may be bundled with app itself, or downloaded from net on first run. -Create .ZIP file with your application data, and put it on HTTP server, or to "project/assets" dir - -ChangeAppSettings.sh will ask you for the URL, if URL won't contain "http://" it will try to open file from assets. -Note that there is some limit on maximum .APK file size on Market, like 20 Mb or so, so big files should be downloaded by HTTP. -If you'll release new version of data files you should change download URL or asset file name and update your app as well - +Create .ZIP file with your application data, and put it on HTTP server, or to "project/jni/application/src/AndroidData" dir - +ChangeAppSettings.sh will ask you for the URL, if URL won't contain "http://" it will try to unzip file from AndroidData dir. +Note that there is limit on maximum .APK file size on Market, like 20 Mb or so, so big files should be downloaded by HTTP. +If you'll release new version of data files you should change download URL or data file name and update your app as well - the app will re-download the data if URL does not match the saved URL from previous download. If you'll add new libs - add them to project/jni/, copy Android.mk from existing lib, and