Skip to content

Commit 28bc8c8

Browse files
committed
Merge branch 'master' of github.com:supertuxkart/stk-code
2 parents f783be4 + 7c10a55 commit 28bc8c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1165
-330
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ android/bin
6060
android/build
6161
android/libs
6262
android/obj
63+
android/res
6364
android/.gradle
6465
android-*
6566
*.apk

android/README.ANDROID

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -143,38 +143,3 @@ you have to run:
143143
and then:
144144

145145
zipalign -v 4 SuperTuxKart-release-unsigned.apk SuperTuxKart-release.apk
146-
147-
148-
149-
--------------------------------------------------------------------------------
150-
KNOWN ISSUES
151-
--------------------------------------------------------------------------------
152-
153-
1. It's not possible to compile STK for Android < 4.4 due to missing GLES 3.0
154-
functions. It is technically possible to do - check GLES context version,
155-
load OpenGL functions dynamically using EGL, and if they are not loaded
156-
properly, then fallback to GLES 2.0.
157-
158-
2. It never ocurred for me, but it's possible that EGL context is lost in some
159-
cases. SuperTuxKart is not designed to re-create all textures at any moment,
160-
so this is a "Wontfix", at least for now.
161-
162-
3. We use "exit(0)" at the end of main function. We shouldn't do it and we
163-
should just return from the main function. But STK uses some global
164-
variables and their values are remembered when the game is restarted. We
165-
should properly clear them or re-initialize on startup. Using the "exit(0)"
166-
is not-that-bad workaround, but it may cause a crash on exit sometimes.
167-
It seems to affect only Android 5.0. More information about the crash:
168-
https://code.google.com/p/android/issues/detail?id=160824
169-
170-
4. STK crashes on startup on some devices when aarch64 build is made using
171-
Android r13 NDK. The r13 version has rather big modifications (it uses clang
172-
instead of gcc by default). This is probably a bug in NDK/compiler/OS, but
173-
for this reason using NDK r12 for 64-bit arm compilation is preferred.
174-
175-
5. Angelscript doesn't have full support for aarch64 builds, so that scripting
176-
won't work on this platform.
177-
178-
6. Turning left/right using accelerometer is available, but at this stage the
179-
default screen orientation is not automatically detected and user must
180-
manually choose if he needs "phone" or "tablet" accelerometer.

android/icon-dbg.png

41.7 KB
Loading
File renamed without changes.

android/make.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ export HOST_AARCH64=aarch64-linux-android
3636
export NDK_PLATFORM_AARCH64=android-21
3737
export SDK_VERSION_AARCH64=21
3838

39+
export APP_NAME_RELEASE="SuperTuxKart"
40+
export APP_NAME_DEBUG="SuperTuxKart Debug"
41+
export PACKAGE_NAME_RELEASE="org.supertuxkart.stk"
42+
export PACKAGE_NAME_DEBUG="org.supertuxkart.stk_dev"
43+
export APP_ICON_RELEASE="$DIRNAME/icon.png"
44+
export APP_ICON_DEBUG="$DIRNAME/icon-dbg.png"
45+
3946

4047
# A helper function that checks if error ocurred
4148
check_error()
@@ -52,6 +59,7 @@ if [ ! -z "$1" ] && [ "$1" = "clean" ]; then
5259
rm -rf build
5360
rm -rf libs
5461
rm -rf obj
62+
rm -rf res
5563
rm -rf .gradle
5664
exit
5765
fi
@@ -108,10 +116,16 @@ if [ "$BUILD_TYPE" = "debug" ] || [ "$BUILD_TYPE" = "Debug" ]; then
108116
export ANT_BUILD_TYPE="debug"
109117
export GRADLE_BUILD_TYPE="assembleDebug"
110118
export IS_DEBUG_BUILD=1
119+
export APP_NAME="$APP_NAME_DEBUG"
120+
export PACKAGE_NAME="$PACKAGE_NAME_DEBUG"
121+
export APP_ICON="$APP_ICON_DEBUG"
111122
elif [ "$BUILD_TYPE" = "release" ] || [ "$BUILD_TYPE" = "Release" ]; then
112123
export ANT_BUILD_TYPE="release"
113124
export GRADLE_BUILD_TYPE="assembleRelease"
114125
export IS_DEBUG_BUILD=0
126+
export APP_NAME="$APP_NAME_RELEASE"
127+
export PACKAGE_NAME="$PACKAGE_NAME_RELEASE"
128+
export APP_ICON="$APP_ICON_RELEASE"
115129
else
116130
echo "Unsupported BUILD_TYPE: $BUILD_TYPE. Possible values are: " \
117131
"debug, release"
@@ -342,8 +356,31 @@ check_error
342356
# Build apk
343357
echo "Building APK"
344358

