Apply Debian patch to keep GCC5 happy

master
cim 2015-09-06 11:06:04 +01:00
parent 622b05a990
commit a439f3de41
33 changed files with 136 additions and 136 deletions

View File

@ -517,7 +517,7 @@ static NSString * const kOOLogEntityVerificationError = @"entity.linkedList.ver
- (void) warnAboutHostiles
{
// do nothing for now, this can be expanded in sub classes
OOLog(@"general.error.subclassResponsibility.Entity-warnAboutHostiles", @"***** Entity does nothing in warnAboutHostiles");
OOLog(@"general.error.subclassResponsibility.Entity-warnAboutHostiles", @"%@", @"***** Entity does nothing in warnAboutHostiles");
}

View File

@ -203,7 +203,7 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
else
{
// This happened on startup when [UNIVERSE setUpSpace] was called before player init, inside [UNIVERSE setUpInitialUniverse].
OOLog(@"fuelPrices", @"Player ship not initialised properly yet, using precalculated base mass.");
OOLog(@"fuelPrices", @"%@", @"Player ship not initialised properly yet, using precalculated base mass.");
return 185580.0;
}
}
@ -324,7 +324,7 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
}
else
{
OOLogERR(@"player.loadCargoPods.noContainer", @"couldn't create a container in [PlayerEntity loadCargoPods]");
OOLogERR(@"player.loadCargoPods.noContainer", @"%@", @"couldn't create a container in [PlayerEntity loadCargoPods]");
// throw an exception here...
[NSException raise:OOLITE_EXCEPTION_FATAL
format:@"[PlayerEntity loadCargoPods] failed to create a container for cargo with role 'cargopod'"];
@ -1489,12 +1489,12 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
*/
if ([self mountMissileWithRole:@"EQ_QC_MINE"])
{
OOLog(@"load.upgrade.replacedEnergyBomb", @"Replaced legacy energy bomb with Quirium cascade mine.");
OOLog(@"load.upgrade.replacedEnergyBomb", @"%@", @"Replaced legacy energy bomb with Quirium cascade mine.");
}
else
{
credits += 9000;
OOLog(@"load.upgrade.replacedEnergyBomb", @"Compensated legacy energy bomb with 900 credits.");
OOLog(@"load.upgrade.replacedEnergyBomb", @"%@", @"Compensated legacy energy bomb with 900 credits.");
}
}
@ -1663,7 +1663,7 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
// set up STATUS_DEAD
[self setDockedStation:nil]; // needed for STATUS_DEAD
[self setStatus:STATUS_DEAD];
OOLog(@"script.javascript.init.error", @"Scheduling new JavaScript reset.");
OOLog(@"script.javascript.init.error", @"%@", @"Scheduling new JavaScript reset.");
shot_time = kDeadResetTime - 0.02f; // schedule reinit 20 milliseconds from now.
if (![gc inFullScreenMode]) [gc startAnimationTimer]; // keep the game ticking over.
@ -3786,7 +3786,7 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
switch ([wh scanInfo])
{
case WH_SCANINFO_NONE:
OOLog(kOOLogInconsistentState, @"Internal Error - WH_SCANINFO_NONE reached in [PlayerEntity updateTargeting:]");
OOLog(kOOLogInconsistentState, @"%@", @"Internal Error - WH_SCANINFO_NONE reached in [PlayerEntity updateTargeting:]");
[self dumpState];
[wh dumpState];
// Workaround a reported hit of the assert here. We really
@ -4512,7 +4512,7 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
// Invariant/safety interlock: weapons offline implies missiles safe. -- Ahruman 2012-07-21
if (missile_status != MISSILE_STATUS_SAFE)
{
OOLogERR(@"player.missilesUnsafe", @"Missile state is not SAFE when weapons are offline. This is a bug, please report it.");
OOLogERR(@"player.missilesUnsafe", @"%@", @"Missile state is not SAFE when weapons are offline. This is a bug, please report it.");
[self safeAllMissiles];
}
return MISSILE_STATUS_SAFE;
@ -6833,7 +6833,7 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
if ( ![self wormhole] && !galactic_witchjump) // galactic hyperspace does not generate a wormhole
{
OOLog(kOOLogInconsistentState, @"Internal Error : Player entering witchspace with no wormhole.");
OOLog(kOOLogInconsistentState, @"%@", @"Internal Error : Player entering witchspace with no wormhole.");
}
[UNIVERSE allShipsDoScriptEvent:OOJSID("playerWillEnterWitchspace") andReactToAIMessage:@"PLAYER WITCHSPACE"];
@ -8232,7 +8232,7 @@ static NSString *SliderString(NSInteger amountIn20ths)
NSUInteger displayModeIndex = [controller indexOfCurrentDisplayMode];
if (displayModeIndex == NSNotFound)
{
OOLogWARN(@"display.currentMode.notFound", @"couldn't find current fullscreen setting, switching to default.");
OOLogWARN(@"display.currentMode.notFound", @"%@", @"couldn't find current fullscreen setting, switching to default.");
displayModeIndex = 0;
}
@ -9793,7 +9793,7 @@ static NSString *last_outfitting_key=nil;
if ([eqType isMissileOrMine] && missiles >= max_missiles)
{
OOLog(@"equip.buy.mounted.failed.full", @"rejecting missile because already full");
OOLog(@"equip.buy.mounted.failed.full", @"%@", @"rejecting missile because already full");
return NO;
}
@ -11383,7 +11383,7 @@ static NSString *last_outfitting_key=nil;
if (info_failed)
{
OOLog(@"cheat.tentative", @"POSSIBLE CHEAT DETECTED");
OOLog(@"cheat.tentative", @"%@", @"POSSIBLE CHEAT DETECTED");
possible_cheat = YES;
}
@ -11403,7 +11403,7 @@ static NSString *last_outfitting_key=nil;
}
if (possible_cheat && !info_failed)
OOLog(@"cheat.verified", @"CHEAT DEFEATED - that's not the way to get rid of trumbles!");
OOLog(@"cheat.verified", @"%@", @"CHEAT DEFEATED - that's not the way to get rid of trumbles!");
}
if (info_failed && [[NSUserDefaults standardUserDefaults] objectForKey:namekey])
@ -11425,7 +11425,7 @@ static NSString *last_outfitting_key=nil;
}
if (!info_failed)
OOLog(@"cheat.verified", @"CHEAT DEFEATED - that's not the way to get rid of trumbles!");
OOLog(@"cheat.verified", @"%@", @"CHEAT DEFEATED - that's not the way to get rid of trumbles!");
}
// at this stage we've done the best we can to stop cheaters
trumbleCount = putativeNTrumbles;

View File

