diff --git a/Oolite.xcodeproj/project.pbxproj b/Oolite.xcodeproj/project.pbxproj index 61af3233..3c421edd 100644 --- a/Oolite.xcodeproj/project.pbxproj +++ b/Oolite.xcodeproj/project.pbxproj @@ -447,7 +447,6 @@ 1A71E71F0BCE34CF00CD5C13 /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 1A71E70B0BCE34CF00CD5C13 /* pngwtran.c */; }; 1A71E7200BCE34CF00CD5C13 /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 1A71E70C0BCE34CF00CD5C13 /* pngread.c */; }; 1A71E7210BCE34CF00CD5C13 /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 1A71E70D0BCE34CF00CD5C13 /* pngrutil.c */; }; - 1A71E7220BCE34CF00CD5C13 /* pngtest.c in Sources */ = {isa = PBXBuildFile; fileRef = 1A71E70E0BCE34CF00CD5C13 /* pngtest.c */; }; 1A71E7230BCE34CF00CD5C13 /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 1A71E70F0BCE34CF00CD5C13 /* pngerror.c */; }; 1A71E7240BCE34CF00CD5C13 /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 1A71E7100BCE34CF00CD5C13 /* pngset.c */; }; 1A71E7250BCE34CF00CD5C13 /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 1A71E7110BCE34CF00CD5C13 /* pngwrite.c */; }; @@ -1062,7 +1061,7 @@ 083325DC09DDBCDE00F5B8E4 /* OOColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OOColor.m; sourceTree = ""; }; 083DB4D30A70E51E00B419B2 /* OOBrain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OOBrain.h; sourceTree = ""; }; 083DB4D40A70E51E00B419B2 /* OOBrain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OOBrain.m; sourceTree = ""; }; - 0865432206B8447D000CA0AB /* OoliteDev.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OoliteDev.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0865432206B8447D000CA0AB /* Oolite.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Oolite.app; sourceTree = BUILT_PRODUCTS_DIR; }; 0878FD2F086EF845004CB752 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 1A020E0A0D020AFB00C3F51E /* changedScriptHandlers.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = changedScriptHandlers.plist; sourceTree = ""; }; @@ -1771,7 +1770,7 @@ 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( - 0865432206B8447D000CA0AB /* OoliteDev.app */, + 0865432206B8447D000CA0AB /* Oolite.app */, 1A71E6F30BCE340C00CD5C13 /* libpng.a */, ); name = Products; @@ -3042,7 +3041,7 @@ name = Oolite; productInstallPath = "$(HOME)/Applications"; productName = Oolite; - productReference = 0865432206B8447D000CA0AB /* OoliteDev.app */; + productReference = 0865432206B8447D000CA0AB /* Oolite.app */; productType = "com.apple.product-type.application"; }; 1A71E6F20BCE340C00CD5C13 /* libpng-custom */ = { @@ -3068,6 +3067,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; ORGANIZATIONNAME = "the Oolite team"; }; buildConfigurationList = 08B31CB008FE63D70038D42F /* Build configuration list for PBXProject "Oolite" */; @@ -3345,7 +3345,6 @@ 1A71E71F0BCE34CF00CD5C13 /* pngwtran.c in Sources */, 1A71E7200BCE34CF00CD5C13 /* pngread.c in Sources */, 1A71E7210BCE34CF00CD5C13 /* pngrutil.c in Sources */, - 1A71E7220BCE34CF00CD5C13 /* pngtest.c in Sources */, 1A71E7230BCE34CF00CD5C13 /* pngerror.c in Sources */, 1A71E7240BCE34CF00CD5C13 /* pngset.c in Sources */, 1A71E7250BCE34CF00CD5C13 /* pngwrite.c in Sources */, @@ -3413,6 +3412,8 @@ GCC_REUSE_STRINGS = YES; GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_VERSION = 4.2; + "GCC_VERSION[sdk=macosx10.4][arch=*]" = 4.0; HEADER_SEARCH_PATHS = ( "$(HEADER_SEARCH_PATHS_QUOTED_1)", "$(HEADER_SEARCH_PATHS_QUOTED_2)", @@ -3567,7 +3568,7 @@ GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = PNG_USER_CONFIG; HEADER_SEARCH_PATHS = "\"$(SRCROOT)/src/Core/Materials/\""; INSTALL_PATH = /usr/local/lib; - MACOSX_DEPLOYMENT_TARGET = 10.3; + LLVM_LTO = YES; PREBINDING = NO; PRODUCT_NAME = png; SDKROOT_i386 = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; @@ -3657,13 +3658,11 @@ GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = PNG_USER_CONFIG; + GENERATE_MASTER_OBJECT_FILE = YES; HEADER_SEARCH_PATHS = "\"$(SRCROOT)/src/Core/Materials/\""; INSTALL_PATH = /usr/local/lib; - MACOSX_DEPLOYMENT_TARGET = 10.3; PREBINDING = NO; PRODUCT_NAME = png; - SDKROOT_i386 = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - ZERO_LINK = NO; }; name = Debug; }; diff --git a/src/Cocoa/oolite-targets.xcconfig b/src/Cocoa/oolite-targets.xcconfig index ab53641d..aa91c213 100644 --- a/src/Cocoa/oolite-targets.xcconfig +++ b/src/Cocoa/oolite-targets.xcconfig @@ -5,5 +5,6 @@ SDKROOT[arch=ppc64] = macosx10.5 MACOSX_DEPLOYMENT_TARGET = 10.4 MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.5 MACOSX_DEPLOYMENT_TARGET[arch=ppc64] = 10.5 +//GCC_VERSION = com.apple.compilers.llvm.clang.1_0 GCC_VERSION = 4.2 GCC_VERSION[sdk=macosx10.4][arch=*] = 4.0 diff --git a/src/Core/Entities/PlanetEntity.h b/src/Core/Entities/PlanetEntity.h index a5f49be7..088b119f 100644 --- a/src/Core/Entities/PlanetEntity.h +++ b/src/Core/Entities/PlanetEntity.h @@ -122,11 +122,6 @@ typedef struct Vector rotationAxis; } -// straight c -double corona_speed_factor; // multiply delta_t by this before adding it to corona_stage -double corona_stage; // 0.0 -> 1.0 -GLfloat rvalue[729]; // stores random values for adjusting colors in the corona - - (id) initSunWithColor:(OOColor*)sun_color andDictionary:(NSDictionary*) dict; - (id) initWithSeed:(Random_Seed) p_seed; - (void) miniaturize; diff --git a/src/Core/Entities/PlanetEntity.m b/src/Core/Entities/PlanetEntity.m index 4ff548ce..84acf17b 100644 --- a/src/Core/Entities/PlanetEntity.m +++ b/src/Core/Entities/PlanetEntity.m @@ -45,6 +45,11 @@ MA 02110-1301, USA. #define LIM16K 16000.0*16000.0 * NO_DRAW_DISTANCE_FACTOR*NO_DRAW_DISTANCE_FACTOR +static double corona_speed_factor; // multiply delta_t by this before adding it to corona_stage +static double corona_stage; // 0.0 -> 1.0 +static GLfloat rvalue[729]; // stores random values for adjusting colors in the corona + + // straight c static Vector base_vertex_array[10400]; static int base_terrain_array[10400]; diff --git a/src/Core/Entities/ShipEntity.h b/src/Core/Entities/ShipEntity.h index 9eca10e8..1d305742 100644 --- a/src/Core/Entities/ShipEntity.h +++ b/src/Core/Entities/ShipEntity.h @@ -804,7 +804,7 @@ BOOL class_masslocks(int some_class); @end -#if OO_DEBUG +#ifndef NDEBUG @interface ShipEntity (Debug) - (OOShipGroup *) rawEscortGroup; diff --git a/src/Core/Entities/ShipEntity.m b/src/Core/Entities/ShipEntity.m index cc1dea48..29781882 100644 --- a/src/Core/Entities/ShipEntity.m +++ b/src/Core/Entities/ShipEntity.m @@ -3600,7 +3600,7 @@ static GLfloat mascem_color2[4] = { 0.4, 0.1, 0.4, 1.0}; // purple } -#if OO_DEBUG +#if NDEBUG - (OOShipGroup *) rawEscortGroup { return _escortGroup; diff --git a/src/Core/OOCocoa.h b/src/Core/OOCocoa.h index e57fd5e4..4422fd31 100644 --- a/src/Core/OOCocoa.h +++ b/src/Core/OOCocoa.h @@ -305,7 +305,7 @@ enum { #undef NS_DURING #undef NS_HANDLER #undef NS_ENDHANDLER - #undef NS_VALUERETURN(v,t) + #undef NS_VALUERETURN #undef NS_VOIDRETURN #define NS_DURING @try { diff --git a/src/Core/OODebugGLDrawing.m b/src/Core/OODebugGLDrawing.m index fd70e29b..f812e484 100644 --- a/src/Core/OODebugGLDrawing.m +++ b/src/Core/OODebugGLDrawing.m @@ -155,7 +155,7 @@ OODebugWFState OODebugBeginWireframe(BOOL ignoreZ) { OO_ENTER_OPENGL(); - OODebugWFState state = { material: [OOMaterial current] }; + OODebugWFState state = { .material = [OOMaterial current] }; [OOMaterial applyNone]; glPushAttrib(GL_ENABLE_BIT | GL_DEPTH_BUFFER_BIT | GL_LINE_BIT | GL_POINT_BIT | GL_CURRENT_BIT); diff --git a/src/Core/OOMatrix.m b/src/Core/OOMatrix.m index 39977f8f..da22d552 100644 --- a/src/Core/OOMatrix.m +++ b/src/Core/OOMatrix.m @@ -27,13 +27,13 @@ MA 02110-1301, USA. const OOMatrix kIdentityMatrix = - { m: { + { .m = { {1.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 1.0f} }}; -const OOMatrix kZeroMatrix = { m: { +const OOMatrix kZeroMatrix = { .m = { {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, diff --git a/src/Core/OOOpenGLExtensionManager.m b/src/Core/OOOpenGLExtensionManager.m index 182bfc12..1bf63a9b 100644 --- a/src/Core/OOOpenGLExtensionManager.m +++ b/src/Core/OOOpenGLExtensionManager.m @@ -293,7 +293,7 @@ static unsigned IntegerFromString(const GLubyte **ioString) } #endif - const NSString *requiredExtension[] = + NSString * const requiredExtension[] = { @"GL_ARB_shading_language_100", @"GL_ARB_fragment_shader", @@ -302,7 +302,7 @@ static unsigned IntegerFromString(const GLubyte **ioString) @"GL_ARB_shader_objects", nil // sentinel - don't remove! }; - NSString **required = NULL; + NSString * const *required = NULL; for (required = requiredExtension; *required != nil; ++required) { diff --git a/src/Core/OOStringParsing.m b/src/Core/OOStringParsing.m index 42821fc3..1c71cba9 100644 --- a/src/Core/OOStringParsing.m +++ b/src/Core/OOStringParsing.m @@ -754,18 +754,19 @@ static NSString * const kEscapedQuotationMark = @"\\\""; NSString *EscapedGraphVizString(NSString *string) { - const NSString *srcStrings[] = + NSString * const srcStrings[] = { //Note: backslash must be first. @"\\", @"\"", @"\'", @"\r", @"\n", @"\t", nil }; - const NSString *subStrings[] = + NSString * const subStrings[] = { //Note: must be same order. @"\\\\", @"\\\"", @"\\\'", @"\\r", @"\\n", @"\\t", nil }; - NSString **src = srcStrings, **sub = subStrings; + NSString * const * src = srcStrings; + NSString * const * sub = subStrings; NSMutableString *mutable = nil; NSString *result = nil;