diff --git a/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj b/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj index 5e4b95b0a..5c763a806 100644 --- a/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj +++ b/build/iOS/MultiCraft/MultiCraft.xcodeproj/project.pbxproj @@ -1912,7 +1912,7 @@ "\"${PODS_ROOT}/Headers/Public/SDVersion\"", "-isystem", "\"${PODS_ROOT}/Headers/Public/SSZipArchive\"", - "-flto=thin", + "-flto", "-fvisibility=hidden", "-fdata-sections", "-ffunction-sections", @@ -1995,7 +1995,7 @@ "\"${PODS_ROOT}/Headers/Public/SDVersion\"", "-isystem", "\"${PODS_ROOT}/Headers/Public/SSZipArchive\"", - "-flto=thin", + "-flto", "-fvisibility=hidden", "-fdata-sections", "-ffunction-sections", diff --git a/build/iOS/MultiCraft/MultiCraft/Info.plist b/build/iOS/MultiCraft/MultiCraft/Info.plist index 88ed49e6c..5819b9ce9 100755 --- a/build/iOS/MultiCraft/MultiCraft/Info.plist +++ b/build/iOS/MultiCraft/MultiCraft/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.2.10 + 1.2.0 CFBundleVersion 44 LSRequiresIPhoneOS diff --git a/build/iOS/MultiCraft/MultiCraft/ioswrap.m b/build/iOS/MultiCraft/MultiCraft/ioswrap.m index 0135babfa..1b2e76d4a 100644 --- a/build/iOS/MultiCraft/MultiCraft/ioswrap.m +++ b/build/iOS/MultiCraft/MultiCraft/ioswrap.m @@ -6,30 +6,14 @@ // returns the app version as an integer static uint32_t parse_version() { - struct { - uint8_t major, minor, patch, revision; - } version; - NSString *fullver = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; NSString *revstr = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]; - - if([fullver length] != 3 + 2 + 1) - goto err; - version.major = [fullver characterAtIndex:0] - '0'; - if([fullver characterAtIndex:1] != '.') - goto err; - version.minor = [fullver characterAtIndex:2] - '0'; - if([fullver characterAtIndex:3] != '.') - goto err; - version.patch = [fullver characterAtIndex:4] - '0'; - version.revision = [revstr intValue]; - - uint32_t ret = version.revision | (version.patch << 8) | (version.minor << 16) | (version.major << 24); - NSLog(@"App version %@-%@ -> %u", fullver, revstr, ret); + uint8_t revision = [revstr intValue]; + + // compatibility with old versions, DON'T CHANGE + uint32_t ret = revision | (2 << 24); + + NSLog(@"App revision %@ -> %u", revstr, ret); return ret; - -err: - NSLog(@"VERSION PARSING ERROR: Only versions in the format x.x.x can be used"); - exit(1); } static uint32_t read_version(NSString *path) diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 005cc2d9e..136cc205d 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -388,7 +388,7 @@ void set_default_settings(Settings *settings) settings->setDefault("abm_interval", "2.0"); settings->setDefault("client_unload_unused_data_timeout", "60"); settings->setDefault("curl_verify_cert", "false"); - settings->setDefault("mapgens_available", "v6, v7p, flat"); + settings->setDefault("mapgens_available", "v7p, v6, flat"); #endif // Android Settings @@ -440,9 +440,9 @@ void set_default_settings(Settings *settings) // iOS Settings #ifdef __IOS__ - settings->setDefault("mg_name", "v7p"); settings->setDefault("emergequeue_limit_diskonly", "16"); settings->setDefault("emergequeue_limit_generate", "16"); + settings->setDefault("gui_scaling_filter_txr2img", "false"); // set font_path settings->setDefault("mono_font_path", porting::getDataPath("fonts" DIR_DELIM "retrovillenc.ttf")); settings->setDefault("fallback_font_path", porting::getDataPath("fonts" DIR_DELIM "retrovillenc.ttf")); @@ -451,26 +451,21 @@ void set_default_settings(Settings *settings) if ([SDVersion deviceSize] == Screen3Dot5inch) { // 3.5" (old iPhone's) settings->setDefault("hud_scaling", "0.5"); - settings->setDefault("gui_scaling", "1.0"); } else if ([SDVersion deviceSize] == Screen4inch) { // 4" (iPhone 5) settings->setDefault("hud_scaling", "0.5"); - settings->setDefault("gui_scaling", "1.1"); - settings->setDefault("mouse_sensitivity", "0.24"); + settings->setDefault("mouse_sensitivity", "0.25"); } else if ([SDVersion deviceSize] == Screen4Dot7inch) { // 4.7" (iPhone) settings->setDefault("hud_scaling", "0.6"); - settings->setDefault("gui_scaling", "1.1"); settings->setDefault("mouse_sensitivity", "0.25"); } else if ([SDVersion deviceSize] == Screen5Dot5inch) { // 5.5" (iPhone Plus) settings->setDefault("hud_scaling", "0.7"); - settings->setDefault("gui_scaling", "1.2"); settings->setDefault("mouse_sensitivity", "0.3"); } else if (([SDVersion deviceSize] == Screen5Dot8inch) || ([SDVersion deviceSize] == Screen6Dot1inch) || ([SDVersion deviceSize] == Screen6Dot5inch)) { // 5.8+" (iPhone X-series) settings->setDefault("hud_scaling", "0.8"); - settings->setDefault("gui_scaling", "1.3"); settings->setDefault("mouse_sensitivity", "0.35"); } else { // iPad diff --git a/src/game.cpp b/src/game.cpp index 85174df15..e670f408b 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -548,7 +548,7 @@ public: static void playerDamage(MtEvent *e, void *data) { SoundMaker *sm = (SoundMaker *)data; - sm->m_sound->playSound(SimpleSoundSpec("player_damage", 0.5), false); + sm->m_sound->playSound(SimpleSoundSpec("player_damage", 1.0), false); } static void playerFallingDamage(MtEvent *e, void *data) @@ -965,11 +965,7 @@ static inline void create_formspec_menu(GUIFormSpecMenu **cur_formspec, } -#if defined(__ANDROID__) || defined(__IOS__) -#define SIZE_TAG "size[11,5.5]" -#else -#define SIZE_TAG "size[11,5.5,true]" // Fixed size on desktop -#endif +#define SIZE_TAG "size[11,5.5,true]" /******************************************************************************/ static void updateChat(Client &client, f32 dtime, bool show_debug, @@ -4759,12 +4755,12 @@ void Game::showPauseMenu() << strgettext("Change Keys") << "]"; #endif os << "button_exit[3.5," << (ypos++) << ";4,0.5;btn_exit_menu;" - << strgettext("Save and Exit") << "]" + << strgettext("Save and Exit") << "]"; #ifndef __IOS__ -; // LoL os << "button_exit[3.5," << (ypos++) << ";4,0.5;btn_exit_os;" - << strgettext("Close game") << "]" + << strgettext("Close game") << "]"; #endif + /* << "textarea[7.5,0.25;3.9,6.25;;" << control_text << ";] << "textarea[0.4,0.25;3.9,6.25;;" << PROJECT_NAME_C " " VERSION_STRING "\n" << "\n" diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index c8dd58cd6..516ea05e0 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -2126,10 +2126,10 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize) // different and forms should always use the // maximum screen space available. double prefer_imgsize = mydata.screensize.Y / 10 * gui_scaling; - double fitx_imgsize = mydata.screensize.X / - ((12.0 / 8.0) * (0.5 + mydata.invsize.X)); - double fity_imgsize = mydata.screensize.Y / - ((15.0 / 11.0) * (0.85 + mydata.invsize.Y)); + double fitx_imgsize = floor(mydata.screensize.X / + (1.5 * (0.5 + mydata.invsize.X))); + double fity_imgsize = floor(mydata.screensize.Y / + (1.15 * (0.85 + mydata.invsize.Y))); use_imgsize = MYMIN(prefer_imgsize, MYMIN(fitx_imgsize, fity_imgsize)); #else