From bdf5acf09736ebbcb3ee38d9b334896de33f2416 Mon Sep 17 00:00:00 2001 From: MoNTE48 Date: Tue, 4 Jun 2019 22:59:30 +0300 Subject: [PATCH] iOS: minor fixes --- .../MultiCraft.xcodeproj/project.pbxproj | 12 ++++++------ build/iOS/Podfile | 5 +++-- build/iOS/deps/libraries.sh | 2 +- src/game.cpp | 14 +++++++------- 4 files changed, 17 insertions(+), 16 deletions(-) mode change 100644 => 100755 build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj diff --git a/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj b/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj old mode 100644 new mode 100755 index 9b8e8ec8d..221be9394 --- a/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj +++ b/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj @@ -297,7 +297,7 @@ F81F6BE41DDC7D99000B9E21 /* libintl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libintl.a; path = ../deps/intl/libintl.a; sourceTree = ""; }; F84D3A931DE79AB400ADE1A0 /* ads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ads.h; path = ../../Ads/ads.h; sourceTree = ""; }; F84D3A941DE79AB400ADE1A0 /* ads.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ads.mm; path = ../../Ads/ads.mm; sourceTree = ""; }; - F85119A61F4476FC00BFA9AF /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../deps/libcurl/lib/libcurl.a; sourceTree = ""; }; + F85119A61F4476FC00BFA9AF /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../Pods/libCurlPod/lib/libcurl.a; sourceTree = ""; }; F856B5C21F55F7EE00FE9494 /* bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bg.png; path = ../../../../textures/base/bg.png; sourceTree = ""; }; F85722881DDC74B700308383 /* libluajit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libluajit.a; path = ../Pods/LuaJITPod/lib/libluajit.a; sourceTree = ""; }; F87DC8B8210887C600393B64 /* mapgen_v7p.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mapgen_v7p.h; path = ../../../../src/mapgen_v7p.h; sourceTree = ""; }; @@ -1401,7 +1401,7 @@ }; buildConfigurationList = F8E6C4D41DCA3B7900F64426 /* Build configuration list for PBXProject "MultiCraft" */; compatibilityVersion = "Xcode 10.0"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -1845,7 +1845,7 @@ "${SRCROOT}/../deps/freetype/include/freetype2", "${SRCROOT}/../Pods/LuaJITPod/include", "${SRCROOT}/../deps/intl/include", - "${SRCROOT}/../deps/libcurl/include", + "${SRCROOT}/../Pods/libCurlPod/include", ); INFOPLIST_FILE = MultiCraft/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; @@ -1876,7 +1876,7 @@ "-L${SRCROOT}/../deps/freetype/lib", "-L${SRCROOT}/../Pods/LuaJITPod/lib", "-L${SRCROOT}/../deps/intl", - "-L${SRCROOT}/../deps/libcurl/lib", + "-L${SRCROOT}/../Pods/libCurlPod/lib", "-Wl,-dead_strip", ); PRODUCT_BUNDLE_IDENTIFIER = mobi.MultiCraft; @@ -1928,7 +1928,7 @@ "${SRCROOT}/../deps/freetype/include/freetype2", "${SRCROOT}/../Pods/LuaJITPod/include", "${SRCROOT}/../deps/intl/include", - "${SRCROOT}/../deps/libcurl/include", + "${SRCROOT}/../Pods/libCurlPod/include", ); INFOPLIST_FILE = MultiCraft/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; @@ -1959,7 +1959,7 @@ "-L${SRCROOT}/../deps/freetype/lib", "-L${SRCROOT}/../Pods/LuaJITPod/lib", "-L${SRCROOT}/../deps/intl", - "-L${SRCROOT}/../deps/libcurl/lib", + "-L${SRCROOT}/../Pods/libCurlPod/lib", "-Wl,-dead_strip", ); PRODUCT_BUNDLE_IDENTIFIER = mobi.MultiCraft; diff --git a/build/iOS/Podfile b/build/iOS/Podfile index 01cd7780f..252fc0efc 100755 --- a/build/iOS/Podfile +++ b/build/iOS/Podfile @@ -6,8 +6,9 @@ target 'MultiCraft' do source 'https://github.com/appodeal/CocoaPods.git' pod 'SSZipArchive' - pod 'SDVersion', :git => 'https://github.com/MoNTE48/SDVersion' - pod 'LuaJITPod', :git => 'https://github.com/MoNTE48/LuaJITPod' + pod 'SDVersion', :git => 'https://github.com/MoNTE48/SDVersion' + pod 'LuaJITPod', :git => 'https://github.com/MoNTE48/LuaJITPod' + pod 'libCurlPod', :git => 'https://github.com/MoNTE48/libCurlPod' pod 'Appodeal/Interstitial', '2.5.4-Beta' pod 'PersonalizedAdConsent', :git => 'https://github.com/MultiCraftProject/googleads-consent-sdk-ios' diff --git a/build/iOS/deps/libraries.sh b/build/iOS/deps/libraries.sh index 342715cfe..a6d3e3431 100755 --- a/build/iOS/deps/libraries.sh +++ b/build/iOS/deps/libraries.sh @@ -7,7 +7,7 @@ ./freetype.sh #./luajit.sh ./intl.sh -./libcurl.sh +#./libcurl.sh echo echo "All libraries were built!" diff --git a/src/game.cpp b/src/game.cpp index a4352b59a..0836620e8 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2292,7 +2292,11 @@ bool Game::getServerContent(bool *aborted) std::stringstream message; std::fixed(message); message.precision(0); - message << gettext("Media...") << " " << (client->mediaReceiveProgress()*100) << "%"; + if (client->mediaReceiveProgress() > 0) { + message << gettext("Media... ") << (client->mediaReceiveProgress() * 100) << "%"; + } else { + message << gettext("Media..."); + } message.precision(2); if ((USE_CURL == 0) || @@ -4150,7 +4154,7 @@ void Game::updateFrame(ProfilerGraph *graph, RunStats *stats, f32 dtime, if (draw_control->range_all) { runData.fog_range = 100000 * BS; #if defined(__ANDROID__) || defined(__IOS__) - runData.fog_range = 0.9 * draw_control->wanted_range * 4 * BS; + runData.fog_range = 4 * draw_control->wanted_range * BS; #endif } else { runData.fog_range = draw_control->wanted_range * BS; @@ -4492,11 +4496,7 @@ void Game::updateGui(const RunStats &stats, f32 dtime, const CameraOrientation & if (!m_statustext.empty()) { s32 status_width = guitext_status->getTextWidth(); s32 status_height = guitext_status->getTextHeight(); -#if defined(__ANDROID__) || defined(__IOS__) - s32 status_y = screensize.Y - 250 * g_settings->getFloat("hud_scaling"); -#else - s32 status_y = screensize.Y - 150; -#endif + s32 status_y = screensize.Y - 150 * g_settings->getFloat("hud_scaling"); s32 status_x = (screensize.X - status_width) / 2; core::rect rect( status_x , status_y - status_height,