Oolite 1.93.0.7767-260207-f2a8cb5
Loading...
Searching...
No Matches
GameController(OOPrivate) Category Reference

Instance Methods

(void) - reportUnhandledStartupException:
(void) - doPerformGameTick

Detailed Description

Definition at line 62 of file GameController.m.

Method Documentation

◆ doPerformGameTick

- (void) doPerformGameTick

Extends class GameController.

Definition at line 346 of file GameController.m.

347{
348 @try
349 {
350 if (gameIsPaused)
351 delta_t = 0.0; // no movement!
352 else
353 {
354 delta_t = [NSDate timeIntervalSinceReferenceDate] - last_timeInterval;
355 last_timeInterval += delta_t;
356 if (delta_t > MINIMUM_GAME_TICK)
357 delta_t = MINIMUM_GAME_TICK; // peg the maximum pause (at 0.5->1.0 seconds) to protect against when the machine sleeps
358 }
359
360 [UNIVERSE update:delta_t];
361 if (EXPECT_NOT([PLAYER status] == STATUS_RESTART_GAME))
362 {
363 [UNIVERSE reinitAndShowDemo:YES];
364 }
365 [OOSound update];
366 if (!gameIsPaused)
367 {
369 }
370 }
371 @catch (id exception)
372 {
373 OOLog(@"exception.backtrace",@"%@",[exception callStackSymbols]);
374 }
375
376 @try
377 {
378 [gameView display];
379 }
380 @catch (id exception) {}
381}
#define MINIMUM_GAME_TICK
#define EXPECT_NOT(x)
void OOJSFrameCallbacksInvoke(OOTimeDelta delta)
#define OOLog(class, format,...)
Definition OOLogging.h:88
#define PLAYER
void update()
Definition OOALSound.m:149

References doPerformGameTick, EXPECT_NOT, MINIMUM_GAME_TICK, OOJSFrameCallbacksInvoke(), OOLog, PLAYER, and OOSound::update.

Referenced by doPerformGameTick, and GameController::performGameTick:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reportUnhandledStartupException:

- (void) reportUnhandledStartupException: (NSException *) exception

Extends class GameController.

Definition at line 931 of file GameController.m.

931 :(NSException *)exception
932{
933 OOLog(@"startup.exception", @"***** Unhandled exception during startup: %@ (%@).", [exception name], [exception reason]);
934
935 #if OOLITE_MAC_OS_X
936 // Display an error alert.
937 // TODO: provide better information on reporting bugs in the manual, and refer to it here.
938 NSRunCriticalAlertPanel(@"Oolite failed to start up, because an unhandled exception occurred.", @"An exception of type %@ occurred. If this problem persists, please file a bug report.", @"OK", NULL, NULL, [exception name]);
939 #endif
940}

References OOLog.

Referenced by GameController::applicationDidFinishLaunching:.

Here is the caller graph for this function:

The documentation for this category was generated from the following file: