class
IGameModeManagerA manager that takes care of game modes; check IGameMode for more information.
The manager has a vector with all the modes and keeps track of the active mode. The active mode can be set by either ID or name.
The manager also controls the active ICameraManager and Viewer, which control all the calculations related with camera and view projections used for rendering.
Derived classes
- class cGameModeManager
- The implementation of IGameModeManager; this should only be used for extending and detouring.
Public static functions
- static auto Get() -> IGameModeManager*
- Gets the active game mode manager.
Constructors, destructors, conversion operators
- ~IGameModeManager() virtual
Public functions
- auto AddRef() -> int pure virtual
- auto Release() -> int pure virtual
- auto Initialize() -> bool pure virtual
- auto Dispose() -> bool pure virtual
- auto func14h() -> bool pure virtual
- auto InitializeModes() -> bool pure virtual
- Calls the IGameMode::
Initialize() method on all the modes in this manager. - auto ClearActiveMode() -> bool pure virtual
- Sets the active game mode to nullptr.
-
auto AddGameMode(IGameMode* pMode,
uint32_
t modeID, const char* pName) -> void pure virtual - Adds the given game mode to this manager under the modeID specified.
-
auto RemoveGameMode(uint32_
t modeID) -> bool pure virtual - Removes the game mode with the ID specified from this manager.
-
auto SetActiveMode(uint32_
t modeID) -> bool pure virtual - Sets the active game mode to be the one with the specified ID.
- auto GetActiveMode() -> IGameMode* pure virtual
- Returns the game mode that is currently in action.
-
auto GetGameMode(uint32_
t modeID) -> IGameMode* pure virtual - Gets the game mode in this manager with the specified ID.
-
auto GetModeIDAt(size_
t index) -> uint32_ t pure virtual - Gets the modeID at the specified index.
-
auto GetActiveModeID() -> uint32_
t pure virtual - Gets the modeID of the currently active IGameMode.
-
auto GetModeCount() -> size_
t pure virtual - Gets the number of game modes contained in this manager.
-
auto SetActiveModeAt(size_
t index) -> bool pure virtual - Sets the active game mode to be the one at the specified index.
-
auto GetGameModeAt(size_
t index) -> IGameMode* pure virtual - Gets the IGameMode at the specified index.
- auto func48h(int) -> int pure virtual
- auto SetActiveModeByName(const char* pName) -> bool pure virtual
- Sets the active game mode to be the one with the specified name.
- auto GetCameraManager() -> ICameraManager* pure virtual
- Gets the ICameraManager instance used in this mode manager, and that manages the active camera of the active game mode.
- auto SetViewer(cViewer* pViewer) -> void pure virtual
- Sets the Viewer instance that is used for rendering the main game frame.
- auto GetViewer() -> cViewer* pure virtual
- Returns the Viewer instance that is being used for rendering the main game frame.
Function documentation
bool App:: IGameModeManager:: ClearActiveMode() pure virtual
Sets the active game mode to nullptr.
Returns | True if there was an active context, false otherwise. |
---|
The IGameMode::
void App:: IGameModeManager:: AddGameMode(IGameMode* pMode,
uint32_ t modeID,
const char* pName) pure virtual
Adds the given game mode to this manager under the modeID specified.
Parameters | |
---|---|
pMode | The IGameMode to add. |
modeID | The ID that uniquely identifies this game mode, and that can be used to access it. |
pName | The name of this mode. |
bool App:: IGameModeManager:: RemoveGameMode(uint32_ t modeID) pure virtual
Removes the game mode with the ID specified from this manager.
Parameters | |
---|---|
modeID | The ID of the mode to remove. |
Returns | True if the game mode was removed, false if it was not in this manager. |
This will call the IGameMode::
bool App:: IGameModeManager:: SetActiveMode(uint32_ t modeID) pure virtual
Sets the active game mode to be the one with the specified ID.
Parameters | |
---|---|
modeID | The ID of the game mode to set as active. |
Returns | True if the mode was found and set active, false otherwise. |
If there's already an active mode, the method IGameMode::
IGameMode* App:: IGameModeManager:: GetGameMode(uint32_ t modeID) pure virtual
Gets the game mode in this manager with the specified ID.
Parameters | |
---|---|
modeID | The ID of the mode. |
Returns | The IGameMode with that ID, or nullptr if there is none. |
uint32_ t App:: IGameModeManager:: GetModeIDAt(size_ t index) pure virtual
Gets the modeID at the specified index.
Parameters | |
---|---|
index | The index of the game modes array. |
Returns | The ID of the game mode at that index, or 0 if the index is out of bounds. |
uint32_ t App:: IGameModeManager:: GetActiveModeID() pure virtual
Gets the modeID of the currently active IGameMode.
Returns | The ID of the active game mode, or 0 if no mode is active. |
---|
bool App:: IGameModeManager:: SetActiveModeAt(size_ t index) pure virtual
Sets the active game mode to be the one at the specified index.
Parameters | |
---|---|
index | The index of the game mode to set as active. |
Returns | True if the mode was found and set active, false otherwise. |
If there's already an active mode, the method IGameMode::
IGameMode* App:: IGameModeManager:: GetGameModeAt(size_ t index) pure virtual
Gets the IGameMode at the specified index.
Parameters | |
---|---|
index | The index of the game modes array. |
Returns | A pointer to the IGameMode at that index, or nullptr if the index is out of bounds. |
bool App:: IGameModeManager:: SetActiveModeByName(const char* pName) pure virtual
Sets the active game mode to be the one with the specified name.
Parameters | |
---|---|
pName | The name of the game mode to set as active. |
Returns | True if the mode was found and set active, false otherwise. |
If there's already an active mode, the method IGameMode::