![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <ViewportManager.h>
Public Member Functions | |
| ViewportManager () | |
| ~ViewportManager () | |
| virtual void | Render () |
| void | Initialize (int w, int h) |
| void | Shutdown () |
| bool | AddPlayer (short playerID, ViewportLayout viewportLayout) |
| bool | RemovePlayer (short playerID) |
| void | SetSize (int w, int h) |
| int | GetPlayerCount () const |
| const std::vector< SDL_FRect > & | GetViewRects () const |
| bool | GetViewRectForPlayer (short playerID, SDL_FRect &outRect) const |
| const std::vector< short > & | GetPlayers () const |
| void | UpdateViewports () |
Static Public Member Functions | |
| static ViewportManager & | GetInstance () |
| static ViewportManager & | Get () |
Private Attributes | |
| int | m_width = 400 |
| int | m_height = 320 |
| std::vector< SDL_FRect > | m_viewRects |
| std::vector< short > | m_players |
| std::unordered_map< short, int > | m_playerIndexMap |
| ViewportLayout | m_currentLayout = ViewportLayout::ViewportLayout_Grid1x1 |
Definition at line 23 of file ViewportManager.h.
| ViewportManager::ViewportManager | ( | ) |
Definition at line 7 of file ViewportManager.cpp.
References Initialize(), GameEngine::screenHeight, and GameEngine::screenWidth.
Here is the call graph for this function:| ViewportManager::~ViewportManager | ( | ) |
Definition at line 12 of file ViewportManager.cpp.
References Shutdown().
Here is the call graph for this function:| bool ViewportManager::AddPlayer | ( | short | playerID, |
| ViewportLayout | viewportLayout = ViewportLayout::ViewportLayout_Grid1x1 |
||
| ) |
Definition at line 48 of file ViewportManager.cpp.
References GetComponentTypeID_Static(), m_playerIndexMap, m_players, MAX_PLAYERS, and UpdateViewports().
Referenced by VideoGame::SetViewportLayout().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 34 of file ViewportManager.h.
References GetInstance().
Referenced by CameraSystem::CreateCameraForPlayer(), GetActiveCameraTransform(), RenderingSystem::Render(), GridSystem::Render(), UIRenderingSystem::Render(), World::Render_ECS_Systems(), and SDL_AppIterate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 29 of file ViewportManager.h.
References GetComponentTypeID_Static().
Referenced by Get().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 43 of file ViewportManager.h.
References m_players.
Definition at line 50 of file ViewportManager.h.
References m_players.
Referenced by RenderingSystem::Render(), GridSystem::Render(), UIRenderingSystem::Render(), and SDL_AppIterate().
Here is the caller graph for this function:Definition at line 79 of file ViewportManager.cpp.
References GetComponentTypeID_Static(), m_playerIndexMap, and m_viewRects.
Referenced by GetActiveCameraTransform().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 46 of file ViewportManager.h.
References m_viewRects.
Referenced by SDL_AppIterate().
Here is the caller graph for this function:Definition at line 28 of file ViewportManager.cpp.
References GetComponentTypeID_Static(), m_height, m_playerIndexMap, m_players, m_viewRects, m_width, SYSTEM_LOG, and UpdateViewports().
Referenced by VideoGame::VideoGame(), and ViewportManager().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 62 of file ViewportManager.cpp.
References GetComponentTypeID_Static(), m_playerIndexMap, m_players, and UpdateViewports().
Here is the call graph for this function:
|
virtual |
Definition at line 17 of file ViewportManager.cpp.
References GetComponentTypeID_Static(), m_viewRects, and GameEngine::renderer.
Referenced by World::Render_ECS_Systems().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 73 of file ViewportManager.cpp.
References GetComponentTypeID_Static(), m_height, m_width, and UpdateViewports().
Here is the call graph for this function:| void ViewportManager::Shutdown | ( | ) |
Definition at line 39 of file ViewportManager.cpp.
References m_playerIndexMap, m_players, m_viewRects, and SYSTEM_LOG.
Referenced by ~ViewportManager().
Here is the caller graph for this function:| void ViewportManager::UpdateViewports | ( | ) |
Definition at line 89 of file ViewportManager.cpp.
References GetComponentTypeID_Static(), m_height, m_playerIndexMap, m_players, m_viewRects, and m_width.
Referenced by AddPlayer(), Initialize(), RemovePlayer(), and SetSize().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 60 of file ViewportManager.h.
|
private |
Definition at line 55 of file ViewportManager.h.
Referenced by Initialize(), SetSize(), and UpdateViewports().
Definition at line 58 of file ViewportManager.h.
Referenced by AddPlayer(), GetViewRectForPlayer(), Initialize(), RemovePlayer(), Shutdown(), and UpdateViewports().
|
private |
Definition at line 57 of file ViewportManager.h.
Referenced by AddPlayer(), GetPlayerCount(), GetPlayers(), Initialize(), RemovePlayer(), Shutdown(), and UpdateViewports().
|
private |
Definition at line 56 of file ViewportManager.h.
Referenced by GetViewRectForPlayer(), GetViewRects(), Initialize(), Render(), Shutdown(), and UpdateViewports().
|
private |
Definition at line 54 of file ViewportManager.h.
Referenced by Initialize(), SetSize(), and UpdateViewports().