![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <InputsManager.h>
Static Public Member Functions | |
| static InputsManager & | GetInstance () |
| static InputsManager & | Get () |
Private Attributes | |
| std::string | name |
| std::unordered_map< short, SDL_JoystickID > | m_playerBindings |
| std::unordered_map< short, SDL_JoystickID > | m_playerDisconnected |
| std::unordered_map< short, EntityID > | m_playerEntityIndex |
| bool | m_keyboardAssigned = false |
| std::ostringstream | m_devicesStatus |
| std::vector< InputContext > | m_contextStack = { InputContext::Gameplay } |
| std::vector< EntityID > | m_inputEntities |
Definition at line 16 of file InputsManager.h.
| InputsManager::InputsManager | ( | ) |
Definition at line 6 of file InputsManager.cpp.
References name, and SYSTEM_LOG.
|
virtual |
Definition at line 13 of file InputsManager.cpp.
References Shutdown(), and SYSTEM_LOG.
Here is the call graph for this function:
|
inline |
Definition at line 191 of file InputsManager.h.
References GetComponentTypeID_Static(), and m_playerDisconnected.
Referenced by JoystickManager::HandleEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 120 of file InputsManager.h.
References GetComponentTypeID_Static(), and m_playerEntityIndex.
Referenced by VideoGame::AddPlayerEntity(), and VideoGame::RegisterLoadedPlayerEntity().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 87 of file InputsManager.h.
References BindControllerToPlayer(), JoystickManager::Get(), GetComponentTypeID_Static(), JoystickManager::GetConnectedJoysticks(), GetPlayerForController(), and SYSTEM_LOG.
Referenced by VideoGame::AddPlayerEntity(), AI_Player::Initialize(), and VideoGame::RegisterLoadedPlayerEntity().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 128 of file InputsManager.h.
References PlayerBinding_data::controllerID, JoystickManager::Get(), World::Get(), World::GetComponent(), GetComponentTypeID_Static(), m_keyboardAssigned, m_playerBindings, m_playerEntityIndex, and SYSTEM_LOG.
Referenced by AutoBindControllerToPlayer().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 27 of file InputsManager.h.
References GetInstance().
Referenced by VideoGame::AddPlayerEntity(), JoystickManager::HandleEvent(), AI_Player::Initialize(), VideoGame::IsInputDeviceAvailable(), InputEventConsumeSystem::Process(), InputMappingSystem::Process(), RegisterInputEntityWithManager(), VideoGame::RegisterLoadedPlayerEntity(), SDL_AppEvent(), and PanelManager::UpdateInputsInspectorList().
Here is the call graph for this function:
Here is the caller graph for this function:| InputContext InputsManager::GetActiveContext | ( | ) | const |
Definition at line 168 of file InputsManager.cpp.
References m_contextStack.
Referenced by InputMappingSystem::Process().
Here is the caller graph for this function:
|
inline |
Definition at line 69 of file InputsManager.h.
References JoystickManager::Get(), GetComponentTypeID_Static(), JoystickManager::GetConnectedJoysticks(), and m_playerBindings.
Referenced by VideoGame::AddPlayerEntity(), GetDevicesStatusUpdate(), and VideoGame::IsInputDeviceAvailable().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 53 of file InputsManager.h.
References JoystickManager::Get(), and JoystickManager::GetConnectedJoysticks().
Referenced by GetDevicesStatusUpdate(), and GetMaxDevices().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 58 of file InputsManager.h.
References m_keyboardAssigned.
Referenced by GetMaxDevices().
Here is the caller graph for this function:
|
inline |
Definition at line 44 of file InputsManager.h.
References InputContextManager::Get().
Here is the call graph for this function:
|
inline |
Definition at line 43 of file InputsManager.h.
References InputDeviceManager::Get().
Referenced by InputMappingSystem::Process().
Here is the call graph for this function:
Here is the caller graph for this function:| string InputsManager::GetDevicesStatusUpdate | ( | ) |
Definition at line 100 of file InputsManager.cpp.
References JoystickManager::Get(), GetAvailableJoystickCount(), GetComponentTypeID_Static(), JoystickManager::GetConnectedJoysticks(), GetConnectedJoysticksCount(), m_devicesStatus, m_keyboardAssigned, and m_playerBindings.
Referenced by PanelManager::UpdateInputsInspectorList().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 208 of file InputsManager.h.
References m_playerDisconnected.
Referenced by InputEventConsumeSystem::Process().
Here is the caller graph for this function:
|
inline |
Definition at line 212 of file InputsManager.h.
References m_playerDisconnected.
Referenced by InputEventConsumeSystem::Process().
Here is the caller graph for this function:Definition at line 195 of file InputsManager.cpp.
References m_inputEntities.
Referenced by InputEventConsumeSystem::Process().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 22 of file InputsManager.h.
References GetComponentTypeID_Static().
Referenced by Get(), and GameEngine::Initialize().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 63 of file InputsManager.h.
References GetConnectedJoysticksCount(), and GetConnectedKeyboardsCount().
Here is the call graph for this function:
|
inline |
Definition at line 221 of file InputsManager.h.
References GetComponentTypeID_Static(), and m_playerBindings.
Referenced by AI_Player::Initialize().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 227 of file InputsManager.h.
References GetComponentTypeID_Static(), and m_playerBindings.
Referenced by AutoBindControllerToPlayer(), and JoystickManager::HandleEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 71 of file InputsManager.cpp.
References InputDeviceManager::Get(), JoystickManager::Get(), KeyboardManager::Get(), MouseManager::Get(), GetComponentTypeID_Static(), JoystickManager::HandleEvent(), KeyboardManager::HandleEvent(), MouseManager::HandleEvent(), Joystick, name, InputDeviceManager::RegisterDevice(), SYSTEM_LOG, and InputDeviceManager::UnregisterDevice().
Referenced by SDL_AppEvent().
Here is the call graph for this function:
Here is the caller graph for this function:| void InputsManager::InitializeInputSystem | ( | const std::string & | configPath = "Config/olympe-config.json" | ) |
Definition at line 19 of file InputsManager.cpp.
References InputDeviceManager::AddActionMap(), InputDeviceManager::AddProfile(), Gameplay, InputConfigLoader::Get(), InputDeviceManager::Get(), InputContextManager::Get(), GetComponentTypeID_Static(), InputContextManager::Initialize(), Joystick, KeyboardMouse, InputConfigLoader::LoadProfileOverride(), InputDeviceManager::LogDeviceStatus(), InputDeviceManager::RegisterDevice(), InputDeviceManager::SetDefaultProfile(), and SYSTEM_LOG.
Here is the call graph for this function:
|
inline |
Definition at line 48 of file InputsManager.h.
References m_keyboardAssigned.
Referenced by VideoGame::IsInputDeviceAvailable().
Here is the caller graph for this function:Definition at line 220 of file InputsManager.h.
References GetComponentTypeID_Static(), and m_playerBindings.
Here is the call graph for this function:Definition at line 204 of file InputsManager.h.
References GetComponentTypeID_Static(), and m_playerDisconnected.
Here is the call graph for this function:| void InputsManager::PopContext | ( | ) |
Definition at line 155 of file InputsManager.cpp.
References m_contextStack, and SYSTEM_LOG.
| void InputsManager::PushContext | ( | InputContext | ctx | ) |
Definition at line 149 of file InputsManager.cpp.
References GetComponentTypeID_Static(), m_contextStack, and SYSTEM_LOG.
Here is the call graph for this function:Definition at line 174 of file InputsManager.cpp.
References GetComponentTypeID_Static(), m_inputEntities, and SYSTEM_LOG.
Referenced by RegisterInputEntityWithManager().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 197 of file InputsManager.h.
References GetComponentTypeID_Static(), and m_playerDisconnected.
Referenced by InputEventConsumeSystem::Process().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 29 of file InputsManager.h.
References JoystickManager::Get(), KeyboardManager::Get(), MouseManager::Get(), m_keyboardAssigned, m_playerBindings, JoystickManager::Shutdown(), KeyboardManager::Shutdown(), and MouseManager::Shutdown().
Referenced by ~InputsManager().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 168 of file InputsManager.h.
References PlayerBinding_data::controllerID, World::Get(), World::GetComponent(), GetComponentTypeID_Static(), m_keyboardAssigned, m_playerBindings, m_playerEntityIndex, and SYSTEM_LOG.
Referenced by JoystickManager::HandleEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 185 of file InputsManager.cpp.
References GetComponentTypeID_Static(), m_inputEntities, and SYSTEM_LOG.
Here is the call graph for this function:
|
private |
Definition at line 259 of file InputsManager.h.
Referenced by GetActiveContext(), PopContext(), and PushContext().
|
private |
Definition at line 256 of file InputsManager.h.
Referenced by GetDevicesStatusUpdate().
|
private |
Definition at line 262 of file InputsManager.h.
Referenced by GetInputEntities(), RegisterInputEntity(), and UnregisterInputEntity().
Definition at line 252 of file InputsManager.h.
Referenced by BindControllerToPlayer(), GetConnectedKeyboardsCount(), GetDevicesStatusUpdate(), IsKeyboardAssigned(), Shutdown(), and UnbindControllerFromPlayer().
|
private |
Definition at line 248 of file InputsManager.h.
Referenced by BindControllerToPlayer(), GetAvailableJoystickCount(), GetDevicesStatusUpdate(), GetPlayerBinding(), GetPlayerForController(), IsPlayerBound(), Shutdown(), and UnbindControllerFromPlayer().
|
private |
Definition at line 249 of file InputsManager.h.
Referenced by AddDisconnectedPlayer(), GetDisconnectedPlayersCount(), GetFirstDisconnectedPlayerID(), IsPlayerDisconnected(), and RemoveDisconnectedPlayer().
Definition at line 251 of file InputsManager.h.
Referenced by AddPlayerEntityIndex(), BindControllerToPlayer(), and UnbindControllerFromPlayer().
|
private |
Definition at line 247 of file InputsManager.h.
Referenced by HandleEvent(), and InputsManager().