|
Oolite
|
#include <GameController.h>
Class Methods | |
| (GameController *) | + sharedController |
| (static id) | + GetPreference [implementation] |
| (static void) | + SetPreference [implementation] |
| (static void) | + RemovePreference [implementation] |
Private Attributes | |
| IBOutlet NSTextField * | splashProgressTextField |
| IBOutlet NSView * | splashView |
| IBOutlet NSWindow * | gameWindow |
| IBOutlet PDFView * | helpView |
| IBOutlet NSMenu * | dockMenu |
| IBOutlet MyOpenGLView * | gameView |
| NSTimeInterval | last_timeInterval |
| double | delta_t |
| int | my_mouse_x |
| int | my_mouse_y |
| NSString * | playerFileDirectory |
| NSString * | playerFileToLoad |
| NSMutableArray * | expansionPathsToInclude |
| NSTimer * | timer |
| NSTimeInterval | _animationTimerInterval |
| NSDate * | _splashStart |
| SEL | pauseSelector |
| NSObject * | pauseTarget |
| BOOL | gameIsPaused |
| OOMouseInteractionMode | _mouseMode |
| OOMouseInteractionMode | _resumeMode |
| OOFullScreenController * | _fullScreenController |
Definition at line 47 of file GameController.h.
|
implementation |
Definition at line 539 of file GameController.m.
|
implementation |
Definition at line 738 of file GameController.m.
References expansionPathsToInclude, nil, setPlayerFileDirectory:, and setPlayerFileToLoad:.
| - (void) applicationDidFinishLaunching: | (NSNotification*) | notification |
Definition at line 212 of file GameController.m.
References _splashStart, ResourceManager::addExternalPath:, beginSplashScreen, endSplashScreen, exitAppWithContext:, expansionPathsToInclude, loadPlayerIfRequired, logProgress:, nil, OOLog, reportUnhandledStartupException:, setFullScreenMode:, OOJoystickManager::setStickHandlerClass:, setUpDisplayModes, SetUpSparkle(), OOOXZManager::sharedManager, and startAnimationTimer.
Referenced by main().
|
implementation |
Definition at line 595 of file GameController.m.
References dockMenu.
|
implementation |
Definition at line 766 of file GameController.m.
References OOCacheManager::finishOngoingFlush, OOLoggingTerminate(), and OOCacheManager::sharedCache.
|
implementation |
Definition at line 723 of file GameController.m.
References awakeFromNib, and nil.
Referenced by awakeFromNib.
| - (void) beginSplashScreen |
Definition at line 303 of file GameController.m.
References beginSplashScreen, gameView, MyOpenGLView::init, MyOpenGLView::initSplashScreen, MyOpenGLView::setGameController:, and MyOpenGLView::updateScreen.
Referenced by applicationDidFinishLaunching:, beginSplashScreen, and playerFileDirectory.
|
implementation |
Definition at line 104 of file GameController.m.
References dealloc.
Referenced by dealloc.
| - (NSArray *) displayModes |
Provided by category GameController(FullScreen).
Referenced by PlayerEntity(OOControlsPrivate)::handleGameOptionsScreenKeys, and PlayerEntity::setGuiToGameOptionsScreen.
|
implementation |
Provided by category GameController(OOPrivate).
Definition at line 339 of file GameController.m.
References GameController(OOPrivate)::doPerformGameTick, EXPECT_NOT, MINIMUM_GAME_TICK, OOJSFrameCallbacksInvoke(), OOLog, PLAYER, and OOSound::update.
Referenced by GameController(OOPrivate)::doPerformGameTick, and performGameTick:.
| - (void) endSplashScreen |
Definition at line 703 of file GameController.m.
References endSplashScreen, MyOpenGLView::endSplashScreen, nil, OOLogSetDisplayMessagesInClass(), splashProgressTextField, and splashView.
Referenced by applicationDidFinishLaunching:, endSplashScreen, and playerFileDirectory.
| - (void) exitAppCommandQ |
Definition at line 806 of file GameController.m.
References exitAppCommandQ, and exitAppWithContext:.
Referenced by exitAppCommandQ.
| - (void) exitAppWithContext: | (NSString*) | context |
Definition at line 759 of file GameController.m.
Referenced by applicationDidFinishLaunching:, MyOpenGLView::endSplashScreen, exitAppCommandQ, PlayerEntity(OOControlsPrivate)::pollApplicationControls, and Universe::quitGame.
| - (void) exitFullScreenMode |
Provided by category GameController(FullScreen).
Referenced by PlayerEntity(OOControlsPrivate)::pollApplicationControls.
| - (NSDictionary *) findDisplayModeForWidth: | (unsigned int) | d_width | |
| Height: | (unsigned int) | d_height | |
| Refresh: | (unsigned int) | d_refresh |
Provided by category GameController(FullScreen).
| - (BOOL) finishedLaunching |
Definition at line 286 of file GameController.m.
References finishedLaunching.
Referenced by finishedLaunching.
| - (MyOpenGLView *) gameView |
References gameView.
|
implementation |
Definition at line 416 of file GameController.m.
References nil.
Referenced by snapshotsURLCreatingIfNeeded:.
| - (NSUInteger) indexOfCurrentDisplayMode |
Provided by category GameController(FullScreen).
Referenced by PlayerEntity(OOControlsPrivate)::handleGameOptionsScreenKeys, and PlayerEntity::setGuiToGameOptionsScreen.
| - (BOOL) inFullScreenMode |
Provided by category GameController(FullScreen).
Referenced by Universe::gameSettings, PlayerEntity(OOControlsPrivate)::pollApplicationControls, and setMouseInteractionMode:.
|
implementation |
Definition at line 81 of file GameController.m.
References _animationTimerInterval, _splashStart, delta_t, init, last_timeInterval, nil, ranrot_srand(), and sSharedController.
Referenced by init.
|
implementation |
Definition at line 533 of file GameController.m.
| - (BOOL) isGamePaused |
Definition at line 121 of file GameController.m.
References gameIsPaused, and isGamePaused.
Referenced by isGamePaused, and Universe::setViewDirection:.
| - (void) loadPlayerIfRequired |
Definition at line 291 of file GameController.m.
References loadPlayerIfRequired, logProgress:, nil, and playerFileToLoad.
Referenced by applicationDidFinishLaunching:, Universe::handleGameOver, loadPlayerIfRequired, and playerFileDirectory.
| - (void) logProgress: | (NSString*) | message |
Definition at line 620 of file GameController.m.
References _splashStart, OOLog, and UNIVERSE.
Referenced by applicationDidFinishLaunching:, Universe::initWithGameView:, loadPlayerIfRequired, NoteVerificationStage(), PlayerEntity::setUpAndConfirmOK:saveGame:, and Universe::setUpSpace.
| - (OOMouseInteractionMode) mouseInteractionMode |
Definition at line 165 of file GameController.m.
References _mouseMode, and mouseInteractionMode.
Referenced by mouseInteractionMode, and setGamePaused:.
|
implementation |
Definition at line 555 of file GameController.m.
Referenced by showAddOnsAction:.
| - (void) pauseFullScreenModeToPerform: | (SEL) | selector | |
| onTarget: | (id) | target |
Provided by category GameController(FullScreen).
Referenced by PlayerEntity(OOControlsPrivate)::pollApplicationControls, and PlayerEntity(OOControlsPrivate)::pollGuiArrowKeyControls:.
| - (void) performGameTick: | (id) | sender |
Definition at line 319 of file GameController.m.
References doPerformGameTick, and MyOpenGLView::pollControls.
| - (NSString *) playerFileDirectory |
References beginSplashScreen, endSplashScreen, loadPlayerIfRequired, playerFileDirectory, startAnimationTimer, and stopAnimationTimer.
| - (NSString *) playerFileToLoad |
References playerFileToLoad.
| - (void) recenterVirtualJoystick |
Definition at line 398 of file GameController.m.
References my_mouse_x, my_mouse_y, and recenterVirtualJoystick.
Referenced by recenterVirtualJoystick.
|
implementation |
Definition at line 430 of file GameController.m.
Referenced by snapshotsURLCreatingIfNeeded:.
|
implementation |
Provided by category GameController(OOPrivate).
Definition at line 861 of file GameController.m.
References OOLog.
Referenced by applicationDidFinishLaunching:.
| - (BOOL) setDisplayWidth: | (unsigned int) | d_width | |
| Height: | (unsigned int) | d_height | |
| Refresh: | (unsigned int) | d_refresh |
Provided by category GameController(FullScreen).
Referenced by PlayerEntity(OOControlsPrivate)::handleGameOptionsScreenKeys.
| - (void) setEcoQoS: | (BOOL) | efficiencyModeRequested |
Definition at line 142 of file GameController.m.
References EXPECT_NOT, and OOLog.
Referenced by setGamePaused:.
| - (void) setFullScreenMode: | (BOOL) | value |
Provided by category GameController(FullScreen).
Referenced by applicationDidFinishLaunching:.
| - (void) setGamePaused: | (BOOL) | value |
Definition at line 126 of file GameController.m.
References _resumeMode, gameIsPaused, mouseInteractionMode, setEcoQoS:, setMouseInteractionMode:, and setMouseInteractionModeForUIWithMouseInteraction:.
Referenced by Universe::handleOoliteException:, Universe::pauseGame, PlayerEntity(OOControlsPrivate)::pollApplicationControls, PlayerEntity(OOControlsPrivate)::pollDockedControls:, Universe::reinitAndShowDemo:, StationDockPlayer(), and StationDockPlayer().
| - (void) setGameView: | (MyOpenGLView*) | view |
Definition at line 204 of file GameController.m.
References gameView, and MyOpenGLView::setGameController:.
| - (void) setMouseInteractionMode: | (OOMouseInteractionMode) | mode |
Definition at line 170 of file GameController.m.
References _mouseMode, gameView, inFullScreenMode, MyOpenGLView::noteMouseInteractionModeChangedFrom:to:, OOFullScreenController::noteMouseInteractionModeChangedFrom:to:, OOLog, and OOStringFromMouseInteractionMode().
Referenced by setGamePaused:.
| - (void) setMouseInteractionModeForFlight |
Definition at line 189 of file GameController.m.
References setMouseInteractionModeForFlight.
Referenced by PlayerEntity(OOControlsPrivate)::pollApplicationControls, setMouseInteractionModeForFlight, and Universe::setViewDirection:.
| - (void) setMouseInteractionModeForUIWithMouseInteraction: | (BOOL) | interaction |
Definition at line 194 of file GameController.m.
Referenced by Universe::enterGUIViewModeWithMouseInteraction:, Universe::reinitAndShowDemo:, setGamePaused:, and Universe::setViewDirection:.
| - (void) setPlayerFileDirectory: | (NSString*) | filename |
Definition at line 846 of file GameController.m.
References nil, and playerFileDirectory.
Referenced by application:openFile:.
| - (void) setPlayerFileToLoad: | (NSString*) | filename |
Definition at line 821 of file GameController.m.
References nil, and playerFileToLoad.
Referenced by application:openFile:, main(), and Universe::reinitAndShowDemo:.
|
implementation |
Definition at line 425 of file GameController.m.
Referenced by snapshotsURLCreatingIfNeeded:.
| - (void) setUpDisplayModes |
Provided by category GameController(FullScreen).
Referenced by applicationDidFinishLaunching:.
| + (GameController *) sharedController |
Definition at line 73 of file GameController.m.
References nil, sharedController, and sSharedController.
Referenced by Universe::initWithGameView:, NoteVerificationStage(), PlayerEntity::setUpAndConfirmOK:saveGame:, Universe::setUpSpace, and sharedController.
| - (IBAction) showAddOnsAction: | (id) | sender |
Definition at line 505 of file GameController.m.
References openPath:, and ResourceManager::userRootPaths.
| - (IBAction) showLogAction: | (id) | sender |
Definition at line 405 of file GameController.m.
| - (IBAction) showLogFolderAction: | (id) | sender |
Definition at line 410 of file GameController.m.
| - (IBAction) showSnapshotsAction: | (id) | sender |
Definition at line 500 of file GameController.m.
References snapshotsURLCreatingIfNeeded:.
| - (NSURL *) snapshotsURLCreatingIfNeeded: | (BOOL) | create |
Definition at line 438 of file GameController.m.
References count, DESC, GetPreference, kSnapshotsDirNameKey, kSnapshotsDirRefKey, nil, RemovePreference, and SetPreference.
Referenced by showSnapshotsAction:.
| - (void) startAnimationTimer |
Definition at line 372 of file GameController.m.
References _animationTimerInterval, nil, startAnimationTimer, and timer.
Referenced by applicationDidFinishLaunching:, playerFileDirectory, PlayerEntity::setUpAndConfirmOK:saveGame:, and startAnimationTimer.
| - (void) stopAnimationTimer |
Definition at line 387 of file GameController.m.
References nil, stopAnimationTimer, and timer.
Referenced by playerFileDirectory, PlayerEntity::setUpAndConfirmOK:saveGame:, and stopAnimationTimer.
|
implementation |
Definition at line 876 of file GameController.m.
References pauseSelector, pauseTarget, and suppressClangStuff.
Referenced by suppressClangStuff.
| - (IBAction) toggleFullScreenAction: | (id) | sender |
Provided by category GameController(FullScreen).
|
implementation |
Definition at line 560 of file GameController.m.
References _fullScreenController, nil, OOLogHandlerGetLogBasePath(), and ResourceManager::useAddOns.
| - (void) windowDidResize: | (NSNotification*) | aNotification |
Definition at line 811 of file GameController.m.
References MyOpenGLView::updateScreen.
|
private |
Definition at line 69 of file GameController.h.
Referenced by init, and startAnimationTimer.
|
private |
Definition at line 83 of file GameController.h.
Referenced by validateMenuItem:.
|
private |
Definition at line 78 of file GameController.h.
Referenced by mouseInteractionMode, and setMouseInteractionMode:.
|
private |
Definition at line 79 of file GameController.h.
Referenced by setGamePaused:.
|
private |
Definition at line 71 of file GameController.h.
Referenced by applicationDidFinishLaunching:, init, and logProgress:.
|
private |
Definition at line 60 of file GameController.h.
Referenced by init.
|
private |
Definition at line 54 of file GameController.h.
Referenced by applicationDockMenu:.
|
private |
Definition at line 66 of file GameController.h.
Referenced by application:openFile:, and applicationDidFinishLaunching:.
|
private |
Definition at line 76 of file GameController.h.
Referenced by isGamePaused, and setGamePaused:.
|
private |
Definition at line 199 of file GameController.m.
Referenced by beginSplashScreen, gameView, setGameView:, and setMouseInteractionMode:.
|
private |
Definition at line 52 of file GameController.h.
|
private |
Definition at line 53 of file GameController.h.
|
private |
Definition at line 59 of file GameController.h.
Referenced by init.
|
private |
Definition at line 62 of file GameController.h.
Referenced by recenterVirtualJoystick.
|
private |
Definition at line 62 of file GameController.h.
Referenced by recenterVirtualJoystick.
|
private |
Definition at line 73 of file GameController.h.
Referenced by suppressClangStuff.
|
private |
Definition at line 74 of file GameController.h.
Referenced by suppressClangStuff.
|
private |
Definition at line 830 of file GameController.m.
Referenced by playerFileDirectory, and setPlayerFileDirectory:.
|
private |
Definition at line 816 of file GameController.m.
Referenced by loadPlayerIfRequired, playerFileToLoad, PlayerEntity(LoadSave)::quicksavePlayer, PlayerEntity::setGuiToLoadSaveScreen, and setPlayerFileToLoad:.
|
private |
Definition at line 50 of file GameController.h.
Referenced by endSplashScreen.
|
private |
Definition at line 51 of file GameController.h.
Referenced by endSplashScreen.
|
private |
Definition at line 68 of file GameController.h.
Referenced by startAnimationTimer, and stopAnimationTimer.