Updated UQM and readme
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
<?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.googlecode.opentyrian"
|
package="com.sourceforge.sc2"
|
||||||
android:versionCode="2114"
|
android:versionCode="1011"
|
||||||
android:versionName="2.1.14 - game can be put to background with Home button and successfully restored back"
|
android:versionName="1.0.11 - game can be put to background with Home button and successfully restored back"
|
||||||
android:installLocation="preferExternal"
|
android:installLocation="preferExternal"
|
||||||
>
|
>
|
||||||
<application android:label="@string/app_name"
|
<application android:label="@string/app_name"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
# The namespace in Java file, with dots replaced with underscores
|
# The namespace in Java file, with dots replaced with underscores
|
||||||
SDL_JAVA_PACKAGE_PATH := com_googlecode_opentyrian
|
SDL_JAVA_PACKAGE_PATH := com_sourceforge_sc2
|
||||||
|
|
||||||
# Path to shared libraries - Android 1.6 cannot load them properly, thus we have to specify absolute path here
|
# Path to shared libraries - Android 1.6 cannot load them properly, thus we have to specify absolute path here
|
||||||
# SDL_SHARED_LIBRARIES_PATH := /data/data/de.schwardtnet.alienblaster/lib
|
# SDL_SHARED_LIBRARIES_PATH := /data/data/de.schwardtnet.alienblaster/lib
|
||||||
@@ -10,7 +10,7 @@ SDL_JAVA_PACKAGE_PATH := com_googlecode_opentyrian
|
|||||||
# Typically /sdcard/alienblaster
|
# Typically /sdcard/alienblaster
|
||||||
# Or /data/data/de.schwardtnet.alienblaster/files if you're planning to unpack data in application private folder
|
# Or /data/data/de.schwardtnet.alienblaster/files if you're planning to unpack data in application private folder
|
||||||
# Your application will just set current directory there
|
# Your application will just set current directory there
|
||||||
SDL_CURDIR_PATH := com.googlecode.opentyrian
|
SDL_CURDIR_PATH := com.sourceforge.sc2
|
||||||
|
|
||||||
# Android Dev Phone G1 has trackball instead of cursor keys, and
|
# Android Dev Phone G1 has trackball instead of cursor keys, and
|
||||||
# sends trackball movement events as rapid KeyDown/KeyUp events,
|
# sends trackball movement events as rapid KeyDown/KeyUp events,
|
||||||
@@ -23,17 +23,17 @@ SDL_TRACKBALL_KEYUP_DELAY := 1
|
|||||||
# resized in HW-accelerated way, however it eats a tiny bit of CPU
|
# resized in HW-accelerated way, however it eats a tiny bit of CPU
|
||||||
SDL_VIDEO_RENDER_RESIZE := 1
|
SDL_VIDEO_RENDER_RESIZE := 1
|
||||||
|
|
||||||
COMPILED_LIBRARIES := sdl_net
|
COMPILED_LIBRARIES := sdl_image
|
||||||
|
|
||||||
APPLICATION_ADDITIONAL_CFLAGS := -finline-functions -O2
|
APPLICATION_ADDITIONAL_CFLAGS := -O2 -finline-functions -DTHREADLIB_SDL=1 -DTIMELIB=SDL -DOVCODEC_TREMOR=1 -DNETPLAY=1 -DHAVE_REGEX=1 -DHAVE_GETOPT_LONG=1 -DHAVE_ZIP=1
|
||||||
|
|
||||||
APPLICATION_ADDITIONAL_LDFLAGS :=
|
APPLICATION_ADDITIONAL_LDFLAGS := -Lobj/local/armeabi -ltremor
|
||||||
|
|
||||||
APPLICATION_SUBDIRS_BUILD :=
|
APPLICATION_SUBDIRS_BUILD :=
|
||||||
|
|
||||||
APPLICATION_CUSTOM_BUILD_SCRIPT :=
|
APPLICATION_CUSTOM_BUILD_SCRIPT :=
|
||||||
|
|
||||||
SDL_ADDITIONAL_CFLAGS := -DSDL_ANDROID_KEYCODE_MOUSE=UNKNOWN -DSDL_ANDROID_KEYCODE_0=SPACE -DSDL_ANDROID_KEYCODE_1=RETURN -DSDL_ANDROID_KEYCODE_2=LCTRL -DSDL_ANDROID_KEYCODE_3=LALT -DSDL_ANDROID_KEYCODE_4=SPACE
|
SDL_ADDITIONAL_CFLAGS := -DSDL_ANDROID_KEYCODE_MOUSE=UNKNOWN -DSDL_ANDROID_KEYCODE_0=RETURN -DSDL_ANDROID_KEYCODE_1=RSHIFT -DSDL_ANDROID_KEYCODE_2=KP_PLUS -DSDL_ANDROID_KEYCODE_3=KP_MINUS -DSDL_ANDROID_KEYCODE_4=ESCAPE -DSDL_ANDROID_KEYCODE_5=F10
|
||||||
|
|
||||||
# If SDL_Mixer should link to libMAD
|
# If SDL_Mixer should link to libMAD
|
||||||
SDL_MIXER_USE_LIBMAD :=
|
SDL_MIXER_USE_LIBMAD :=
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ APP_PROJECT_PATH := $(call my-dir)/..
|
|||||||
# sdl_image depends on png and jpeg
|
# sdl_image depends on png and jpeg
|
||||||
# sdl_ttf depends on freetype
|
# sdl_ttf depends on freetype
|
||||||
|
|
||||||
APP_MODULES := application sdl sdl_main stlport tremor png jpeg freetype sdl_net
|
APP_MODULES := application sdl sdl_main stlport tremor png jpeg freetype sdl_image
|
||||||
|
|
||||||
APP_ABI := armeabi
|
APP_ABI := armeabi
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ RedefinedKeys="RETURN RSHIFT KP_PLUS KP_MINUS ESCAPE F10"
|
|||||||
AppTouchscreenKeyboardKeysAmount=2
|
AppTouchscreenKeyboardKeysAmount=2
|
||||||
AppTouchscreenKeyboardKeysAmountAutoFire=2
|
AppTouchscreenKeyboardKeysAmountAutoFire=2
|
||||||
MultiABI=n
|
MultiABI=n
|
||||||
AppVersionCode=1010
|
AppVersionCode=1011
|
||||||
AppVersionName="1.0.10 - fixed overwriting savegames, added support for 3DO videos (you should copy them from your 3DO game CD)"
|
AppVersionName="1.0.11 - game can be put to background with Home button and successfully restored back"
|
||||||
CompiledLibraries="sdl_image"
|
CompiledLibraries="sdl_image"
|
||||||
CustomBuildScript=n
|
CustomBuildScript=n
|
||||||
AppCflags='-O2 -finline-functions -DTHREADLIB_SDL=1 -DTIMELIB=SDL -DOVCODEC_TREMOR=1 -DNETPLAY=1 -DHAVE_REGEX=1 -DHAVE_GETOPT_LONG=1 -DHAVE_ZIP=1'
|
AppCflags='-O2 -finline-functions -DTHREADLIB_SDL=1 -DTIMELIB=SDL -DOVCODEC_TREMOR=1 -DNETPLAY=1 -DHAVE_REGEX=1 -DHAVE_GETOPT_LONG=1 -DHAVE_ZIP=1'
|
||||||
|
|||||||
@@ -52,6 +52,25 @@ TFB_GRAPHICS_BACKEND *graphics_backend = NULL;
|
|||||||
volatile int QuitPosted = 0;
|
volatile int QuitPosted = 0;
|
||||||
volatile int GameActive = 1; // Track the SDL_ACTIVEEVENT state SDL_APPACTIVE
|
volatile int GameActive = 1; // Track the SDL_ACTIVEEVENT state SDL_APPACTIVE
|
||||||
|
|
||||||
|
#ifdef ANDROID
|
||||||
|
extern void ResumeMusic (void);
|
||||||
|
extern void PauseMusic (void);
|
||||||
|
|
||||||
|
void AndroidGamePaused()
|
||||||
|
{
|
||||||
|
GameActive = 0;
|
||||||
|
SDL_ANDROID_PauseAudioPlayback();
|
||||||
|
PauseMusic();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AndroidGameResumed()
|
||||||
|
{
|
||||||
|
GameActive = 1;
|
||||||
|
SDL_ANDROID_ResumeAudioPlayback();
|
||||||
|
ResumeMusic();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
TFB_PreInit (void)
|
TFB_PreInit (void)
|
||||||
{
|
{
|
||||||
@@ -76,6 +95,9 @@ TFB_PreInit (void)
|
|||||||
log_add (log_Fatal, "Could not initialize SDL: %s.", SDL_GetError ());
|
log_add (log_Fatal, "Could not initialize SDL: %s.", SDL_GetError ());
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
#ifdef ANDROID
|
||||||
|
SDL_ANDROID_SetApplicationPutToBackgroundCallback(&AndroidGamePaused, &AndroidGameResumed);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
opentyrian
|
sc2
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">OpenTyrian</string>
|
<string name="app_name">Ur-Quan Masters</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||||
package com.googlecode.opentyrian;
|
package com.sourceforge.sc2;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This string is autogenerated by ChangeAppSettings.sh, do not change
|
// This string is autogenerated by ChangeAppSettings.sh, do not change
|
||||||
// spaces amount
|
// spaces amount
|
||||||
package com.googlecode.opentyrian;
|
package com.sourceforge.sc2;
|
||||||
|
|
||||||
import java.util.zip.*;
|
import java.util.zip.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||||
package com.googlecode.opentyrian;
|
package com.sourceforge.sc2;
|
||||||
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||||
package com.googlecode.opentyrian;
|
package com.sourceforge.sc2;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
fixed with a hammer and rasp to work with libSDL port */
|
fixed with a hammer and rasp to work with libSDL port */
|
||||||
|
|
||||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||||
package com.googlecode.opentyrian;
|
package com.sourceforge.sc2;
|
||||||
|
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount anywhere
|
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount anywhere
|
||||||
package com.googlecode.opentyrian;
|
package com.sourceforge.sc2;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
class Globals {
|
class Globals {
|
||||||
public static String ApplicationName = "OpenTyrian";
|
public static String ApplicationName = "Ur-QuanMasters";
|
||||||
|
|
||||||
// Should be zip file
|
// Should be zip file
|
||||||
public static String DataDownloadUrl = "Data files size is 11 Mb|http://sites.google.com/site/xpelyax/Home/tyrian21-data.zip?attredirects=0%26d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/tyrian21-data.zip";
|
public static String DataDownloadUrl = "Game data is 14 Mb|https://sites.google.com/site/xpelyax/Home/sc2-data.zip?attredirects=0%26d=1|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/sc2-data.zip/download|http://sitesproxy.goapk.com/site/xpelyax/Home/sc2-data.zip^3DO remixed music (19 Mb) - enable it in Setup->Sound Options->3DO Remixes|:addons/3domusic/3domusic.zip:https://sites.google.com/site/xpelyax/Home/3domusic.zip?attredirects=0%26d=1|:addons/3domusic/3domusic.zip:https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3domusic.zip/download|:addons/3domusic/3domusic.zip:http://sitesproxy.goapk.com/site/xpelyax/Home/3domusic.zip^UQM music remix pack (150 Mb) - enable it in Setup->Sound Options->UQM Remixes|:addons/remix/remix.zip:https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/remix.zip/download^3DO voice (115 Mb) - go to Setup->Sound Options and increase Voice volume from zero|:addons/3dovoice/3dovoice.zip:https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovoice.zip/download^3DO video support - after installing this pack copy all files from|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^your 3DO Star Control II game CD from 'duckart' dir to the SD card to dir|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^'app-data/com.sourceforge.sc2/addons/3dovideo', to extract files from 3DO disk use|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^'3DO Commander' or 'uncd-rom' apps from http://madroms.free.fr/3do/|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download^Then from the game change 'Setup->PC/3DO compat->Cutscenes' to Movies, and restart game|https://sourceforge.net/projects/libsdl-android/files/Ur-Quan%20Masters/3dovideo.zip/download";
|
||||||
|
|
||||||
// Set this value to true if you're planning to render 3D using OpenGL - it eats some GFX resources, so disabled for 2D
|
// 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;
|
public static boolean NeedDepthBuffer = false;
|
||||||
@@ -19,7 +19,7 @@ class Globals {
|
|||||||
// Readme text to be shown on download page
|
// Readme text to be shown on download page
|
||||||
public static String ReadmeText = "^You may press \"Home\" now - the data will be downloaded in background".replace("^","\n");
|
public static String ReadmeText = "^You may press \"Home\" now - the data will be downloaded in background".replace("^","\n");
|
||||||
|
|
||||||
public static boolean AppUsesMouse = true;
|
public static boolean AppUsesMouse = false;
|
||||||
|
|
||||||
public static boolean AppNeedsArrowKeys = true;
|
public static boolean AppNeedsArrowKeys = true;
|
||||||
|
|
||||||
@@ -27,9 +27,9 @@ class Globals {
|
|||||||
|
|
||||||
public static boolean AppUsesMultitouch = false;
|
public static boolean AppUsesMultitouch = false;
|
||||||
|
|
||||||
public static int AppTouchscreenKeyboardKeysAmount = 4;
|
public static int AppTouchscreenKeyboardKeysAmount = 2;
|
||||||
|
|
||||||
public static int AppTouchscreenKeyboardKeysAmountAutoFire = 1;
|
public static int AppTouchscreenKeyboardKeysAmountAutoFire = 2;
|
||||||
|
|
||||||
// Phone-specific config
|
// Phone-specific config
|
||||||
// It will download app data to /sdcard/alienblaster if set to true,
|
// It will download app data to /sdcard/alienblaster if set to true,
|
||||||
@@ -48,5 +48,5 @@ class Globals {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class LoadLibrary {
|
class LoadLibrary {
|
||||||
public LoadLibrary() { System.loadLibrary("sdl"); System.loadLibrary("sdl_net"); };
|
public LoadLibrary() { System.loadLibrary("sdl"); System.loadLibrary("sdl_image"); };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||||
package com.googlecode.opentyrian;
|
package com.sourceforge.sc2;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||||
package com.googlecode.opentyrian;
|
package com.sourceforge.sc2;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||||
package com.googlecode.opentyrian;
|
package com.sourceforge.sc2;
|
||||||
|
|
||||||
import javax.microedition.khronos.opengles.GL10;
|
import javax.microedition.khronos.opengles.GL10;
|
||||||
|
|
||||||
|
|||||||
@@ -187,14 +187,16 @@ Also it's a good practice to pause any application audio, especially if the user
|
|||||||
and if you won't set your own callbacks the default callbacks will do exactly that.
|
and if you won't set your own callbacks the default callbacks will do exactly that.
|
||||||
There are circumstances when you want to avoid that, for example if the application is audio player,
|
There are circumstances when you want to avoid that, for example if the application is audio player,
|
||||||
or if application gets some notification over network (for example you're running a game server,
|
or if application gets some notification over network (for example you're running a game server,
|
||||||
and want a beep when someone connects to you) - you may unpause audio for some short time then.
|
and want a beep when someone connects to you) - you may unpause audio for some short time then,
|
||||||
|
that will require another thread to watch the network, because main thread will be blocked inside SDL_Flip().
|
||||||
|
|
||||||
The application is not allowed to do any GFX output without OpenGL context (or it will crash),
|
The application is not allowed to do any GFX output without OpenGL context (or it will crash),
|
||||||
that's why SDL_Flip() call will block until we're re-acquired context, and the callbacks will be called
|
that's why SDL_Flip() call will block until we're re-acquired context, and the callbacks will be called
|
||||||
from inside SDL_Flip(). so you won't receive SDL_WINDOWEVENT_HIDDEN / SDL_WINDOWEVENT_SHOWN,
|
from inside SDL_Flip(). so you won't receive SDL_WINDOWEVENT_HIDDEN / SDL_WINDOWEVENT_SHOWN,
|
||||||
because if SDL sends them the application will get them only after SDL_Flip() successfully
|
because if SDL sends them the application will get them only after SDL_Flip() successfully
|
||||||
re-acquired GL context, and it's too late to pause audio and save application state,
|
re-acquired GL context, and it's too late to pause audio and save application state,
|
||||||
so please use callbacks instead of SDL window events on Android OS.
|
so please use callbacks instead of SDL window events on Android OS (also if your application
|
||||||
|
is single-threaded you don't need any mutexes inside callbacks).
|
||||||
|
|
||||||
The whole idea behind callbacks is that the existing application should not be modified to
|
The whole idea behind callbacks is that the existing application should not be modified to
|
||||||
operate correctly - the whole time in background will just look to app as one very long SDL_Flip(),
|
operate correctly - the whole time in background will just look to app as one very long SDL_Flip(),
|
||||||
|
|||||||
Reference in New Issue
Block a user