359+
mkdir -p "$DIRNAME/res/drawable/"
360+
mkdir -p "$DIRNAME/res/drawable-hdpi/"
361+
mkdir -p "$DIRNAME/res/drawable-mdpi/"
362+
mkdir -p "$DIRNAME/res/drawable-xhdpi/"
363+
mkdir -p "$DIRNAME/res/drawable-xxhdpi/"
364+
mkdir -p "$DIRNAME/res/values/"
365+
366+
STRINGS_FILE="$DIRNAME/res/values/strings.xml"
367+
368+
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > "$STRINGS_FILE"
369+
echo "<resources>" >> "$STRINGS_FILE"
370+
echo " <string name=\"app_name\">$APP_NAME</string>" >> "$STRINGS_FILE"
371+
echo "</resources>" >> "$STRINGS_FILE"
372+
345373
sed -i "s/minSdkVersion=\".*\"/minSdkVersion=\"$SDK_VERSION\"/g" \
346374
"$DIRNAME/AndroidManifest.xml"
375+
376+
sed -i "s/package=\".*\"/package=\"$PACKAGE_NAME\"/g" \
377+
"$DIRNAME/AndroidManifest.xml"
378+
379+
cp "$APP_ICON" "$DIRNAME/res/drawable/icon.png"
380+
convert -scale 72x72 "$APP_ICON" "$DIRNAME/res/drawable-hdpi/icon.png"
381+
convert -scale 48x48 "$APP_ICON" "$DIRNAME/res/drawable-mdpi/icon.png"
382+
convert -scale 96x96 "$APP_ICON" "$DIRNAME/res/drawable-xhdpi/icon.png"
383+
convert -scale 144x144 "$APP_ICON" "$DIRNAME/res/drawable-xxhdpi/icon.png"
347384

348385

349386
if [ "$BUILD_TOOL" = "gradle" ]; then

android/res/drawable-hdpi/icon.png

-5.74 KB
Binary file not shown.

android/res/drawable-mdpi/icon.png

-3.13 KB
Binary file not shown.

android/res/drawable-xhdpi/icon.png

-8.86 KB
Binary file not shown.

android/res/drawable-xxhdpi/icon.png

-16.7 KB
Binary file not shown.

android/res/values/strings.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

data/gui/online/lan.stkgui

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<stkgui>
3+
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
4+
5+
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
6+
<header id="title" text_align="center" width="80%" align="center" text="Local Networking"/>
7+
8+
<spacer height="5%" width="10"/>
9+
<icon id="logo" align="center" proportion="1" width="100%" icon="gui/logo.png"/>
10+
<spacer height="5%" width="10"/>
11+
12+
<buttonbar id="lan" proportion="1" width="90%" align="center">
13+
<icon-button id="find_lan_server" width="128" height="128"
14+
icon="gui/online/menu_find_server.png" focus_icon="gui/online/menu_find_server_hover.png"
15+
I18N="In the online multiplayer screen" text="Find Server"/>
16+
<icon-button id="create_lan_server" width="128" height="128"
17+
icon="gui/online/menu_create_server.png" focus_icon="gui/online/menu_create_server_hover.png"
18+
I18N="In the online multiplayer screen" text="Create Server"/>
19+
<!--
20+
<icon-button id="manage_user" width="128" height="128"
21+
icon="gui/options_players.png"
22+
I18N="In the online multiplayer screen" text="Users"/>
23+
-->
24+
</buttonbar>
25+
26+
<spacer height="10%" width="10"/>
27+
28+
</div>
29+
</stkgui>

data/gui/online/online.stkgui

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<stkgui>
3+
<div x="0" y="0" width="100%" height="100%" layout="vertical-row" >
4+
<header text_align="center" width="80%" align="center" text="Online"/>
5+
<spacer height="15" width="10"/>
6+
<button id="user-id" width="20%" height="fit" align="center"/>
7+
<spacer height="15" width="10"/>
8+
<icon id="logo" align="center" proportion="4" width="100%" icon="gui/logo.png"/>
9+
10+
<spacer height="15" width="10"/>
11+
12+
<buttonbar id="menu_toprow" proportion="3" width="90%" align="center">
13+
<icon-button id="lan" width="128" height="128"
14+
icon="gui/menu_multi.png" focus_icon="gui/menu_multi_focus.png"
15+
I18N="Networking menu button" text="Local Networking"/>
16+
<icon-button id="wan" width="128" height="128"
17+
icon="gui/menu_multi.png" focus_icon="gui/menu_multi_focus.png"
18+
I18N="Networking menu button" text="Global Networking"/>
19+
<icon-button id="online" width="128" height="128"
20+
icon="gui/menu_online.png" focus_icon="gui/menu_online_focus.png"
21+
I18N="Networking menu button" text="Your profile"/>
22+
</buttonbar>
23+
24+
<spacer height="10%" width="10"/>
25+
26+
</div>
27+
28+
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
29+
</stkgui>

