From 7f53faed4aeabea76a1ac5cba5239db82d1d2b6c Mon Sep 17 00:00:00 2001 From: Deve Date: Thu, 6 Apr 2017 23:48:49 +0200 Subject: [PATCH 1/9] Avoid reading/writing out of array --- lib/irrlicht/source/Irrlicht/COGLES2Driver.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/irrlicht/source/Irrlicht/COGLES2Driver.cpp b/lib/irrlicht/source/Irrlicht/COGLES2Driver.cpp index a39445e7f..343dedf8a 100644 --- a/lib/irrlicht/source/Irrlicht/COGLES2Driver.cpp +++ b/lib/irrlicht/source/Irrlicht/COGLES2Driver.cpp @@ -126,7 +126,11 @@ namespace video }; EGLint num_configs; +#if defined( _IRR_COMPILE_WITH_ANDROID_DEVICE_ ) + u32 steps=0; +#else u32 steps=5; +#endif while (!eglChooseConfig(EglDisplay, attribs, &EglConfig, 1, &num_configs) || !num_configs) { switch (steps) @@ -192,6 +196,7 @@ namespace video return; } } +#if !defined( _IRR_COMPILE_WITH_ANDROID_DEVICE_ ) if (params.AntiAlias && !attribs[17]) os::Printer::log("No multisampling."); if (params.WithAlphaChannel && !attribs[7]) @@ -202,6 +207,7 @@ namespace video os::Printer::log("No full depth buffer."); if (params.Bits > attribs[9]) os::Printer::log("No full color buffer."); +#endif #if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_) /* EGL_NATIVE_VISUAL_ID is an attribute of the EGLConfig that is * guaranteed to be accepted by ANativeWindow_setBuffersGeometry(). From 724cb100e07151ac40b809a291db059ea2105e24 Mon Sep 17 00:00:00 2001 From: Deve Date: Fri, 7 Apr 2017 00:02:31 +0200 Subject: [PATCH 2/9] Make grass material more bright in legacy pipeline --- src/graphics/material.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/graphics/material.cpp b/src/graphics/material.cpp index fb82e1aa8..651fb91e6 100644 --- a/src/graphics/material.cpp +++ b/src/graphics/material.cpp @@ -1010,6 +1010,16 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m if (m_shader_type == SHADERTYPE_VEGETATION) { m->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF; + + // A hack that makes the grass more bright in legacy pipeline, so that + // it looks more similar to our shader-based pipeline + if (!CVS->isGLSL()) + { + m->AmbientColor = video::SColor(255, 150, 150, 150); + m->DiffuseColor = video::SColor(255, 150, 150, 150); + m->EmissiveColor = video::SColor(255, 150, 150, 150); + m->SpecularColor = video::SColor(255, 150, 150, 150); + } } if (m_disable_z_write) From 9efe8ae4fade3990ee8e9f123e41e6013160742b Mon Sep 17 00:00:00 2001 From: Deve Date: Fri, 7 Apr 2017 21:34:28 +0200 Subject: [PATCH 3/9] One more fix for mingw --- src/recorder/wasapi_recorder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/recorder/wasapi_recorder.cpp b/src/recorder/wasapi_recorder.cpp index 6ce7a7320..86d65bbf7 100644 --- a/src/recorder/wasapi_recorder.cpp +++ b/src/recorder/wasapi_recorder.cpp @@ -36,7 +36,7 @@ { unsigned long p0; unsigned int p1, p2, p3, p4, p5, p6, p7, p8, p9, p10; - sscanf_s(s, "%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", + sscanf(s, "%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", &p0, &p1, &p2, &p3, &p4, &p5, &p6, &p7, &p8, &p9, &p10); GUID g = { p0, (uint16_t)p1, (uint16_t)p2, { (uint8_t)p3, (uint8_t)p4, (uint8_t)p5, (uint8_t)p6, (uint8_t)p7, (uint8_t)p8, (uint8_t)p9, From 91e7c51ae7aaf8be799785e8fb4126a9fc9526c4 Mon Sep 17 00:00:00 2001 From: Deve Date: Sat, 8 Apr 2017 12:31:09 +0200 Subject: [PATCH 4/9] Make sure we don't link with GLU --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 991e61dac..e4a54b9b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -429,7 +429,7 @@ target_link_libraries(supertuxkart if(NOT SERVER_ONLY) if(NOT USE_GLES2) - target_link_libraries(supertuxkart ${OPENGL_LIBRARIES} glew graphics_utils) + target_link_libraries(supertuxkart ${OPENGL_gl_LIBRARY} glew graphics_utils) else() target_link_libraries(supertuxkart EGL GLESv2) endif() From c00c35e59ae54f172eaef69bb47ef6bb3c5d5283 Mon Sep 17 00:00:00 2001 From: Corentin Pazdera Date: Sun, 9 Apr 2017 00:48:49 +0200 Subject: [PATCH 5/9] Fix appveyor build by using correct branch for dependencies (#2834) --- .appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 1902823f5..2240fa4b8 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,5 +1,6 @@ environment: DEPS_DIR: c:\\projects\dependencies + DEPS_BRANCH: master ASSETS_DIR: c:\\projects\stk-assets APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -m0=lzma2 -mx=9 IRC_NOTIFY_SCRIPT: c:\\projects\stk-code\tools\appveyor-irc-notify.py @@ -11,7 +12,7 @@ shallow_clone: true platform: # - x86 - x64 - + configuration: - Debug - Release @@ -27,7 +28,7 @@ install: - ps: >- If(!(Test-Path "$env:DEPS_DIR")) { Write-Host "Downloading dependencies"; - Start-Process -FilePath "git" -ArgumentList "clone --branch adv_recording_64 --single-branch --depth 1 https://github.com/supertuxkart/dependencies.git $env:DEPS_DIR" -Wait; + Start-Process -FilePath "git" -ArgumentList "clone --branch $env:DEPS_BRANCH --single-branch --depth 1 https://github.com/supertuxkart/dependencies.git $env:DEPS_DIR" -Wait; } Else { Write-Host "Updating dependencies"; From c06ea3447d338fff0f73bb9c8e9c7fcdb10205b4 Mon Sep 17 00:00:00 2001 From: Deve Date: Sun, 9 Apr 2017 09:26:03 +0200 Subject: [PATCH 6/9] Revert "Move loadSfx to the SFXManager thread" This reverts commit ce426d82cc5988b82b8f35eadfd3e61198df2159. --- src/audio/sfx_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audio/sfx_manager.cpp b/src/audio/sfx_manager.cpp index 94e32b445..3484af6ab 100644 --- a/src/audio/sfx_manager.cpp +++ b/src/audio/sfx_manager.cpp @@ -83,6 +83,8 @@ SFXManager::SFXManager() m_listener_front = Vec3(0, 0, 1); m_listener_up = Vec3(0, 1, 0); + loadSfx(); + pthread_cond_init(&m_cond_request, NULL); pthread_attr_t attr; @@ -294,7 +296,6 @@ void* SFXManager::mainLoop(void *obj) VS::setThreadName("SFXManager"); SFXManager *me = (SFXManager*)obj; - me->loadSfx(); me->m_sfx_commands.lock(); // Wait till we have an empty sfx in the queue From f2e2ebb2591232cae2b2273a566a8de5ba440e00 Mon Sep 17 00:00:00 2001 From: Deve Date: Sun, 9 Apr 2017 21:48:15 +0200 Subject: [PATCH 7/9] Update readme --- android/README.ANDROID | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/android/README.ANDROID b/android/README.ANDROID index 38c9847e2..0f733b917 100644 --- a/android/README.ANDROID +++ b/android/README.ANDROID @@ -84,6 +84,59 @@ to just run: +-------------------------------------------------------------------------------- + RELEASE BUILD +-------------------------------------------------------------------------------- + +Making a release build is similar to typical compilation, but there are few +additional things to do. + +You have to change version numbers. This is important, because assets manager +in STK checks these numbers and detects if already extracted data files are +up to date. So that when you will install new STK version, this will force new +data extraction automatically. + +So that you have to: + +1. Change "data/supertuxkart.git" to "data/supertuxkart.VERSION_NUMBER" + +2. Open "src/utils/constants.cpp" and change: + + const char STK_VERSION[] = "git"; + + to + + const char STK_VERSION[] = "VERSION_NUMBER"; + + where "VERSION_NUMBER" is for example "0.9.3" or "git20170409" or whatever. + +3. You can also update these lines in "android/AndroidManifest.xml": + android:versionCode="1" + android:versionName="1.0" + + +Before compilation you have to set: + + export BUILD_TYPE=release + +and then you make standard compilation with: + + ./generate_assets.sh + ./make.sh -j5 + + +The compiled apk is unsigned, so you have to sign it with your key. To sign it, +you have to run: + + jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore \ + my-release-key.keystore SuperTuxKart-release-unsigned.apk alias_name + +and then: + + zipalign -v 4 SuperTuxKart-release-unsigned.apk SuperTuxKart-release.apk + + + -------------------------------------------------------------------------------- KNOWN ISSUES -------------------------------------------------------------------------------- From 6599ceddec330cbc6fb5b86e426d1312efae3494 Mon Sep 17 00:00:00 2001 From: deve Date: Mon, 10 Apr 2017 06:15:01 +0200 Subject: [PATCH 8/9] Fixed server only build --- src/graphics/material.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graphics/material.cpp b/src/graphics/material.cpp index 651fb91e6..57878c9bc 100644 --- a/src/graphics/material.cpp +++ b/src/graphics/material.cpp @@ -1011,6 +1011,7 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m { m->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF; +#ifndef SERVER_ONLY // A hack that makes the grass more bright in legacy pipeline, so that // it looks more similar to our shader-based pipeline if (!CVS->isGLSL()) @@ -1020,6 +1021,7 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m m->EmissiveColor = video::SColor(255, 150, 150, 150); m->SpecularColor = video::SColor(255, 150, 150, 150); } +#endif } if (m_disable_z_write) From ad092f021306a929425e9e2c3130b9063bc82f2d Mon Sep 17 00:00:00 2001 From: "auria.mg" Date: Tue, 11 Apr 2017 18:42:32 -0400 Subject: [PATCH 9/9] Add missing language --- src/tinygettext/language.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tinygettext/language.cpp b/src/tinygettext/language.cpp index aefed84b7..35fc88e83 100644 --- a/src/tinygettext/language.cpp +++ b/src/tinygettext/language.cpp @@ -172,6 +172,7 @@ static const LanguageSpec languages[] = { { "kn", 0, 0, "Kannada" }, { "ko", 0, 0, "Korean" }, { "ko", "KR", 0, "Korean (Korea)" }, + { "krl",0, 0, "Karelian" }, { "ku", 0, 0, "Kurdish" }, { "kw", 0, 0, "Cornish" }, { "ky", 0, 0, "Kirghiz" },