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

376{
377 @try
378 {
379 if (gameIsPaused)
380 delta_t = 0.0; // no movement!
381 else
382 {
383 delta_t = [NSDate timeIntervalSinceReferenceDate] - last_timeInterval;
384 last_timeInterval += delta_t;
385 if (delta_t > MINIMUM_GAME_TICK)
386 delta_t = MINIMUM_GAME_TICK; // peg the maximum pause (at 0.5->1.0 seconds) to protect against when the machine sleeps
387 }
388
389 [UNIVERSE update:delta_t];
390 if (EXPECT_NOT([PLAYER status] == STATUS_RESTART_GAME))
391 {
392 [UNIVERSE reinitAndShowDemo:YES];
393 }
394 [OOSound update];
395 if (!gameIsPaused)
396 {
398 }
399 }
400 @catch (id exception)
401 {
402 OOLog(@"exception.backtrace",@"%@",[exception callStackSymbols]);
403 }
404
405 @try
406 {
407 [gameView display];
408 }
409 @catch (id exception) {}
410}
#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 479 of file GameController.m.

960 :(NSException *)exception
961{
962 OOLog(@"startup.exception", @"***** Unhandled exception during startup: %@ (%@).", [exception name], [exception reason]);
963
964 #if OOLITE_MAC_OS_X
965 // Display an error alert.
966 // TODO: provide better information on reporting bugs in the manual, and refer to it here.
967 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]);
968 #endif
969}

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