data/gui/online/profile_achievements_tab.stkgui

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<spacer height="25" width="10"/>
1010

1111
<tabs id="profile_tabs" height="10%" max_height="110" x="2%" width="98%" align="center">
12-
<icon-button id="tab_servers" width="128" height="128" icon="gui/main_network.png"/>
1312
<icon-button id="tab_achievements" width="128" height="128" icon="gui/gp_copy.png"
1413
I18N="Section in the profile screen" text="Achievements"/>
1514
<icon-button id="tab_friends" width="128" height="128" icon="gui/options_players.png"/>

data/gui/online/profile_friends.stkgui

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<spacer height="25" width="10"/>
1010

1111
<tabs id="profile_tabs" height="10%" max_height="110" x="2%" width="98%" align="center">
12-
<icon-button id="tab_servers" width="128" height="128" icon="gui/main_network.png"/>
1312
<icon-button id="tab_achievements" width="128" height="128" icon="gui/gp_copy.png"/>
1413
<icon-button id="tab_friends" width="128" height="128" icon="gui/options_players.png"
1514
I18N="Section in the profile screen" text="Friends"/>

data/gui/online/profile_servers.stkgui

Lines changed: 20 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,25 @@
33
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
44

55
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
6-
<header id="title" text_align="center" width="80%" align="center" text="..."/>
7-
8-
<spacer height="25" width="10"/>
9-
10-
<tabs id="profile_tabs" height="10%" max_height="110" x="2%" width="98%" align="center">
11-
<icon-button id="tab_servers" width="128" height="128" icon="gui/main_network.png" I18N="Section in the profile screen" text="Servers"/>
12-
<icon-button id="tab_achievements" width="128" height="128" icon="gui/gp_copy.png"/>
13-
<icon-button id="tab_friends" width="128" height="128" icon="gui/options_players.png" />
14-
<icon-button id="tab_settings" width="128" height="128" icon="gui/main_options.png" />
15-
</tabs>
16-
17-
<box proportion="1" width="100%" layout="vertical-row">
18-
<div x="1%" y="2%" width="98%" height="96%" layout="vertical-row" >
19-
20-
<spacer height="5%" width="25"/>
21-
22-
<box width="100%" proportion="1" padding="10" layout="vertical-row">
23-
<bright width="100%" text="Local Networking" align="center" text_align="left" />
24-
25-
<buttonbar id="lan" proportion="2" width="90%" align="center">
26-
<icon-button id="find_lan_server" width="128" height="128"
27-
icon="gui/online/menu_find_server.png" focus_icon="gui/online/menu_find_server_hover.png"
28-
I18N="In the online multiplayer screen" text="Find Server"/>
29-
<icon-button id="create_lan_server" width="128" height="128"
30-
icon="gui/online/menu_create_server.png" focus_icon="gui/online/menu_create_server_hover.png"
31-
I18N="In the online multiplayer screen" text="Create Server"/>
32-
<!--
33-
<icon-button id="manage_user" width="128" height="128"
34-
icon="gui/options_players.png"
35-
I18N="In the online multiplayer screen" text="Users"/>
36-
-->
37-
</buttonbar>
38-
</box>
39-
40-
<spacer height="5%" width="25"/>
41-
42-
<box width="100%" proportion="1" padding="10" layout="vertical-row">
43-
<bright width="100%" text="Global Networking" align="center" text_align="left" />
44-
45-
<buttonbar id="wan" proportion="2" width="90%" align="center">
46-
<icon-button id="find_wan_server" width="128" height="128"
47-
icon="gui/online/menu_find_server.png" focus_icon="gui/online/menu_find_server_hover.png"
48-
I18N="In the online multiplayer screen" text="Find Server"/>
49-
<icon-button id="create_wan_server" width="128" height="128"
50-
icon="gui/online/menu_create_server.png" focus_icon="gui/online/menu_create_server_hover.png"
51-
I18N="In the online multiplayer screen" text="Create Server"/>
52-
<icon-button id="quick_wan_play" width="128" height="128"
53-
icon="gui/online/menu_quick_play.png" focus_icon="gui/online/menu_quick_play_hover.png"
54-
I18N="In the online multiplayer screen" text="Quick Play"/>
55-
</buttonbar>
56-
</box>
57-
58-
</div>
59-
</box>
6+
<header id="title" text_align="center" width="80%" align="center" text="Global Networking"/>
7+
8+
<spacer height="5%" width="10"/>
9+
<icon id="logo" align="center" proportion="1" width="100%" icon="gui/logo.png"/>
10+
<spacer height="5%" width="10"/>
11+
12+
<buttonbar id="wan" proportion="1" width="90%" align="center">
13+
<icon-button id="find_wan_server" width="128" height="128"
14+
icon="gui/online/menu_find_server.png" focus_icon="gui/online/menu_find_server_hover.png"
15+
I18N="In the online multiplayer screen" text="Find Server"/>
16+
<icon-button id="create_wan_server" width="128" height="128"
17+
icon="gui/online/menu_create_server.png" focus_icon="gui/online/menu_create_server_hover.png"
18+
I18N="In the online multiplayer screen" text="Create Server"/>
19+
<icon-button id="quick_wan_play" width="128" height="128"
20+
icon="gui/online/menu_quick_play.png" focus_icon="gui/online/menu_quick_play_hover.png"
21+
I18N="In the online multiplayer screen" text="Quick Play"/>
22+
</buttonbar>
23+
24+
<spacer height="10%" width="10"/>
25+
6026
</div>
6127
</stkgui>