@ -2151,7 +2151,7 @@ static NSTimeInterval time_last_frame;
OOLog(kOOLogException, @"\n\n***** Handling exception: %@ : %@ *****\n\n",[exception name], [exception reason]);
if ([[exception name] isEqual:@"GameNotSavedException"]) // try saving game instead
{
OOLog(kOOLogException, @"\n\n***** Trying a normal save instead *****\n\n");
OOLog(kOOLogException, @"%@", @"\n\n***** Trying a normal save instead *****\n\n");
if ([controller inFullScreenMode])
[controller pauseFullScreenModeToPerform:@selector(savePlayer) onTarget:self];
else
@ -2889,7 +2889,7 @@ static NSTimeInterval time_last_frame;
if (displayModeIndex == (NSInteger)NSNotFound)
{
OOLogWARN(@"graphics.mode.notFound", @"couldn't find current fullscreen setting, switching to default.");
OOLogWARN(@"graphics.mode.notFound", @"%@", @"couldn't find current fullscreen setting, switching to default.");
displayModeIndex = 0;
}
else

View File

@ -13220,7 +13220,7 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
BOOL OK = NO;
if ([self isPlayer] && [(PlayerEntity *)self isDocked])
{
OOLog(@"ShipEntity.abandonShip.failed", @"Player cannot abandon ship while docked.");
OOLog(@"ShipEntity.abandonShip.failed", @"%@", @"Player cannot abandon ship while docked.");
return OK;
}

View File

@ -1337,7 +1337,7 @@
}
else
{
OOLog(@"ai.setTakeOffFromPlanet.noPlanet", @"***** Error. Planet not found during take off!");
OOLog(@"ai.setTakeOffFromPlanet.noPlanet", @"%@", @"***** Error. Planet not found during take off!");
}
}

View File

@ -195,7 +195,7 @@ MA 02110-1301, USA.
}
else
{
OOLog(@"sky.warning",@"PLAYER is nil");
OOLog(@"sky.warning", @"%@", @"PLAYER is nil");
}
}

View File

