# HG changeset patch # User koda # Date 1312500171 -7200 # Node ID d8632f5890081d4d1d9729628eec6555bce080c4 # Parent 0ba2dca673e6c476e0112f8aff9489b878a08cef use -Os --ffast-math on ios everywhere, plus other sdk3.2 compatibility changes diff -r 0ba2dca673e6 -r d8632f589008 misc/libfreetype/Xcode-iPhoneOS/Freetype.xcodeproj/project.pbxproj --- a/misc/libfreetype/Xcode-iPhoneOS/Freetype.xcodeproj/project.pbxproj Fri Aug 05 14:15:19 2011 -0400 +++ b/misc/libfreetype/Xcode-iPhoneOS/Freetype.xcodeproj/project.pbxproj Fri Aug 05 01:22:51 2011 +0200 @@ -1115,7 +1115,8 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; GCC_C_LANGUAGE_STANDARD = c99; - GCC_OPTIMIZATION_LEVEL = 2; + GCC_FAST_MATH = YES; + GCC_OPTIMIZATION_LEVEL = s; GCC_PREPROCESSOR_DEFINITIONS = ( DARWIN_NO_CARBON, FT2_BUILD_LIBRARY, diff -r 0ba2dca673e6 -r d8632f589008 misc/liblua/Xcode/Lua.xcodeproj/project.pbxproj --- a/misc/liblua/Xcode/Lua.xcodeproj/project.pbxproj Fri Aug 05 14:15:19 2011 -0400 +++ b/misc/liblua/Xcode/Lua.xcodeproj/project.pbxproj Fri Aug 05 01:22:51 2011 +0200 @@ -405,6 +405,7 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; GCC_C_LANGUAGE_STANDARD = c99; + GCC_FAST_MATH = YES; GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_ABOUT_RETURN_TYPE = YES; diff -r 0ba2dca673e6 -r d8632f589008 misc/libtremor/Xcode/Tremor.xcodeproj/project.pbxproj --- a/misc/libtremor/Xcode/Tremor.xcodeproj/project.pbxproj Fri Aug 05 14:15:19 2011 -0400 +++ b/misc/libtremor/Xcode/Tremor.xcodeproj/project.pbxproj Fri Aug 05 01:22:51 2011 +0200 @@ -325,6 +325,7 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; GCC_C_LANGUAGE_STANDARD = c99; + GCC_FAST_MATH = YES; GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_ABOUT_RETURN_TYPE = YES; diff -r 0ba2dca673e6 -r d8632f589008 project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m --- a/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m Fri Aug 05 14:15:19 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m Fri Aug 05 01:22:51 2011 +0200 @@ -144,10 +144,9 @@ -(void) applicationWillResignActive:(UIApplication *)application { //[super applicationWillResignActive:application]; - UIDevice* device = [UIDevice currentDevice]; + UIDevice *device = [UIDevice currentDevice]; if ([device respondsToSelector:@selector(isMultitaskingSupported)] && - device.multitaskingSupported && - self.isInGame) { + [device isMultitaskingSupported] && self.isInGame) { // let's try to be permissive with multitasking here... if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"multitasking"] boolValue]) HW_suspend(); @@ -166,10 +165,9 @@ -(void) applicationDidBecomeActive:(UIApplication *)application { //[super applicationDidBecomeActive:application]; - UIDevice* device = [UIDevice currentDevice]; + UIDevice *device = [UIDevice currentDevice]; if ([device respondsToSelector:@selector(isMultitaskingSupported)] && - device.multitaskingSupported && - self.isInGame) { + [device isMultitaskingSupported] && self.isInGame) { HW_resume(); } } diff -r 0ba2dca673e6 -r d8632f589008 project_files/HedgewarsMobile/Classes/UIImageExtra.m --- a/project_files/HedgewarsMobile/Classes/UIImageExtra.m Fri Aug 05 14:15:19 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/UIImageExtra.m Fri Aug 05 01:22:51 2011 +0200 @@ -25,17 +25,17 @@ @implementation UIImage (extra) CGFloat getScreenScale(void) { + float scale = 1.0f; if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) - return [UIScreen mainScreen].scale; - else - return 1.0f; + scale = [[UIScreen mainScreen] scale]; + return scale; } -(UIImage *)scaleToSize:(CGSize) size { DLog(@"warning - this is a very expensive operation, you should avoid using it"); // Create a bitmap graphics context; this will also set it as the current context - if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) + if (UIGraphicsBeginImageContextWithOptions != NULL) UIGraphicsBeginImageContextWithOptions(size, NO, getScreenScale()); else UIGraphicsBeginImageContext(size);