migrate to ARC
parent
6ce84010a7
commit
cb7a080f6f
|
@ -21,7 +21,7 @@ NSDictionary* coordinateDict;
|
|||
int year = astroDate.year;
|
||||
NSCalendar *currentCalendar = [NSCalendar currentCalendar];
|
||||
[currentCalendar setTimeZone: [NSTimeZone timeZoneWithAbbreviation:@"GMT"]];
|
||||
NSDateComponents *comps = [[[NSDateComponents alloc] init] autorelease];
|
||||
NSDateComponents *comps = [[NSDateComponents alloc] init];
|
||||
int era = 1;
|
||||
if (year < 1)
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ NSDictionary* coordinateDict;
|
|||
}
|
||||
+(CelestiaUniversalCoord*)universalPosition:(CelestiaVector*)heliocentric starPosition:(CelestiaVector*)starPosition
|
||||
{
|
||||
return [[[CelestiaUniversalCoord alloc] initWithUniversalCoord:astro::universalPosition([heliocentric point3d],[starPosition point3f])] autorelease];
|
||||
return [[CelestiaUniversalCoord alloc] initWithUniversalCoord:astro::universalPosition([heliocentric point3d],[starPosition point3f])];
|
||||
}
|
||||
+(CelestiaVector*)equatorialToCelestialCart:(NSNumber*)ra declination:(NSNumber*)dec distance:(NSNumber*)distance
|
||||
{
|
||||
|
@ -112,7 +112,6 @@ NSDictionary* coordinateDict;
|
|||
// -[NSDateComponents second] is rounded to an integer,
|
||||
// so have to calculate and add decimal part
|
||||
roundedDate = [currentCalendar dateFromComponents: comps];
|
||||
[currentCalendar release];
|
||||
|
||||
NSTimeInterval extraSeconds = [date timeIntervalSinceDate: roundedDate];
|
||||
astroDate.seconds += extraSeconds;
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
children: (NSDictionary *)aChildren;
|
||||
+ (void)addChildrenToStar: (BrowserItem *) aStar;
|
||||
+ (void)addChildrenToBody: (BrowserItem *) aBody;
|
||||
- (void)dealloc;
|
||||
|
||||
- (NSString *)name;
|
||||
- (id)body;
|
||||
|
|
|
@ -22,31 +22,31 @@
|
|||
- (id)initWithCelestiaDSO: (CelestiaDSO *)aDSO
|
||||
{
|
||||
self = [super init];
|
||||
if (self) data = [aDSO retain];
|
||||
if (self) data = aDSO;
|
||||
return self;
|
||||
}
|
||||
- (id)initWithCelestiaStar: (CelestiaStar *)aStar
|
||||
{
|
||||
self = [super init];
|
||||
if (self) data = [aStar retain];
|
||||
if (self) data = aStar;
|
||||
return self;
|
||||
}
|
||||
- (id)initWithCelestiaBody: (CelestiaBody *)aBody
|
||||
{
|
||||
self = [super init];
|
||||
if (self) data = [aBody retain];
|
||||
if (self) data = aBody;
|
||||
return self;
|
||||
}
|
||||
- (id)initWithCelestiaLocation: (CelestiaLocation *)aLocation
|
||||
{
|
||||
self = [super init];
|
||||
if (self) data = [aLocation retain];
|
||||
if (self) data = aLocation;
|
||||
return self;
|
||||
}
|
||||
- (id)initWithName: (NSString *)aName
|
||||
{
|
||||
self = [super init];
|
||||
if (self) data = [aName retain];
|
||||
if (self) data = aName;
|
||||
return self;
|
||||
}
|
||||
- (id)initWithName: (NSString *)aName
|
||||
|
@ -55,7 +55,7 @@
|
|||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
data = [aName retain];
|
||||
data = aName;
|
||||
if (nil == children)
|
||||
{
|
||||
children = [[NSMutableDictionary alloc] initWithDictionary: aChildren];
|
||||
|
@ -87,8 +87,8 @@
|
|||
Body* body = sys->getBody(i);
|
||||
if (body->getName().empty())
|
||||
continue;
|
||||
BrowserItem *item = [[[BrowserItem alloc] initWithCelestiaBody:
|
||||
[[[CelestiaBody alloc] initWithBody: body] autorelease]] autorelease];
|
||||
BrowserItem *item = [[BrowserItem alloc] initWithCelestiaBody:
|
||||
[[CelestiaBody alloc] initWithBody: body]];
|
||||
int bodyClass = body->getClassification();
|
||||
switch (bodyClass)
|
||||
{
|
||||
|
@ -96,12 +96,12 @@
|
|||
continue;
|
||||
case Body::Planet:
|
||||
if (!planets)
|
||||
planets = [[[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Planets",@"po",@"")] autorelease];
|
||||
planets = [[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Planets",@"po",@"")];
|
||||
subItem = planets;
|
||||
break;
|
||||
case Body::DwarfPlanet:
|
||||
if (!dwarfPlanets)
|
||||
dwarfPlanets = [[[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Dwarf Planets",@"po",@"")] autorelease];
|
||||
dwarfPlanets = [[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Dwarf Planets",@"po",@"")];
|
||||
subItem = dwarfPlanets;
|
||||
break;
|
||||
case Body::Moon:
|
||||
|
@ -109,7 +109,7 @@
|
|||
if (body->getRadius() < 100.0f || Body::MinorMoon == bodyClass)
|
||||
{
|
||||
if (!minorMoons)
|
||||
minorMoons = [[[BrowserItem alloc] initWithName: NSLocalizedString(@"Minor Moons",@"")] autorelease];
|
||||
minorMoons = [[BrowserItem alloc] initWithName: NSLocalizedString(@"Minor Moons",@"")];
|
||||
subItem = minorMoons;
|
||||
}
|
||||
else
|
||||
|
@ -119,17 +119,17 @@
|
|||
break;
|
||||
case Body::Asteroid:
|
||||
if (!asteroids)
|
||||
asteroids = [[[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Asteroids",@"po",@"")] autorelease];
|
||||
asteroids = [[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Asteroids",@"po",@"")];
|
||||
subItem = asteroids;
|
||||
break;
|
||||
case Body::Comet:
|
||||
if (!comets)
|
||||
comets = [[[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Comets",@"po",@"")] autorelease];
|
||||
comets = [[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Comets",@"po",@"")];
|
||||
subItem = comets;
|
||||
break;
|
||||
case Body::Spacecraft:
|
||||
if (!spacecrafts)
|
||||
spacecrafts = [[[BrowserItem alloc] initWithName: NSLocalizedString(@"Spacecrafts",@"")] autorelease];
|
||||
spacecrafts = [[BrowserItem alloc] initWithName: NSLocalizedString(@"Spacecrafts",@"")];
|
||||
subItem = spacecrafts;
|
||||
break;
|
||||
default:
|
||||
|
@ -165,8 +165,8 @@
|
|||
Body* body = sys->getBody(i);
|
||||
if (body->getName().empty())
|
||||
continue;
|
||||
BrowserItem *item = [[[BrowserItem alloc] initWithCelestiaBody:
|
||||
[[[CelestiaBody alloc] initWithBody: body] autorelease]] autorelease];
|
||||
BrowserItem *item = [[BrowserItem alloc] initWithCelestiaBody:
|
||||
[[CelestiaBody alloc] initWithBody: body]];
|
||||
int bodyClass = body->getClassification();
|
||||
if (bodyClass==Body::Asteroid) bodyClass = Body::Moon;
|
||||
|
||||
|
@ -179,7 +179,7 @@
|
|||
if (body->getRadius() < 100.0f || Body::MinorMoon == bodyClass)
|
||||
{
|
||||
if (!minorMoons)
|
||||
minorMoons = [[[BrowserItem alloc] initWithName: NSLocalizedString(@"Minor Moons",@"")] autorelease];
|
||||
minorMoons = [[BrowserItem alloc] initWithName: NSLocalizedString(@"Minor Moons",@"")];
|
||||
subItem = minorMoons;
|
||||
}
|
||||
else
|
||||
|
@ -189,12 +189,12 @@
|
|||
break;
|
||||
case Body::Comet:
|
||||
if (!comets)
|
||||
comets = [[[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Comets",@"po",@"")] autorelease];
|
||||
comets = [[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Comets",@"po",@"")];
|
||||
subItem = comets;
|
||||
break;
|
||||
case Body::Spacecraft:
|
||||
if (!spacecrafts)
|
||||
spacecrafts = [[[BrowserItem alloc] initWithName: NSLocalizedString(@"Spacecrafts",@"")] autorelease];
|
||||
spacecrafts = [[BrowserItem alloc] initWithName: NSLocalizedString(@"Spacecrafts",@"")];
|
||||
subItem = spacecrafts;
|
||||
break;
|
||||
default:
|
||||
|
@ -212,24 +212,16 @@
|
|||
std::vector<Location*>* locations = [(CelestiaBody *)[aBody body] body]->getLocations();
|
||||
if (locations != NULL)
|
||||
{
|
||||
BrowserItem *locationItems = [[[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Locations",@"po",@"")] autorelease];
|
||||
BrowserItem *locationItems = [[BrowserItem alloc] initWithName: NSLocalizedStringFromTable(@"Locations",@"po",@"")];
|
||||
for (vector<Location*>::const_iterator iter = locations->begin();
|
||||
iter != locations->end(); iter++)
|
||||
{
|
||||
[locationItems addChild: [[[BrowserItem alloc] initWithCelestiaLocation: [[[CelestiaLocation alloc] initWithLocation: *iter] autorelease]] autorelease]];
|
||||
[locationItems addChild: [[BrowserItem alloc] initWithCelestiaLocation: [[CelestiaLocation alloc] initWithLocation: *iter]]];
|
||||
}
|
||||
[aBody addChild: locationItems];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[childNames release];
|
||||
[children release];
|
||||
[data release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString *)name
|
||||
{
|
||||
return ([data respondsToSelector:@selector(name)]) ? [data name] : data;
|
||||
|
@ -258,12 +250,12 @@
|
|||
{
|
||||
if (childrenChanged)
|
||||
{
|
||||
[childNames release]; childNames = nil;
|
||||
childNames = nil;
|
||||
}
|
||||
|
||||
if (nil == childNames)
|
||||
{
|
||||
childNames = [[[children allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)] retain];
|
||||
childNames = [[children allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
|
||||
childrenChanged = NO;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ static CelestiaCore *appCore;
|
|||
obj = catalog->getDSO(i);
|
||||
if (obj)
|
||||
{
|
||||
dsoWrapper = [[[CelestiaDSO alloc] initWithDSO: obj] autorelease];
|
||||
dsoWrapper = [[CelestiaDSO alloc] initWithDSO: obj];
|
||||
type = [dsoWrapper type];
|
||||
NSNumber *typeCount = [countPerType objectForKey: type];
|
||||
if (nil == typeCount)
|
||||
|
@ -125,7 +125,7 @@ static CelestiaCore *appCore;
|
|||
group = [tempDict objectForKey: @"Unknown"];
|
||||
|
||||
name = [NSString stringWithStdString: catalog->getDSOName(obj)];
|
||||
[group setObject: [[[BrowserItem alloc] initWithCelestiaDSO: dsoWrapper] autorelease]
|
||||
[group setObject: [[BrowserItem alloc] initWithCelestiaDSO: dsoWrapper]
|
||||
forKey: name];
|
||||
}
|
||||
}
|
||||
|
@ -135,19 +135,18 @@ static CelestiaCore *appCore;
|
|||
{
|
||||
if ([(NSDictionary *)[tempDict objectForKey: type] count] > 0)
|
||||
{
|
||||
[result setObject: [[[BrowserItem alloc] initWithName: [typeMap objectForKey: type] children: [tempDict objectForKey: type]] autorelease]
|
||||
[result setObject: [[BrowserItem alloc] initWithName: [typeMap objectForKey: type] children: [tempDict objectForKey: type]]
|
||||
forKey: [typeMap objectForKey: type]];
|
||||
}
|
||||
}
|
||||
|
||||
[typeMap release];
|
||||
return result;
|
||||
}
|
||||
|
||||
- (BrowserItem *) sol
|
||||
{
|
||||
Selection sol = appCore->getSimulation()->getUniverse()->find("Sol");
|
||||
return [[[BrowserItem alloc] initWithCelestiaStar: [[[CelestiaStar alloc] initWithStar: sol.star()] autorelease]] autorelease];
|
||||
return [[BrowserItem alloc] initWithCelestiaStar: [[CelestiaStar alloc] initWithStar: sol.star()]];
|
||||
}
|
||||
|
||||
- (NSDictionary *) starsOfKind: (int) kind
|
||||
|
@ -168,7 +167,7 @@ static CelestiaCore *appCore;
|
|||
aStar = (*nearStars)[i];
|
||||
starName = [NSString stringWithStdString: sim->getUniverse()->getStarCatalog()->getStarName(*aStar) ];
|
||||
[starDict setObject:
|
||||
[[[BrowserItem alloc] initWithCelestiaStar: [[[CelestiaStar alloc] initWithStar: aStar] autorelease]] autorelease]
|
||||
[[BrowserItem alloc] initWithCelestiaStar: [[CelestiaStar alloc] initWithStar: aStar]]
|
||||
forKey: starName];
|
||||
}
|
||||
|
||||
|
@ -189,15 +188,15 @@ static CelestiaCore *appCore;
|
|||
[BrowserItem addChildrenToStar: sol];
|
||||
|
||||
stars = [[BrowserItem alloc] initWithName: @""];
|
||||
[stars addChild: [[[BrowserItem alloc] initWithName:
|
||||
[stars addChild: [[BrowserItem alloc] initWithName:
|
||||
NSLocalizedString(@"Nearest Stars",@"") children:
|
||||
[self starsOfKind: StarBrowser::NearestStars]] autorelease]];
|
||||
[stars addChild: [[[BrowserItem alloc] initWithName:
|
||||
[self starsOfKind: StarBrowser::NearestStars]]];
|
||||
[stars addChild: [[BrowserItem alloc] initWithName:
|
||||
NSLocalizedString(@"Brightest Stars",@"") children:
|
||||
[self starsOfKind: StarBrowser::BrighterStars]] autorelease]];
|
||||
[stars addChild: [[[BrowserItem alloc] initWithName:
|
||||
[self starsOfKind: StarBrowser::BrighterStars]]];
|
||||
[stars addChild: [[BrowserItem alloc] initWithName:
|
||||
NSLocalizedString(@"Stars With Planets",@"") children:
|
||||
[self starsOfKind: StarBrowser::StarsWithPlanets]] autorelease]];
|
||||
[self starsOfKind: StarBrowser::StarsWithPlanets]]];
|
||||
|
||||
dsos = [[BrowserItem alloc] initWithName: @"" children: [self deepSkyObjects]];
|
||||
|
||||
|
@ -207,8 +206,6 @@ static CelestiaCore *appCore;
|
|||
dsos, @"dso",
|
||||
nil];
|
||||
|
||||
[stars release];
|
||||
[dsos release];
|
||||
return [rootItems objectForKey: rootId];
|
||||
}
|
||||
|
||||
|
@ -339,7 +336,7 @@ static CelestiaCore *appCore;
|
|||
NSDictionary *parenAttr = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSColor grayColor], NSForegroundColorAttributeName,
|
||||
nil];
|
||||
NSMutableAttributedString *attrStr = [[[NSMutableAttributedString alloc] initWithString: itemName] autorelease];
|
||||
NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString: itemName];
|
||||
[attrStr setAttributes:parenAttr range:parenRange];
|
||||
|
||||
[cell setAttributedStringValue:attrStr];
|
||||
|
@ -392,9 +389,9 @@ static CelestiaCore *appCore;
|
|||
if (browser && [rootId isEqualToString: @"star"])
|
||||
{
|
||||
BrowserItem *rootItem = [self root];
|
||||
[rootItem addChild: [[[BrowserItem alloc] initWithName:
|
||||
[rootItem addChild: [[BrowserItem alloc] initWithName:
|
||||
NSLocalizedString(@"Nearest Stars",@"") children:
|
||||
[self starsOfKind: StarBrowser::NearestStars]] autorelease]];
|
||||
[self starsOfKind: StarBrowser::NearestStars]]];
|
||||
|
||||
// Immediately synch browser display with reloaded star list,
|
||||
// but only if star list is showing
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
// Copyright (C) 2007, Celestia Development Team
|
||||
//
|
||||
|
||||
#import "CelestiaDestination.h"
|
||||
#import "CelestiaFavorite.h"
|
||||
#import "CelestiaFavorites.h"
|
||||
#import "CelestiaSimulation.h"
|
||||
|
@ -19,9 +18,7 @@ class CelestiaCore;
|
|||
@class CelestiaCore;
|
||||
#endif
|
||||
|
||||
@interface CelestiaAppCore : NSObject {
|
||||
CelestiaDestinations* _destinations;
|
||||
}
|
||||
@interface CelestiaAppCore : NSObject
|
||||
-(CelestiaCore*) appCore;
|
||||
-(int)toCelestiaKey:(NSEvent*)theEvent;
|
||||
-(int)toCelestiaModifiers:(unsigned int)modifiers buttons:(unsigned int)buttons;
|
||||
|
@ -49,7 +46,6 @@ class CelestiaCore;
|
|||
-(void)showText:(NSString *)text;
|
||||
-(void)activateFavorite:(id)fav;
|
||||
-(CelestiaFavorites *)favorites;
|
||||
-(CelestiaDestinations *)destinations;
|
||||
-(NSTimeZone *)timeZone;
|
||||
-(void)setTimeZone:(NSTimeZone *)timeZone withDate:(NSDate *)date;
|
||||
-(int)textEnterMode;
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#import "CelestiaAppCore.h"
|
||||
#import "CelestiaAppCore_PrivateAPI.h"
|
||||
#import "NSString_ObjCPlusPlus.h"
|
||||
#import "CelestiaDestination_PrivateAPI.h"
|
||||
#import "CelestiaFavorite_PrivateAPI.h"
|
||||
#import "CelestiaSelection_PrivateAPI.h"
|
||||
#import "CelestiaSimulation_PrivateAPI.h"
|
||||
|
@ -70,11 +69,11 @@ public:
|
|||
|
||||
virtual void fatalError(const std::string& msg)
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
NSLog(@"alerter fatalError!");
|
||||
[[CelestiaController shared] fatalError: [NSString stringWithStdString: msg] ];
|
||||
NSLog(@"alerter fatalError finis");
|
||||
[pool release];
|
||||
@autoreleasepool {
|
||||
NSLog(@"alerter fatalError!");
|
||||
[[CelestiaController shared] fatalError: [NSString stringWithStdString: msg] ];
|
||||
NSLog(@"alerter fatalError finis");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -86,9 +85,9 @@ public:
|
|||
|
||||
virtual void update(const string& msg)
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
[[[CelestiaController shared] valueForKey: @"splashWindowController"] performSelector: @selector(setStatusText:) withObject: [NSString stringWithStdString: msg]];
|
||||
[pool release];
|
||||
@autoreleasepool {
|
||||
[[[CelestiaController shared] valueForKey: @"splashWindowController"] performSelector: @selector(setStatusText:) withObject: [NSString stringWithStdString: msg]];
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -303,12 +302,10 @@ CelestiaCore *appCore;
|
|||
-(CelestiaAppCore *)init
|
||||
{
|
||||
if (_sharedCelestiaAppCore != nil) {
|
||||
[[super init] release];
|
||||
return _sharedCelestiaAppCore;
|
||||
}
|
||||
self = [super init];
|
||||
appCore = NULL;
|
||||
_destinations = nil;
|
||||
return self;
|
||||
}
|
||||
-(void)archive
|
||||
|
@ -320,10 +317,6 @@ CelestiaCore *appCore;
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
if (_destinations != nil) {
|
||||
[_destinations release];
|
||||
_destinations = nil;
|
||||
}
|
||||
if (appCore != NULL) {
|
||||
// appCore doesn't own the custom alerter and cursor
|
||||
// handler for some reason so we assume responsibility
|
||||
|
@ -336,7 +329,6 @@ CelestiaCore *appCore;
|
|||
appCore = NULL;
|
||||
}
|
||||
_sharedCelestiaAppCore = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(BOOL)initSimulationWithConfigPath:(NSString *)configPath extraPath:(NSString *)extraPath
|
||||
|
@ -460,12 +452,12 @@ CelestiaCore *appCore;
|
|||
|
||||
-(CelestiaSimulation *)simulation
|
||||
{
|
||||
return [[[CelestiaSimulation alloc] initWithSimulation:appCore->getSimulation()] autorelease];
|
||||
return [[CelestiaSimulation alloc] initWithSimulation:appCore->getSimulation()];
|
||||
}
|
||||
|
||||
-(CelestiaRenderer *)renderer
|
||||
{
|
||||
return [[[CelestiaRenderer alloc] initWithRenderer:appCore->getRenderer()] autorelease];
|
||||
return [[CelestiaRenderer alloc] initWithRenderer:appCore->getRenderer()];
|
||||
}
|
||||
|
||||
-(void)showText:(NSString *)text
|
||||
|
@ -485,16 +477,6 @@ CelestiaCore *appCore;
|
|||
return [CelestiaFavorites sharedFavorites];
|
||||
}
|
||||
|
||||
-(CelestiaDestinations *)destinations
|
||||
{
|
||||
if (_destinations == nil || [_destinations destinations] != appCore->getDestinations()) {
|
||||
if (_destinations != nil)
|
||||
[_destinations release];
|
||||
_destinations = [[CelestiaDestinations alloc] initWithDestinations:appCore->getDestinations()];
|
||||
}
|
||||
return _destinations;
|
||||
}
|
||||
|
||||
-(NSTimeZone *)timeZone
|
||||
{
|
||||
NSTimeZone *bestZone=nil;
|
||||
|
@ -626,8 +608,7 @@ CelestiaCore *appCore;
|
|||
if (!url.empty())
|
||||
{
|
||||
NSString *unescUrl = [NSString stringWithStdString: url];
|
||||
NSString *escUrl =
|
||||
(NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)unescUrl, NULL, NULL, kCFStringEncodingUTF8);
|
||||
NSString *escUrl = [unescUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
if (escUrl)
|
||||
{
|
||||
|
@ -644,7 +625,6 @@ CelestiaCore *appCore;
|
|||
}
|
||||
}
|
||||
|
||||
[escUrl release];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,15 +26,6 @@
|
|||
|
||||
|
||||
@implementation CelestiaBody
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(NSString*)classification
|
||||
{
|
||||
switch ([self body]->getClassification())
|
||||
|
|
|
@ -60,7 +60,7 @@ NSString* fatalErrorMessage;
|
|||
NSURL *tempPath = [NSURL URLByResolvingBookmarkData:configFileData options:NSURLBookmarkResolutionWithSecurityScope relativeToURL:nil bookmarkDataIsStale:nil error:&error];
|
||||
if ([tempPath startAccessingSecurityScopedResource])
|
||||
{
|
||||
configFilePath = [tempPath retain];
|
||||
configFilePath = tempPath;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,16 +70,16 @@ NSString* fatalErrorMessage;
|
|||
NSURL *tempPath = [NSURL URLByResolvingBookmarkData:dataDirData options:NSURLBookmarkResolutionWithSecurityScope relativeToURL:nil bookmarkDataIsStale:nil error:&error];
|
||||
if ([tempPath startAccessingSecurityScopedResource])
|
||||
{
|
||||
dataDirPath = [tempPath retain];
|
||||
dataDirPath = tempPath;
|
||||
}
|
||||
}
|
||||
|
||||
// use the default location for nil ones
|
||||
if (configFilePath == nil)
|
||||
configFilePath = [[ConfigSelectionWindowController applicationConfig] retain];
|
||||
configFilePath = [ConfigSelectionWindowController applicationConfig];
|
||||
|
||||
if (dataDirPath == nil)
|
||||
dataDirPath = [[ConfigSelectionWindowController applicationDataDirectory] retain];
|
||||
dataDirPath = [ConfigSelectionWindowController applicationDataDirectory];
|
||||
|
||||
// add the edit configuration menu item
|
||||
NSMenu *appMenu = [[[[NSApp mainMenu] itemArray] objectAtIndex:0] submenu];
|
||||
|
@ -146,8 +146,8 @@ NSString* fatalErrorMessage;
|
|||
{
|
||||
if (configSelectionWindowController == nil) {
|
||||
configSelectionWindowController = [[ConfigSelectionWindowController alloc] initWithWindowNibName:@"ConfigSelectionWindow"];
|
||||
configSelectionWindowController->dataDirPath = [dataDirPath retain];
|
||||
configSelectionWindowController->configFilePath = [configFilePath retain];
|
||||
configSelectionWindowController->dataDirPath = dataDirPath;
|
||||
configSelectionWindowController->configFilePath = configFilePath;
|
||||
}
|
||||
[configSelectionWindowController setMandatory:!cancelAllowed];
|
||||
[configSelectionWindowController showWindow:self];
|
||||
|
@ -187,31 +187,34 @@ NSString* fatalErrorMessage;
|
|||
|
||||
- (BOOL)startInitialization
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
BOOL result = NO;
|
||||
|
||||
[[glView openGLContext] makeCurrentContext];
|
||||
|
||||
@autoreleasepool {
|
||||
#ifdef DEBUG
|
||||
NSDate *t = [NSDate date];
|
||||
NSDate *t = [NSDate date];
|
||||
#endif
|
||||
|
||||
BOOL result = [appCore initSimulationWithConfigPath:[configFilePath path] extraPath:[extraDataDirPath path]];
|
||||
result = [appCore initSimulationWithConfigPath:[configFilePath path] extraPath:[extraDataDirPath path]];
|
||||
|
||||
if (!result)
|
||||
{
|
||||
[startupCondition lock];
|
||||
[startupCondition unlockWithCondition:99];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!result)
|
||||
{
|
||||
[startupCondition lock];
|
||||
[startupCondition unlockWithCondition:99];
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG
|
||||
NSLog(@"Init took %lf seconds\n", -[t timeIntervalSinceNow]);
|
||||
NSLog(@"Init took %lf seconds\n", -[t timeIntervalSinceNow]);
|
||||
#endif
|
||||
[startupCondition lock];
|
||||
[startupCondition unlockWithCondition:1];
|
||||
[startupCondition lock];
|
||||
[startupCondition unlockWithCondition:1];
|
||||
}
|
||||
}
|
||||
|
||||
[NSOpenGLContext clearCurrentContext];
|
||||
|
||||
[pool release];
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -244,7 +247,7 @@ NSString* fatalErrorMessage;
|
|||
[NSApp terminate:self];
|
||||
return;
|
||||
}
|
||||
fatalErrorMessage = [msg retain];
|
||||
fatalErrorMessage = msg;
|
||||
}
|
||||
|
||||
-(void) setupFavorites
|
||||
|
@ -320,7 +323,7 @@ NSString* fatalErrorMessage;
|
|||
[appCore start:[NSDate date]];
|
||||
|
||||
ready = YES;
|
||||
timer = [[NSTimer timerWithTimeInterval: 0.01 target: self selector:@selector(timeDisplay) userInfo:nil repeats:YES] retain];
|
||||
timer = [NSTimer timerWithTimeInterval: 0.01 target: self selector:@selector(timeDisplay) userInfo:nil repeats:YES];
|
||||
[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];
|
||||
|
||||
// Threaded startup can allow app to be hidden during startup
|
||||
|
@ -347,7 +350,7 @@ NSString* fatalErrorMessage;
|
|||
if ( ready )
|
||||
[self runScript: filename ];
|
||||
else
|
||||
pendingScript = [filename retain];
|
||||
pendingScript = filename;
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
@ -356,7 +359,7 @@ NSString* fatalErrorMessage;
|
|||
if ( ready )
|
||||
[ appCore goToUrl: [[event descriptorAtIndex:1] stringValue] ];
|
||||
else
|
||||
pendingUrl = [[[event descriptorAtIndex:1] stringValue] retain];
|
||||
pendingUrl = [[event descriptorAtIndex:1] stringValue];
|
||||
}
|
||||
|
||||
/* On a multi-screen setup, user is able to change the resolution of the screen running Celestia from a different screen, or the menu bar position so handle that */
|
||||
|
@ -412,7 +415,6 @@ NSString* fatalErrorMessage;
|
|||
|
||||
if (timer != nil) {
|
||||
[timer invalidate];
|
||||
[timer release];
|
||||
timer = nil;
|
||||
}
|
||||
[[CelestiaAppCore sharedAppCore] archive];
|
||||
|
@ -425,16 +427,8 @@ NSString* fatalErrorMessage;
|
|||
|
||||
[configFilePath stopAccessingSecurityScopedResource];
|
||||
[dataDirPath stopAccessingSecurityScopedResource];
|
||||
[configFilePath release];
|
||||
[dataDirPath release];
|
||||
|
||||
[lastScript release];
|
||||
[eclipseFinderController release];
|
||||
[browserWindowController release];
|
||||
[helpWindowController release];
|
||||
|
||||
if (appCore != nil) {
|
||||
[appCore release];
|
||||
appCore = nil;
|
||||
}
|
||||
|
||||
|
@ -625,14 +619,12 @@ NSString* fatalErrorMessage;
|
|||
[fullScreenWindow setBackgroundColor: [NSColor blackColor]];
|
||||
[fullScreenWindow setReleasedWhenClosed: YES];
|
||||
[self setWindow: fullScreenWindow]; // retains it
|
||||
[fullScreenWindow release];
|
||||
[fullScreenWindow setDelegate: self];
|
||||
// Hide the menu bar only if it's on the same screen
|
||||
[self hideMenuBarOnActiveScreen];
|
||||
[fullScreenWindow makeKeyAndOrderFront: nil];
|
||||
|
||||
[fullScreenWindow setContentView: fullScreenView];
|
||||
[fullScreenView release];
|
||||
[fullScreenView setOpenGLContext: [glView openGLContext]];
|
||||
[[glView openGLContext] setView: fullScreenView];
|
||||
|
||||
|
@ -665,10 +657,8 @@ NSString* fatalErrorMessage;
|
|||
|
||||
- (void) runScript: (NSString*) path
|
||||
{
|
||||
NSString* oldScript = lastScript;
|
||||
lastScript = [path retain];
|
||||
[oldScript release];
|
||||
[appCore runScript: lastScript];
|
||||
lastScript = path;
|
||||
[appCore runScript: lastScript];
|
||||
}
|
||||
|
||||
- (IBAction) openScript: (id) sender
|
||||
|
@ -704,7 +694,7 @@ NSString* fatalErrorMessage;
|
|||
[sender respondsToSelector: @selector(representedObject)] &&
|
||||
[sender representedObject])
|
||||
{
|
||||
[[appCore simulation] setSelection: [[[CelestiaSelection alloc] initWithCelestiaBody: [sender representedObject]] autorelease]];
|
||||
[[appCore simulation] setSelection: [[CelestiaSelection alloc] initWithCelestiaBody: [sender representedObject]]];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -718,7 +708,6 @@ NSString* fatalErrorMessage;
|
|||
[str addAttributes:@{NSForegroundColorAttributeName : [NSColor labelColor]} range:NSMakeRange(0, [str length])];
|
||||
}
|
||||
[text setAttributedString: str];
|
||||
[str release];
|
||||
}
|
||||
|
||||
[glInfoPanel makeKeyAndOrderFront: self];
|
||||
|
|
|
@ -25,15 +25,6 @@
|
|||
return reinterpret_cast<DeepSkyObject*>([_data pointerValue]);
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(NSString*)type
|
||||
{
|
||||
return [NSString stringWithStdString: [self DSO]->getType()];
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
//
|
||||
// CelestiaDestination.h
|
||||
// celestia
|
||||
//
|
||||
// Created by Bob Ippolito on Fri Jun 07 2002.
|
||||
// Copyright (c) 2002 Chris Laurel. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
@interface CelestiaDestination : NSObject {
|
||||
NSValue* _data;
|
||||
}
|
||||
-(NSString*)name;
|
||||
-(void)setName:(NSString*)name;
|
||||
-(NSString*)target;
|
||||
-(void)setTarget:(NSString*)target;
|
||||
-(NSNumber*)distance;
|
||||
-(void)setDistance:(NSNumber*)distance;
|
||||
-(NSString*)description;
|
||||
-(void)setDescription:(NSString*)description;
|
||||
@end
|
||||
|
||||
@interface CelestiaDestinations : NSMutableArray {
|
||||
NSValue* _data;
|
||||
NSInvocation* _synchronize;
|
||||
}
|
||||
-(void)synchronize;
|
||||
-(void)setSynchronize:(NSInvocation*)sync;
|
||||
-(unsigned)count;
|
||||
-(id)objectAtIndex:(unsigned)index;
|
||||
-(void)addObject:(CelestiaDestination*)o;
|
||||
-(void)insertObject:(CelestiaDestination*)o atIndex:(unsigned)index;
|
||||
-(void)removeLastObject;
|
||||
-(void)removeObjectAtIndex:(unsigned)index;
|
||||
-(void)replaceObjectAtIndex:(unsigned)index withObject:(CelestiaDestination*)o;
|
||||
@end
|
|
@ -1,147 +0,0 @@
|
|||
//
|
||||
// CelestiaDestination.mm
|
||||
// celestia
|
||||
//
|
||||
// Created by Bob Ippolito on Fri Jun 07 2002.
|
||||
// Copyright (c) 2002 Chris Laurel. All rights reserved.
|
||||
//
|
||||
|
||||
#import "CelestiaDestination.h"
|
||||
#import "CelestiaDestination_PrivateAPI.h"
|
||||
#import "NSString_ObjCPlusPlus.h"
|
||||
|
||||
@implementation CelestiaDestination(PrivateAPI)
|
||||
-(CelestiaDestination *)initWithDestination:(Destination *)dst
|
||||
{
|
||||
self = [super init];
|
||||
_data = [[NSValue alloc] initWithBytes:reinterpret_cast<void*>(&dst) objCType:@encode(Destination*)];
|
||||
return self;
|
||||
}
|
||||
|
||||
-(Destination *)destination
|
||||
{
|
||||
return reinterpret_cast<Destination*>([_data pointerValue]);
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation CelestiaDestination
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
-(NSString*)name
|
||||
{
|
||||
return [NSString stringWithStdString:[self destination]->name];
|
||||
}
|
||||
-(void)setName:(NSString*)name
|
||||
{
|
||||
[self destination]->name = [name stdString];
|
||||
}
|
||||
-(NSString*)target
|
||||
{
|
||||
return [NSString stringWithStdString:[self destination]->target];
|
||||
}
|
||||
-(void)setTarget:(NSString*)target
|
||||
{
|
||||
[self destination]->target = [target stdString];
|
||||
}
|
||||
-(NSNumber*)distance
|
||||
{
|
||||
return [NSNumber numberWithDouble:[self destination]->distance];
|
||||
}
|
||||
-(void)setDistance:(NSNumber*)distance
|
||||
{
|
||||
[self destination]->distance = [distance doubleValue];
|
||||
}
|
||||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithStdString:[self destination]->description];
|
||||
}
|
||||
-(void)setDescription:(NSString*)description
|
||||
{
|
||||
[self destination]->description = [description stdString];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation CelestiaDestinations(PrivateAPI)
|
||||
-(CelestiaDestinations *)initWithDestinations:(const DestinationList *)dsts
|
||||
{
|
||||
self = [super init];
|
||||
_data = [[NSValue alloc] initWithBytes:reinterpret_cast<void*>(&dsts) objCType:@encode(DestinationList*)];
|
||||
return self;
|
||||
}
|
||||
|
||||
-(DestinationList *)destinations
|
||||
{
|
||||
return reinterpret_cast<DestinationList*>([_data pointerValue]);
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation CelestiaDestinations
|
||||
-(void)setSynchronize:(NSInvocation*)sync
|
||||
{
|
||||
if (_synchronize == nil) {
|
||||
[_synchronize release];
|
||||
_synchronize = nil;
|
||||
}
|
||||
_synchronize = [sync retain];
|
||||
[_synchronize setArgument:&self atIndex:2];
|
||||
}
|
||||
-(void)synchronize
|
||||
{
|
||||
if (_synchronize == nil)
|
||||
return;
|
||||
[_synchronize invoke];
|
||||
}
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
if (_synchronize != nil) {
|
||||
[_synchronize release];
|
||||
_synchronize = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
-(unsigned)count
|
||||
{
|
||||
return [self destinations]->size();
|
||||
}
|
||||
-(id)objectAtIndex:(unsigned)index
|
||||
{
|
||||
return [[[CelestiaDestination alloc] initWithDestination:(*[self destinations])[index]] autorelease];
|
||||
}
|
||||
-(void)addObject:(CelestiaDestination*)o
|
||||
{
|
||||
Destination* d=[o destination];
|
||||
[self destinations]->push_back(d);
|
||||
[self synchronize];
|
||||
}
|
||||
-(void)insertObject:(CelestiaDestination*)o atIndex:(unsigned)index
|
||||
{
|
||||
Destination* d=[o destination];
|
||||
[self destinations]->insert([self destinations]->begin()+index, d);
|
||||
[self synchronize];
|
||||
}
|
||||
-(void)removeLastObject
|
||||
{
|
||||
[self destinations]->pop_back();
|
||||
[self synchronize];
|
||||
}
|
||||
-(void)removeObjectAtIndex:(unsigned)index
|
||||
{
|
||||
[self destinations]->erase([self destinations]->begin()+index);
|
||||
[self synchronize];
|
||||
}
|
||||
-(void)replaceObjectAtIndex:(unsigned)index withObject:(CelestiaDestination*)o
|
||||
{
|
||||
[self removeObjectAtIndex:index];
|
||||
[self insertObject:o atIndex:index];
|
||||
}
|
||||
@end
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* CelestiaDestination_PrivateAPI.h
|
||||
* celestia
|
||||
*
|
||||
* Created by Bob Ippolito on Fri Jun 07 2002.
|
||||
* Copyright (c) 2002 Chris Laurel. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <celestia/destination.h>
|
||||
|
||||
@interface CelestiaDestination(PrivateAPI)
|
||||
-(CelestiaDestination*)initWithDestination:(Destination*)dst;
|
||||
-(Destination*)destination;
|
||||
@end
|
||||
|
||||
@interface CelestiaDestinations(PrivateAPI)
|
||||
-(CelestiaDestinations*)initWithDestinations:(const DestinationList*)dsts;
|
||||
-(DestinationList*)destinations;
|
||||
@end
|
|
@ -169,19 +169,12 @@
|
|||
}
|
||||
-(void)dealloc
|
||||
{
|
||||
#ifdef URL_FAVORITES
|
||||
[url release]; url = nil;
|
||||
[_name release]; _name = nil;
|
||||
#endif
|
||||
if (_data != nil) {
|
||||
if (_freeWhenDone) {
|
||||
FavoritesEntry* fav = [self favorite];
|
||||
delete fav;
|
||||
}
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
-(BOOL)isEqualToFavorite:(CelestiaFavorite*)fav
|
||||
{
|
||||
|
@ -236,7 +229,7 @@
|
|||
[self setParentFolder:[dict objectForKey:@"parentFolder"]];
|
||||
[self setSelectionName:[dict objectForKey:@"selectionName"]];
|
||||
[self setOrientation:[CelestiaVector vectorWithArray:[dict objectForKey:@"orientation"]]];
|
||||
[self setPosition:[[[CelestiaUniversalCoord alloc] initWithData:[dict objectForKey:@"position"]] autorelease]];
|
||||
[self setPosition:[[CelestiaUniversalCoord alloc] initWithData:[dict objectForKey:@"position"]]];
|
||||
[self setJd:[dict objectForKey:@"jd"]];
|
||||
[self setCoordinateSystem:[dict objectForKey:@"coordinateSystem"]];
|
||||
#ifdef URL_FAVORITES
|
||||
|
@ -253,8 +246,7 @@
|
|||
if (name == nil)
|
||||
name = @"";
|
||||
#ifdef URL_FAVORITES
|
||||
[_name release];
|
||||
_name = [name retain];
|
||||
_name = name;
|
||||
#else
|
||||
[self favorite]->name = [name stdString];
|
||||
#endif
|
||||
|
@ -268,7 +260,7 @@
|
|||
-(NSString*)name
|
||||
{
|
||||
#ifdef URL_FAVORITES
|
||||
return [[_name retain] autorelease];
|
||||
return _name;
|
||||
#else
|
||||
return [NSString stringWithStdString:[self favorite]->name];
|
||||
#endif
|
||||
|
@ -279,7 +271,7 @@
|
|||
}
|
||||
-(CelestiaUniversalCoord*)position
|
||||
{
|
||||
return [[[CelestiaUniversalCoord alloc] initWithUniversalCoord:[self favorite]->position] autorelease];
|
||||
return [[CelestiaUniversalCoord alloc] initWithUniversalCoord:[self favorite]->position];
|
||||
}
|
||||
-(CelestiaVector*)orientation
|
||||
{
|
||||
|
@ -308,7 +300,7 @@
|
|||
}
|
||||
-(void)setUrl:(NSString *)aUrl
|
||||
{
|
||||
url = [aUrl retain];
|
||||
url = aUrl;
|
||||
}
|
||||
#endif
|
||||
@end
|
||||
|
|
|
@ -24,9 +24,7 @@ static CelestiaFavorites* _celestiaFavorites;
|
|||
}
|
||||
-(void)setSynchronize:(NSInvocation*)synchronize
|
||||
{
|
||||
if (_synchronize != nil)
|
||||
[_synchronize autorelease];
|
||||
_synchronize = [synchronize retain];
|
||||
_synchronize = synchronize;
|
||||
}
|
||||
-(void)synchronize
|
||||
{
|
||||
|
@ -39,13 +37,13 @@ static CelestiaFavorites* _celestiaFavorites;
|
|||
}
|
||||
-(MyTree*)addNewFavorite:(NSString*)name
|
||||
{
|
||||
MyTree* obj = [[[MyTree alloc] initWithNode:[[[CelestiaFavorite alloc] initWithName:name] autorelease] parent:self] autorelease];
|
||||
MyTree* obj = [[MyTree alloc] initWithNode:[[CelestiaFavorite alloc] initWithName:name]parent:self];
|
||||
[[self children] addObject:obj];
|
||||
return obj;
|
||||
}
|
||||
-(MyTree*)addNewFolder:(NSString*)name
|
||||
{
|
||||
MyTree* obj = [[[MyTree alloc] initWithNode:[[[CelestiaFavorite alloc] initWithFolderName:name] autorelease] parent:self children:[NSArray array]] autorelease];
|
||||
MyTree* obj = [[MyTree alloc] initWithNode:[[CelestiaFavorite alloc] initWithFolderName:name] parent:self children:[NSArray array]];
|
||||
[[self children] addObject:obj];
|
||||
return obj;
|
||||
}
|
||||
|
@ -66,7 +64,7 @@ static CelestiaFavorites* _celestiaFavorites;
|
|||
MyVector* children = [_celestiaFavorites children];
|
||||
id obj = nil;
|
||||
while ((obj = [enumerator nextObject]) != nil)
|
||||
[children addObject:[[[MyTree alloc] initWithDictionary:obj parent:_celestiaFavorites] autorelease]];
|
||||
[children addObject:[[MyTree alloc] initWithDictionary:obj parent:_celestiaFavorites]];
|
||||
}
|
||||
return _celestiaFavorites;
|
||||
}
|
||||
|
|
|
@ -33,14 +33,6 @@
|
|||
|
||||
@implementation CelestiaGalaxy
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
-(NSString*)type
|
||||
{
|
||||
return [NSString stringWithUTF8String:[self galaxy]->getType()];
|
||||
|
|
|
@ -24,15 +24,6 @@
|
|||
return reinterpret_cast<Location*>([_data pointerValue]);
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(NSString*)name
|
||||
{
|
||||
return [NSString stringWithStdString: [self location]->getName(true)];
|
||||
|
|
|
@ -25,17 +25,9 @@
|
|||
@end
|
||||
|
||||
@implementation CelestiaObserver
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
-(CelestiaUniversalCoord*)position
|
||||
{
|
||||
return [[[CelestiaUniversalCoord alloc] initWithUniversalCoord:[self observer].getPosition()] autorelease];
|
||||
return [[CelestiaUniversalCoord alloc] initWithUniversalCoord:[self observer].getPosition()];
|
||||
}
|
||||
-(CelestiaVector*)orientation
|
||||
{
|
||||
|
@ -84,4 +76,4 @@
|
|||
[self observer].setLocationFilter(filter);
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
if (pixFmt)
|
||||
{
|
||||
[self setPixelFormat: pixFmt] ;
|
||||
[pixFmt release];
|
||||
|
||||
if (0 == CGLEnable([[self openGLContext] CGLContextObj], (CGLContextEnable)313))
|
||||
{
|
||||
|
@ -67,7 +66,6 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
@ -75,13 +73,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[inputWatcher release];
|
||||
[textWindow release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)setAASamples: (unsigned int)aaSamples
|
||||
{
|
||||
if (aaSamples > 1)
|
||||
|
@ -119,7 +110,6 @@
|
|||
{
|
||||
context = [[NSOpenGLContext alloc] initWithFormat: pixFmt
|
||||
shareContext: nil];
|
||||
[pixFmt release];
|
||||
|
||||
if (context)
|
||||
{
|
||||
|
@ -132,7 +122,6 @@
|
|||
[self setOpenGLContext: context];
|
||||
[context setView: self];
|
||||
[context makeCurrentContext];
|
||||
[context release];
|
||||
|
||||
glEnable(GL_MULTISAMPLE_ARB);
|
||||
// GL_NICEST enables Quincunx on supported NVIDIA cards,
|
||||
|
|
|
@ -29,18 +29,9 @@ NSDictionary* _renderFlags;
|
|||
@implementation CelestiaRenderer
|
||||
+(void)initialize
|
||||
{
|
||||
_labelFlags = [[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:Renderer::StarLabels],@"Stars",[NSNumber numberWithInt:Renderer::PlanetLabels],@"Planets",[NSNumber numberWithInt:Renderer::MoonLabels],@"Moons",[NSNumber numberWithInt:Renderer::ConstellationLabels],@"Constellations",[NSNumber numberWithInt:Renderer::GalaxyLabels],@"Galaxies",[NSNumber numberWithInt:Renderer::AsteroidLabels],@"Asteroids",[NSNumber numberWithInt:Renderer::SpacecraftLabels],@"Spacecraft",nil,nil] retain];
|
||||
_renderFlags = [[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:Renderer::ShowStars],@"Stars",[NSNumber
|
||||
numberWithInt:Renderer::ShowPlanets],@"Planets",[NSNumber numberWithInt:Renderer::ShowGalaxies],@"Galaxies",[NSNumber numberWithInt:Renderer::ShowDiagrams],@"Diagrams",[NSNumber numberWithInt:Renderer::ShowCloudMaps],@"CloudMaps",[NSNumber numberWithInt:Renderer::ShowOrbits],@"Orbits",[NSNumber numberWithInt:Renderer::ShowCelestialSphere],@"CelestialSphere",[NSNumber numberWithInt:Renderer::ShowNightMaps],@"NightMaps",[NSNumber numberWithInt:Renderer::ShowAtmospheres],@"Atmospheres",[NSNumber numberWithInt:Renderer::ShowSmoothLines],@"SmoothLines",[NSNumber numberWithInt:Renderer::ShowEclipseShadows],@"EclipseShadows",[NSNumber numberWithInt:Renderer::ShowStarsAsPoints],@"StarsAsPoints",[NSNumber numberWithInt:Renderer::ShowRingShadows],@"RingShadows",[NSNumber numberWithInt:Renderer::ShowBoundaries],@"Boundaries",[NSNumber numberWithInt:Renderer::ShowAutoMag],@"AutoMag",[NSNumber numberWithInt:Renderer::ShowCometTails],@"CometTails",[NSNumber numberWithInt:Renderer::ShowMarkers],@"Markers",nil,nil] retain];
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
_labelFlags = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:Renderer::StarLabels],@"Stars",[NSNumber numberWithInt:Renderer::PlanetLabels],@"Planets",[NSNumber numberWithInt:Renderer::MoonLabels],@"Moons",[NSNumber numberWithInt:Renderer::ConstellationLabels],@"Constellations",[NSNumber numberWithInt:Renderer::GalaxyLabels],@"Galaxies",[NSNumber numberWithInt:Renderer::AsteroidLabels],@"Asteroids",[NSNumber numberWithInt:Renderer::SpacecraftLabels],@"Spacecraft",nil,nil];
|
||||
_renderFlags = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:Renderer::ShowStars],@"Stars",[NSNumber
|
||||
numberWithInt:Renderer::ShowPlanets],@"Planets",[NSNumber numberWithInt:Renderer::ShowGalaxies],@"Galaxies",[NSNumber numberWithInt:Renderer::ShowDiagrams],@"Diagrams",[NSNumber numberWithInt:Renderer::ShowCloudMaps],@"CloudMaps",[NSNumber numberWithInt:Renderer::ShowOrbits],@"Orbits",[NSNumber numberWithInt:Renderer::ShowCelestialSphere],@"CelestialSphere",[NSNumber numberWithInt:Renderer::ShowNightMaps],@"NightMaps",[NSNumber numberWithInt:Renderer::ShowAtmospheres],@"Atmospheres",[NSNumber numberWithInt:Renderer::ShowSmoothLines],@"SmoothLines",[NSNumber numberWithInt:Renderer::ShowEclipseShadows],@"EclipseShadows",[NSNumber numberWithInt:Renderer::ShowStarsAsPoints],@"StarsAsPoints",[NSNumber numberWithInt:Renderer::ShowRingShadows],@"RingShadows",[NSNumber numberWithInt:Renderer::ShowBoundaries],@"Boundaries",[NSNumber numberWithInt:Renderer::ShowAutoMag],@"AutoMag",[NSNumber numberWithInt:Renderer::ShowCometTails],@"CometTails",[NSNumber numberWithInt:Renderer::ShowMarkers],@"Markers",nil,nil];
|
||||
}
|
||||
|
||||
-(NSDictionary*)renderFlags
|
||||
|
|
|
@ -41,15 +41,6 @@
|
|||
Selection(Galaxy* _galaxy) : star(NULL), body(NULL), galaxy(_galaxy) {};
|
||||
*/
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(CelestiaSelection*)initWithCelestiaStar:(CelestiaStar*)s
|
||||
{
|
||||
return [self initWithSelection:Selection([s star])];
|
||||
|
@ -69,7 +60,7 @@
|
|||
-(CelestiaBody *)body
|
||||
{
|
||||
if ([self selection].getType() != Selection::Type_Body) return nil;
|
||||
return [[[CelestiaBody alloc] initWithBody:[self selection].body()] autorelease];
|
||||
return [[CelestiaBody alloc] initWithBody:[self selection].body()];
|
||||
}
|
||||
-(BOOL)isEmpty
|
||||
{
|
||||
|
@ -87,17 +78,17 @@
|
|||
-(CelestiaStar*)star
|
||||
{
|
||||
if ([self selection].getType() != Selection::Type_Star) return nil;
|
||||
return [[[CelestiaStar alloc] initWithStar:[self selection].star()] autorelease];
|
||||
return [[CelestiaStar alloc] initWithStar:[self selection].star()];
|
||||
}
|
||||
-(CelestiaGalaxy*)galaxy
|
||||
{
|
||||
if ([self selection].getType() != Selection::Type_DeepSky) return nil;
|
||||
return [[[CelestiaGalaxy alloc] initWithGalaxy:((Galaxy*)[self selection].deepsky())] autorelease];
|
||||
return [[CelestiaGalaxy alloc] initWithGalaxy:((Galaxy*)[self selection].deepsky())];
|
||||
}
|
||||
-(CelestiaLocation*)location
|
||||
{
|
||||
if ([self selection].getType() != Selection::Type_Location) return nil;
|
||||
return [[[CelestiaLocation alloc] initWithLocation:((Location*)[self selection].location())] autorelease];
|
||||
return [[CelestiaLocation alloc] initWithLocation:((Location*)[self selection].location())];
|
||||
}
|
||||
-(NSString *)name
|
||||
{
|
||||
|
@ -145,7 +136,7 @@
|
|||
|
||||
-(CelestiaUniversalCoord*)position:(NSNumber*)t
|
||||
{
|
||||
return [[[CelestiaUniversalCoord alloc] initWithUniversalCoord:[self selection].getPosition([t doubleValue])] autorelease];
|
||||
return [[CelestiaUniversalCoord alloc] initWithUniversalCoord:[self selection].getPosition([t doubleValue])];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -72,13 +72,12 @@ static NSMutableDictionary* tagMap;
|
|||
-(CelestiaSettings*)init
|
||||
{
|
||||
if (sharedInstance != nil) {
|
||||
[[super init] release];
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
self = [super init];
|
||||
|
||||
tagMap = [[ NSMutableDictionary dictionaryWithCapacity: 100 ] retain];
|
||||
tagMap = [ NSMutableDictionary dictionaryWithCapacity: 100 ];
|
||||
|
||||
appCore = (CelestiaCore*) [[CelestiaAppCore sharedAppCore] appCore];
|
||||
|
||||
|
@ -186,7 +185,7 @@ static NSMutableDictionary* tagMap;
|
|||
// TAGDEF(999,@"saturationMagnitude")
|
||||
|
||||
nil];
|
||||
keyArray = [[tagDict allValues] retain];
|
||||
keyArray = [tagDict allValues];
|
||||
|
||||
NSDictionary *volatileTagDict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
TAGDEF(1000,@"showBodyAxes")
|
||||
|
|
|
@ -36,15 +36,6 @@ FrameOfReference getFrame() const;
|
|||
@end
|
||||
|
||||
@implementation CelestiaSimulation
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil)
|
||||
{
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
-(NSNumber*)julianDate
|
||||
{
|
||||
return [NSNumber numberWithDouble:[self simulation]->getTime()];
|
||||
|
@ -73,7 +64,7 @@ FrameOfReference getFrame() const;
|
|||
}
|
||||
-(CelestiaSelection*)pickObject:(CelestiaVector*)pickRay tolerance:(NSNumber*)tolerance
|
||||
{
|
||||
return [[[CelestiaSelection alloc] initWithSelection:[self simulation]->pickObject([pickRay vec3f],[tolerance floatValue])] autorelease];
|
||||
return [[CelestiaSelection alloc] initWithSelection:[self simulation]->pickObject([pickRay vec3f],[tolerance floatValue])];
|
||||
}
|
||||
-(CelestiaSelection*)pickObject:(CelestiaVector*)pickRay
|
||||
{
|
||||
|
@ -84,7 +75,7 @@ FrameOfReference getFrame() const;
|
|||
Universe* uni = [self simulation]->getUniverse();
|
||||
if (uni == NULL)
|
||||
return nil;
|
||||
return [[[CelestiaUniverse alloc] initWithUniverse:uni] autorelease];
|
||||
return [[CelestiaUniverse alloc] initWithUniverse:uni];
|
||||
}
|
||||
|
||||
-(void)orbit:(CelestiaVector*)q
|
||||
|
@ -109,7 +100,7 @@ FrameOfReference getFrame() const;
|
|||
}
|
||||
-(CelestiaSelection*)selection
|
||||
{
|
||||
return [[[CelestiaSelection alloc] initWithSelection:[self simulation]->getSelection()] autorelease];
|
||||
return [[CelestiaSelection alloc] initWithSelection:[self simulation]->getSelection()];
|
||||
}
|
||||
-(void)setSelection:(CelestiaSelection*)sel
|
||||
{
|
||||
|
@ -117,7 +108,7 @@ FrameOfReference getFrame() const;
|
|||
}
|
||||
-(CelestiaSelection*)trackedObject
|
||||
{
|
||||
return [[[CelestiaSelection alloc] initWithSelection:[self simulation]->getTrackedObject()] autorelease];
|
||||
return [[CelestiaSelection alloc] initWithSelection:[self simulation]->getTrackedObject()];
|
||||
}
|
||||
-(void)setTrackedObject:(CelestiaSelection*)sel
|
||||
{
|
||||
|
@ -131,12 +122,12 @@ FrameOfReference getFrame() const;
|
|||
|
||||
-(CelestiaSelection*)findObject:(NSString*)s
|
||||
{
|
||||
return [[[CelestiaSelection alloc] initWithSelection:[self simulation]->findObject([s stdString])] autorelease];
|
||||
return [[CelestiaSelection alloc] initWithSelection:[self simulation]->findObject([s stdString])];
|
||||
}
|
||||
|
||||
-(CelestiaSelection*)findObjectFromPath:(NSString*)s
|
||||
{
|
||||
return [[[CelestiaSelection alloc] initWithSelection:[self simulation]->findObjectFromPath([s stdString], true)] autorelease];
|
||||
return [[CelestiaSelection alloc] initWithSelection:[self simulation]->findObjectFromPath([s stdString], true)];
|
||||
}
|
||||
|
||||
-(void)gotoSelection:(NSNumber*)gotoTime up:(CelestiaVector*)up coordinateSystem:(NSString*)csysName
|
||||
|
@ -204,7 +195,7 @@ FrameOfReference getFrame() const;
|
|||
}
|
||||
-(CelestiaObserver*)observer
|
||||
{
|
||||
return [[[CelestiaObserver alloc] initWithObserver:[self simulation]->getObserver()] autorelease];
|
||||
return [[CelestiaObserver alloc] initWithObserver:[self simulation]->getObserver()];
|
||||
}
|
||||
-(void)setObserverPosition:(CelestiaUniversalCoord*)uc
|
||||
{
|
||||
|
@ -228,4 +219,4 @@ FrameOfReference getFrame() const;
|
|||
[self simulation]->setFrame((ObserverFrame::CoordinateSystem)[[Astro coordinateSystem:cs] intValue], [sel selection]);
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
|
|
|
@ -46,15 +46,6 @@
|
|||
{
|
||||
// return [NSNumber numberWithUnsignedInt:[self star]->getCatalogNumber([cat unsignedIntValue])];
|
||||
}
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(NSNumber *)radius
|
||||
{
|
||||
return [NSNumber numberWithFloat:[self star]->getRadius()];
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
-(id)initWithData:(NSData*)data
|
||||
{
|
||||
self = [super init];
|
||||
_data = [data retain];
|
||||
_data = data;
|
||||
return self;
|
||||
}
|
||||
-(void)encodeWithCoder:(NSCoder*)coder
|
||||
|
@ -45,17 +45,9 @@
|
|||
NSLog(@"[CelestiaUniversalCoord initWithCoder:%@]",coder);
|
||||
//self = [super initWithCoder:coder];
|
||||
self = [super init];
|
||||
_data = [[coder decodeObject] retain];
|
||||
_data = [coder decodeObject];
|
||||
return self;
|
||||
}
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
-(CelestiaVector*)celestiaVector
|
||||
{
|
||||
return [CelestiaVector vectorWithPoint3d:Point3d([self universalCoord])];
|
||||
|
@ -66,6 +58,6 @@
|
|||
}
|
||||
-(CelestiaUniversalCoord*)difference:(CelestiaUniversalCoord*)t
|
||||
{
|
||||
return [[[CelestiaUniversalCoord alloc] initWithUniversalCoord:[self universalCoord].difference([self universalCoord])] autorelease];
|
||||
return [[CelestiaUniversalCoord alloc] initWithUniversalCoord:[self universalCoord].difference([self universalCoord])];
|
||||
}
|
||||
@end
|
||||
@end
|
||||
|
|
|
@ -29,14 +29,6 @@
|
|||
@end
|
||||
|
||||
@implementation CelestiaUniverse
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_data != nil) {
|
||||
[_data release];
|
||||
_data = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
/*
|
||||
-(CelestiaSelection*)pick:(CelestiaUniversalCoord*)origin direction:(CelestiaVector*)direction when:(NSNumber*)when faintestMag:(NSNumber*)faintestMag tolerance:(NSNumber*)tolerance
|
||||
{
|
||||
|
|
|
@ -144,37 +144,29 @@
|
|||
{
|
||||
//self = [super initWithCoder:coder];
|
||||
self = [self init];
|
||||
_array = [[coder decodeObject] retain];
|
||||
_array = [coder decodeObject];
|
||||
return self;
|
||||
}
|
||||
-(void)dealloc
|
||||
{
|
||||
if (_array != nil) {
|
||||
[_array release];
|
||||
_array = nil;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
+(CelestiaVector*)vectorWithArray:(NSArray*)v
|
||||
{
|
||||
return [[[CelestiaVector alloc] initWithArray:v] autorelease];
|
||||
return [[CelestiaVector alloc] initWithArray:v];
|
||||
}
|
||||
+(CelestiaVector*)vectorWithx:(NSNumber*)x y:(NSNumber*)y
|
||||
{
|
||||
return [[[CelestiaVector alloc] initWithx:x y:y] autorelease];
|
||||
return [[CelestiaVector alloc] initWithx:x y:y];
|
||||
}
|
||||
+(CelestiaVector*)vectorWithx:(NSNumber*)x y:(NSNumber*)y z:(NSNumber*)z
|
||||
{
|
||||
return [[[CelestiaVector alloc] initWithx:x y:y z:z] autorelease];
|
||||
return [[CelestiaVector alloc] initWithx:x y:y z:z];
|
||||
}
|
||||
+(CelestiaVector*)vectorWithx:(NSNumber*)x y:(NSNumber*)y z:(NSNumber*)z w:(NSNumber*)w
|
||||
{
|
||||
return [[[CelestiaVector alloc] initWithx:x y:y z:z w:w] autorelease];
|
||||
return [[CelestiaVector alloc] initWithx:x y:y z:z w:w];
|
||||
}
|
||||
-(CelestiaVector*)initWithArray:(NSArray*)v
|
||||
{
|
||||
self = [super init];
|
||||
_array = [v retain];
|
||||
_array = v;
|
||||
return self;
|
||||
}
|
||||
-(CelestiaVector*)initWithx:(NSNumber*)x y:(NSNumber*)y
|
||||
|
@ -219,4 +211,4 @@
|
|||
{
|
||||
return [_array count];
|
||||
}
|
||||
@end
|
||||
@end
|
||||
|
|
|
@ -23,12 +23,6 @@ NSString *const dataDirPathPrefKey = @"dataDirPath";
|
|||
[[[self window] standardWindowButton:NSWindowCloseButton] setEnabled:!mandatory];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[configFilePath release];
|
||||
[dataDirPath release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (IBAction)reset:(id)sender
|
||||
{
|
||||
|
|
|
@ -23,10 +23,13 @@
|
|||
{
|
||||
NSMenu *result;
|
||||
[invoc setSelector: sel];
|
||||
[invoc setArgument: &self atIndex: 2];
|
||||
[invoc setArgument: &item atIndex: 3];
|
||||
__unsafe_unretained id arg1 = self;
|
||||
__unsafe_unretained id arg2 = item;
|
||||
__unsafe_unretained id ret = result;
|
||||
[invoc setArgument: &arg1 atIndex: 2];
|
||||
[invoc setArgument: &arg2 atIndex: 3];
|
||||
[invoc invokeWithTarget: delegate];
|
||||
[invoc getReturnValue: &result];
|
||||
[invoc getReturnValue: &ret];
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,12 +51,6 @@ static CelestiaBody *eclipseBody;
|
|||
}
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[eclipses release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
|
||||
{
|
||||
NSDictionary *userInfo = [aNotification userInfo];
|
||||
|
@ -102,7 +96,7 @@ static CelestiaBody *eclipseBody;
|
|||
return;
|
||||
}
|
||||
|
||||
eclipseBody = [[sel body] retain];
|
||||
eclipseBody = [sel body];
|
||||
body = [eclipseBody body];
|
||||
if (nil == body || nil == body->getSystem())
|
||||
{
|
||||
|
@ -122,7 +116,6 @@ static CelestiaBody *eclipseBody;
|
|||
Body *parent = system->getPrimaryBody();
|
||||
if (NULL == parent)
|
||||
{
|
||||
[eclipseBody release];
|
||||
return;
|
||||
}
|
||||
receiverName = parent->getName();
|
||||
|
@ -136,19 +129,18 @@ static CelestiaBody *eclipseBody;
|
|||
}
|
||||
|
||||
|
||||
startDate = (NSCalendarDate *)[startDateObj retain];
|
||||
endDate = (NSCalendarDate *)[endDateObj retain];
|
||||
midDate = [[startDate dateByAddingYears: 0
|
||||
startDate = (NSCalendarDate *)startDateObj;
|
||||
endDate = (NSCalendarDate *)endDateObj;
|
||||
midDate = [startDate dateByAddingYears: 0
|
||||
months: 0
|
||||
days: 15
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0] retain];
|
||||
seconds: 0];
|
||||
// Find eclipses in small timeslices, to give the user
|
||||
// a chance to abort with the stop button
|
||||
|
||||
[findButton setEnabled: NO];
|
||||
[eclipses release];
|
||||
eclipses = [[NSMutableArray alloc] init];
|
||||
[eclipseProgress startAnimation: self];
|
||||
|
||||
|
@ -188,7 +180,6 @@ static CelestiaBody *eclipseBody;
|
|||
|
||||
- (void)getEclipses: (id)aObject
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
CelestiaCore *appCore = (CelestiaCore*) [[CelestiaAppCore sharedAppCore] appCore];
|
||||
EclipseFinder *eclipseFinder;
|
||||
const Eclipse *eclipse;
|
||||
|
@ -205,8 +196,7 @@ static CelestiaBody *eclipseBody;
|
|||
{
|
||||
if (NSOrderedAscending == [startDate compare: endDate])
|
||||
{
|
||||
[midDate release];
|
||||
midDate = [endDate retain];
|
||||
midDate = endDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -245,7 +235,7 @@ static CelestiaBody *eclipseBody;
|
|||
[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
NSLocalizedStringFromTable(eclipseName,@"po",@""), @"caster",
|
||||
eclipseDate, @"date",
|
||||
[[[CelestiaBody alloc] initWithBody: eclipse->body] autorelease], @"body",
|
||||
[[CelestiaBody alloc] initWithBody: eclipse->body], @"body",
|
||||
[NSNumber numberWithDouble: eclipse->startTime], @"start",
|
||||
duration, @"duration",
|
||||
nil]
|
||||
|
@ -254,29 +244,26 @@ static CelestiaBody *eclipseBody;
|
|||
|
||||
delete eclipseFinder;
|
||||
|
||||
[startDate release];
|
||||
startDate = [midDate retain];
|
||||
[midDate release];
|
||||
midDate = [[startDate dateByAddingYears: 0
|
||||
months: 0
|
||||
days: 15
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0] retain];
|
||||
startDate = midDate;
|
||||
midDate = [startDate dateByAddingYears: 0
|
||||
months: 0
|
||||
days: 15
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 0];
|
||||
}
|
||||
|
||||
[self performSelectorOnMainThread: @selector(getEclipsesDone:)
|
||||
withObject: nil
|
||||
waitUntilDone: NO];
|
||||
[pool release];
|
||||
}
|
||||
|
||||
- (void)getEclipsesDone: (id)aObject
|
||||
{
|
||||
[startDate release]; startDate = nil;
|
||||
[midDate release]; midDate = nil;
|
||||
[endDate release]; endDate = nil;
|
||||
[eclipseBody release]; eclipseBody = nil;
|
||||
startDate = nil;
|
||||
midDate = nil;
|
||||
endDate = nil;
|
||||
eclipseBody = nil;
|
||||
[eclipseProgress stopAnimation: self];
|
||||
[findButton setEnabled: YES];
|
||||
[eclipseList reloadData];
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
@implementation CelestiaFavorite(ViewAPI)
|
||||
-(NSMenuItem*)favoriteMenuItem
|
||||
{
|
||||
NSMenuItem* menuItem = [[[NSMenuItem alloc] initWithTitle:[self name] action:([self isFolder] ? nil : @selector(activate)) keyEquivalent:@""] autorelease];
|
||||
NSMenuItem* menuItem = [[NSMenuItem alloc] initWithTitle:[self name] action:([self isFolder] ? nil : @selector(activate)) keyEquivalent:@""];
|
||||
return [self setupFavoriteMenuItem:menuItem];
|
||||
}
|
||||
-(NSMenuItem*)setupFavoriteMenuItem:(NSMenuItem*)menuItem
|
||||
|
@ -56,7 +56,7 @@
|
|||
if ([self isLeaf])
|
||||
return menuItem;
|
||||
enumerator = [[self children] objectEnumerator];
|
||||
subMenu = [[[NSMenu alloc] initWithTitle:[[self nodeValue] name]] autorelease];
|
||||
subMenu = [[NSMenu alloc] initWithTitle:[[self nodeValue] name]];
|
||||
while ((node = [enumerator nextObject]) != nil)
|
||||
[subMenu addItem:[node favoriteMenuItem]];
|
||||
[menuItem setSubmenu:subMenu];
|
||||
|
@ -240,15 +240,19 @@ contextMenuForItem:(id)item
|
|||
} else {
|
||||
[editInv setTarget:self];
|
||||
[editInv setSelector:@selector(outlineView:editItem:)];
|
||||
[editInv setArgument:&olv atIndex:2];
|
||||
[editInv setArgument:&item atIndex:3];
|
||||
__unsafe_unretained id arg1 = olv;
|
||||
__unsafe_unretained id arg2 = item;
|
||||
[editInv setArgument:&arg1 atIndex:2];
|
||||
[editInv setArgument:&arg2 atIndex:3];
|
||||
[editItem setTarget:editInv];
|
||||
[editItem setAction:@selector(invoke)];
|
||||
}
|
||||
[delInv setTarget:self];
|
||||
[delInv setSelector:@selector(outlineView:deleteItem:)];
|
||||
[delInv setArgument:&olv atIndex:2];
|
||||
[delInv setArgument:&item atIndex:3];
|
||||
__unsafe_unretained id arg1 = olv;
|
||||
__unsafe_unretained id arg2 = item;
|
||||
[delInv setArgument:&arg1 atIndex:2];
|
||||
[delInv setArgument:&arg2 atIndex:3];
|
||||
[delItem setTarget:delInv];
|
||||
[delItem setAction:@selector(invoke)];
|
||||
return contextMenu;
|
||||
|
|
|
@ -54,7 +54,6 @@ public:
|
|||
- (void)dealloc
|
||||
{
|
||||
if (watcher) delete watcher;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) watched
|
||||
|
|
|
@ -60,50 +60,50 @@
|
|||
if ([aSelection body])
|
||||
{
|
||||
target = [aSelection body];
|
||||
mi = [[[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Reference Vectors",@"po",@"") action: nil keyEquivalent: @""] autorelease];
|
||||
NSMenu *refMarksMenu = [[[NSMenu alloc ] initWithTitle: @"Reference Vectors" ] autorelease];
|
||||
mi = [[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Reference Vectors",@"po",@"") action: nil keyEquivalent: @""];
|
||||
NSMenu *refMarksMenu = [[NSMenu alloc] initWithTitle: @"Reference Vectors" ];
|
||||
[mi setSubmenu: refMarksMenu];
|
||||
if (mi)
|
||||
{
|
||||
[self insertItem: mi atIndex: aIndex];
|
||||
}
|
||||
|
||||
mi = [[[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Body Axes",@"po",@"") action: nil keyEquivalent: @""] autorelease];
|
||||
mi = [[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Body Axes",@"po",@"") action: nil keyEquivalent: @""];
|
||||
if (mi)
|
||||
{
|
||||
[mi setTag: 1000];
|
||||
[refMarksMenu addItem: mi];
|
||||
[settings scanForKeys: mi];
|
||||
}
|
||||
mi = [[[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Frame Axes",@"po",@"") action: nil keyEquivalent: @""] autorelease];
|
||||
mi = [[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Frame Axes",@"po",@"") action: nil keyEquivalent: @""];
|
||||
if (mi)
|
||||
{
|
||||
[mi setTag: 1001];
|
||||
[refMarksMenu addItem: mi];
|
||||
[settings scanForKeys: mi];
|
||||
}
|
||||
mi = [[[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Sun Direction",@"po",@"") action: nil keyEquivalent: @""] autorelease];
|
||||
mi = [[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Sun Direction",@"po",@"") action: nil keyEquivalent: @""];
|
||||
if (mi)
|
||||
{
|
||||
[mi setTag: 1002];
|
||||
[refMarksMenu addItem: mi];
|
||||
[settings scanForKeys: mi];
|
||||
}
|
||||
mi = [[[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Velocity Vector",@"po",@"") action: nil keyEquivalent: @""] autorelease];
|
||||
mi = [[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Velocity Vector",@"po",@"") action: nil keyEquivalent: @""];
|
||||
if (mi)
|
||||
{
|
||||
[mi setTag: 1003];
|
||||
[refMarksMenu addItem: mi];
|
||||
[settings scanForKeys: mi];
|
||||
}
|
||||
mi = [[[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Planetographic Grid",@"po",@"") action: nil keyEquivalent: @""] autorelease];
|
||||
mi = [[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Planetographic Grid",@"po",@"") action: nil keyEquivalent: @""];
|
||||
if (mi)
|
||||
{
|
||||
[mi setTag: 1004];
|
||||
[refMarksMenu addItem: mi];
|
||||
[settings scanForKeys: mi];
|
||||
}
|
||||
mi = [[[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Terminator",@"po",@"") action: nil keyEquivalent: @""] autorelease];
|
||||
mi = [[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Terminator",@"po",@"") action: nil keyEquivalent: @""];
|
||||
if (mi)
|
||||
{
|
||||
[mi setTag: 1005];
|
||||
|
@ -124,12 +124,12 @@
|
|||
id browseItem;
|
||||
if ([aSelection body])
|
||||
{
|
||||
browseItem = [[[BrowserItem alloc] initWithCelestiaBody: [aSelection body]] autorelease];
|
||||
browseItem = [[BrowserItem alloc] initWithCelestiaBody: [aSelection body]];
|
||||
[BrowserItem addChildrenToBody: browseItem];
|
||||
NSArray *children = [browseItem allChildNames];
|
||||
if (children && [children count] > 0)
|
||||
{
|
||||
mi = [[[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Satellites",@"po",@"") action: nil keyEquivalent: @""] autorelease];
|
||||
mi = [[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Satellites",@"po",@"") action: nil keyEquivalent: @""];
|
||||
[mi addPlanetarySystemMenuForItem: browseItem
|
||||
target: aTarget
|
||||
action: @selector(selectSatellite:)];
|
||||
|
@ -137,14 +137,14 @@
|
|||
}
|
||||
else if ([aSelection star])
|
||||
{
|
||||
browseItem = [[[BrowserItem alloc] initWithCelestiaStar: [aSelection star]] autorelease];
|
||||
browseItem = [[BrowserItem alloc] initWithCelestiaStar: [aSelection star]];
|
||||
[BrowserItem addChildrenToStar: browseItem];
|
||||
NSArray *children = [browseItem allChildNames];
|
||||
if (children && [children count] > 0)
|
||||
{
|
||||
NSString *satMenuItemName = [[browseItem name] isEqualToString: @"Sol"] ?
|
||||
@"Orbiting Bodies" : @"Planets";
|
||||
mi = [[[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(satMenuItemName,@"po",@"") action: nil keyEquivalent: @""] autorelease];
|
||||
mi = [[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(satMenuItemName,@"po",@"") action: nil keyEquivalent: @""];
|
||||
[mi addPlanetarySystemMenuForItem: browseItem
|
||||
target: aTarget
|
||||
action: @selector(selectSatellite:)];
|
||||
|
@ -169,9 +169,9 @@
|
|||
NSArray *surfaces = [[aSelection body] alternateSurfaceNames];
|
||||
if (surfaces && [surfaces count] > 0)
|
||||
{
|
||||
mi = [[[NSMenuItem alloc] initWithTitle:
|
||||
mi = [[NSMenuItem alloc] initWithTitle:
|
||||
NSLocalizedString(@"Show Alternate Surface",@"") action: nil
|
||||
keyEquivalent: @""] autorelease];
|
||||
keyEquivalent: @""];
|
||||
[mi addAltSurfaceMenuWithNames: surfaces
|
||||
target: aTarget
|
||||
action: @selector(activateMenuItem:)];
|
||||
|
@ -206,7 +206,7 @@
|
|||
if (![childName isEqualToString: locationsName]) ++childCount;
|
||||
loneChild = (childCount == 1);
|
||||
|
||||
satMenu = [[[NSMenu alloc ] initWithTitle: @"Satellites" ] autorelease];
|
||||
satMenu = [[NSMenu alloc] initWithTitle: @"Satellites" ];
|
||||
[self setSubmenu: satMenu];
|
||||
|
||||
childEnum = [children objectEnumerator];
|
||||
|
@ -226,7 +226,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
satMenuItem = [[[NSMenuItem alloc] initWithTitle: childName action: nil keyEquivalent: @""] autorelease];
|
||||
satMenuItem = [[NSMenuItem alloc] initWithTitle: childName action: nil keyEquivalent: @""];
|
||||
[satMenuItem setRepresentedObject: [child body] ];
|
||||
[satMenuItem setTarget: target];
|
||||
[satMenu addItem: satMenuItem];
|
||||
|
@ -234,7 +234,7 @@
|
|||
|
||||
if (childChildren && [childChildren count] > 0)
|
||||
{
|
||||
NSMenu *subMenu = [[[NSMenu alloc ] initWithTitle: @"children" ] autorelease];
|
||||
NSMenu *subMenu = [[NSMenu alloc] initWithTitle: @"children" ];
|
||||
NSMenuItem *subMenuItem;
|
||||
id subChildName;
|
||||
id subChild;
|
||||
|
@ -244,7 +244,7 @@
|
|||
subChild = [child childNamed: subChildName];
|
||||
if (subChild)
|
||||
{
|
||||
subMenuItem = [[[NSMenuItem alloc] initWithTitle: subChildName action: action keyEquivalent: @""] autorelease];
|
||||
subMenuItem = [[NSMenuItem alloc] initWithTitle: subChildName action: action keyEquivalent: @""];
|
||||
[subMenuItem setRepresentedObject: [subChild body] ];
|
||||
[subMenuItem setTarget: target];
|
||||
[subMenu addItem: subMenuItem];
|
||||
|
|
|
@ -23,14 +23,14 @@
|
|||
// NSLog(@"[MyVector initWithCoder:%@]",coder);
|
||||
//self = [super initWithCoder:coder];
|
||||
self = [self init];
|
||||
_array = [[coder decodeObject] retain];
|
||||
_array = [coder decodeObject];
|
||||
//[coder decodeValueOfObjCType:@encode(Class) at:&_myClass];
|
||||
return self;
|
||||
}
|
||||
-(id)init
|
||||
{
|
||||
self = [super init];
|
||||
_array = [[NSMutableArray arrayWithCapacity:0] retain];
|
||||
_array = [NSMutableArray arrayWithCapacity:0];
|
||||
_myClass = [NSObject class];
|
||||
return self;
|
||||
}
|
||||
|
@ -40,11 +40,6 @@
|
|||
_myClass = myClass;
|
||||
return self;
|
||||
}
|
||||
-(void)dealloc
|
||||
{
|
||||
[_array release];
|
||||
[super dealloc];
|
||||
}
|
||||
-(void)addObject:(id)obj
|
||||
{
|
||||
if (![obj isKindOfClass:_myClass])
|
||||
|
@ -95,8 +90,8 @@
|
|||
//self = [super initWithCoder:coder];
|
||||
self = [self init];
|
||||
_parent = nil;
|
||||
_nodeValue = [[coder decodeObject] retain];
|
||||
_children = [[coder decodeObject] retain];
|
||||
_nodeValue = [coder decodeObject];
|
||||
_children = [coder decodeObject];
|
||||
[_children makeObjectsPerformSelector:@selector(setParent:) withObject:self];
|
||||
return self;
|
||||
}
|
||||
|
@ -108,23 +103,10 @@
|
|||
_parent = nil;
|
||||
return self;
|
||||
}
|
||||
-(void)dealloc
|
||||
{
|
||||
// NSLog(@"[MyTree dealloc]");
|
||||
// NSLog(@"%@",self);
|
||||
if ([self nodeValue] != nil)
|
||||
[[self nodeValue] autorelease];
|
||||
if ([self children] != nil)
|
||||
[[self children] autorelease];
|
||||
_nodeValue = nil;
|
||||
_children = nil;
|
||||
_parent = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
-(id)initWithNode:(id)obj parent:(MyTree*)parent
|
||||
{
|
||||
self = [self init];
|
||||
_nodeValue = [obj retain];
|
||||
_nodeValue = obj;
|
||||
_parent = parent;
|
||||
_children = nil;
|
||||
return self;
|
||||
|
@ -148,14 +130,14 @@
|
|||
id <NSCoding> nodeValue = nil;
|
||||
// NSLog(@"[MyTree initWithDictionary:%@ parent:%@]",dict,parent);
|
||||
// this part could use some work
|
||||
nodeValue = [[[CelestiaFavorite alloc] initWithDictionary:[dict objectForKey:@"nodeValue"]] autorelease];
|
||||
nodeValue = [[CelestiaFavorite alloc] initWithDictionary:[dict objectForKey:@"nodeValue"]];
|
||||
// Leaf
|
||||
if ((origArray = [dict objectForKey:@"children"]) == nil)
|
||||
return [self initWithNode:nodeValue parent:parent];
|
||||
children = [[[MyVector alloc] initWithClass:[MyTree class]] autorelease];
|
||||
children = [[MyVector alloc] initWithClass:[MyTree class]];
|
||||
enumerator = [origArray objectEnumerator];
|
||||
while ((childDict = [enumerator nextObject]) != nil)
|
||||
[children addObject:[[[MyTree alloc] initWithDictionary:childDict parent:self] autorelease]];
|
||||
[children addObject:[[MyTree alloc] initWithDictionary:childDict parent:self]];
|
||||
return [self initWithNode:nodeValue parent:parent children:children];
|
||||
}
|
||||
-(MyTree*)parent
|
||||
|
@ -176,9 +158,7 @@
|
|||
}
|
||||
-(void)setNode:(id)obj
|
||||
{
|
||||
if ([self nodeValue] != nil)
|
||||
[[self nodeValue] autorelease];
|
||||
_nodeValue = [obj retain];
|
||||
_nodeValue = obj;
|
||||
}
|
||||
-(void)setParent:(MyTree*)obj
|
||||
{
|
||||
|
@ -188,8 +168,6 @@
|
|||
{
|
||||
NSEnumerator *enumerator = nil;
|
||||
id obj = nil;
|
||||
if ([self children] == nil)
|
||||
[[self children] autorelease];
|
||||
if (children == nil) {
|
||||
_children = nil;
|
||||
return;
|
||||
|
|
|
@ -16,25 +16,12 @@
|
|||
[self hideRenderPathWarning];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
if (_renderPathWarningSuper)
|
||||
{
|
||||
[renderPathCautionIcon release];
|
||||
[renderPathWarning release];
|
||||
}
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)displayRenderPathWarning:(NSString *)warning
|
||||
{
|
||||
if (_renderPathWarningSuper)
|
||||
{
|
||||
[_renderPathWarningSuper addSubview: renderPathCautionIcon];
|
||||
[_renderPathWarningSuper addSubview: renderPathWarning];
|
||||
[renderPathCautionIcon release];
|
||||
[renderPathWarning release];
|
||||
_renderPathWarningSuper = nil;
|
||||
}
|
||||
|
||||
|
@ -47,8 +34,6 @@
|
|||
if (_renderPathWarningSuper == nil)
|
||||
{
|
||||
_renderPathWarningSuper = [renderPathWarning superview];
|
||||
[renderPathCautionIcon retain];
|
||||
[renderPathWarning retain];
|
||||
[renderPathCautionIcon removeFromSuperview];
|
||||
[renderPathWarning removeFromSuperview];
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
if ([item respondsToSelector: @selector(objectForKey:)])
|
||||
{
|
||||
[mi setAction: nil];
|
||||
NSMenu *subMenu = [[[NSMenu alloc] initWithTitle: title] autorelease];
|
||||
NSMenu *subMenu = [[NSMenu alloc] initWithTitle: title];
|
||||
[self addItems: item toMenu: subMenu];
|
||||
[mi setSubmenu: subMenu];
|
||||
}
|
||||
|
|
|
@ -29,11 +29,6 @@
|
|||
// http://unicode.org/reports/tr35/tr35-4.html
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[dateTimeFormat release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (IBAction)setTime:(id)sender
|
||||
{
|
||||
|
|
|
@ -144,7 +144,6 @@
|
|||
E56430FD07769C9000E2C4A3 /* Astro.mm in Sources */ = {isa = PBXBuildFile; fileRef = F55F041202B1105D0100020A /* Astro.mm */; };
|
||||
E56430FE07769C9000E2C4A3 /* CelestiaUniversalCoord.mm in Sources */ = {isa = PBXBuildFile; fileRef = F55F041602B149370100020A /* CelestiaUniversalCoord.mm */; };
|
||||
E56430FF07769C9000E2C4A3 /* NSString_ObjCPlusPlus.mm in Sources */ = {isa = PBXBuildFile; fileRef = F55F041E02B152180100020A /* NSString_ObjCPlusPlus.mm */; };
|
||||
E564310007769C9000E2C4A3 /* CelestiaDestination.mm in Sources */ = {isa = PBXBuildFile; fileRef = F55F042102B155E00100020A /* CelestiaDestination.mm */; };
|
||||
E564310107769C9000E2C4A3 /* CelestiaVector.mm in Sources */ = {isa = PBXBuildFile; fileRef = F55A246902B2D9BA0100020A /* CelestiaVector.mm */; };
|
||||
E564310207769C9000E2C4A3 /* CelestiaGalaxy.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58102A502B3269F0100020A /* CelestiaGalaxy.mm */; };
|
||||
E564310307769C9000E2C4A3 /* CelestiaStar.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58102A602B3269F0100020A /* CelestiaStar.mm */; };
|
||||
|
@ -246,7 +245,7 @@
|
|||
E5B48EBA0C22065E00C6FBD7 /* MacInputWatcher.mm in Sources */ = {isa = PBXBuildFile; fileRef = E5B48EB80C22065E00C6FBD7 /* MacInputWatcher.mm */; };
|
||||
E5C9ADE10848FFEF0071B1EE /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5040B0602A47B91014901DC /* Carbon.framework */; };
|
||||
E5CAABA70D3D7A08001926FC /* POSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5CAABA60D3D7A08001926FC /* POSupport.cpp */; };
|
||||
E5CC203709AA836E00CFFF2C /* POConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = E5CC203209AA834B00CFFF2C /* POConverter.m */; };
|
||||
E5CC203709AA836E00CFFF2C /* POConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = E5CC203209AA834B00CFFF2C /* POConverter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
|
||||
E5CC204709AA843300CFFF2C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = E5CC204509AA843300CFFF2C /* Localizable.strings */; };
|
||||
E5D3E6550D1EA18A00214838 /* axisarrow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5D3E6530D1EA18A00214838 /* axisarrow.cpp */; };
|
||||
E5D446660777291700A1577D /* utf8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5D446640777291700A1577D /* utf8.cpp */; };
|
||||
|
@ -971,9 +970,6 @@
|
|||
F55F041B02B150810100020A /* CelestiaAppCore_PrivateAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CelestiaAppCore_PrivateAPI.h; sourceTree = "<group>"; };
|
||||
F55F041D02B152180100020A /* NSString_ObjCPlusPlus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSString_ObjCPlusPlus.h; sourceTree = "<group>"; };
|
||||
F55F041E02B152180100020A /* NSString_ObjCPlusPlus.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NSString_ObjCPlusPlus.mm; sourceTree = "<group>"; };
|
||||
F55F042102B155E00100020A /* CelestiaDestination.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CelestiaDestination.mm; sourceTree = "<group>"; };
|
||||
F55F042202B155E00100020A /* CelestiaDestination.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CelestiaDestination.h; sourceTree = "<group>"; };
|
||||
F55F042302B155E00100020A /* CelestiaDestination_PrivateAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CelestiaDestination_PrivateAPI.h; sourceTree = "<group>"; };
|
||||
F55F042702B1596A0100020A /* CelestiaFavorite.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CelestiaFavorite.mm; sourceTree = "<group>"; };
|
||||
F55F042802B1596A0100020A /* CelestiaUniverse.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CelestiaUniverse.mm; sourceTree = "<group>"; };
|
||||
F55F042902B1596A0100020A /* CelestiaSimulation.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CelestiaSimulation.mm; sourceTree = "<group>"; };
|
||||
|
@ -1736,7 +1732,6 @@
|
|||
F55F041202B1105D0100020A /* Astro.mm */,
|
||||
F51FB0E102AF0C820100020A /* CelestiaAppCore.mm */,
|
||||
F55A246202B2AE6E0100020A /* CelestiaBody.mm */,
|
||||
F55F042102B155E00100020A /* CelestiaDestination.mm */,
|
||||
E561FB5E0B46164000668CFE /* CelestiaDSO.mm */,
|
||||
F55F042702B1596A0100020A /* CelestiaFavorite.mm */,
|
||||
F58102A502B3269F0100020A /* CelestiaGalaxy.mm */,
|
||||
|
@ -1753,7 +1748,6 @@
|
|||
F55F041102B1105D0100020A /* Astro.h */,
|
||||
F51FB0E002AF0C820100020A /* CelestiaAppCore.h */,
|
||||
F55A246102B2AE6E0100020A /* CelestiaBody.h */,
|
||||
F55F042202B155E00100020A /* CelestiaDestination.h */,
|
||||
E561FB5D0B46164000668CFE /* CelestiaDSO.h */,
|
||||
F55F042B02B1596A0100020A /* CelestiaFavorite.h */,
|
||||
F58102A702B3269F0100020A /* CelestiaGalaxy.h */,
|
||||
|
@ -1769,7 +1763,6 @@
|
|||
F58102A302B31BC30100020A /* Astro_PrivateAPI.h */,
|
||||
F55F041B02B150810100020A /* CelestiaAppCore_PrivateAPI.h */,
|
||||
F55A246302B2AE6E0100020A /* CelestiaBody_PrivateAPI.h */,
|
||||
F55F042302B155E00100020A /* CelestiaDestination_PrivateAPI.h */,
|
||||
F55F043D02B15A810100020A /* CelestiaFavorite_PrivateAPI.h */,
|
||||
F58102A902B3269F0100020A /* CelestiaGalaxy_PrivateAPI.h */,
|
||||
F55F044902B175770100020A /* CelestiaObserver_PrivateAPI.h */,
|
||||
|
@ -2076,7 +2069,6 @@
|
|||
E56430FD07769C9000E2C4A3 /* Astro.mm in Sources */,
|
||||
E56430FE07769C9000E2C4A3 /* CelestiaUniversalCoord.mm in Sources */,
|
||||
E56430FF07769C9000E2C4A3 /* NSString_ObjCPlusPlus.mm in Sources */,
|
||||
E564310007769C9000E2C4A3 /* CelestiaDestination.mm in Sources */,
|
||||
E564310107769C9000E2C4A3 /* CelestiaVector.mm in Sources */,
|
||||
E564310207769C9000E2C4A3 /* CelestiaGalaxy.mm in Sources */,
|
||||
E564310307769C9000E2C4A3 /* CelestiaStar.mm in Sources */,
|
||||
|
@ -2353,6 +2345,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Celestia.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
|
@ -2419,6 +2412,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Celestia.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
|
@ -2481,6 +2475,7 @@
|
|||
E5CC202C09AA829B00CFFF2C /* Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(GCC_PREPROCESSOR_DEFINITIONS)",
|
||||
|
@ -2496,6 +2491,7 @@
|
|||
E5CC202E09AA829B00CFFF2C /* Universal_Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(GCC_PREPROCESSOR_DEFINITIONS)",
|
||||
|
@ -2515,6 +2511,7 @@
|
|||
E5F9EC660D9EA6BE00A83FEF /* HDR_Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(GCC_PREPROCESSOR_DEFINITIONS)",
|
||||
|
@ -2534,6 +2531,7 @@
|
|||
E5F9EC670D9EA6BE00A83FEF /* HDR_Universal_Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(GCC_PREPROCESSOR_DEFINITIONS)",
|
||||
|
@ -2556,6 +2554,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Celestia.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
|
@ -2597,6 +2596,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Celestia.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
|
|
Loading…
Reference in New Issue