@ -623,7 +623,7 @@ static void DrawWormholeCorona(GLfloat inner_radius, GLfloat outer_radius, int s
}
else
{
OOLogERR(kOOLogInconsistentState, @"Wormhole identified when ship has no EQ_WORMHOLE_SCANNER.");
OOLogERR(kOOLogInconsistentState, @"%@", @"Wormhole identified when ship has no EQ_WORMHOLE_SCANNER.");
/*
This was previously an assertion, but a player reported hitting it.
http://aegidian.org/bb/viewtopic.php?p=128110#p128110

View File

@ -835,7 +835,7 @@ static NSMutableArray *sMessageStack;
[[OODebugMonitor sharedDebugMonitor] applicationWillTerminate];
#endif
[[NSUserDefaults standardUserDefaults] synchronize];
OOLog(@"gameController.exitApp",@".GNUstepDefaults synchronized.");
OOLog(@"gameController.exitApp", @"%@", @".GNUstepDefaults synchronized.");
OOLoggingTerminate();
SDL_Quit();
[[OOOpenALController sharedController] shutdown];

View File

@ -152,7 +152,7 @@ static OOMaterial *sActiveMaterial = nil;
{
if (EXPECT_NOT(sActiveMaterial == self))
{
OOLog(@"shader.dealloc.imbalance", @"***** Material deallocated while active, indicating a retain/release imbalance.");
OOLog(@"shader.dealloc.imbalance", @"%@", @"***** Material deallocated while active, indicating a retain/release imbalance.");
[self unapplyWithNext:nil];
sActiveMaterial = nil;
}

View File

@ -148,12 +148,12 @@ enum
- (id) initWithPlanetInfo:(NSDictionary *)planetInfo
{
OOLog(@"texture.planet.generate",@"Initialising planetary generator");
OOLog(@"texture.planet.generate", @"%@", @"Initialising planetary generator");
// AllowCubeMap not used yet but might be in future
if ((self = [super initWithPath:[NSString stringWithFormat:@"OOPlanetTexture@%p", self] options:kOOTextureAllowCubeMap]))
{
OOLog(@"texture.planet.generate",@"Extracting parameters for generator %@",self);
OOLog(@"texture.planet.generate", @"Extracting parameters for generator %@",self);
_info.landFraction = OOClamp_0_1_f([planetInfo oo_floatForKey:@"land_fraction" defaultValue:0.3]);
_info.polarFraction = OOClamp_0_1_f([planetInfo oo_floatForKey:@"polar_fraction" defaultValue:0.05]);
@ -164,7 +164,7 @@ enum
[[planetInfo objectForKey:@"noise_map_seed"] getValue:&_info.seed];
if ([planetInfo objectForKey:@"cloud_alpha"])
{
OOLog(@"texture.planet.generate",@"Extracting atmosphere parameters");
OOLog(@"texture.planet.generate", @"%@", @"Extracting atmosphere parameters");
// we have an atmosphere:
_info.cloudAlpha = [planetInfo oo_floatForKey:@"cloud_alpha" defaultValue:1.0f];
_info.cloudFraction = OOClamp_0_1_f([planetInfo oo_floatForKey:@"cloud_fraction" defaultValue:0.3]);
@ -1324,7 +1324,7 @@ static void SetMixConstants(OOPlanetTextureGeneratorInfo *info, float temperatur
- (void) completeWithData:(void *)data_ width:(unsigned)width_ height:(unsigned)height_
{
OOLog(@"texture.planet.generate",@"Completing atmosphere generator");
OOLog(@"texture.planet.generate", @"%@", @"Completing atmosphere generator");
_data = data_;
_width = width_;

View File

@ -101,14 +101,14 @@ enum
- (id) initWithPlanetInfo:(NSDictionary *)planetInfo
{
OOLog(@"texture.planet.generate",@"Initialising standalone atmosphere generator");
OOLog(@"texture.planet.generate", @"%@", @"Initialising standalone atmosphere generator");
// AllowCubeMap not used yet but might be in future
if ((self = [super initWithPath:[NSString stringWithFormat:@"OOStandaloneAtmosphereTexture@%p", self] options:kOOTextureAllowCubeMap]))
{
OOLog(@"texture.planet.generate",@"Extracting parameters for generator %@",self);
[[planetInfo objectForKey:@"noise_map_seed"] getValue:&_info.seed];
OOLog(@"texture.planet.generate",@"Extracting atmosphere parameters");
OOLog(@"texture.planet.generate", @"%@", @"Extracting atmosphere parameters");
// we are an atmosphere:
_info.cloudAlpha = [planetInfo oo_floatForKey:@"cloud_alpha" defaultValue:1.0f];
_info.cloudFraction = OOClamp_0_1_f([planetInfo oo_floatForKey:@"cloud_fraction" defaultValue:0.3]);

View File

@ -329,7 +329,7 @@ static BOOL sHaveSetUp = NO;
if (_data != NULL) [self applySettings];
OOLog(@"texture.load.asyncLoad.done", @"Loading complete.");
OOLog(@"texture.load.asyncLoad.done", @"%@", @"Loading complete.");
}
@catch (NSException *exception)
{

View File

@ -84,7 +84,7 @@ SOFTWARE.
OOAL(alGenBuffers(1,&buffer));
if ((error = alGetError()) != AL_NO_ERROR)
{
OOLog(kOOLogSoundLoadingError,@"Could not create OpenAL buffer");
OOLog(kOOLogSoundLoadingError, @"%@", @"Could not create OpenAL buffer");
return 0;
}
else

View File

@ -49,7 +49,7 @@ SOFTWARE.
OOAL(alGenSources(1,&_source));
if ((error = alGetError()) != AL_NO_ERROR)
{
OOLog(kOOLogSoundInitError, @"Could not create OpenAL source");
OOLog(kOOLogSoundInitError, @"%@", @"Could not create OpenAL source");
[self release];
self = nil;
}

View File

@ -107,7 +107,7 @@ SOFTWARE.
OOAL(alGenBuffers(1,&buffer));
if ((error = alGetError()) != AL_NO_ERROR)
{
OOLog(kOOLogSoundLoadingError,@"Could not create OpenAL buffer");
OOLog(kOOLogSoundLoadingError, @"%@", @"Could not create OpenAL buffer");
return 0;
}
else

View File

@ -121,7 +121,7 @@ static void InitAsyncWorkManager(void)
if (sSingleton == nil)
{
OOLog(@"asyncWorkManager.setUpDispatcher.failed", @"***** FATAL ERROR: could not set up async work manager!");
OOLog(@"asyncWorkManager.setUpDispatcher.failed", @"%@", @"***** FATAL ERROR: could not set up async work manager!");
exit(EXIT_FAILURE);
}

View File

@ -67,7 +67,7 @@ void OOCPUInfoInit(void)
#if OOLITE_BIG_ENDIAN
if (*(uint32_t*)endianTag != 0x12345678)
{
OOLog(@"cpuInfo.endianTest.failed", @"OOLITE_BIG_ENDIAN is set, but the system is not big-endian -- aborting.");
OOLog(@"cpuInfo.endianTest.failed", @"%@", @"OOLITE_BIG_ENDIAN is set, but the system is not big-endian -- aborting.");
exit(EXIT_FAILURE);
}
#endif
@ -75,7 +75,7 @@ void OOCPUInfoInit(void)
#if OOLITE_LITTLE_ENDIAN
if (*(uint32_t*)endianTag != 0x78563412)
{
OOLog(@"cpuInfo.endianTest.failed", @"OOLITE_LITTLE_ENDIAN is set, but the system is not little-endian -- aborting.");
OOLog(@"cpuInfo.endianTest.failed", @"%@", @"OOLITE_LITTLE_ENDIAN is set, but the system is not little-endian -- aborting.");
exit(EXIT_FAILURE);
}
#endif

View File

@ -344,7 +344,7 @@ static OOCacheManager *sSingleton = nil;
if (cache != nil)
{
// We have a cache
OOLog(kOOLogDataCacheFound, @"Found data cache.");
OOLog(kOOLogDataCacheFound, @"%@", @"Found data cache.");
OOLogIndentIf(kOOLogDataCacheFound);
cacheVersion = [cache objectForKey:kCacheKeyVersion];
@ -366,7 +366,7 @@ static OOCacheManager *sSingleton = nil;
endianTag = [cache objectForKey:kCacheKeyEndianTag];
if (![endianTag isKindOfClass:[NSData class]] || [endianTag length] != sizeof endianTagValue)
{
OOLog(kOOLogDataCacheRebuild, @"Data cache endian tag is invalid, rebuilding cache.");
OOLog(kOOLogDataCacheRebuild, @"%@", @"Data cache endian tag is invalid, rebuilding cache.");
accept = NO;
}
else
@ -374,7 +374,7 @@ static OOCacheManager *sSingleton = nil;
endianTagValue = *(const uint64_t *)[endianTag bytes];
if (endianTagValue != kEndianTagValue)
{
OOLog(kOOLogDataCacheRebuild, @"Data cache endianness is inappropriate for this system, rebuilding cache.");
OOLog(kOOLogDataCacheRebuild, @"%@", @"Data cache endianness is inappropriate for this system, rebuilding cache.");
accept = NO;
}
}
@ -391,7 +391,7 @@ static OOCacheManager *sSingleton = nil;
else
{
// No cache
OOLog(kOOLogDataCacheNotFound, @"No data cache found, starting from scratch.");
OOLog(kOOLogDataCacheNotFound, @"%@", @"No data cache found, starting from scratch.");
}
// If loading failed, or there was a version or endianness conflict
@ -417,9 +417,9 @@ static OOCacheManager *sSingleton = nil;
#endif
#if WRITE_ASYNC
OOLog(@"dataCache.willWrite", @"Scheduling data cache write.");
OOLog(@"dataCache.willWrite", @"%@", @"Scheduling data cache write.");
#else
OOLog(@"dataCache.willWrite", @"About to write cache.");
OOLog(@"dataCache.willWrite", @"%@", @"About to write cache.");
#endif
ooliteVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
@ -429,7 +429,7 @@ static OOCacheManager *sSingleton = nil;
pListRep = [self dictionaryOfCaches];
if (ooliteVersion == nil || endianTag == nil || formatVersion == nil || pListRep == nil)
{
OOLog(@"dataCache.cantWrite", @"Failed to write data cache -- prerequisites not fulfilled. %@",@"This is an internal error, please report it.");
OOLog(@"dataCache.cantWrite", @"%@", @"Failed to write data cache -- prerequisites not fulfilled. This is an internal error, please report it.");
return;
}
@ -461,11 +461,11 @@ static OOCacheManager *sSingleton = nil;
if ([self writeDict:newCache])
{
[self markClean];
OOLog(kOOLogDataCacheWriteSuccess, @"Wrote data cache.");
OOLog(kOOLogDataCacheWriteSuccess, @"%@", @"Wrote data cache.");
}
else
{
OOLog(kOOLogDataCacheWriteFailed, @"Failed to write data cache.");
OOLog(kOOLogDataCacheWriteFailed, @"%@", @"Failed to write data cache.");
}
#endif
}
@ -733,11 +733,11 @@ static OOCacheManager *sSingleton = nil;
{
if ([[OOCacheManager sharedCache] writeDict:_cacheContents])
{
OOLog(kOOLogDataCacheWriteSuccess, @"Wrote data cache.");
OOLog(kOOLogDataCacheWriteSuccess, @"%@", @"Wrote data cache.");
}
else
{
OOLog(kOOLogDataCacheWriteFailed, @"Failed to write data cache.");
OOLog(kOOLogDataCacheWriteFailed, @"%@", @"Failed to write data cache.");
}
DESTROY(_cacheContents);
}

View File

@ -74,7 +74,7 @@ static OOGraphicsResetManager *sSingleton = nil;
OOGL(glFinish());
OOLog(@"rendering.reset.start", @"Resetting graphics state.");
OOLog(@"rendering.reset.start", @"%@", @"Resetting graphics state.");
OOLogIndentIf(@"rendering.reset.start");
[[OOOpenGLExtensionManager sharedManager] reset];
@ -93,7 +93,7 @@ static OOGraphicsResetManager *sSingleton = nil;
}
OOLogOutdentIf(@"rendering.reset.start");
OOLog(@"rendering.reset.end", @"End of graphics state reset.");
OOLog(@"rendering.reset.end", @"%@", @"End of graphics state reset.");
}
@end

View File

@ -922,7 +922,7 @@ static NO_INLINE_FUNC void AddTriangle_slow(GeometryData *data, Triangle tri)
if (EXPECT_NOT(data->triangles == NULL))
{
OOLog(kOOLogAllocationFailure, @"!!!!! Ran out of memory to allocate more geometry!");
OOLog(kOOLogAllocationFailure, @"%@", @"!!!!! Ran out of memory to allocate more geometry!");
exit(EXIT_FAILURE);
}

View File

@ -595,7 +595,7 @@ static OOOXZManager *sSingleton = nil;
{
return NO;
}
OOLog(kOOOXZDebugLog,@"Trying to cancel file download");
OOLog(kOOOXZDebugLog, @"%@", @"Trying to cancel file download");
if (_currentDownload != nil)
{
[_currentDownload cancel];
@ -734,7 +734,7 @@ static OOOXZManager *sSingleton = nil;
)
{
_downloadStatus = OXZ_DOWNLOAD_ERROR;
OOLog(kOOOXZErrorLog,@"Downloaded OXZ does not have the same identifer and version as expected. This might be due to your manifests list being out of date - try updating it.");
OOLog(kOOOXZErrorLog, @"%@", @"Downloaded OXZ does not have the same identifer and version as expected. This might be due to your manifests list being out of date - try updating it.");
_interfaceState = OXZ_STATE_TASKDONE;
[self gui];
return NO;
@ -746,7 +746,7 @@ static OOOXZManager *sSingleton = nil;
if (![self ensureInstallPath])
{
_downloadStatus = OXZ_DOWNLOAD_ERROR;
OOLog(kOOOXZErrorLog,@"Unable to create installation folder.");
OOLog(kOOOXZErrorLog, @"%@", @"Unable to create installation folder.");
_interfaceState = OXZ_STATE_TASKDONE;
[self gui];
return NO;
@ -760,7 +760,7 @@ static OOOXZManager *sSingleton = nil;
if (![[NSFileManager defaultManager] oo_moveItemAtPath:[self downloadPath] toPath:destination])
{
_downloadStatus = OXZ_DOWNLOAD_ERROR;
OOLog(kOOOXZErrorLog,@"Downloaded OXZ could not be installed.");
OOLog(kOOOXZErrorLog, @"%@", @"Downloaded OXZ could not be installed.");
_interfaceState = OXZ_STATE_TASKDONE;
[self gui];
return NO;
@ -804,7 +804,7 @@ static OOOXZManager *sSingleton = nil;
[progress appendFormat:DESC(@"oolite-oxzmanager-progress-now-has-@"),[requirement oo_stringForKey:kOOManifestRelationDescription defaultValue:[requirement oo_stringForKey:kOOManifestRelationIdentifier]]];
// it was unmet, but now it's met
[_dependencyStack removeObject:requirement];
OOLog(kOOOXZDebugLog,@"Dependency stack: requirement met");
OOLog(kOOOXZDebugLog, @"%@", @"Dependency stack: requirement met");
} else if ([[requirement oo_stringForKey:kOOManifestRelationIdentifier] isEqualToString:[downloadedManifest oo_stringForKey:kOOManifestIdentifier]]) {
// remove the requirement for the just downloaded OXP
[_dependencyStack removeObject:requirement];
@ -851,7 +851,7 @@ static OOOXZManager *sSingleton = nil;
{
if ([ResourceManager matchVersions:requirement withVersion:[availableDownload oo_stringForKey:kOOManifestVersion]])
{
OOLog(kOOOXZDebugLog,@"Dependency stack: found download for next item");
OOLog(kOOOXZDebugLog, @"%@", @"Dependency stack: found download for next item");
foundDownload = YES;
index = [_oxzList indexOfObject:availableDownload];
break;
@ -900,7 +900,7 @@ static OOOXZManager *sSingleton = nil;
[self setProgressStatus:progress];
OOLog(kOOOXZErrorLog,@"OXZ dependency %@ could not be found for automatic download.",needsIdentifier);
_downloadStatus = OXZ_DOWNLOAD_ERROR;
OOLog(kOOOXZErrorLog,@"Downloaded OXZ could not be installed.");
OOLog(kOOOXZErrorLog, @"%@", @"Downloaded OXZ could not be installed.");
_interfaceState = OXZ_STATE_TASKDONE;
[self gui];
return NO;
@ -922,7 +922,7 @@ static OOOXZManager *sSingleton = nil;
[self setProgressStatus:progress];
OOLog(kOOOXZErrorLog,@"OXZ dependency %@ could not be found for automatic download.",needsIdentifier);
_downloadStatus = OXZ_DOWNLOAD_ERROR;
OOLog(kOOOXZErrorLog,@"Downloaded OXZ could not be installed.");
OOLog(kOOOXZErrorLog, @"%@", @"Downloaded OXZ could not be installed.");
_interfaceState = OXZ_STATE_TASKDONE;
[self gui];
return NO;
@ -1612,7 +1612,7 @@ static OOOXZManager *sSingleton = nil;
NSString *url = [manifest objectForKey:kOOManifestDownloadURL];
if (url == nil)
{
OOLog(kOOOXZErrorLog,@"Manifest does not have a download URL - cannot install");
OOLog(kOOOXZErrorLog, @"%@", @"Manifest does not have a download URL - cannot install");
return NO;
}
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
@ -2187,7 +2187,7 @@ static OOOXZManager *sSingleton = nil;
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
_downloadStatus = OXZ_DOWNLOAD_RECEIVING;
OOLog(kOOOXZDebugLog,@"Download receiving");
OOLog(kOOOXZDebugLog, @"%@", @"Download receiving");
_downloadExpected = [response expectedContentLength];
_downloadProgress = 0;
DESTROY(_fileWriter);
@ -2196,7 +2196,7 @@ static OOOXZManager *sSingleton = nil;
if (_fileWriter == nil)
{
// file system is full or read-only or something
OOLog(kOOOXZErrorLog,@"Unable to create download file");
OOLog(kOOOXZErrorLog, @"%@", @"Unable to create download file");
[self cancelUpdate];
}
}
@ -2233,7 +2233,7 @@ static OOOXZManager *sSingleton = nil;
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
_downloadStatus = OXZ_DOWNLOAD_COMPLETE;
OOLog(kOOOXZDebugLog,@"Download complete");
OOLog(kOOOXZDebugLog, @"%@", @"Download complete");
[_fileWriter synchronizeFile];
[_fileWriter closeFile];
DESTROY(_fileWriter);

View File

@ -51,14 +51,14 @@ static id sSingleton = nil;
device = alcOpenDevice(NULL); // default device
if (!device)
{
OOLog(kOOLogSoundInitError,@"Failed to open default sound device");
OOLog(kOOLogSoundInitError, @"%@", @"Failed to open default sound device");
[self release];
return nil;
}
context = alcCreateContext(device,NULL); // default context
if (!alcMakeContextCurrent(context))
{
OOLog(kOOLogSoundInitError,@"Failed to create default sound context");
OOLog(kOOLogSoundInitError, @"%@", @"Failed to create default sound context");
[self release];
return nil;
}

View File

@ -253,7 +253,7 @@ static NSArray *ArrayOfExtensions(NSString *extensionString)
if (shadersAvailable)
{
OOLog(kOOLogOpenGLShaderSupport, @"Shaders are supported.");
OOLog(kOOLogOpenGLShaderSupport, @"%@", @"Shaders are supported.");
}
}
else
@ -521,7 +521,7 @@ static unsigned IntegerFromString(const GLubyte **ioString)
{
if ([arg isEqual:@"-noshaders"] || [arg isEqual:@"--noshaders"])
{
OOLog(kOOLogOpenGLShaderSupport, @"Shaders will not be used (disabled on command line).");
OOLog(kOOLogOpenGLShaderSupport, @"%@", @"Shaders will not be used (disabled on command line).");
return;
}
}

View File

@ -304,46 +304,46 @@ static NSString * const kVisualEffectDataCacheKey = @"visual effect data";
// Make each entry mutable to simplify later stages. Also removes any entries that aren't dictionaries.
if (![self makeShipEntriesMutable:result]) return;
OOLog(@"shipData.load.progress", @"Finished initial cleanup...");
OOLog(@"shipData.load.progress", @"%@", @"Finished initial cleanup...");
// Apply patches.
if (![self loadAndApplyShipDataOverrides:result]) return;
OOLog(@"shipData.load.progress", @"Finished applying patches...");
OOLog(@"shipData.load.progress", @"%@", @"Finished applying patches...");
// Strip private keys (anything starting with _oo_).
if (![self stripPrivateKeys:result]) return;
OOLog(@"shipData.load.progress", @"Finished stripping private keys...");
OOLog(@"shipData.load.progress", @"%@", @"Finished stripping private keys...");
// Resolve like_ship entries.
if (![self applyLikeShips:result withKey:@"like_ship"]) return;
OOLog(@"shipData.load.progress", @"Finished resolving like_ships...");
OOLog(@"shipData.load.progress", @"%@", @"Finished resolving like_ships...");
// Clean up subentity declarations and tag subentities so they won't be pruned.
if (![self canonicalizeAndTagSubentities:result]) return;
OOLog(@"shipData.load.progress", @"Finished cleaning up subentities...");
OOLog(@"shipData.load.progress", @"%@", @"Finished cleaning up subentities...");
// Clean out templates and invalid entries.
if (![self removeUnusableEntries:result shipMode:YES]) return;
OOLog(@"shipData.load.progress", @"Finished removing invalid entries...");
OOLog(@"shipData.load.progress", @"%@", @"Finished removing invalid entries...");
// Add shipyard entries into shipdata entries.
if (![self loadAndMergeShipyard:result]) return;
OOLog(@"shipData.load.progress", @"Finished adding shipyard entries...");
OOLog(@"shipData.load.progress", @"%@", @"Finished adding shipyard entries...");
// Sanitize conditions.
if (![self sanitizeConditions:result]) return;
OOLog(@"shipData.load.progress", @"Finished validating data...");
OOLog(@"shipData.load.progress", @"%@", @"Finished validating data...");
#if PRELOAD
// Preload and cache meshes.
if (![self preloadShipMeshes:result]) return;
OOLog(@"shipData.load.progress", @"Finished loading meshes...");
OOLog(@"shipData.load.progress", @"%@", @"Finished loading meshes...");
#endif
_shipData = OODeepCopy(result);
[[OOCacheManager sharedCache] setObject:_shipData forKey:kShipDataCacheKey inCache:kShipRegistryCacheName];
OOLog(@"shipData.load.done", @"Ship data loaded.");
OOLog(@"shipData.load.done", @"%@", @"Ship data loaded.");
[_effectData release];
_effectData = nil;
@ -356,28 +356,28 @@ static NSString * const kVisualEffectDataCacheKey = @"visual effect data";
// Make each entry mutable to simplify later stages. Also removes any entries that aren't dictionaries.
if (![self makeShipEntriesMutable:result]) return;
OOLog(@"effectData.load.progress", @"Finished initial cleanup...");
OOLog(@"effectData.load.progress", @"%@", @"Finished initial cleanup...");
// Strip private keys (anything starting with _oo_).
if (![self stripPrivateKeys:result]) return;
OOLog(@"effectData.load.progress", @"Finished stripping private keys...");
OOLog(@"effectData.load.progress", @"%@", @"Finished stripping private keys...");
// Resolve like_effect entries.
if (![self applyLikeShips:result withKey:@"like_effect"]) return;
OOLog(@"effectData.load.progress", @"Finished resolving like_effects...");
OOLog(@"effectData.load.progress", @"%@", @"Finished resolving like_effects...");
// Clean up subentity declarations and tag subentities so they won't be pruned.
if (![self canonicalizeAndTagSubentities:result]) return;
OOLog(@"effectData.load.progress", @"Finished cleaning up subentities...");
OOLog(@"effectData.load.progress", @"%@", @"Finished cleaning up subentities...");
// Clean out templates and invalid entries.
if (![self removeUnusableEntries:result shipMode:NO]) return;
OOLog(@"effectData.load.progress", @"Finished removing invalid entries...");
OOLog(@"effectData.load.progress", @"%@", @"Finished removing invalid entries...");
_effectData = OODeepCopy(result);
[[OOCacheManager sharedCache] setObject:_effectData forKey:kVisualEffectDataCacheKey inCache:kVisualEffectRegistryCacheName];
OOLog(@"effectData.load.done", @"Effect data loaded.");
OOLog(@"effectData.load.done", @"%@", @"Effect data loaded.");
}
@ -1686,7 +1686,7 @@ static NSString * const kVisualEffectDataCacheKey = @"visual effect data";
{
if (sSingleton == nil)
{
OOLog(@"shipData.load.begin", @"Loading ship data.");
OOLog(@"shipData.load.begin", @"%@", @"Loading ship data.");
sSingleton = [super allocWithZone:inZone];
return sSingleton;
}

View File

@ -575,7 +575,7 @@ static NSString *ExpandDigitKey(OOStringExpansionContext *context, const unichar
else
{
// This is out of the scope of whatever triggered it, so shouldn't be a JS warning.
OOLogERR(@"strings.expand.invalidData", @"descriptions.plist entry system_description must be an array of arrays of strings.");
OOLogERR(@"strings.expand.invalidData", @"%@", @"descriptions.plist entry system_description must be an array of arrays of strings.");
}
return nil;
}
@ -1047,7 +1047,7 @@ static NSString *ExpandSystemNameEscape(OOStringExpansionContext *context, const
if (EXPECT_NOT(size - idx < 5))
{
// Too close to end of string to actually have three characters, let alone three digits.
SyntaxError(context, @"strings.expand.invalidJEscape", kInvalidJEscapeMessage);
SyntaxError(context, @"strings.expand.invalidJEscape", @"%@", kInvalidJEscapeMessage);
return nil;
}
@ -1057,7 +1057,7 @@ static NSString *ExpandSystemNameEscape(OOStringExpansionContext *context, const
if (!(isdigit(hundreds) && isdigit(tens) && isdigit(units)))
{
SyntaxError(context, @"strings.expand.invalidJEscape", kInvalidJEscapeMessage);
SyntaxError(context, @"strings.expand.invalidJEscape", @"%@", kInvalidJEscapeMessage);
return nil;
}

View File

@ -330,7 +330,7 @@ static NSString *kOOSystemLayerProperty = @"layer";
}
else
{
OOLog(@"system.description.error",@"getPropertiesForCurrentSystem called while player in interstellar space. This is an internal error. Please report it.");
OOLog(@"system.description.error", @"%@", @"getPropertiesForCurrentSystem called while player in interstellar space. This is an internal error. Please report it.");
// this shouldn't be called for interstellar space
return [NSDictionary dictionary];
}

View File

@ -349,7 +349,7 @@ BOOL OOGenerateMipMaps(void *textureBytes, OOPixMapDimension width, OOPixMapDime
}
if (EXPECT_NOT(textureBytes == NULL))
{
OOLog(kOOLogParameterError, @"NULL texutre pointer passed to GenerateMipMaps().");
OOLog(kOOLogParameterError, @"%@", @"NULL texture pointer passed to GenerateMipMaps().");
return NO;
}

View File

@ -1140,12 +1140,12 @@ static NSMutableDictionary *sStringCache;
if (EXPECT_NOT([[NSUserDefaults standardUserDefaults] boolForKey:@"always-flush-cache"]))
{
OOLog(kOOLogCacheExplicitFlush, @"Cache explicitly flushed with always-flush-cache preference. Rebuilding from scratch.");
OOLog(kOOLogCacheExplicitFlush, @"%@", @"Cache explicitly flushed with always-flush-cache preference. Rebuilding from scratch.");
upToDate = NO;
}
else if ([MyOpenGLView pollShiftKey])
{
OOLog(kOOLogCacheExplicitFlush, @"Cache explicitly flushed with shift key. Rebuilding from scratch.");
OOLog(kOOLogCacheExplicitFlush, @"%@", @"Cache explicitly flushed with shift key. Rebuilding from scratch.");
upToDate = NO;
}
@ -1153,7 +1153,7 @@ static NSMutableDictionary *sStringCache;
if (upToDate && ![oldPaths isEqual:searchPaths])
{
// OXPs added/removed
if (oldPaths != nil) OOLog(kOOLogCacheStalePaths, @"Cache is stale (search paths have changed). Rebuilding from scratch.");
if (oldPaths != nil) OOLog(kOOLogCacheStalePaths, @"%@", @"Cache is stale (search paths have changed). Rebuilding from scratch.");
upToDate = NO;
}
@ -1173,7 +1173,7 @@ static NSMutableDictionary *sStringCache;
if (upToDate && ![[cacheMgr objectForKey:kOOCacheKeyModificationDates inCache:kOOCacheSearchPathModDates] isEqual:modDates])
{
OOLog(kOOLogCacheStaleDates, @"Cache is stale (modification dates have changed). Rebuilding from scratch.");
OOLog(kOOLogCacheStaleDates, @"%@", @"Cache is stale (modification dates have changed). Rebuilding from scratch.");
upToDate = NO;
}
@ -1183,7 +1183,7 @@ static NSMutableDictionary *sStringCache;
[cacheMgr setObject:searchPaths forKey:kOOCacheKeySearchPaths inCache:kOOCacheSearchPathModDates];
[cacheMgr setObject:modDates forKey:kOOCacheKeyModificationDates inCache:kOOCacheSearchPathModDates];
}
else OOLog(kOOLogCacheUpToDate, @"Data cache is up to date.");
else OOLog(kOOLogCacheUpToDate, @"%@", @"Data cache is up to date.");
return upToDate;
}
@ -1632,7 +1632,7 @@ static NSString *LogClassKeyRoot(NSString *key)
+ (OOSystemDescriptionManager *) systemDescriptionManager
{
OOLog(@"resourceManager.planetinfo.load",@"Initialising manager");
OOLog(@"resourceManager.planetinfo.load", @"%@", @"Initialising manager");
OOSystemDescriptionManager *manager = [[OOSystemDescriptionManager alloc] init];
NSString *path = nil;
@ -1673,9 +1673,9 @@ static NSString *LogClassKeyRoot(NSString *key)
}
}
}
OOLog(@"resourceManager.planetinfo.load",@"Caching routes");
OOLog(@"resourceManager.planetinfo.load", @"%@", @"Caching routes");
[manager buildRouteCache];
OOLog(@"resourceManager.planetinfo.load",@"Initialised manager");
OOLog(@"resourceManager.planetinfo.load", @"%@", @"Initialised manager");
return [manager autorelease];
}
@ -1892,7 +1892,7 @@ static NSString *LogClassKeyRoot(NSString *key)
NSString *name = nil;
NSAutoreleasePool *pool = nil;
OOLog(@"script.load.world.begin", @"Loading world scripts...");
OOLog(@"script.load.world.begin", @"%@", @"Loading world scripts...");
loadedScripts = [NSMutableDictionary dictionary];
paths = [ResourceManager paths];
@ -1951,7 +1951,7 @@ static NSString *LogClassKeyRoot(NSString *key)
}
else
{
OOLog(@"script.load.world.listAll", @"*** No world scripts loaded.");
OOLog(@"script.load.world.listAll", @"%@", @"*** No world scripts loaded.");
}
}

View File

@ -283,7 +283,7 @@ static void ReportJSError(JSContext *context, const char *message, JSErrorReport
// if runtime creation failed, end the program here.
if (_runtime == NULL)
{
OOLog(@"script.javaScript.init.error", @"***** FATAL ERROR: failed to create JavaScript runtime.");
OOLog(@"script.javaScript.init.error", @"%@", @"***** FATAL ERROR: failed to create JavaScript runtime.");
exit(1);
}
@ -306,7 +306,7 @@ static void ReportJSError(JSContext *context, const char *message, JSErrorReport
// if context creation failed, end the program here.
if (gOOJSMainThreadContext == NULL)
{
OOLog(@"script.javaScript.init.error", @"***** FATAL ERROR: failed to create JavaScript context.");
OOLog(@"script.javaScript.init.error", @"%@", @"***** FATAL ERROR: failed to create JavaScript context.");
exit(1);
}
@ -334,7 +334,7 @@ static void ReportJSError(JSContext *context, const char *message, JSErrorReport
JS_InitStandardClasses(gOOJSMainThreadContext, _globalObject);
if (![self lookUpStandardClassPointers])
{
OOLog(@"script.javaScript.init.error", @"***** FATAL ERROR: failed to look up standard JavaScript classes.");
OOLog(@"script.javaScript.init.error", @"%@", @"***** FATAL ERROR: failed to look up standard JavaScript classes.");
exit(1);
}
[self registerStandardObjectConverters];
@ -383,7 +383,7 @@ static void ReportJSError(JSContext *context, const char *message, JSErrorReport
JS_EndRequest(gOOJSMainThreadContext);
OOLog(@"script.javaScript.init.success", @"Set up JavaScript context.");
OOLog(@"script.javaScript.init.success", @"%@", @"Set up JavaScript context.");
}
@ -425,12 +425,12 @@ static void ReportJSError(JSContext *context, const char *message, JSErrorReport
static int counter = 3; // loading a savegame with different strict mode calls js reset twice
if (counter-- == 0) {
counter = 3;
OOLog(@"script.javascript.init.error", @"JavaScript processes still pending. Can't reset JavaScript engine.");
OOLog(@"script.javascript.init.error", @"%@", @"JavaScript processes still pending. Can't reset JavaScript engine.");
return NO;
}
else
{
OOLog(@"script.javascript.init", @"JavaScript reset successful.");
OOLog(@"script.javascript.init", @"%@", @"JavaScript reset successful.");
}
#endif
@ -440,12 +440,12 @@ static void ReportJSError(JSContext *context, const char *message, JSErrorReport
if (JS_IsInRequest(gOOJSMainThreadContext))
{
// some threads are still pending, this should mean timers are still being removed.
OOLog(@"script.javascript.init.error", @"JavaScript processes still pending. Can't reset JavaScript engine.");
OOLog(@"script.javascript.init.error", @"%@", @"JavaScript processes still pending. Can't reset JavaScript engine.");
return NO;
}
else
{
OOLog(@"script.javascript.init", @"JavaScript reset successful.");
OOLog(@"script.javascript.init", @"%@", @"JavaScript reset successful.");
}
#endif

View File

@ -255,21 +255,21 @@ static NSString * const kOOLogLoadScriptNone = @"script.load.none";
- (NSString *)name
{
OOLogERR(kOOLogSubclassResponsibility, @"OOScript should not be used directly!");
OOLogERR(kOOLogSubclassResponsibility, @"%@", @"OOScript should not be used directly!");
return nil;
}
- (NSString *)scriptDescription
{
OOLogERR(kOOLogSubclassResponsibility, @"OOScript should not be used directly!");
OOLogERR(kOOLogSubclassResponsibility, @"%@", @"OOScript should not be used directly!");
return nil;
}
- (NSString *)version
{
OOLogERR(kOOLogSubclassResponsibility, @"OOScript should not be used directly!");
OOLogERR(kOOLogSubclassResponsibility, @"%@", @"OOScript should not be used directly!");
return nil;
}
@ -293,7 +293,7 @@ static NSString * const kOOLogLoadScriptNone = @"script.load.none";
- (void)runWithTarget:(Entity *)target
{
OOLogERR(kOOLogSubclassResponsibility, @"OOScript should not be used directly!");
OOLogERR(kOOLogSubclassResponsibility, @"%@", @"OOScript should not be used directly!");
}
@end

View File

@ -845,7 +845,7 @@ static GLfloat docked_light_specular[4] = { DOCKED_ILLUM_LEVEL, DOCKED_ILLUM_LEV
ambientLightLevel = [systeminfo oo_floatForKey:@"ambient_level" defaultValue:1.0];
[self setLighting]; // also sets initial lights positions.
OOLog(kOOLogUniversePopulateWitchspace, @"Populating witchspace ...");
OOLog(kOOLogUniversePopulateWitchspace, @"%@", @"Populating witchspace ...");
OOLogIndentIf(kOOLogUniversePopulateWitchspace);
[self clearSystemPopulator];
@ -1198,7 +1198,7 @@ static GLfloat docked_light_specular[4] = { DOCKED_ILLUM_LEVEL, DOCKED_ILLUM_LEV
a_station = (StationEntity *)[self newShipWithName:@"coriolis-station"];
if (![a_station isStation] || ![a_station validForAddToUniverse])
{
OOLog(@"universe.setup.badStation", @"Could not create built-in Coriolis station! Generating a stationless system.");
OOLog(@"universe.setup.badStation", @"%@", @"Could not create built-in Coriolis station! Generating a stationless system.");
DESTROY(a_station);
}
}
@ -4332,7 +4332,7 @@ static const OOMatrix starboard_matrix =
- (void) drawUniverse
{
OOLog(@"universe.profile.draw",@"Begin draw");
OOLog(@"universe.profile.draw", @"%@", @"Begin draw");
if (!no_update)
{
@try
@ -4502,7 +4502,7 @@ static const OOMatrix starboard_matrix =
OOVerifyOpenGLState();
OOCheckOpenGLErrors(@"Universe after setting up for opaque pass");
OOLog(@"universe.profile.draw",@"Begin opaque pass");
OOLog(@"universe.profile.draw", @"%@", @"Begin opaque pass");
// DRAW ALL THE OPAQUE ENTITIES
@ -4629,7 +4629,7 @@ static const OOMatrix starboard_matrix =
OOGLFrustum(-0.5, 0.5, -aspect*0.5, aspect*0.5, 1.0, MAX_CLEAR_DEPTH);
OOCheckOpenGLErrors(@"Universe after drawing entities");
OOLog(@"universe.profile.draw",@"Begin HUD");
OOLog(@"universe.profile.draw", @"%@", @"Begin HUD");
OOSetOpenGLState(OPENGL_STATE_OVERLAY); // FIXME: should be redundant.
if (EXPECT(!displayGUI))
{
@ -4726,7 +4726,7 @@ static const OOMatrix starboard_matrix =
}
}
}
OOLog(@"universe.profile.draw",@"End drawing");
OOLog(@"universe.profile.draw", @"%@", @"End drawing");
}
@ -5375,7 +5375,7 @@ static BOOL MaintainLinkedLists(Universe *uni)
if (!e1)
{
OOLog(kOOLogParameterError, @"***** No entity set in Universe getSafeVectorFromEntity:toDistance:fromPoint:");
OOLog(kOOLogParameterError, @"%@", @"***** No entity set in Universe getSafeVectorFromEntity:toDistance:fromPoint:");
return kZeroHPVector;
}
@ -6487,7 +6487,7 @@ OOINLINE BOOL EntityInRange(HPVector p1, Entity *e2, float range)
{
volatile OOTimeDelta delta_t = inDeltaT * [self timeAccelerationFactor];
NSUInteger sessionID = _sessionID;
OOLog(@"universe.profile.update",@"Begin update");
OOLog(@"universe.profile.update", @"%@", @"Begin update");
if (EXPECT(!no_update))
{
next_repopulation -= delta_t;
@ -6770,7 +6770,7 @@ OOINLINE BOOL EntityInRange(HPVector p1, Entity *e2, float range)
[self prunePreloadingPlanetMaterials];
#endif
OOLog(@"universe.profile.update",@"Update complete");
OOLog(@"universe.profile.update", @"%@", @"Update complete");
}
@ -7616,7 +7616,7 @@ static void VerifyDesc(NSString *key, id desc)
static BOOL sysdataLocked = NO;
if (sysdataLocked)
{
OOLogERR(@"script.error", @"System properties cannot be set during 'systemInformationChanged' events to avoid infinite loops.");
OOLogERR(@"script.error", @"%@", @"System properties cannot be set during 'systemInformationChanged' events to avoid infinite loops.");
return;
}
@ -9160,14 +9160,14 @@ static OOComparisonResult comparePrice(id dict1, id dict2, void *context)
{
if (!ship)
{
OOLog(kOOLogParameterError, @"***** No ship set in Universe getSunSkimStartPositionForShip:");
OOLog(kOOLogParameterError, @"%@", @"***** No ship set in Universe getSunSkimStartPositionForShip:");
return kZeroHPVector;
}
OOSunEntity* the_sun = [self sun];
// get vector from sun position to ship
if (!the_sun)
{
OOLog(kOOLogInconsistentState, @"***** No sun set in Universe getSunSkimStartPositionForShip:");
OOLog(kOOLogInconsistentState, @"%@", @"***** No sun set in Universe getSunSkimStartPositionForShip:");
return kZeroHPVector;
}
HPVector v0 = the_sun->position;
@ -9190,13 +9190,13 @@ static OOComparisonResult comparePrice(id dict1, id dict2, void *context)
OOSunEntity* the_sun = [self sun];
if (!ship)
{
OOLog(kOOLogParameterError, @"***** No ship set in Universe getSunSkimEndPositionForShip:");
OOLog(kOOLogParameterError, @"%@", @"***** No ship set in Universe getSunSkimEndPositionForShip:");
return kZeroHPVector;
}
// get vector from sun position to ship
if (!the_sun)
{
OOLog(kOOLogInconsistentState, @"***** No sun set in Universe getSunSkimEndPositionForShip:");
OOLog(kOOLogInconsistentState, @"%@", @"***** No sun set in Universe getSunSkimEndPositionForShip:");
return kZeroHPVector;
}
HPVector v0 = the_sun->position;

View File

@ -66,7 +66,7 @@ MA 02110-1301, USA.
}
else
{
OOLog(@"display.mode.list.native.failed", @"SDL_GetWMInfo failed, defaulting to 1024x768 for native size");
OOLog(@"display.mode.list.native.failed", @"%@", @"SDL_GetWMInfo failed, defaulting to 1024x768 for native size");
}
#elif OOLITE_WINDOWS
nativeDisplayWidth = GetSystemMetrics(SM_CXSCREEN);
@ -180,7 +180,7 @@ MA 02110-1301, USA.
// TODO: This code up to and including stickHandler really ought
// not to be in this class.
OOLog(@"sdl.init", @"initialising SDL");
OOLog(@"sdl.init", @"%@", @"initialising SDL");
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) < 0)
{
OOLog(@"sdl.init.failed", @"Unable to init SDL: %s\n", SDL_GetError());
@ -263,7 +263,7 @@ MA 02110-1301, USA.
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
}
OOLog(@"display.mode.list", @"CREATING MODE LIST");
OOLog(@"display.mode.list", @"%@", @"CREATING MODE LIST");
[self populateFullScreenModelist];
currentSize = 0;
@ -275,19 +275,19 @@ MA 02110-1301, USA.
firstScreen= (fullScreen) ? [self modeAsSize: currentSize] : currentWindowSize;
viewSize = firstScreen; // viewSize must be set prior to splash screen initialization
OOLog(@"display.initGL",@"Trying 32-bit depth buffer");
OOLog(@"display.initGL", @"%@", @"Trying 32-bit depth buffer");
[self createSurface];
if (surface == NULL)
{
// Retry with a 24-bit depth buffer
OOLog(@"display.initGL",@"Trying 24-bit depth buffer");
OOLog(@"display.initGL", @"%@", @"Trying 24-bit depth buffer");
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
[self createSurface];
if (surface == NULL)
{
// Still not working? One last go...
// Retry, allowing 16-bit contexts.
OOLog(@"display.initGL",@"Trying 16-bit depth buffer");
OOLog(@"display.initGL", @"%@", @"Trying 16-bit depth buffer");
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
@ -661,7 +661,7 @@ MA 02110-1301, USA.
if (image == NULL)
{
SDL_FreeSurface(image);
OOLogWARN(@"sdl.gameStart", @"image 'splash.bmp' not found!");
OOLogWARN(@"sdl.gameStart", @"%@", @"image 'splash.bmp' not found!");
[self endSplashScreen];
return;
}
@ -729,7 +729,7 @@ MA 02110-1301, USA.
texture_format = GL_BGR;
} else {
SDL_FreeSurface(image);
OOLog(@"Sdl.GameStart", @"----- Encoding error within image 'splash.bmp'");
OOLog(@"Sdl.GameStart", @"%@", @"----- Encoding error within image 'splash.bmp'");
[self endSplashScreen];
return;
}
@ -1173,7 +1173,7 @@ MA 02110-1301, USA.
infoPtr = png_create_info_struct(pngPtr);
if (infoPtr == NULL) {
png_destroy_write_struct(&pngPtr, (png_infopp)NULL);
OOLog(@"pngSaveSurface.info_struct.failed", @"png_create_info_struct error");
OOLog(@"pngSaveSurface.info_struct.failed", @"%@", @"png_create_info_struct error");
exit(-1);
}
@ -2164,13 +2164,13 @@ keys[a] = NO; keys[b] = NO; \
modes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);
if(modes == (SDL_Rect **)NULL)
{
OOLog(@"display.mode.list.none", @"SDL didn't return any screen modes");
OOLog(@"display.mode.list.none", @"%@", @"SDL didn't return any screen modes");
return;
}
if(modes == (SDL_Rect **)-1)
{
OOLog(@"display.mode.list.none", @"SDL claims 'all resolutions available' which is unhelpful in the extreme");
OOLog(@"display.mode.list.none", @"%@", @"SDL claims 'all resolutions available' which is unhelpful in the extreme");
return;
}
@ -2298,7 +2298,7 @@ keys[a] = NO; keys[b] = NO; \
return NSMakeSize([[mode objectForKey: kOODisplayWidth] intValue],
[[mode objectForKey: kOODisplayHeight] intValue]);
}
OOLog(@"display.mode.unknown", @"Screen size unknown!");
OOLog(@"display.mode.unknown", @"%@", @"Screen size unknown!");
return NSMakeSize(800, 600);
}

View File

@ -83,7 +83,7 @@ MA 02110-1301, USA.
rc=YES;
break;
default:
OOLog(@"handleSDLEvent.unknownEvent", @"JoystickHandler was sent an event it doesn't know");
OOLog(@"handleSDLEvent.unknownEvent", @"%@", @"JoystickHandler was sent an event it doesn't know");
}
return rc;
}