Oolite 1.91.0.7644-241112-7f5034b
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 1010 of file GameController.m.

338{
339 @try
340 {
341 if (gameIsPaused)
342 delta_t = 0.0; // no movement!
343 else
344 {
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 {
354 [UNIVERSE reinitAndShowDemo:YES];
355 }
356 [OOSound update];
357 if (!gameIsPaused)
358 {
360 }
361 }
362 @catch (id exception)
363 {
364 OOLog(@"exception.backtrace",@"%@",[exception callStackSymbols]);
365 }
366
367 @try
368 {
369 [gameView display];
370 }
371 @catch (id exception) {}
372}
#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

◆ reportUnhandledStartupException:

- (void) reportUnhandledStartupException: (NSException *) exception

Extends class GameController.

Definition at line 441 of file GameController.m.

922 :(NSException *)exception
923{
924 OOLog(@"startup.exception", @"***** Unhandled exception during startup: %@ (%@).", [exception name], [exception reason]);
925
926 #if OOLITE_MAC_OS_X
927 // Display an error alert.
928 // TODO: provide better information on reporting bugs in the manual, and refer to it here.
929 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]);
930 #endif
931}

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