Base class for video game application. More...
Public Types | |
typedef uint_t(*) | MainWindowProc(GameApp *pThis, HWND__ *hWnd, uint_t uMessage, uintptr_t wParam, uintptr_t lParam, uintptr_t *pOutput) |
Callback custom window message handler. | |
Public Member Functions | |
const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept override |
Get the description to the class. | |
GameApp (uintptr_t uDefaultMemorySize=Burger::MemoryManagerHandle::kSystemMemoryChuckSize, uint_t uDefaultHandleCount=Burger::MemoryManagerHandle::kDefaultHandleCount, uintptr_t uMinReserveSize=Burger::MemoryManagerHandle::kSystemMemoryReservedSize) noexcept | |
Create an instance of a GameApp. | |
virtual | ~GameApp () |
Base destructor for a GameApp. | |
void | Poll (void) noexcept |
Perform cooperative multitasking. | |
void | AddRoutine (RunQueue::CallbackProc Proc, RunQueue::CallbackProc pShutdown, void *pData, uint_t uPriority=RunQueue::PRIORITY_MEDIUM) noexcept |
Add a RunQueue polling routine. | |
void | RemoveRoutine (RunQueue::CallbackProc Proc, void *pData) noexcept |
Remove a RunQueue polling routine. | |
RunQueue * | GetRunQueue (void) noexcept |
Get the pointer to the RunQueue. | |
Keyboard * | StartupKeyboard (void) noexcept |
Create an instance of the Keyboard manager. | |
Mouse * | StartupMouse (void) noexcept |
Create an instance of the Mouse manager. | |
Joypad * | StartupJoypad (void) noexcept |
Create an instance of the Joypad manager. | |
Display * | StartupDisplay (void) noexcept |
Create an instance of the Display manager. | |
SoundManager * | StartupSoundManager (void) noexcept |
Create an instance of the SoundManager. | |
uint_t | StartupEverything (void) noexcept |
Create instances of all default classes for a game. | |
MemoryManagerGlobalHandle * | GetMemoryManager (void) noexcept |
Get the pointer to the MemoryManagerGlobalHandle. | |
void | SetArgv (const char **ppArgv) noexcept |
Set the current argv parameter. | |
const char ** | GetArgv (void) const noexcept |
Get the current argv parameter. | |
void | SetArgc (int iArgc) noexcept |
Set the current argc parameter. | |
int | GetArgc (void) const noexcept |
Get the current argc parameter. | |
void | SetQuitCode (void) noexcept |
Alert the application to shut down. | |
void | ClearQuitCode (void) noexcept |
Cancel an application shutdown. | |
uint_t | GetQuitCode (void) const noexcept |
Get the current return code. | |
void | SetInBackground (uint_t bInBackground) noexcept |
Set the state if app should go into pause mode. | |
uint_t | IsInBackground (void) const noexcept |
Detect if the app is should go into pause mode. | |
void | SetKeyboard (Keyboard *pKeyboard) noexcept |
Set the pointer to the current Keyboard class instance. | |
Keyboard * | GetKeyboard (void) const noexcept |
Get the current Keyboard class instance. | |
void | SetMouse (Mouse *pMouse) noexcept |
Set the pointer to the current Mouse class instance. | |
Mouse * | GetMouse (void) const noexcept |
Get the current Mouse class instance. | |
void | SetJoypad (Joypad *pJoypad) noexcept |
Set the pointer to the current Joypad class instance. | |
Joypad * | GetJoypad (void) const noexcept |
Get the current Joypad class instance. | |
void | SetSoundManager (SoundManager *pSoundManager) noexcept |
Set the pointer to the current SoundManager class instance. | |
SoundManager * | GetSoundManager (void) const noexcept |
Get the current SoundManager class instance. | |
void | SetDisplay (Display *pDisplay) noexcept |
Set the pointer to the current Display class instance. | |
Display * | GetDisplay (void) const noexcept |
Get the current Display class instance. | |
void | SetWindowSwitching (uint_t bAllowWindowSwitching) noexcept |
Enable the Alt-Enter key. | |
uint_t | IsWindowSwitchingAllowed (void) const noexcept |
Get the flag for video mode switching. | |
uint_t | SwitchVideo (void) noexcept |
Switch from full screen to windowed mode and back again. | |
uint_t | IsMinimized (void) const noexcept |
Return TRUE if the application is in the background or minimized. | |
void | SetMinimized (uint_t bMinimized) noexcept |
Sets the application flag for being in the background or minimized. | |
uint_t | IsAppFullScreen (void) const noexcept |
Return TRUE if the application is in full screen mode. | |
uint_t | IsResizingAllowed (void) const noexcept |
Return TRUE if the application can be resized at runtime. | |
void | SetMouseOnScreen (uint_t bMouseOnScreen) noexcept |
Sets the application flag if a mouse cursor is on the game screen. | |
uint_t | IsMouseOnScreen (void) const noexcept |
Return TRUE if the mouse cursor is on the game screen. | |
void | SetWindowSwitchRequested (uint_t bWindowSwitchRequested) noexcept |
Sets the application flag to toggle between full screen and window mode. | |
uint_t | IsWindowSwitchRequested (void) const noexcept |
Return TRUE if there is a pending video mode switch. | |
HINSTANCE__ * | GetInstance (void) const noexcept |
Get the HINSTANCE of the running application. | |
HWND__ * | GetWindow (void) const noexcept |
Return the main application window. | |
HMENU__ * | GetMenu (void) const noexcept |
Get the HMENU of the running application. | |
void | SetMenu (HMENU__ *hMenu) noexcept |
Set the HMENU of the running application. | |
MainWindowProc | GetCallBack (void) const noexcept |
Get the pointer to the window callback. | |
uint_t | GetInSizeMove (void) const noexcept |
Return TRUE if the window is resizing. | |
void | SetInSizeMove (uint_t bInSizeMode) noexcept |
Set or clear the resizing window flag. | |
int | InitWindow (const char *pGameName, MainWindowProc pCallBack, uint_t uIconResID=0) noexcept |
Create an application's default window. | |
int | SetWindowSize (uint_t uWidth, uint_t uHeight) noexcept |
Change the size of the application window. | |
int | SetWindowFullScreen (uint_t uWidth, uint_t uHeight) noexcept |
Prepare an application window for full screen mode. | |
void | ResetWindowLocation (void) noexcept |
Purge the cached window location. | |
void | RecordWindowLocation (void) noexcept |
Save the current window location. | |
uint_t | HandleCursor (uint_t uParam) noexcept |
Handle cursor updates. | |
void | GetInputFocus (void) noexcept |
Obtain DirectInput focus (Windows only) | |
void | KillInputFocus (void) noexcept |
Release DirectInput focus (Windows only) | |
int | Run (void) noexcept |
Set up iOS and call CodeEntry() | |
UIWindow * | CreateWindow (void) noexcept |
Create the main application window. | |
void | ReleaseWindow (void) noexcept |
Dispose of the window. | |
void | SetViewController (UIViewController *pViewController, UIView *pView) noexcept |
Set the main window's UIView and UIViewController. | |
UIWindow * | GetWindow (void) const noexcept |
UIViewController * | GetViewController (void) const noexcept |
Return the main application window controller. | |
UIView * | GetView (void) const noexcept |
Return the main application window view. | |
void | FocusWindow (void) noexcept |
Handle NSApplicationDidBecomeActiveNotification. | |
uint_t | SetWindowSize (uint_t uWidth, uint_t uHeight) noexcept |
NSApplication * | GetApplication (void) const noexcept |
NSApplicationDelegate * | GetDelegate (void) const noexcept |
NSWindow * | GetWindow (void) const noexcept |
Public Member Functions inherited from Burger::Base | |
const char * | get_class_name (void) const noexcept |
Get the name of the class. | |
virtual | ~Base () noexcept=default |
Destructor. | |
Static Public Member Functions | |
static RunQueue::eReturnCode | Poll (void *pSelf) noexcept |
Process Windows events. | |
static GameApp * | GetApp (void) noexcept |
Return the pointer to the global application instance. | |
static RunQueue::eReturnCode | Poll (void *pSelf) noexcept |
Static Public Attributes | |
static const Burger::StaticRTTI | g_StaticRTTI |
Static Public Attributes inherited from Burger::Base | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Protected Member Functions | |
void | InitDefaults (void) noexcept |
Initialize shared variables. | |
void | ShutdownDefaults (void) noexcept |
Release shared variables. | |
Static Protected Member Functions | |
static RunQueue::eReturnCode | EventPoll (void *pData) noexcept |
MacOSX event handler. | |
Protected Attributes | |
Keyboard * | m_pKeyboard |
Pointer to the active keyboard instance. | |
Mouse * | m_pMouse |
Pointer to the active mouse instance. | |
Joypad * | m_pJoypad |
Pointer to the active joypad instance. | |
SoundManager * | m_pSoundManager |
Pointer to the active sound manager instance. | |
Display * | m_pDisplay |
Pointer to the active display instance. | |
const char ** | m_ppArgv |
Arguments passed to the console. | |
MemoryManagerGlobalHandle | m_MemoryManagerHandle |
Handle based memory manager for the app. | |
RunQueue | m_RunQueue |
Internal run queue. | |
HINSTANCE__ * | m_hInstance |
(Windows only) Current instance of the application | |
HWND__ * | m_hWindow |
(Windows only) Main window for the application | |
HMENU__ * | m_hMenu |
(Windows only) Menu bar for the application | |
HICON__ * | m_pDefaultCursor |
(Windows only) Default cursor when not in the game area | |
const char ** | m_ppOldArgv |
(Windows only) Saved pointer to the global __argv for restoring on exit | |
MainWindowProc | m_pCallBack |
(Windows only) Custom application window proc | |
Rect_t | m_WindowRect |
(Windows only) Bounds rect of the window | |
uint_t | m_uErrorMode |
(Windows only) Initial GetErrorMode() value | |
uint8_t | m_bCoCreateInstanceInit |
(Windows only) TRUE if CoInitializeEx() was initialized | |
uint8_t | m_bInSizeMove |
(Windows only) TRUE if the window is being resized | |
UIWindow * | m_pWindow |
(iOS only) Pointer to the UIWindow for the iOS application | |
UIViewController * | m_pViewController |
(iOS only) Pointer to the UIViewController to the window | |
UIView * | m_pView |
(iOS only) Pointer to the UIView being used | |
NSApplication * | m_pApplication |
Pointer to the current application context (Copy of NSApp) | |
NSApplicationDelegate * | m_pApplicationDelegate |
Pointer to the current application delegate. | |
NSWindow * | m_pWindow |
Game window. | |
NSResponder * | m_pListener |
Main listener for window events. | |
uint_t | m_bCenterWindow |
TRUE if the window needs to be centered | |
int | m_iArgc |
Number of valid arguments. | |
uint8_t | m_bQuit |
Set to TRUE when the application has to shut down. | |
uint8_t | m_bInBackground |
Set to TRUE if the game should be paused due to another window being in front. | |
uint8_t | m_bMinimized |
Set to TRUE if the game is minimized (PC/Mac only, always false on consoles) | |
uint8_t | m_bAllowWindowSwitching |
uint8_t | m_bMouseOnScreen |
TRUE if the mouse cursor is on the screen in windows systems | |
uint8_t | m_bWindowSwitchRequested |
TRUE if the window resolution switch key was pressed | |
uint8_t | m_bKeyboardStarted |
TRUE if a Keyboard class was started with a call to StartupKeyboard(void) | |
uint8_t | m_bMouseStarted |
TRUE if a Mouse class was started with a call to StartupMouse(void) | |
uint8_t | m_bJoypadStarted |
TRUE if a Joypad class was started with a call to StartupJoypad(void) | |
uint8_t | m_bDisplayStarted |
TRUE if a Display class was started with a call to StartupDisplay(void) | |
uint8_t | m_bSoundManagerStarted |
TRUE if a SoundManager class was started with a call to StartupSoundManager(void) | |
Static Protected Attributes | |
static GameApp * | g_piOSApp |
(iOS only) Global singular application instance | |
Private Member Functions | |
GameApp (const GameApp &)=delete | |
GameApp & | operator= (const GameApp &)=delete |
GameApp (GameApp &&)=delete | |
GameApp & | operator= (GameApp &&)=delete |
Base class for video game application.
This class contains the startup code for creating an environment for creating all of the needed subclasses for the operation of a video game. It auto links to instances of the Keyboard, Joypad, Mouse, Sound, Renderer and Display classes so other classes only need to have a GameApp pointer to be able to detect their presence.
A RunQueue is part of this class so background tasks can be executed from the main thread from time to time for background servicing
uint_t( *) Burger::GameApp::MainWindowProc(GameApp *pThis, HWND__ *hWnd, uint_t uMessage, uintptr_t wParam, uintptr_t lParam, uintptr_t *pOutput) |
Callback custom window message handler.
|
privatedelete |
|
privatedelete |
|
noexcept |
Create an instance of a GameApp.
Base constructor.
Upon startup, a handle based memory manager is instantiated and used for all future memory allocations. Variables are passed for setting the amount of memory the application could manage.
This class is a base class. A system specific class will derive from this one which will contain system specific operating system calls and variables.
uDefaultMemorySize | Default memory block to manager for the handle based memory manager |
uDefaultHandleCount | Default number of handles to create on startup. |
uMinReserveSize | Default amount of memory to NOT allocate and leave in the hands of the operating system |
When a Windows app is spawned using WinMain(), it is given the application instance. This parm are cached inside of this base class so the member functions can handle automatic parameter passing and decoding. The return code is initialized to zero.
|
virtual |
|
inlinenoexcept |
Add a RunQueue polling routine.
Given a proc pointer and a pointer to data to pass to the proc pointer, add this to the list of procedures that are called with each call to Poll(). The pointer pData is not used by the polling manager itself. Only the polling proc uses the pointer for it's internal use.
Proc | Pointer to a function of type RunQueue::CallbackProc |
pShutdown | Pointer to a function to call when this is deleted, can be NULL |
pData | Pointer that is passed to the Proc upon calling. Otherwise, it's not used by Burger::GameApp. |
uPriority | Priority value to use to determine the location of this new entry in the linked list. |
|
inlinenoexcept |
Cancel an application shutdown.
If an application decides to cancel a shutdown (User chooses to return to the application instead of quitting), call this function to clear the flag. The application will return to executing the main loop.
|
noexcept |
Create the main application window.
iOS applications have a single master window that covers the entire screen. This function will create the window
|
staticprotectednoexcept |
|
noexcept |
Handle NSApplicationDidBecomeActiveNotification.
When a NSApplicationDidBecomeActiveNotification is passed to this application, this function is called to hide or show the game window
|
overridevirtualnoexcept |
Get the description to the class.
This virtual function will pull the pointer to the StaticRTTI instance that has the name of the class. Due to it being virtual, it will be the name of the most derived class.
Reimplemented from Burger::Base.
|
inlinestaticnoexcept |
Return the pointer to the global application instance.
iOS applications only exist in a single instance, to simplify internal code, the instance is reflected in a singleton and the pointer to it is stored in a global which is accessed through this function.
|
inlinenoexcept |
|
inlinenoexcept |
Get the current argc parameter.
Accessor to get the current argc input value passed to main().
|
inlinenoexcept |
Get the current argv parameter.
Accessor to get the current argv input value passed to main().
|
inlinenoexcept |
Get the pointer to the window callback.
The main application window has a callback function to handle most functions automatically. A user supplied callback is used or augment or override default behavior. This function returns the pointer to the user supplied callback function.
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
inlinenoexcept |
Return TRUE if the window is resizing.
|
inlinenoexcept |
Get the HINSTANCE of the running application.
When started, an HINSTANCE is assigned to an application and this value is used for some Windows specific function.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Get the pointer to the MemoryManagerGlobalHandle.
Accessor to get the MemoryManagerGlobalHandle associated with the application.
|
inlinenoexcept |
Get the HMENU of the running application.
Return the HMENU that's attached to the window
|
inlinenoexcept |
|
inlinenoexcept |
Get the current return code.
Accessor to get the current return code that main() would give back to the operating system if the application exited immediately.
|
inlinenoexcept |
Get the pointer to the RunQueue.
Accessor to get the RunQueue associated with the application.
|
inlinenoexcept |
Get the current SoundManager class instance.
|
inlinenoexcept |
Return the main application window view.
iOS application windows can have an attached window view, this is the currently active view pointer
|
inlinenoexcept |
Return the main application window controller.
iOS application windows can have an attached window controller, this is the currently active controller pointer
|
inlinenoexcept |
Return the main application window.
Get the HWND of the running application.
iOS applications have a single master window that covers the entire screen. This function will return the pointer to that window
When started, a window is created and attached to an application and this is the reference to the global window instance. It is used extensively by the rendering sub-systems.
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
Handle cursor updates.
When the mouse moves in windowed mode, a WM_CURSOR event is triggered an the window needs to respond by changing the mouse cursor if needed.
If the game has enabled a hardware cursor, it will be enabled if the cursor is hovering over the client area, otherwise, it will be hidden or enabled to whatever cursor is needed for the borders of the window.
The application doesn't call this function. The WindowsApp class will handle it in the default window processing function.
uParam | The passed "lparam" for a WM_CURSOR event. |
|
protectednoexcept |
Initialize shared variables.
For variables that are present on all platforms, this function will clear them.
|
noexcept |
Create an application's default window.
Windows requires a window object to be created by the application to send and receive system events including sound and visual focus. Create this window and set internal variables so the Windows version of Burgerlib can function
pGameName | Pointer to a UTF-8 "C" string of the string to attach to the top of the game window |
pCallBack | Pointer to a user supplied callback function for Windows (NULL if no user supplied pointer is present) |
uIconResID | Numeric ID of the Windows Icon to attach to the window that's in the EXE files resource data (0 to use the default application icon from Windows) |
|
noexcept |
Return TRUE if the application is in full screen mode.
|
inlinenoexcept |
Detect if the app is should go into pause mode.
On many platforms, applications can be put in the background either through OS or user events from an external source. This flag is set and cleared by Burgerlib when the app is in the background or foreground.
If the game is in progress and this flag is set, force the game to pause and wait for direct user input before resuming.
|
inlinenoexcept |
Return TRUE if the application is in the background or minimized.
Determine if the state of the application is for it to be minimized and not drawing anything.
|
inlinenoexcept |
Return TRUE if the mouse cursor is on the game screen.
Return if a game drawn mouse cursor should be drawn. Do not draw if this flag is FALSE because it means that the mouse cursor is somewhere else on the desktop.
|
noexcept |
Return TRUE if the application can be resized at runtime.
|
inlinenoexcept |
|
inlinenoexcept |
Return TRUE if there is a pending video mode switch.
The key command ALT-Enter can be issued by another thread, so to ensure the mode switch is done properly, this flag is set to alert the main thread that a full screen to window or vice versa mode switch is desired.
|
noexcept |
|
staticnoexcept |
Process Windows events.
Internal function that will call PeekMessage(), TranslateMessage() and DispatchMessage() to handle messages sent to the app
pSelf | "this" pointer to the WindowsApp class |
|
staticnoexcept |
|
inlinenoexcept |
Perform cooperative multitasking.
Some systems only have one CPU, others require background tasks running in the primary thread. To handle these cases, all callbacks are logged in the GameApp via calls to AddRoutine() and RemoveRoutine().
Since this background task can be called as often as possible, write any and all callbacks to do as little work as possible to prevent any sort of performance degradation.
|
noexcept |
Save the current window location.
When changing video display modes, it's prudent to save off the location of the application window so if the application switches to full screen mode, it can later revert to a windowed mode with the window in its previous location. This function records the current location of the window for later restoration.
|
noexcept |
Dispose of the window.
Release the UIWindow used by the iOS application
|
inlinenoexcept |
Remove a RunQueue polling routine.
Given a proc pointer and a pointer to data to pass to the proc pointer, search the proc list and if a match is found, remove the proc from the list.
Proc | Pointer to a function of type RunQueue::CallbackProc |
pData | Pointer that is passed to the Proc upon calling. Not used by the input manager. |
|
noexcept |
Purge the cached window location.
When calling SetWindowSize(), it will center the window in the middle of the screen on the first call and then use the last known origin location on all subsequent calls so if the user moves the window, the location of the window won't be lost on toggling from full screen to window mode. If the window needs to be re-centered, call this function to purge the cache.
|
noexcept |
Set up iOS and call CodeEntry()
Sets up an iOS application shell and calls CodeEntry()
|
inlinenoexcept |
Set the current argc parameter.
Override the argc input value passed to main().
iArgc | New number of parameters present (Can be zero) |
|
inlinenoexcept |
Set the current argv parameter.
Override the argv input value passed to main().
ppArgv | NULL or pointer to an array of char pointers of command line parameters. |
|
noexcept |
Set the pointer to the current Display class instance.
Sets the pointer to the active Display instance
pDisplay | Pointer to an active Display instance or NULL to disable the connection or delete the instance allocated by StartupDisplay(void) |
|
inlinenoexcept |
Set the state if app should go into pause mode.
On many platforms, applications can be put in the background either through OS or user events from an external source. This flag is set and cleared by Burgerlib when the app is in the background or foreground.
If the game is in progress and this flag is set, force the game to pause and wait for direct user input before resuming.
bInBackground | TRUE if the application is in the background |
|
inlinenoexcept |
Set or clear the resizing window flag.
|
noexcept |
Set the pointer to the current Joypad class instance.
Sets the pointer to the active Joypad instance
pJoypad | Pointer to an active Joypad instance or NULL to disable the connection or delete the instance allocated by StartupJoypad(void) |
|
noexcept |
Set the pointer to the current Keyboard class instance.
Sets the pointer to the active Keyboard instance
pKeyboard | Pointer to an active Keyboard instance or NULL to disable the connection or delete the instance allocated by StartupKeyboard(void) |
|
inlinenoexcept |
Set the HMENU of the running application.
hMenu | The application's new HMENU |
|
inlinenoexcept |
|
noexcept |
Set the pointer to the current Mouse class instance.
Sets the pointer to the active Mouse instance
pMouse | Pointer to an active Mouse instance or NULL to disable the connection or delete the instance allocated by StartupMouse(void) |
|
inlinenoexcept |
|
inlinenoexcept |
Alert the application to shut down.
Set a flag so that at the end of the update/draw loop, the application can exit cleanly.
|
noexcept |
Set the pointer to the current SoundManager class instance.
Sets the pointer to the active SoundManager instance
pSetSoundManager | Pointer to an active SoundManager instance or NULL to disable the connection or delete the instance allocated by StartupSoundManager(void) |
|
noexcept |
Set the main window's UIView and UIViewController.
iOS applications have a single master window that covers the entire screen. This function will attach (If different) a UIViewController and / or UIView to it.
pViewController | Pointer to a UIViewController or NULL to detach any previous controller |
pView | Pointer to a UIView or NULL to detach any previous view |
|
noexcept |
Prepare an application window for full screen mode.
When initializing a display, the window needs to be adjusted to be size of the display and all borders removed. This function will make the window visible and adjust if for full screen drawing.
uWidth | Width of the display rectangle in pixels |
uHeight | Height of the display rectangle in pixels |
|
noexcept |
Change the size of the application window.
When initializing a display, the window needs to be adjusted to be able to accommodate the new size. This function will make the window visible and resize it to the requested dimensions.
If this is the first time executing, the window will be placed in the center of the screen, otherwise it will be placed where at the location of the last time the window was opened.
uWidth | Width of the display rectangle in pixels |
uHeight | Height of the display rectangle in pixels |
|
inlinenoexcept |
Enable the Alt-Enter key.
Enable the desktop application to switch from full screen to window mode by pressing Alt-Enter or equivalent for the native operating system.
|
inlinenoexcept |
Sets the application flag to toggle between full screen and window mode.
|
protectednoexcept |
Release shared variables.
For variables that are present on all platforms, this function will clear them and release all resources under this classes' control.
|
noexcept |
Create an instance of the Display manager.
If a Display manager was already allocated or manually assigned, return the pointer to the preexisting Display manager. Otherwise allocate a new instance of a Display manager and use it as the default.
|
noexcept |
Create instances of all default classes for a game.
Game applications usually need Mouse/Keyboard/Joypad input, video display and audio managers initialized. This function will initialize all five subsystems and return an error code if it failed.
All managers this function creates will be disposed of when this class shuts down
|
noexcept |
Create an instance of the Joypad manager.
If a Joypad manager was already allocated or manually assigned, return the pointer to the preexisting Joypad manager. Otherwise allocate a new instance of a Joypad manager and use it as the default.
|
noexcept |
Create an instance of the Keyboard manager.
If a Keyboard manager was already allocated or manually assigned, return the pointer to the preexisting Keyboard manager. Otherwise allocate a new instance of a Keyboard manager and use it as the default.
|
noexcept |
Create an instance of the Mouse manager.
If a Mouse manager was already allocated or manually assigned, return the pointer to the preexisting Mouse manager. Otherwise allocate a new instance of a Mouse manager and use it as the default.
|
noexcept |
Create an instance of the SoundManager.
If a SoundManager was already allocated or manually assigned, return the pointer to the preexisting SoundManager . Otherwise allocate a new instance of a SoundManager and use it as the default.
|
noexcept |
Switch from full screen to windowed mode and back again.
If supported, both by platform and by having the m_bAllowWindowSwitching flag being non-zero, this function will switch to full screen if the game is in a window and vice versa.
|
staticprotected |
(iOS only) Global singular application instance
|
static |
|
protected |
|
protected |
(Windows only) TRUE if CoInitializeEx() was initialized
|
protected |
TRUE if a Display class was started with a call to StartupDisplay(void)
|
protected |
Set to TRUE if the game should be paused due to another window being in front.
|
protected |
(Windows only) TRUE if the window is being resized
|
protected |
TRUE if a Joypad class was started with a call to StartupJoypad(void)
|
protected |
TRUE if a Keyboard class was started with a call to StartupKeyboard(void)
|
protected |
Set to TRUE if the game is minimized (PC/Mac only, always false on consoles)
|
protected |
TRUE if the mouse cursor is on the screen in windows systems
|
protected |
TRUE if a Mouse class was started with a call to StartupMouse(void)
|
protected |
Set to TRUE when the application has to shut down.
|
protected |
TRUE if a SoundManager class was started with a call to StartupSoundManager(void)
|
protected |
TRUE if the window resolution switch key was pressed
|
protected |
(Windows only) Current instance of the application
|
protected |
(Windows only) Menu bar for the application
|
protected |
(Windows only) Main window for the application
|
protected |
Number of valid arguments.
|
protected |
Handle based memory manager for the app.
|
protected |
Pointer to the current application context (Copy of NSApp)
|
protected |
Pointer to the current application delegate.
|
protected |
(Windows only) Custom application window proc
|
protected |
(Windows only) Default cursor when not in the game area
|
protected |
Pointer to the active display instance.
|
protected |
Pointer to the active joypad instance.
|
protected |
Pointer to the active keyboard instance.
|
protected |
Main listener for window events.
|
protected |
Pointer to the active mouse instance.
|
protected |
Arguments passed to the console.
|
protected |
(Windows only) Saved pointer to the global __argv for restoring on exit
|
protected |
Pointer to the active sound manager instance.
|
protected |
(iOS only) Pointer to the UIView being used
|
protected |
(iOS only) Pointer to the UIViewController to the window
|
protected |
(iOS only) Pointer to the UIWindow for the iOS application
|
protected |
Game window.
|
protected |
Internal run queue.
|
protected |
(Windows only) Initial GetErrorMode() value
|
protected |
(Windows only) Bounds rect of the window