From 6444b5d5e92b42c8cceefd1d95332f3f6088842c Mon Sep 17 00:00:00 2001 From: Jens Ayton Date: Sat, 3 May 2008 13:39:56 +0000 Subject: [PATCH] Moved demo2 screen over to OOShipRegistry. No more blank spaces or crashes for empty lists, possibly. git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1611 127b21dd-08f5-0310-b4b7-95ae10353056 --- Oolite.xcodeproj/project.pbxproj | 6 +++--- src/Core/Universe.m | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Oolite.xcodeproj/project.pbxproj b/Oolite.xcodeproj/project.pbxproj index 7aeee67f..dd29832c 100644 --- a/Oolite.xcodeproj/project.pbxproj +++ b/Oolite.xcodeproj/project.pbxproj @@ -1020,7 +1020,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 = ""; }; @@ -1688,7 +1688,7 @@ 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( - 0865432206B8447D000CA0AB /* OoliteDev.app */, + 0865432206B8447D000CA0AB /* Oolite.app */, 1A71E6F30BCE340C00CD5C13 /* libpng.a */, ); name = Products; @@ -2912,7 +2912,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 */ = { diff --git a/src/Core/Universe.m b/src/Core/Universe.m index d2f0edf0..e7a8c353 100644 --- a/src/Core/Universe.m +++ b/src/Core/Universe.m @@ -239,7 +239,7 @@ static NSComparisonResult comparePrice(NSDictionary *dict1, NSDictionary *dict2, missiontext = [[ResourceManager dictionaryFromFilesNamed:@"missiontext.plist" inFolder:@"Config" andMerge:YES] retain]; - demo_ships = [[ResourceManager arrayFromFilesNamed:@"demoships.plist" inFolder:@"Config" andMerge:YES] retain]; + demo_ships = [[OOShipRegistry sharedRegistry] demoShipKeys]; demo_ship_index = 0; breakPatternCounter = 0; @@ -497,8 +497,8 @@ static NSComparisonResult comparePrice(NSDictionary *dict1, NSDictionary *dict2, } if(showDemo) { - [demo_ships autorelease]; - demo_ships = [[ResourceManager arrayFromFilesNamed:@"demoships.plist" inFolder:@"Config" andMerge:YES] retain]; + [demo_ships release]; + demo_ships = [[OOShipRegistry sharedRegistry] demoShipKeys]; demo_ship_index = 0; }