Oolite
Loading...
Searching...
No Matches
GameController(OOPrivate) Category Reference

Instance Methods

(void) - reportUnhandledStartupException:
(void) - doPerformGameTick

Detailed Description

Definition at line 63 of file GameController.m.

Method Documentation

◆ doPerformGameTick

- (void) doPerformGameTick

Extends class GameController.

Definition at line 339 of file GameController.m.

340{
341 @try {
342 if (gameIsPaused)
343 delta_t = 0.0; // no movement!
344 else {
345 delta_t = [NSDate timeIntervalSinceReferenceDate] - last_timeInterval;
346 last_timeInterval += delta_t;
347 if (delta_t > MINIMUM_GAME_TICK)
348 delta_t = MINIMUM_GAME_TICK; // peg the maximum pause (at 0.5->1.0 seconds) to protect against when the machine sleeps
349 }
350
351 [UNIVERSE update:delta_t];
352 if (EXPECT_NOT([PLAYER status] == STATUS_RESTART_GAME)) {
353 [UNIVERSE reinitAndShowDemo:YES];
354 }
355 [OOSound update];
356 if (!gameIsPaused) {
358 }
359 }
360 @catch (id exception) {
361 OOLog(@"exception.backtrace", @"%@", [exception callStackSymbols]);
362 }
363
364 @
365 try {
366 [gameView updateScreen];
367 }
368 @catch (id exception) {
369 }
370}
#define MINIMUM_GAME_TICK
#define EXPECT_NOT(x)
void OOJSFrameCallbacksInvoke(OOTimeDelta delta)
#define OOLog(class, format,...)
Definition OOLogging.h:84
#define PLAYER
void update()
Definition OOALSound.m:136

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 861 of file GameController.m.

861 :(NSException*)exception
862{
863 OOLog(@"startup.exception", @"***** Unhandled exception during startup: %@ (%@).", [exception name], [exception reason]);
864
865#if OOLITE_MAC_COCOA_UI
866 // Display an error alert.
867 // TODO: provide better information on reporting bugs in the manual, and refer to it here.
868 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]);
869#endif
870}

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: