Permalink
Browse files

Updated OpenTTD, fixes for NDK r6.

  • Loading branch information...
pelya committed Oct 26, 2011
1 parent 5ca1cf3 commit caab1c07bbc223fc387229e2df0559c71b57cf62
View
@@ -826,6 +826,7 @@ for LIB in freetype intl jpeg png lua mad stlport tremor xerces xml2; do
done
done
rm -rf project/bin/classes
+rm -rf project/bin/res
mkdir -p project/assets
rm -f project/assets/*
View
@@ -1,67 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project name="DemoActivity" default="help">
+<project name="MainActivity" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
- It contains the path to the SDK. It should *NOT* be checked in in Version
- Control Systems. -->
- <property file="local.properties" />
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <loadproperties srcFile="local.properties" />
- <!-- The build.properties file can be created by you and is never touched
- by the 'android' tool. This is the place to change some of the default property values
- used by the Ant rules.
+ <!-- The ant.properties file can be created by you. It is only edited by the
+ 'android' tool to add properties to it.
+ This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
- application.package
- the name of your application package as defined in the manifest. Used by the
- 'uninstall' rule.
source.dir
- the name of the source directory. Default is 'src'.
+ The name of the source directory. Default is 'src'.
out.dir
- the name of the output directory. Default is 'bin'.
+ The name of the output directory. Default is 'bin'.
- Properties related to the SDK location or the project target should be updated
- using the 'android' tool with the 'update' action.
+ For other overridable properties, look at the beginning of the rules
+ files in the SDK, at tools/ant/build.xml
- This file is an integral part of the build system for your application and
- should be checked in in Version Control Systems.
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
-->
- <property file="build.properties" />
-
- <!-- The default.properties file is created and updated by the 'android' tool, as well
- as ADT.
- This file is an integral part of the build system for your application and
- should be checked in in Version Control Systems. -->
- <property file="default.properties" />
-
- <!-- Custom Android task to deal with the project target, and import the proper rules.
- This requires ant 1.6.0 or above. -->
- <path id="android.antlibs">
- <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
- <pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
- <pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
- <pathelement path="${sdk.dir}/tools/lib/apkbuilder.jar" />
- <pathelement path="${sdk.dir}/tools/lib/jarutils.jar" />
- </path>
-
- <taskdef name="setup"
- classname="com.android.ant.SetupTask"
- classpathref="android.antlibs" />
-
- <!-- Execute the Android Setup task that will setup some properties specific to the target,
- and import the build rules files.
-
- The rules file is imported from
- <SDK>/platforms/<target_platform>/templates/android_rules.xml
-
- To customize some build steps for your project:
- - copy the content of the main node <project> from android_rules.xml
- - paste it in this build.xml below the <setup /> task.
- - disable the import by changing the setup task below to <setup import="false" />
-
- This will ensure that the properties are setup correctly but that your customized
- build steps are used.
+ <property file="ant.properties" />
+
+ <!-- The project.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+
+ This contains project specific properties such as project target, and library
+ dependencies. Lower level build properties are stored in ant.properties
+ (or in .classpath for Eclipse projects).
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <loadproperties srcFile="project.properties" />
+
+ <!-- quick check on sdk.dir -->
+ <fail
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
+ unless="sdk.dir"
+ />
+
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+<!--
+ <target name="-pre-build">
+ </target>
+ <target name="-pre-compile">
+ </target>
+
+ /* This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir} */
+ <target name="-post-compile">
+ </target>
+-->
+
+ <!-- Import the actual build file.
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <import> task.
+ - customize it to your needs.
+ - Customize the whole content of build.xml
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, replacing the <import> task.
+ - customize to your needs.
+
+ ***********************
+ ****** IMPORTANT ******
+ ***********************
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+ in order to avoid having your file be overridden by tools such as "android update project"
-->
- <setup />
+ <!-- version-tag: 1 -->
+ <import file="${sdk.dir}/tools/ant/build.xml" />
</project>
View
@@ -1,11 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system use,
-# "build.properties", and override values to adapt the script to your
-# project structure.
-
-# Project target.
-target=android-12
@@ -393,9 +393,12 @@ public boolean dispatchTouchEvent(final MotionEvent ev)
@Override
public boolean dispatchGenericMotionEvent (MotionEvent ev)
{
+ // This code fails to run for Android 1.6, so there will be no generic motion event for Andorid screen keyboard
+ /*
if(_screenKeyboard != null)
_screenKeyboard.dispatchGenericMotionEvent(ev);
else
+ */
if(mGLView != null)
mGLView.onGenericMotionEvent(ev);
return true;
@@ -31,8 +31,8 @@ StartupMenuButtonTimeout=3000
HiddenMenuOptions='KeyboardConfigMainMenu AudioConfig'
FirstStartMenuOptions=''
MultiABI=n
-AppVersionCode=11314
-AppVersionName="1.1.3.14"
+AppVersionCode=11315
+AppVersionName="1.1.3.15"
CompiledLibraries="jpeg png freetype timidity lzma lzo2"
CustomBuildScript=y
AppCflags=''
@@ -1,6 +1,6 @@
Index: src/video/sdl_v.cpp
===================================================================
---- src/video/sdl_v.cpp (revision 22532)
+--- src/video/sdl_v.cpp (revision 23014)
+++ 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 22532)
+--- src/sound/sdl_s.cpp (revision 23014)
+++ 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 22532)
+--- src/music/libtimidity.cpp (revision 23014)
+++ 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 22532)
+--- src/table/settings.h (revision 23014)
+++ 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 22532)
+--- src/os/unix/unix.cpp (revision 23014)
+++ 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 22532)
+--- src/os/unix/crashlog_unix.cpp (revision 23014)
+++ src/os/unix/crashlog_unix.cpp (working copy)
@@ -141,7 +141,11 @@
};
@@ -148,9 +148,9 @@ Index: src/os/unix/crashlog_unix.cpp
* Entry point for the crash handler.
Index: src/window.cpp
===================================================================
---- src/window.cpp (revision 22532)
+--- src/window.cpp (revision 23014)
+++ src/window.cpp (working copy)
-@@ -2159,6 +2159,10 @@
+@@ -2160,6 +2160,10 @@
* But there is no company related window open anyway, so _current_company is not used. */
assert(IsGeneratingWorld() || IsLocalCompany());
@@ -163,7 +163,7 @@ Index: src/window.cpp
Index: src/network/core/os_abstraction.h
===================================================================
---- src/network/core/os_abstraction.h (revision 22532)
+--- src/network/core/os_abstraction.h (revision 23014)
+++ 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 22532)
+--- src/debug.cpp (revision 23014)
+++ src/debug.cpp (working copy)
@@ -16,6 +16,9 @@
#include "string_func.h"
@@ -200,9 +200,9 @@ Index: src/debug.cpp
char buf2[1024 + 32];
Index: src/main_gui.cpp
===================================================================
---- src/main_gui.cpp (revision 22532)
+--- src/main_gui.cpp (revision 23014)
+++ src/main_gui.cpp (working copy)
-@@ -462,7 +462,11 @@
+@@ -460,7 +460,11 @@
Hotkey<MainWindow>('C', "center", GHK_CENTER),
Hotkey<MainWindow>('Z', "center_zoom", GHK_CENTER_ZOOM),
Hotkey<MainWindow>(WKC_ESC, "reset_object_to_place", GHK_RESET_OBJECT_TO_PLACE),
@@ -214,3 +214,15 @@ Index: src/main_gui.cpp
Hotkey<MainWindow>(WKC_DELETE | WKC_SHIFT, "delete_all_windows", GHK_DELETE_NONVITAL_WINDOWS),
Hotkey<MainWindow>('R' | WKC_CTRL, "refresh_screen", GHK_REFRESH_SCREEN),
#if defined(_DEBUG)
+Index: findversion.sh
+===================================================================
+--- findversion.sh (revision 23014)
++++ findversion.sh (working copy)
+@@ -134,6 +134,7 @@
+ REV_NR=""
+ fi
+
++MODIFIED="0" # This prevents Andorid build from connecting to a public servers
+ if [ "$MODIFIED" -eq "2" ]; then
+ REV="${REV}M"
+ fi
@@ -31,8 +31,8 @@ StartupMenuButtonTimeout=3000
HiddenMenuOptions='OptionalDownloadConfig'
FirstStartMenuOptions=''
MultiABI=n
-AppVersionCode=07403
-AppVersionName="0.74.03"
+AppVersionCode=07404
+AppVersionName="0.74.04"
CompiledLibraries="jpeg png sdl_mixer sdl_net sdl_sound"
CustomBuildScript=y
AppCflags=''
@@ -115,7 +115,7 @@ int ANDROID_ToggleFullScreen(_THIS, int fullscreen)
return 1;
}
-#define SDL_NUMMODES 12
+#define SDL_NUMMODES 13
static SDL_Rect *SDL_modelist[SDL_NUMMODES+1];
//#define SDL_modelist (this->hidden->SDL_modelist)
@@ -278,7 +278,8 @@ int ANDROID_VideoInit(_THIS, SDL_PixelFormat *vformat)
SDL_modelist[9]->w = 480; SDL_modelist[9]->h = 320; // Virtual wide-screen mode
SDL_modelist[10]->w = 800; SDL_modelist[10]->h = 480; // Virtual wide-screen mode
SDL_modelist[11]->w = 544; SDL_modelist[11]->h = 332; // I have no idea where this videomode is used
- SDL_modelist[12] = NULL;
+ SDL_modelist[12]->w = 640; SDL_modelist[12]->h = 350; // For PrefClub app
+ SDL_modelist[13] = NULL;
SDL_VideoInit_1_3(NULL, 0);

0 comments on commit caab1c0

Please sign in to comment.