![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <ECS_Systems.h>
Inheritance diagram for CameraSystem:
Collaboration diagram for CameraSystem:Public Attributes | |
| std::unordered_map< short, EntityID > | m_playerCameras |
| EntityID | m_defaultKeyboardCamera = INVALID_ENTITY_ID |
Public Attributes inherited from ECS_System | |
| ComponentSignature | requiredSignature |
| std::set< EntityID > | m_entities |
Definition at line 255 of file ECS_Systems.h.
| CameraSystem::CameraSystem | ( | ) |
Definition at line 35 of file ECS_Systems_Camera.cpp.
References GetComponentTypeID_Static(), ECS_System::requiredSignature, and SYSTEM_LOG.
Here is the call graph for this function:
|
virtual |
Definition at line 44 of file ECS_Systems_Camera.cpp.
References SYSTEM_LOG.
Definition at line 653 of file ECS_Systems_Camera.cpp.
References CameraBounds_data::boundingBox, CameraBounds_data::clampToViewport, World::Get(), World::GetComponent(), GetComponentTypeID_Static(), World::HasComponent(), and CameraBounds_data::useBounds.
Referenced by Process().
Here is the call graph for this function:
Here is the caller graph for this function:| void CameraSystem::ApplyCameraToRenderer | ( | SDL_Renderer * | renderer, |
| short | playerID | ||
| ) |
Definition at line 771 of file ECS_Systems_Camera.cpp.
References World::Get(), World::GetComponent(), GetComponentTypeID_Static(), m_playerCameras, and renderer.
Here is the call graph for this function:Definition at line 491 of file ECS_Systems_Camera.cpp.
References GetComponentTypeID_Static().
Referenced by ProcessJoystickInput().
Here is the call graph for this function:
Here is the caller graph for this function:| void CameraSystem::BindCameraToJoystick | ( | EntityID | cameraEntity, |
| short | playerID, | ||
| SDL_JoystickID | joystickId | ||
| ) |
Definition at line 213 of file ECS_Systems_Camera.cpp.
References World::Get(), World::GetComponent(), GetComponentTypeID_Static(), SYSTEM_LOG, and CameraInputBinding_data::useKeyboard.
Here is the call graph for this function:Definition at line 198 of file ECS_Systems_Camera.cpp.
References World::Get(), World::GetComponent(), GetComponentTypeID_Static(), m_defaultKeyboardCamera, SYSTEM_LOG, and CameraInputBinding_data::useKeyboard.
Referenced by CreateCameraForPlayer().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 259 of file ECS_Systems_Camera.cpp.
References Camera_data::controlMode, World::Get(), World::GetComponent(), GetComponentTypeID_Static(), World::HasComponent(), INVALID_ENTITY_ID, Mode_Free, SYSTEM_LOG, and CameraTarget_data::targetEntityID.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 96 of file ECS_Systems_Camera.cpp.
References World::AddComponent(), BindCameraToKeyboard(), CameraType_2D, CameraBounds_data::clampToViewport, World::CreateEntity(), CameraTarget_data::followTarget, ViewportManager::Get(), World::Get(), GetComponentTypeID_Static(), CameraEffects_data::isShaking, m_playerCameras, Mode_Free, Camera_data::playerId, CameraInputBinding_data::playerId, GameEngine::screenHeight, GameEngine::screenWidth, SYSTEM_LOG, and CameraBounds_data::useBounds.
Referenced by GameEngine::Initialize(), and OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 187 of file ECS_Systems_Camera.cpp.
References GetComponentTypeID_Static(), INVALID_ENTITY_ID, and m_playerCameras.
Referenced by VideoGame::AddPlayerEntity(), CameraEventHandler::FollowTarget(), CameraEventHandler::HandleClearBoundsEvent(), CameraEventHandler::HandleResetEvent(), CameraEventHandler::HandleRotateEvent(), CameraEventHandler::HandleShakeEvent(), CameraEventHandler::HandleShakeStopEvent(), CameraEventHandler::HandleTeleportEvent(), CameraEventHandler::HandleUnfollowEvent(), CameraEventHandler::HandleZoomEvent(), OnEvent(), VideoGame::RegisterLoadedPlayerEntity(), and CameraEventHandler::SetCameraBounds().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 799 of file ECS_Systems_Camera.cpp.
References CameraType_2_5D, CameraType_2D, CameraType_Isometric, ClearCameraTarget(), CreateCameraForPlayer(), World::Get(), GetCameraEntityForPlayer(), World::GetComponent(), GetComponentTypeID_Static(), INVALID_ENTITY_ID, World::IsEntityValid(), CameraEffects_data::isShaking, Olympe_EventType_Camera_Mode_2_5D, Olympe_EventType_Camera_Mode_2D, Olympe_EventType_Camera_Mode_Isometric, Olympe_EventType_Camera_MoveToPosition, Olympe_EventType_Camera_Reset, Olympe_EventType_Camera_RotateTo, Olympe_EventType_Camera_Shake, Olympe_EventType_Camera_Target_Follow, Olympe_EventType_Camera_Target_Unfollow, Olympe_EventType_Camera_Teleport, Olympe_EventType_Camera_ZoomTo, Camera_data::position, ResetCameraControls(), SetCameraTarget_ECS(), SyncZoomLevelIndex(), SYSTEM_LOG, and Vector::x.
Here is the call graph for this function:
|
overridevirtual |
Reimplemented from ECS_System.
Definition at line 50 of file ECS_Systems_Camera.cpp.
References ApplyCameraBounds(), GameEngine::fDt, GetComponentTypeID_Static(), ECS_System::m_entities, UpdateCameraFollow(), UpdateCameraInput(), UpdateCameraRotation(), UpdateCameraShake(), and UpdateCameraZoom().
Here is the call graph for this function:| void CameraSystem::ProcessJoystickInput | ( | EntityID | entity, |
| CameraInputBinding_data & | binding | ||
| ) |
Definition at line 448 of file ECS_Systems_Camera.cpp.
References ApplyDeadzone(), JoystickManager::Get(), GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by UpdateCameraInput().
Here is the call graph for this function:
Here is the caller graph for this function:| void CameraSystem::ProcessKeyboardInput | ( | EntityID | entity, |
| CameraInputBinding_data & | binding | ||
| ) |
Definition at line 375 of file ECS_Systems_Camera.cpp.
References GameEngine::fDt, KeyboardManager::Get(), GetComponentTypeID_Static(), SYSTEM_LOG, Vector::x, and Vector::y.
Referenced by UpdateCameraInput().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 175 of file ECS_Systems_Camera.cpp.
References World::DestroyEntity(), World::Get(), GetComponentTypeID_Static(), m_playerCameras, and SYSTEM_LOG.
Here is the call graph for this function:
|
overridevirtual |
Reimplemented from ECS_System.
Definition at line 89 of file ECS_Systems_Camera.cpp.
Definition at line 697 of file ECS_Systems_Camera.cpp.
References Camera_data::controlOffset, CameraTarget_data::followTarget, World::Get(), World::GetComponent(), GetComponentTypeID_Static(), World::HasComponent(), INVALID_ENTITY_ID, CameraEffects_data::isShaking, Mode_Free, and SYSTEM_LOG.
Referenced by OnEvent(), and UpdateCameraInput().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 239 of file ECS_Systems_Camera.cpp.
References Camera_data::controlMode, World::Get(), World::GetComponent(), GetComponentTypeID_Static(), World::HasComponent(), Mode_FollowWithControl, SYSTEM_LOG, and CameraTarget_data::targetEntityID.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:| void CameraSystem::SyncZoomLevelIndex | ( | Camera_data & | cam | ) |
Definition at line 751 of file ECS_Systems_Camera.cpp.
References GetComponentTypeID_Static(), Camera_data::ZOOM_LEVEL_COUNT, and Camera_data::ZOOM_LEVELS.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 227 of file ECS_Systems_Camera.cpp.
References World::Get(), World::GetComponent(), GetComponentTypeID_Static(), SYSTEM_LOG, and CameraInputBinding_data::useKeyboard.
Here is the call graph for this function:Definition at line 503 of file ECS_Systems_Camera.cpp.
References World::Get(), World::GetComponent(), GetComponentTypeID_Static(), World::HasComponent(), INVALID_ENTITY_ID, Mode_Follow, Mode_FollowWithControl, Position_data::position, and vBlend().
Referenced by Process().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 279 of file ECS_Systems_Camera.cpp.
References World::Get(), World::GetComponent(), GetComponentTypeID_Static(), Camera_data::GetRotationFromLevel(), CameraInputBinding_data::inputDirection, k_PI, ProcessJoystickInput(), ProcessKeyboardInput(), ResetCameraControls(), Camera_data::rotation, Camera_data::ROTATION_LEVELS, SYSTEM_LOG, Camera_data::ZOOM_LEVEL_COUNT, and Camera_data::ZOOM_LEVELS.
Referenced by Process().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 589 of file ECS_Systems_Camera.cpp.
References World::Get(), World::GetComponent(), GetComponentTypeID_Static(), and Camera_data::targetRotation.
Referenced by Process().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 620 of file ECS_Systems_Camera.cpp.
References gen(), World::Get(), World::GetComponent(), GetComponentTypeID_Static(), shakeDist(), and CameraEffects_data::shakeOffset.
Referenced by Process().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 569 of file ECS_Systems_Camera.cpp.
References World::Get(), World::GetComponent(), GetComponentTypeID_Static(), and Camera_data::zoom.
Referenced by Process().
Here is the call graph for this function:
Here is the caller graph for this function:| EntityID CameraSystem::m_defaultKeyboardCamera = INVALID_ENTITY_ID |
Definition at line 304 of file ECS_Systems.h.
Referenced by BindCameraToKeyboard().
Definition at line 303 of file ECS_Systems.h.
Referenced by ApplyCameraToRenderer(), CreateCameraForPlayer(), GetCameraEntityForPlayer(), and RemoveCameraForPlayer().