data/gui/online/profile_settings.stkgui

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<spacer height="25" width="10"/>
99

1010
<tabs id="profile_tabs" height="10%" max_height="110" x="2%" width="98%" align="center">
11-
<icon-button id="tab_servers" width="128" height="128" icon="gui/main_network.png"/>
1211
<icon-button id="tab_achievements" width="128" height="128" icon="gui/gp_copy.png"/>
1312
<icon-button id="tab_friends" width="128" height="128" icon="gui/options_players.png" />
1413
<icon-button id="tab_settings" width="128" height="128" icon="gui/main_options.png"

lib/irrlicht/include/IAnimatedMeshSceneNode.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ namespace scene
182182
virtual s32 getAnimationSet() const = 0;
183183
virtual void addAnimationSet(u32 start, u32 end) = 0;
184184
virtual void useAnimationSet(u32 set_num) = 0;
185+
virtual void removeAllAnimationSet() = 0;
185186
};
186187

187188
} // end namespace scene

lib/irrlicht/source/Irrlicht/CAnimatedMeshSceneNode.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ namespace scene
167167
m_animation_set.push_back(start);
168168
m_animation_set.push_back(end);
169169
}
170+
virtual void removeAllAnimationSet() { m_animation_set.clear(); }
170171
virtual void useAnimationSet(u32 set_num);
171172
virtual void setFrameLoopOnce(s32 begin, s32 end);
172173
protected:

lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,12 @@ bool CIrrDeviceLinux::createWindow()
694694
visualAttrBuffer[17] = 0;
695695
visualAttrBuffer[19] = 0;
696696
}
697+
698+
if (CreationParams.HandleSRGB == false)
699+
{
700+
visualAttrBuffer[21] = GLX_DONT_CARE;
701+
}
702+
697703
// first round with unchanged values
698704
{
699705
configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems);

lib/irrlicht/source/Irrlicht/CSkinnedMesh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace scene
6868

6969
//! constructor
7070
CSkinnedMesh::CSkinnedMesh()
71-
: SkinningBuffers(0), AnimationFrames(0.f), FramesPerSecond(25.f),
71+
: AnimationFrames(0.f), SkinningBuffers(0), FramesPerSecond(25.f),
7272
LastAnimatedFrame(-1), SkinnedLastFrame(false),
7373
InterpolationMode(EIM_LINEAR),
7474
HasAnimation(false), PreparedForSkinning(false),

lib/irrlicht/source/Irrlicht/CSkinnedMesh.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ namespace scene
175175

176176
u32 getTotalJoints() const { return m_total_joints; }
177177

178+
f32 AnimationFrames;
179+
178180
private:
179181
void toStaticPose();
180182

@@ -215,7 +217,6 @@ namespace scene
215217

216218
core::aabbox3d<f32> BoundingBox;
217219

218-
f32 AnimationFrames;
219220
f32 FramesPerSecond;
220221

221222
f32 LastAnimatedFrame;

sources.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Modify this file to change the last-modified date when you add/remove a file.
2-
# This will then trigger a new cmake run automatically.
2+
# This will then trigger a new cmake run automatically.
33
file(GLOB_RECURSE STK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.hpp")
44
file(GLOB_RECURSE STK_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.cpp")
55
file(GLOB_RECURSE STK_SHADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "data/shaders/*")

0 commit comments

Comments
 (0)