Updated OpenTTD, fixed build scripts
This commit is contained in:
@@ -596,8 +596,6 @@ public class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
|
||||
mSwapBuffersCallback = c;
|
||||
}
|
||||
|
||||
public abstract void DrawLogo(GL10 gl);
|
||||
|
||||
private SwapBuffersCallback mSwapBuffersCallback = null;
|
||||
}
|
||||
|
||||
@@ -993,8 +991,6 @@ public class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
|
||||
mNeedStart = true;
|
||||
mSizeChanged = true;
|
||||
SwapBuffers();
|
||||
mRenderer.DrawLogo(mGL);
|
||||
SwapBuffers();
|
||||
|
||||
mRenderer.onDrawFrame(mGL);
|
||||
|
||||
|
||||
@@ -262,18 +262,22 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
|
||||
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
|
||||
System.out.println("libSDL: DemoRenderer.onSurfaceCreated(): paused " + mPaused + " mFirstTimeStart " + mFirstTimeStart );
|
||||
mGlSurfaceCreated = true;
|
||||
mGl = gl;
|
||||
if( ! mPaused && ! mFirstTimeStart )
|
||||
nativeGlContextRecreated();
|
||||
mFirstTimeStart = false;
|
||||
}
|
||||
|
||||
public void onSurfaceChanged(GL10 gl, int w, int h) {
|
||||
System.out.println("libSDL: DemoRenderer.onSurfaceChanged(): paused " + mPaused + " mFirstTimeStart " + mFirstTimeStart );
|
||||
mWidth = w;
|
||||
mHeight = h;
|
||||
mGl = gl;
|
||||
nativeResize(w, h, Globals.KeepAspectRatio ? 1 : 0);
|
||||
}
|
||||
|
||||
public void onSurfaceDestroyed() {
|
||||
System.out.println("libSDL: DemoRenderer.onSurfaceDestroyed(): paused " + mPaused + " mFirstTimeStart " + mFirstTimeStart );
|
||||
mGlSurfaceCreated = false;
|
||||
mGlContextLost = true;
|
||||
nativeGlContextLost();
|
||||
@@ -281,6 +285,10 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
|
||||
|
||||
public void onDrawFrame(GL10 gl) {
|
||||
|
||||
mGl = gl;
|
||||
DrawLogo(mGl);
|
||||
SwapBuffers();
|
||||
|
||||
nativeInitJavaCallbacks();
|
||||
|
||||
// Make main thread priority lower so audio thread won't get underrun
|
||||
@@ -339,6 +347,8 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
|
||||
if(mGlContextLost) {
|
||||
mGlContextLost = false;
|
||||
Settings.SetupTouchscreenKeyboardGraphics(context); // Reload on-screen buttons graphics
|
||||
DrawLogo(mGl);
|
||||
super.SwapBuffers();
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -377,6 +387,7 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
|
||||
}
|
||||
public void DrawLogo(GL10 gl)
|
||||
{
|
||||
System.out.println("libSDL: DrawLogo");
|
||||
BitmapDrawable bmp = null;
|
||||
try
|
||||
{
|
||||
@@ -441,6 +452,7 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
|
||||
private MainActivity context = null;
|
||||
public AccelerometerReader accelerometer = null;
|
||||
|
||||
private GL10 mGl = null;
|
||||
private EGL10 mEgl = null;
|
||||
private EGLDisplay mEglDisplay = null;
|
||||
private EGLSurface mEglSurface = null;
|
||||
|
||||
@@ -106,6 +106,9 @@ $(LOCAL_PATH)/src/libapplication.so: $(LOCAL_PATH)/src/AndroidBuild.sh $(LOCAL_P
|
||||
$(abspath $(LOCAL_PATH)/../../obj/local/armeabi/libapplication.so): $(LOCAL_PATH)/src/libapplication.so OVERRIDE_CUSTOM_LIB
|
||||
cp -f $< $@
|
||||
|
||||
obj/local/armeabi/libapplication.so: $(LOCAL_PATH)/src/libapplication.so OVERRIDE_CUSTOM_LIB
|
||||
cp -f $< $@
|
||||
|
||||
.PHONY: OVERRIDE_CUSTOM_LIB
|
||||
|
||||
OVERRIDE_CUSTOM_LIB:
|
||||
|
||||
@@ -580,6 +580,7 @@ int main(int argc, char* argv[])
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "SDL resize event: %d x %d", evt.resize.w, evt.resize.h);
|
||||
if(evt.type == SDL_ACTIVEEVENT)
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "======= SDL active event: gain %d state %d", evt.active.gain, evt.active.state);
|
||||
/*
|
||||
if( evt.type == SDL_ACTIVEEVENT && evt.active.gain == 0 && evt.active.state & SDL_APPACTIVE )
|
||||
{
|
||||
// We've lost GL context, we are not allowed to do any GFX output here, or app will crash!
|
||||
@@ -600,6 +601,7 @@ int main(int argc, char* argv[])
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "Waiting");
|
||||
}
|
||||
}
|
||||
*/
|
||||
if( evt.type == SDL_JOYAXISMOTION )
|
||||
{
|
||||
if( evt.jaxis.which == 0 )
|
||||
|
||||
@@ -5,7 +5,7 @@ AppName="OpenTTD"
|
||||
AppFullName=org.openttd.sdl
|
||||
ScreenOrientation=h
|
||||
InhibitSuspend=n
|
||||
AppDataDownloadUrl="!Data files - 20 Mb|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/openttd-data-7.zip/download^MIDI music support (18 Mb)|http://sourceforge.net/projects/libsdl-android/files/timidity.zip/download"
|
||||
AppDataDownloadUrl="!Data files - 20 Mb|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/openttd-data-8.zip^MIDI music support (18 Mb)|http://sourceforge.net/projects/libsdl-android/files/timidity.zip"
|
||||
VideoDepthBpp=16
|
||||
NeedDepthBuffer=n
|
||||
NeedStencilBuffer=n
|
||||
@@ -16,6 +16,7 @@ SdlVideoResizeKeepAspect=n
|
||||
CompatibilityHacks=n
|
||||
AppUsesMouse=y
|
||||
AppNeedsTwoButtonMouse=y
|
||||
ShowMouseCursor=n
|
||||
ForceRelativeMouseMode=n
|
||||
AppNeedsArrowKeys=n
|
||||
AppNeedsTextInput=y
|
||||
@@ -28,15 +29,16 @@ AppTouchscreenKeyboardKeysAmount=0
|
||||
AppTouchscreenKeyboardKeysAmountAutoFire=0
|
||||
RedefinedKeysScreenKb="LALT RETURN KP_PLUS KP_MINUS SPACE DELETE KP_PLUS KP_MINUS 1 2"
|
||||
StartupMenuButtonTimeout=3000
|
||||
HiddenMenuOptions='KeyboardConfigMainMenu AudioConfig'
|
||||
HiddenMenuOptions='KeyboardConfigMainMenu'
|
||||
FirstStartMenuOptions=''
|
||||
MultiABI=n
|
||||
AppVersionCode=11315
|
||||
AppVersionName="1.1.3.15"
|
||||
AppVersionCode=11415
|
||||
AppVersionName="1.1.4.15"
|
||||
ResetSdlConfigForThisVersion=n
|
||||
CompiledLibraries="jpeg png freetype timidity lzma lzo2"
|
||||
CustomBuildScript=y
|
||||
AppCflags=''
|
||||
AppLdflags=''
|
||||
AppSubdirsBuild=''
|
||||
AppCmdline='openttd -d 3'
|
||||
AppCmdline='openttd'
|
||||
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
|
||||
|
||||
@@ -18,4 +18,4 @@ fi
|
||||
if [ \! -f openttd/Makefile ] ; then
|
||||
../setEnvironment.sh sh -c "cd openttd && ./configure --host=arm-linux-androideabi --with-sdl --with-freetype=sdl-config --with-png --with-zlib --without-icu --with-libtimidity=$LOCAL_PATH/../../../obj/local/armeabi/libtimidity.so --with-lzo2=$LOCAL_PATH/../../../obj/local/armeabi/liblzo2.so --prefix-dir='.' --data-dir='' --without-allegro --without-fontconfig --endian=LE"
|
||||
fi
|
||||
../setEnvironment.sh sh -c "cd openttd && make -j1 VERBOSE=1 STRIP='' LIBS='-lsdl-1.2 -llzo2 -lpng -ltimidity -lfreetype -lgcc -lz -lc -lstdc++'" && cp -f openttd/objs/release/openttd libapplication.so
|
||||
../setEnvironment.sh sh -c "cd openttd && make -j1 VERBOSE=1 STRIP='' LIBS='-lsdl-1.2 -llzo2 -lpng -ltimidity -lfreetype -lgcc -lz -lc -lgnustl_static -lsupc++'" && cp -f openttd/objs/release/openttd libapplication.so
|
||||
|
||||
@@ -1 +1 @@
|
||||
../../../../../openttd-1.1.3
|
||||
../../../../../openttd-1.1.4
|
||||
@@ -1,6 +1,6 @@
|
||||
Index: src/video/sdl_v.cpp
|
||||
===================================================================
|
||||
--- src/video/sdl_v.cpp (revision 23014)
|
||||
--- src/video/sdl_v.cpp (revision 23445)
|
||||
+++ src/video/sdl_v.cpp (working copy)
|
||||
@@ -353,6 +353,8 @@
|
||||
if (sym->scancode == 49) key = WKC_BACKSPACE;
|
||||
@@ -23,7 +23,7 @@ Index: src/video/sdl_v.cpp
|
||||
}
|
||||
Index: src/sound/sdl_s.cpp
|
||||
===================================================================
|
||||
--- src/sound/sdl_s.cpp (revision 23014)
|
||||
--- src/sound/sdl_s.cpp (revision 23445)
|
||||
+++ src/sound/sdl_s.cpp (working copy)
|
||||
@@ -20,9 +20,16 @@
|
||||
|
||||
@@ -44,7 +44,7 @@ Index: src/sound/sdl_s.cpp
|
||||
const char *SoundDriver_SDL::Start(const char * const *parm)
|
||||
Index: src/music/libtimidity.cpp
|
||||
===================================================================
|
||||
--- src/music/libtimidity.cpp (revision 23014)
|
||||
--- src/music/libtimidity.cpp (revision 23445)
|
||||
+++ src/music/libtimidity.cpp (working copy)
|
||||
@@ -22,10 +22,13 @@
|
||||
#include <sys/stat.h>
|
||||
@@ -87,7 +87,7 @@ Index: src/music/libtimidity.cpp
|
||||
|
||||
Index: src/table/settings.h
|
||||
===================================================================
|
||||
--- src/table/settings.h (revision 23014)
|
||||
--- src/table/settings.h (revision 23445)
|
||||
+++ src/table/settings.h (working copy)
|
||||
@@ -270,9 +270,15 @@
|
||||
SDTG_STR("savegame_format", SLE_STRB, S, 0, _savegame_format, NULL, STR_NULL, NULL),
|
||||
@@ -107,7 +107,7 @@ Index: src/table/settings.h
|
||||
SDTG_VAR("large_size", SLE_UINT, S, 0, _freetype.large_size, 16, 0, 72, 0, STR_NULL, NULL),
|
||||
Index: src/os/unix/unix.cpp
|
||||
===================================================================
|
||||
--- src/os/unix/unix.cpp (revision 23014)
|
||||
--- src/os/unix/unix.cpp (revision 23445)
|
||||
+++ src/os/unix/unix.cpp (working copy)
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
@@ -132,7 +132,7 @@ Index: src/os/unix/unix.cpp
|
||||
int ret;
|
||||
Index: src/os/unix/crashlog_unix.cpp
|
||||
===================================================================
|
||||
--- src/os/unix/crashlog_unix.cpp (revision 23014)
|
||||
--- src/os/unix/crashlog_unix.cpp (revision 23445)
|
||||
+++ src/os/unix/crashlog_unix.cpp (working copy)
|
||||
@@ -141,7 +141,11 @@
|
||||
};
|
||||
@@ -148,7 +148,7 @@ Index: src/os/unix/crashlog_unix.cpp
|
||||
* Entry point for the crash handler.
|
||||
Index: src/window.cpp
|
||||
===================================================================
|
||||
--- src/window.cpp (revision 23014)
|
||||
--- src/window.cpp (revision 23445)
|
||||
+++ src/window.cpp (working copy)
|
||||
@@ -2160,6 +2160,10 @@
|
||||
* But there is no company related window open anyway, so _current_company is not used. */
|
||||
@@ -163,7 +163,7 @@ Index: src/window.cpp
|
||||
|
||||
Index: src/network/core/os_abstraction.h
|
||||
===================================================================
|
||||
--- src/network/core/os_abstraction.h (revision 23014)
|
||||
--- src/network/core/os_abstraction.h (revision 23445)
|
||||
+++ src/network/core/os_abstraction.h (working copy)
|
||||
@@ -161,7 +161,7 @@
|
||||
# include <net/if.h>
|
||||
@@ -176,7 +176,7 @@ Index: src/network/core/os_abstraction.h
|
||||
* the list of IPs from the system. */
|
||||
Index: src/debug.cpp
|
||||
===================================================================
|
||||
--- src/debug.cpp (revision 23014)
|
||||
--- src/debug.cpp (revision 23445)
|
||||
+++ src/debug.cpp (working copy)
|
||||
@@ -16,6 +16,9 @@
|
||||
#include "string_func.h"
|
||||
@@ -200,7 +200,7 @@ Index: src/debug.cpp
|
||||
char buf2[1024 + 32];
|
||||
Index: src/main_gui.cpp
|
||||
===================================================================
|
||||
--- src/main_gui.cpp (revision 23014)
|
||||
--- src/main_gui.cpp (revision 23445)
|
||||
+++ src/main_gui.cpp (working copy)
|
||||
@@ -460,7 +460,11 @@
|
||||
Hotkey<MainWindow>('C', "center", GHK_CENTER),
|
||||
@@ -216,7 +216,7 @@ Index: src/main_gui.cpp
|
||||
#if defined(_DEBUG)
|
||||
Index: findversion.sh
|
||||
===================================================================
|
||||
--- findversion.sh (revision 23014)
|
||||
--- findversion.sh (revision 23445)
|
||||
+++ findversion.sh (working copy)
|
||||
@@ -134,6 +134,7 @@
|
||||
REV_NR=""
|
||||
|
||||
@@ -44,10 +44,10 @@ if [ -n "$CRYSTAX_WCHAR" ]; then
|
||||
MISSING_INCLUDE="$MISSING_INCLUDE -isystem$NDK/sources/crystax/include"
|
||||
MISSING_LIB="$MISSING_LIB $NDK/sources/crystax/libs/armeabi/libcrystax_static.a"
|
||||
fi
|
||||
if [ -n "$MISSING_LIBCXX_PATH" ]; then
|
||||
MISSING_INCLUDE="$MISSING_INCLUDE -isystem$NDK/sources/cxx-stl/gnu-libstdc++/include"
|
||||
MISSING_LIB="$MISSING_LIB $NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.a"
|
||||
fi
|
||||
#if [ -n "$MISSING_LIBCXX_PATH" ]; then
|
||||
# MISSING_INCLUDE="$MISSING_INCLUDE -isystem$NDK/sources/cxx-stl/gnu-libstdc++/include"
|
||||
# MISSING_LIB="$MISSING_LIB -lgnustl_static -lsupc++"
|
||||
#fi
|
||||
|
||||
CFLAGS="\
|
||||
-fexceptions -frtti \
|
||||
@@ -81,8 +81,8 @@ $NDK/platforms/$PLATFORMVER/arch-arm/usr/lib/libGLESv1_CM.so \
|
||||
$NDK/platforms/$PLATFORMVER/arch-arm/usr/lib/libdl.so \
|
||||
$NDK/platforms/$PLATFORMVER/arch-arm/usr/lib/liblog.so \
|
||||
$NDK/platforms/$PLATFORMVER/arch-arm/usr/lib/libz.so \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi -lstdc++ \
|
||||
$NDK/platforms/$PLATFORMVER/arch-arm/usr/lib/libstdc++.a \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi \
|
||||
-lgnustl_static \
|
||||
-L$NDK/platforms/$PLATFORMVER/arch-arm/usr/lib \
|
||||
-L$LOCAL_PATH/../../obj/local/armeabi -Wl,--no-undefined -Wl,-z,noexecstack \
|
||||
-Wl,-rpath-link=$NDK/platforms/$PLATFORMVER/arch-arm/usr/lib -lsupc++ \
|
||||
|
||||
@@ -19,9 +19,6 @@ if [ -n "`echo $NDK | grep 'android-ndk-r[56789]'`" ]; then
|
||||
if [ -n "`echo $NDK | grep 'android-ndk-r[56789]-crystax'`" ]; then
|
||||
CRYSTAX_WCHAR=1
|
||||
fi
|
||||
if [ -n "`echo $NDK | grep 'android-ndk-r[6789]'`" ]; then
|
||||
MISSING_LIBCXX_PATH=1
|
||||
fi
|
||||
fi
|
||||
|
||||
env CRYSTAX_WCHAR=$CRYSTAX_WCHAR $LOCAL_PATH/$SCRIPT "$@"
|
||||
|
||||
@@ -1 +1 @@
|
||||
gemrb-sdl-1.3
|
||||
openttd
|
||||
Reference in New Issue
Block a user