![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Core ECS manager and world coordinator. More...
#include <World.h>
Collaboration diagram for World:Classes | |
| struct | InstantiationResult |
| struct | Phase2Result |
Public Member Functions | |
| World () | |
| Default constructor. | |
| virtual | ~World () |
| Destructor. | |
| void | Initialize_ECS_Systems () |
| void | Add_ECS_System (std::unique_ptr< ECS_System > system) |
| void | Process_ECS_Systems () |
| void | Render_ECS_Systems () |
| void | RenderDebug_ECS_Systems () |
| template<typename T > | |
| T * | GetSystem () |
| void | Process () |
| void | Render () |
| void | AddLevel (std::unique_ptr< Level > level) |
| const std::vector< std::unique_ptr< Level > > & | GetLevels () const |
| bool | LoadLevelFromTiled (const std::string &tiledMapPath) |
| void | UnloadCurrentLevel () |
| bool | LoadLevelDependencies (const nlohmann::json &levelJson) |
| void | GenerateCollisionAndNavigationMaps (const Olympe::Tiled::TiledMap &tiledMap, const Olympe::Editor::LevelDefinition &levelDef) |
| EntityID | CreateEntity () |
| void | DestroyEntity (EntityID entity) |
| bool | IsEntityValid (EntityID entity) const |
| const std::vector< EntityID > & | GetAllEntities () const |
| Get all active entity IDs. | |
| template<typename T , typename... Args> | |
| T & | AddComponent (EntityID entity, Args &&... args) |
| template<typename T > | |
| void | RemoveComponent (EntityID entity) |
| template<typename T > | |
| T & | GetComponent (EntityID entity) |
| template<typename T > | |
| bool | HasComponent (EntityID entity) const |
| RenderLayer | GetDefaultLayerForType (EntityType type) const |
| Get the default render layer for an entity type Automatically assigns appropriate layer based on entity classification. | |
| void | SetEntityLayer (EntityID entity, RenderLayer layer) |
| Set entity render layer (updates position.z) | |
| RenderLayer | CalculateLayerFromZOrder (float zOrder) const |
| Calculate layer index from zOrder value (for Tiled levels) Maps zOrder ranges to layer indices for proper depth sorting. | |
| RenderLayer | GetEntityLayer (EntityID entity) const |
| Get entity render layer. | |
| int | GetNextCustomLayerIndex () |
| Get next available custom layer index (for dynamic layers) | |
| void | ToggleGrid () |
| Toggle grid visibility. | |
| bool | IsGridEnabled () |
| Get current grid state. | |
| void | ToggleCollisionOverlay () |
| Toggle collision overlay visibility. | |
| void | ToggleNavigationOverlay () |
| Toggle navigation overlay visibility. | |
| bool | IsCollisionOverlayVisible () |
| Get collision overlay state. | |
| bool | IsNavigationOverlayVisible () |
| Get navigation overlay state. | |
| void | SyncGridWithLevel (const Olympe::Editor::LevelDefinition &levelDef) |
| Synchronize grid settings with loaded level Extracts map orientation and tile dimensions from LevelDefinition and updates GridSettings_data (projection mode, cellSize, hexRadius) Supports: orthogonal, isometric, hexagonal orientations. | |
| const std::vector< TileChunk > & | GetTileChunks () const |
| TilesetManager & | GetTilesetManager () |
| const std::string & | GetMapOrientation () const |
| int | GetTileWidth () const |
| int | GetTileHeight () const |
| float | GetIsometricOriginX () const |
| float | GetIsometricOriginY () const |
| void | SetMapBounds (int minTileX, int minTileY, int maxTileX, int maxTileY, int chunkOriginX, int chunkOriginY) |
| int | GetChunkOriginX () const |
| int | GetChunkOriginY () const |
| void | LoadTileLayer (const nlohmann::json &layerJson, InstantiationResult &result) |
| void | LoadTileChunk (const nlohmann::json &chunkJson, const std::string &layerName, int zOrder, const std::string &encoding) |
| void | LoadTileData (const nlohmann::json &dataJson, const std::string &layerName, int width, int height, int zOrder, const std::string &encoding) |
Static Public Member Functions | |
| static World & | GetInstance () |
| Get singleton instance. | |
| static World & | Get () |
| Get singleton instance (short form) | |
Public Attributes | |
| std::unordered_map< EntityID, ComponentSignature > | m_entitySignatures |
Private Attributes | |
| std::unordered_map< ComponentTypeID, std::unique_ptr< IComponentPool > > | m_componentPools |
| EntityID | m_nextEntityID = 1 |
| std::queue< EntityID > | m_freeEntityIDs |
| std::vector< EntityID > | m_entities |
| std::vector< std::unique_ptr< ECS_System > > | m_systems |
| TilesetManager | m_tilesetManager |
| std::vector< TileChunk > | m_tileChunks |
| std::string | m_mapOrientation |
| int | m_tileWidth |
| int | m_tileHeight |
| std::vector< std::unique_ptr< Level > > | m_levels |
| int | m_minTileX = 0 |
| int | m_minTileY = 0 |
| int | m_maxTileX = 0 |
| int | m_maxTileY = 0 |
| int | m_chunkOriginX = 0 |
| int | m_chunkOriginY = 0 |
| float | m_cachedIsometricOriginX = 0.0f |
| float | m_cachedIsometricOriginY = 0.0f |
| bool | m_isometricOriginCached = false |
| int | m_nextCustomLayerIndex = static_cast<int>(RenderLayer::Foreground_Far) + 1 |
Core ECS manager and world coordinator.
The World class is the central hub for the Entity-Component-System architecture. It manages all entities, components, systems, and level loading.
Key features:
| World::World | ( | ) |
Default constructor.
Definition at line 54 of file World.cpp.
References CreateEntity(), GetComponentTypeID_Static(), Initialize_ECS_Systems(), m_entitySignatures, m_mapOrientation, m_tileHeight, m_tileWidth, and SYSTEM_LOG.
Here is the call graph for this function:
|
virtual |
| void World::Add_ECS_System | ( | std::unique_ptr< ECS_System > | system | ) |
Definition at line 170 of file World.cpp.
References GetComponentTypeID_Static(), and m_systems.
Referenced by Initialize_ECS_Systems().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 393 of file World.h.
References ComponentPool< T >::AddComponent(), GetComponentTypeID_Static(), m_componentPools, m_entitySignatures, and Notify_ECS_Systems().
Referenced by CameraSystem::CreateCameraForPlayer(), CreateMissingPrefabPlaceholder(), PrefabFactory::InstantiateAIBehavior(), PrefabFactory::InstantiateAIState(), PrefabFactory::InstantiateAnimation(), PrefabFactory::InstantiateAttackIntent(), PrefabFactory::InstantiateAudioSource(), PrefabFactory::InstantiateBoundingBox(), PrefabFactory::InstantiateCamera(), PrefabFactory::InstantiateCameraBounds(), PrefabFactory::InstantiateCameraEffects(), PrefabFactory::InstantiateCameraInputBinding(), PrefabFactory::InstantiateCameraTarget(), PrefabFactory::InstantiateCollisionZone(), InstantiateComponentGeneric(), PrefabFactory::InstantiateController(), PrefabFactory::InstantiateFX(), PrefabFactory::InstantiateHealth(), PrefabFactory::InstantiateInputMapping(), PrefabFactory::InstantiateInventory(), PrefabFactory::InstantiateMovement(), PrefabFactory::InstantiateNPC(), PrefabFactory::InstantiatePlayerBinding(), PrefabFactory::InstantiatePlayerController(), PrefabFactory::InstantiateTriggerZone(), and PrefabFactory::InstantiateVisualEditor().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 279 of file World.h.
References GetComponentTypeID_Static(), and m_levels.
Here is the call graph for this function:| RenderLayer World::CalculateLayerFromZOrder | ( | float | zOrder | ) | const |
Calculate layer index from zOrder value (for Tiled levels) Maps zOrder ranges to layer indices for proper depth sorting.
Definition at line 309 of file World.cpp.
References Background_Far, Background_Near, Characters, Effects, Flying, Foreground_Far, Foreground_Near, Ground, Objects, and UI_Near.
Referenced by InstantiateEntity().
Here is the caller graph for this function:| EntityID World::CreateEntity | ( | ) |
Definition at line 225 of file World.cpp.
References GetComponentTypeID_Static(), m_entities, m_entitySignatures, and NotifyBlueprintEditorEntityCreated().
Referenced by CameraSystem::CreateCameraForPlayer(), PrefabFactory::CreateEntity(), PrefabFactory::CreateEntityFromBlueprint(), PrefabFactory::CreateEntityWithOverrides(), CreateMissingPrefabPlaceholder(), and World().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Create a red placeholder entity for missing prefabs.
Definition at line 2724 of file World.cpp.
References AddComponent(), CreateEntity(), World::InstantiationResult::PassStats::failed, World::InstantiationResult::PassStats::failedObjects, DataManager::Get(), Get(), GetComponentTypeID_Static(), DataManager::GetSprite(), INVALID_ENTITY_ID, VisualEditor_data::sprite, World::InstantiationResult::PassStats::successfullyCreated, and SYSTEM_LOG.
Referenced by InstantiateEntity().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 255 of file World.cpp.
References GetComponentTypeID_Static(), INVALID_ENTITY_ID, m_componentPools, m_entities, m_entitySignatures, m_freeEntityIDs, Notify_ECS_Systems(), and NotifyBlueprintEditorEntityDestroyed().
Referenced by CameraSystem::RemoveCameraForPlayer(), and UnloadCurrentLevel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Extract custom properties from JSON overrides into LevelInstanceParameters.
Definition at line 2469 of file World.cpp.
References ComponentParameter::FromBool(), ComponentParameter::FromFloat(), ComponentParameter::FromInt(), GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by InstantiateEntity().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Extract prefab name from prefab path (removes path and extension)
Definition at line 2760 of file World.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:| void World::GenerateCollisionAndNavigationMaps | ( | const Olympe::Tiled::TiledMap & | tiledMap, |
| const Olympe::Editor::LevelDefinition & | levelDef | ||
| ) |
Definition at line 476 of file World.cpp.
References CollisionMap::Get(), NavigationMap::Get(), GetComponentTypeID_Static(), HexAxial, TileProperties::isBlocked, TileProperties::isNavigable, Iso, Olympe::Tiled::TiledTileset::name, Olympe::Tiled::ObjectGroup, Ortho, Olympe::Tiled::ParseLayerProperties(), SYSTEM_LOG, and Olympe::Tiled::TileLayer.
Referenced by LoadLevelFromTiled().
Here is the call graph for this function:
Here is the caller graph for this function:Get singleton instance (short form)
Definition at line 232 of file World.h.
References GetInstance().
Referenced by ObjectFactory::AddComponent(), VideoGame::AddPlayerEntity(), CameraSystem::ApplyCameraBounds(), CameraSystem::ApplyCameraToRenderer(), CameraSystem::BindCameraToJoystick(), CameraSystem::BindCameraToKeyboard(), InputsManager::BindControllerToPlayer(), CameraSystem::ClearCameraTarget(), CameraSystem::CreateCameraForPlayer(), PrefabFactory::CreateEntity(), PrefabFactory::CreateEntityFromBlueprint(), PrefabFactory::CreateEntityWithOverrides(), CreateMissingPrefabPlaceholder(), ObjectFactory::CreateObject(), ExecuteBTAction(), ExecuteBTCondition(), GridSystem::FindSettings(), NavigationSystem::FollowPath(), CameraEventHandler::FollowTarget(), GetActiveCameraTransform(), Olympe::EntityInspectorManager::GetComponentProperties(), GetEntityLayer(), ObjectFactory::GetWorldObjectList(), CameraEventHandler::HandleClearBoundsEvent(), Olympe::BehaviorTreeDebugWindow::HandleNodeCreation(), CameraEventHandler::HandleResetEvent(), CameraEventHandler::HandleRotateEvent(), CameraEventHandler::HandleShakeEvent(), CameraEventHandler::HandleShakeStopEvent(), CameraEventHandler::HandleTeleportEvent(), CameraEventHandler::HandleUnfollowEvent(), CameraEventHandler::HandleZoomEvent(), GameEngine::Initialize(), VideoGame::InitializeAITestScene(), PrefabFactory::InstantiateAIBehavior(), PrefabFactory::InstantiateAIBlackboard(), PrefabFactory::InstantiateAISenses(), PrefabFactory::InstantiateAIState(), PrefabFactory::InstantiateAnimation(), PrefabFactory::InstantiateAttackIntent(), PrefabFactory::InstantiateAudioSource(), PrefabFactory::InstantiateBehaviorTreeRuntime(), PrefabFactory::InstantiateBoundingBox(), PrefabFactory::InstantiateCamera(), PrefabFactory::InstantiateCameraBounds(), PrefabFactory::InstantiateCameraEffects(), PrefabFactory::InstantiateCameraInputBinding(), PrefabFactory::InstantiateCameraTarget(), PrefabFactory::InstantiateCollisionZone(), InstantiateComponentGeneric(), PrefabFactory::InstantiateController(), PrefabFactory::InstantiateFX(), PrefabFactory::InstantiateHealth(), PrefabFactory::InstantiateIdentity(), PrefabFactory::InstantiateInputMapping(), PrefabFactory::InstantiateInventory(), PrefabFactory::InstantiateMoveIntent(), PrefabFactory::InstantiateMovement(), PrefabFactory::InstantiateNavigationAgent(), PrefabFactory::InstantiateNPC(), PrefabFactory::InstantiatePhysicsBody(), PrefabFactory::InstantiatePlayerBinding(), PrefabFactory::InstantiatePlayerController(), PrefabFactory::InstantiatePosition(), PrefabFactory::InstantiateTriggerZone(), PrefabFactory::InstantiateVisualAnimation(), PrefabFactory::InstantiateVisualEditor(), PrefabFactory::InstantiateVisualSprite(), AIPerceptionSystem::IsTargetVisible(), Olympe::EntityInspectorManager::OnEntityCreated(), CameraSystem::OnEvent(), AnimationSystem::PauseAnimation(), AnimationSystem::PlayAnimation(), InputEventConsumeSystem::Process(), CameraEventConsumeSystem::Process(), NavigationSystem::Process(), MovementSystem::Process(), PlayerControlSystem::Process(), InputMappingSystem::Process(), AIPerceptionSystem::Process(), AIStateTransitionSystem::Process(), BehaviorTreeSystem::Process(), AIMotionSystem::Process(), AnimationSystem::Process(), Olympe::BehaviorTreeDebugWindow::RefreshEntityList(), VideoGame::RegisterLoadedPlayerEntity(), CameraSystem::RemoveCameraForPlayer(), RenderingSystem::Render(), RenderingEditorSystem::Render(), Olympe::BehaviorTreeDebugWindow::RenderBehaviorTreeGraph(), Olympe::BehaviorTreeDebugWindow::RenderBlackboardSection(), RenderEntitiesForCamera(), GameMenu::RenderF2Menu(), UIRenderingSystem::RenderHUD(), Olympe::BehaviorTreeDebugWindow::RenderInSeparateWindow(), Olympe::BehaviorTreeDebugWindow::RenderMinimap(), RenderMultiLayerForCamera(), Olympe::BehaviorTreeDebugWindow::RenderNodeGraphPanel(), Olympe::BehaviorTreeDebugWindow::RenderRuntimeInfo(), RenderSingleEntity(), NavigationSystem::RequestPath(), CameraSystem::ResetCameraControls(), Olympe::BehaviorTreeDebugWindow::ResetZoom(), AnimationSystem::ResumeAnimation(), SDL_AppIterate(), CameraEventHandler::SetCameraBounds(), CameraSystem::SetCameraTarget_ECS(), Olympe::EntityInspectorManager::SetComponentProperty(), AnimationSystem::SetPlaybackSpeed(), AnimationSystem::StopAnimation(), Olympe::EntityInspectorManager::SyncWithWorld(), CameraSystem::UnbindCameraKeyboard(), InputsManager::UnbindControllerFromPlayer(), AIStateTransitionSystem::UpdateAIState(), CameraSystem::UpdateCameraFollow(), CameraSystem::UpdateCameraInput(), CameraSystem::UpdateCameraRotation(), CameraSystem::UpdateCameraShake(), and CameraSystem::UpdateCameraZoom().
Here is the call graph for this function:Get all active entity IDs.
Definition at line 384 of file World.h.
References m_entities.
|
inline |
Definition at line 749 of file World.h.
References m_chunkOriginX.
|
inline |
Definition at line 750 of file World.h.
References m_chunkOriginY.
Definition at line 438 of file World.h.
References ComponentPool< T >::GetComponent(), GetComponentTypeID_Static(), and m_componentPools.
Referenced by VideoGame::AddPlayerEntity(), CameraSystem::ApplyCameraBounds(), CameraSystem::ApplyCameraToRenderer(), CameraSystem::BindCameraToJoystick(), CameraSystem::BindCameraToKeyboard(), InputsManager::BindControllerToPlayer(), CameraSystem::ClearCameraTarget(), PrefabFactory::CreateEntityFromBlueprint(), PrefabFactory::CreateEntityWithOverrides(), ExecuteBTAction(), ExecuteBTCondition(), GridSystem::FindSettings(), NavigationSystem::FollowPath(), GetActiveCameraTransform(), Olympe::EntityInspectorManager::GetComponentProperties(), GetEntityLayer(), CameraEventHandler::HandleClearBoundsEvent(), CameraEventHandler::HandleResetEvent(), CameraEventHandler::HandleRotateEvent(), CameraEventHandler::HandleShakeEvent(), CameraEventHandler::HandleShakeStopEvent(), CameraEventHandler::HandleTeleportEvent(), CameraEventHandler::HandleZoomEvent(), VideoGame::InitializeAITestScene(), PrefabFactory::InstantiateAIBlackboard(), PrefabFactory::InstantiateAISenses(), PrefabFactory::InstantiateBehaviorTreeRuntime(), InstantiateComponentGeneric(), PrefabFactory::InstantiateIdentity(), PrefabFactory::InstantiateMoveIntent(), PrefabFactory::InstantiateNavigationAgent(), PrefabFactory::InstantiatePhysicsBody(), PrefabFactory::InstantiatePosition(), PrefabFactory::InstantiateVisualAnimation(), PrefabFactory::InstantiateVisualSprite(), AIPerceptionSystem::IsTargetVisible(), Olympe::EntityInspectorManager::OnEntityCreated(), CameraSystem::OnEvent(), AnimationSystem::PauseAnimation(), AnimationSystem::PlayAnimation(), InputEventConsumeSystem::Process(), NavigationSystem::Process(), MovementSystem::Process(), PlayerControlSystem::Process(), InputMappingSystem::Process(), AIPerceptionSystem::Process(), AIStateTransitionSystem::Process(), BehaviorTreeSystem::Process(), AIMotionSystem::Process(), AnimationSystem::Process(), VideoGame::RegisterLoadedPlayerEntity(), RenderingEditorSystem::Render(), RenderEntitiesForCamera(), UIRenderingSystem::RenderHUD(), RenderMultiLayerForCamera(), RenderSingleEntity(), NavigationSystem::RequestPath(), CameraSystem::ResetCameraControls(), AnimationSystem::ResumeAnimation(), CameraEventHandler::SetCameraBounds(), CameraSystem::SetCameraTarget_ECS(), Olympe::EntityInspectorManager::SetComponentProperty(), AnimationSystem::SetPlaybackSpeed(), AnimationSystem::StopAnimation(), CameraSystem::UnbindCameraKeyboard(), InputsManager::UnbindControllerFromPlayer(), AIStateTransitionSystem::UpdateAIState(), CameraSystem::UpdateCameraFollow(), CameraSystem::UpdateCameraInput(), CameraSystem::UpdateCameraRotation(), CameraSystem::UpdateCameraShake(), and CameraSystem::UpdateCameraZoom().
Here is the call graph for this function:
|
inline |
Get the default render layer for an entity type Automatically assigns appropriate layer based on entity classification.
Definition at line 473 of file World.h.
References Background, Background_Near, Characters, Collectible, Dynamic, Effect, Effects, Enemy, Ground, Item, None, NPC, Objects, Particle, Player, Static, Trigger, UI_Near, UIElement, and Waypoint.
Referenced by PrefabFactory::CreateEntityFromBlueprint(), and PrefabFactory::CreateEntityWithOverrides().
Here is the caller graph for this function:| RenderLayer World::GetEntityLayer | ( | EntityID | entity | ) | const |
Get entity render layer.
Definition at line 334 of file World.cpp.
References Get(), GetComponent(), GetComponentTypeID_Static(), Ground, and ZToLayer().
Here is the call graph for this function:Get singleton instance.
Definition at line 222 of file World.h.
References GetComponentTypeID_Static().
Referenced by Get().
Here is the call graph for this function:
Here is the caller graph for this function:| float World::GetIsometricOriginX | ( | ) | const |
Definition at line 2812 of file World.cpp.
References Olympe::Tiled::IsometricProjection::CalculateTMJOrigin(), m_cachedIsometricOriginX, m_cachedIsometricOriginY, m_isometricOriginCached, m_mapOrientation, m_maxTileX, m_maxTileY, m_minTileX, m_minTileY, m_tileHeight, and m_tileWidth.
Referenced by InstantiatePass1_VisualLayers().
Here is the call graph for this function:
Here is the caller graph for this function:| float World::GetIsometricOriginY | ( | ) | const |
Definition at line 2835 of file World.cpp.
References Olympe::Tiled::IsometricProjection::CalculateTMJOrigin(), m_cachedIsometricOriginX, m_cachedIsometricOriginY, m_isometricOriginCached, m_mapOrientation, m_maxTileX, m_maxTileY, m_minTileX, m_minTileY, m_tileHeight, and m_tileWidth.
Referenced by InstantiatePass1_VisualLayers().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 736 of file World.h.
References m_mapOrientation.
Referenced by RenderMultiLayerForCamera().
Here is the caller graph for this function:
|
inline |
Get next available custom layer index (for dynamic layers)
Definition at line 521 of file World.h.
References m_nextCustomLayerIndex.
Definition at line 244 of file World.h.
References GetComponentTypeID_Static(), and m_systems.
Referenced by VideoGame::AddPlayerEntity(), CameraEventHandler::FollowTarget(), CameraEventHandler::HandleClearBoundsEvent(), CameraEventHandler::HandleResetEvent(), CameraEventHandler::HandleRotateEvent(), CameraEventHandler::HandleShakeEvent(), CameraEventHandler::HandleShakeStopEvent(), CameraEventHandler::HandleTeleportEvent(), CameraEventHandler::HandleUnfollowEvent(), CameraEventHandler::HandleZoomEvent(), GameEngine::Initialize(), CameraEventConsumeSystem::Process(), VideoGame::RegisterLoadedPlayerEntity(), RenderingSystem::Render(), RenderingEditorSystem::Render(), RenderEntitiesForCamera(), RenderMultiLayerForCamera(), and CameraEventHandler::SetCameraBounds().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 730 of file World.h.
References m_tileChunks.
Referenced by RenderMultiLayerForCamera().
Here is the caller graph for this function:
|
inline |
Definition at line 738 of file World.h.
References m_tileHeight.
Referenced by RenderMultiLayerForCamera().
Here is the caller graph for this function:
|
inline |
Definition at line 733 of file World.h.
References m_tilesetManager.
Referenced by RenderMultiLayerForCamera().
Here is the caller graph for this function:
|
inline |
Definition at line 737 of file World.h.
References m_tileWidth.
Referenced by RenderMultiLayerForCamera().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 656 of file World.h.
References GetComponentTypeID_Static(), and RegisterInputEntityWithManager().
Here is the call graph for this function:Definition at line 451 of file World.h.
References GetComponentTypeID_Static(), ComponentPool< T >::HasComponent(), m_componentPools, and m_entitySignatures.
Referenced by VideoGame::AddPlayerEntity(), CameraSystem::ApplyCameraBounds(), CameraSystem::ClearCameraTarget(), PrefabFactory::CreateEntityFromBlueprint(), PrefabFactory::CreateEntityWithOverrides(), ExecuteBTAction(), ExecuteBTCondition(), GridSystem::FindSettings(), GetActiveCameraTransform(), Olympe::EntityInspectorManager::GetComponentProperties(), CameraEventHandler::HandleClearBoundsEvent(), CameraEventHandler::HandleResetEvent(), CameraEventHandler::HandleRotateEvent(), CameraEventHandler::HandleShakeEvent(), CameraEventHandler::HandleShakeStopEvent(), CameraEventHandler::HandleTeleportEvent(), CameraEventHandler::HandleZoomEvent(), PrefabFactory::InstantiateBehaviorTreeRuntime(), AnimationSystem::PauseAnimation(), AnimationSystem::PlayAnimation(), InputEventConsumeSystem::Process(), AIPerceptionSystem::Process(), BehaviorTreeSystem::Process(), AIMotionSystem::Process(), AnimationSystem::Process(), VideoGame::RegisterLoadedPlayerEntity(), UIRenderingSystem::RenderHUD(), RenderMultiLayerForCamera(), CameraSystem::ResetCameraControls(), AnimationSystem::ResumeAnimation(), CameraEventHandler::SetCameraBounds(), CameraSystem::SetCameraTarget_ECS(), Olympe::EntityInspectorManager::SetComponentProperty(), AnimationSystem::SetPlaybackSpeed(), AnimationSystem::StopAnimation(), AIStateTransitionSystem::UpdateAIState(), and CameraSystem::UpdateCameraFollow().
Here is the call graph for this function:
Here is the caller graph for this function:| void World::Initialize_ECS_Systems | ( | ) |
Definition at line 87 of file World.cpp.
References Add_ECS_System(), OlympeAnimation::AnimationManager::Get(), PrefabFactory::Get(), OlympeAnimation::AnimationManager::LoadAnimationBanks(), OlympeAnimation::AnimationManager::LoadAnimationGraphs(), PrefabFactory::PreloadAllPrefabs(), and SYSTEM_LOG.
Referenced by World().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Unified entity instantiation helper (used by all Phase 5 passes) Types are already normalized, performs direct lookup and instantiation.
Definition at line 1387 of file World.cpp.
References CalculateLayerFromZOrder(), CreateMissingPrefabPlaceholder(), ExtractCustomProperties(), World::InstantiationResult::PassStats::failed, World::InstantiationResult::PassStats::failedObjects, VideoGame::Get(), GetComponentTypeID_Static(), INVALID_ENTITY_ID, RegisterPlayerEntity(), World::InstantiationResult::PassStats::successfullyCreated, SYSTEM_LOG, and World::InstantiationResult::PassStats::totalObjects.
Referenced by LoadLevelFromTiled().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1485 of file World.cpp.
References DataManager::FindResourceRecursive(), DataManager::Get(), Olympe::Tiled::ParallaxLayerManager::Get(), GetComponentTypeID_Static(), GetIsometricOriginX(), GetIsometricOriginY(), Olympe::Tiled::ParallaxLayer::imagePath, LoadTileLayer(), TilesetManager::LoadTilesets(), m_mapOrientation, m_tileHeight, m_tilesetManager, m_tileWidth, Olympe::Tiled::ParallaxLayer::name, Olympe::Tiled::ParallaxLayer::offsetX, Olympe::Tiled::ParallaxLayer::offsetY, Olympe::Tiled::ParallaxLayer::opacity, GameEngine::renderer, Olympe::Tiled::ParallaxLayer::repeatX, Olympe::Tiled::ParallaxLayer::repeatY, Olympe::Tiled::ParallaxLayer::scrollFactorX, Olympe::Tiled::ParallaxLayer::scrollFactorY, SetMapBounds(), SYSTEM_LOG, Olympe::Tiled::ParallaxLayer::texture, Olympe::Tiled::ParallaxLayer::tintColor, Olympe::Tiled::ParallaxLayer::visible, and Olympe::Tiled::ParallaxLayer::zOrder.
Referenced by LoadLevelFromTiled().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 2248 of file World.cpp.
Referenced by LoadLevelFromTiled().
Here is the caller graph for this function:
|
private |
Definition at line 2270 of file World.cpp.
References GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by LoadLevelFromTiled().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Get collision overlay state.
Definition at line 600 of file World.h.
References GetComponentTypeID_Static(), and m_entitySignatures.
Here is the call graph for this function:Definition at line 376 of file World.h.
References m_entitySignatures.
Referenced by Olympe::EntityInspectorManager::GetComponentProperties(), CameraSystem::OnEvent(), AIPerceptionSystem::Process(), and Olympe::EntityInspectorManager::SetComponentProperty().
Here is the caller graph for this function:
|
inline |
Get current grid state.
Definition at line 549 of file World.h.
References GetComponentTypeID_Static(), and m_entitySignatures.
Here is the call graph for this function:
|
inline |
Get navigation overlay state.
Definition at line 615 of file World.h.
References GetComponentTypeID_Static(), and m_entitySignatures.
Here is the call graph for this function:| bool World::LoadLevelDependencies | ( | const nlohmann::json & | levelJson | ) |
Definition at line 926 of file World.cpp.
References BehaviorTreeDependencyScanner::ExtractPrefabsFromLevel(), BehaviorTreeManager::Get(), GetComponentTypeID_Static(), BehaviorTreeManager::IsTreeLoadedByPath(), BehaviorTreeManager::LoadTreeFromFile(), and BehaviorTreeDependencyScanner::ScanPrefabs().
Referenced by LoadLevelFromTiled().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1006 of file World.cpp.
References Olympe::Editor::LevelDefinition::entities, GameEntity, GenerateCollisionAndNavigationMaps(), DataManager::Get(), PrefabFactory::Get(), GetComponentTypeID_Static(), InstantiateEntity(), InstantiatePass1_VisualLayers(), InstantiatePass2_SpatialStructure(), InstantiatePass5_Relationships(), INVALID_ENTITY_ID, Level, LoadLevelDependencies(), m_tileChunks, SyncGridWithLevel(), SYSTEM_LOG, UnloadCurrentLevel(), and ValidateLevelPrefabs().
Referenced by GameMenu::RenderF2Menu().
Here is the call graph for this function:
Here is the caller graph for this function:| void World::LoadTileChunk | ( | const nlohmann::json & | chunkJson, |
| const std::string & | layerName, | ||
| int | zOrder, | ||
| const std::string & | encoding | ||
| ) |
Definition at line 1682 of file World.cpp.
References Olympe::Tiled::TiledDecoder::DecodeTileData(), GetComponentTypeID_Static(), TileChunk::layerName, and m_tileChunks.
Referenced by LoadTileLayer().
Here is the call graph for this function:
Here is the caller graph for this function:| void World::LoadTileData | ( | const nlohmann::json & | dataJson, |
| const std::string & | layerName, | ||
| int | width, | ||
| int | height, | ||
| int | zOrder, | ||
| const std::string & | encoding | ||
| ) |
Definition at line 1737 of file World.cpp.
References Olympe::Tiled::TiledDecoder::DecodeTileData(), GetComponentTypeID_Static(), TileChunk::layerName, and m_tileChunks.
Referenced by LoadTileLayer().
Here is the call graph for this function:
Here is the caller graph for this function:| void World::LoadTileLayer | ( | const nlohmann::json & | layerJson, |
| InstantiationResult & | result | ||
| ) |
Definition at line 1632 of file World.cpp.
References GetComponentTypeID_Static(), LoadTileChunk(), and LoadTileData().
Referenced by InstantiatePass1_VisualLayers().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 206 of file World.cpp.
References GetComponentTypeID_Static(), and m_systems.
Referenced by AddComponent(), DestroyEntity(), and RemoveComponent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 347 of file World.cpp.
References GetComponentTypeID_Static(), and NotifyEditorEntityCreated().
Referenced by CreateEntity().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 355 of file World.cpp.
References GetComponentTypeID_Static(), and NotifyEditorEntityDestroyed().
Referenced by DestroyEntity().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 257 of file World.h.
References EventQueue::BeginFrame(), GameState_Paused, EventQueue::Get(), GetComponentTypeID_Static(), GameStateManager::GetState(), and Process_ECS_Systems().
Referenced by SDL_AppIterate().
Here is the call graph for this function:
Here is the caller graph for this function:| void World::Process_ECS_Systems | ( | ) |
Definition at line 176 of file World.cpp.
References GetComponentTypeID_Static(), and m_systems.
Referenced by Process().
Here is the call graph for this function:
Here is the caller graph for this function:Register a player entity that was loaded from a level file Validates required components and delegates to VideoGame for full setup.
Definition at line 2777 of file World.cpp.
References VideoGame::Get(), GetComponentTypeID_Static(), VideoGame::RegisterLoadedPlayerEntity(), and SYSTEM_LOG.
Referenced by InstantiateEntity().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 422 of file World.h.
References GetComponentTypeID_Static(), m_componentPools, m_entitySignatures, and Notify_ECS_Systems().
Here is the call graph for this function:
|
inline |
Definition at line 271 of file World.h.
References Render_ECS_Systems(), and RenderDebug_ECS_Systems().
Referenced by SDL_AppIterate().
Here is the call graph for this function:
Here is the caller graph for this function:| void World::Render_ECS_Systems | ( | ) |
Definition at line 185 of file World.cpp.
References ViewportManager::Get(), GetComponentTypeID_Static(), m_systems, and ViewportManager::Render().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:| void World::RenderDebug_ECS_Systems | ( | ) |
Definition at line 196 of file World.cpp.
References GetComponentTypeID_Static(), and m_systems.
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:| void World::SetEntityLayer | ( | EntityID | entity, |
| RenderLayer | layer | ||
| ) |
Set entity render layer (updates position.z)
Definition at line 292 of file World.cpp.
References GetComponentTypeID_Static(), LayerToZ(), and SYSTEM_LOG.
Referenced by PrefabFactory::CreateEntityFromBlueprint(), and PrefabFactory::CreateEntityWithOverrides().
Here is the call graph for this function:
Here is the caller graph for this function:| void World::SetMapBounds | ( | int | minTileX, |
| int | minTileY, | ||
| int | maxTileX, | ||
| int | maxTileY, | ||
| int | chunkOriginX, | ||
| int | chunkOriginY | ||
| ) |
Definition at line 2795 of file World.cpp.
References GetComponentTypeID_Static(), m_chunkOriginX, m_chunkOriginY, m_isometricOriginCached, m_maxTileX, m_maxTileY, m_minTileX, m_minTileY, and SYSTEM_LOG.
Referenced by InstantiatePass1_VisualLayers().
Here is the call graph for this function:
Here is the caller graph for this function:| void World::SyncGridWithLevel | ( | const Olympe::Editor::LevelDefinition & | levelDef | ) |
Synchronize grid settings with loaded level Extracts map orientation and tile dimensions from LevelDefinition and updates GridSettings_data (projection mode, cellSize, hexRadius) Supports: orthogonal, isometric, hexagonal orientations.
Definition at line 364 of file World.cpp.
References GetComponentTypeID_Static(), HexAxial, Iso, m_entitySignatures, Ortho, and SYSTEM_LOG.
Referenced by LoadLevelFromTiled().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Toggle collision overlay visibility.
Definition at line 564 of file World.h.
References GetComponentTypeID_Static(), m_entitySignatures, and SYSTEM_LOG.
Referenced by InputEventConsumeSystem::Process().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Toggle grid visibility.
Definition at line 531 of file World.h.
References GetComponentTypeID_Static(), m_entitySignatures, and SYSTEM_LOG.
Here is the call graph for this function:
|
inline |
Toggle navigation overlay visibility.
Definition at line 582 of file World.h.
References GetComponentTypeID_Static(), m_entitySignatures, and SYSTEM_LOG.
Referenced by InputEventConsumeSystem::Process().
Here is the call graph for this function:
Here is the caller graph for this function:| void World::UnloadCurrentLevel | ( | ) |
Definition at line 1302 of file World.cpp.
References TilesetManager::Clear(), DestroyEntity(), GetComponentTypeID_Static(), m_entities, m_entitySignatures, m_tileChunks, m_tilesetManager, and SYSTEM_LOG.
Referenced by LoadLevelFromTiled().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1361 of file World.cpp.
References PrefabFactory::Get(), GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by LoadLevelFromTiled().
Here is the call graph for this function:
Here is the caller graph for this function:
|
mutableprivate |
Definition at line 779 of file World.h.
Referenced by GetIsometricOriginX(), and GetIsometricOriginY().
|
mutableprivate |
Definition at line 780 of file World.h.
Referenced by GetIsometricOriginX(), and GetIsometricOriginY().
|
private |
Definition at line 775 of file World.h.
Referenced by GetChunkOriginX(), and SetMapBounds().
|
private |
Definition at line 776 of file World.h.
Referenced by GetChunkOriginY(), and SetMapBounds().
|
private |
Definition at line 640 of file World.h.
Referenced by AddComponent(), DestroyEntity(), GetComponent(), HasComponent(), and RemoveComponent().
|
private |
Definition at line 645 of file World.h.
Referenced by CreateEntity(), DestroyEntity(), GetAllEntities(), and UnloadCurrentLevel().
| std::unordered_map<EntityID, ComponentSignature> World::m_entitySignatures |
Definition at line 636 of file World.h.
Referenced by AddComponent(), CreateEntity(), DestroyEntity(), GridSystem::FindSettings(), GetActiveCameraTransform(), HasComponent(), IsCollisionOverlayVisible(), IsEntityValid(), IsGridEnabled(), IsNavigationOverlayVisible(), AIPerceptionSystem::Process(), RemoveComponent(), SyncGridWithLevel(), Olympe::EntityInspectorManager::SyncWithWorld(), ToggleCollisionOverlay(), ToggleGrid(), ToggleNavigationOverlay(), UnloadCurrentLevel(), and World().
|
private |
Definition at line 644 of file World.h.
Referenced by DestroyEntity().
Definition at line 781 of file World.h.
Referenced by GetIsometricOriginX(), GetIsometricOriginY(), and SetMapBounds().
|
private |
Definition at line 766 of file World.h.
Referenced by AddLevel(), and GetLevels().
|
private |
Definition at line 763 of file World.h.
Referenced by GetIsometricOriginX(), GetIsometricOriginY(), GetMapOrientation(), InstantiatePass1_VisualLayers(), and World().
|
private |
Definition at line 771 of file World.h.
Referenced by GetIsometricOriginX(), GetIsometricOriginY(), and SetMapBounds().
|
private |
Definition at line 772 of file World.h.
Referenced by GetIsometricOriginX(), GetIsometricOriginY(), and SetMapBounds().
|
private |
Definition at line 769 of file World.h.
Referenced by GetIsometricOriginX(), GetIsometricOriginY(), and SetMapBounds().
|
private |
Definition at line 770 of file World.h.
Referenced by GetIsometricOriginX(), GetIsometricOriginY(), and SetMapBounds().
|
private |
Definition at line 784 of file World.h.
Referenced by GetNextCustomLayerIndex().
|
private |
|
private |
Definition at line 648 of file World.h.
Referenced by Add_ECS_System(), GetSystem(), Notify_ECS_Systems(), Process_ECS_Systems(), Render_ECS_Systems(), and RenderDebug_ECS_Systems().
|
private |
Definition at line 762 of file World.h.
Referenced by GetTileChunks(), LoadLevelFromTiled(), LoadTileChunk(), LoadTileData(), and UnloadCurrentLevel().
|
private |
Definition at line 765 of file World.h.
Referenced by GetIsometricOriginX(), GetIsometricOriginY(), GetTileHeight(), InstantiatePass1_VisualLayers(), and World().
|
private |
Definition at line 761 of file World.h.
Referenced by GetTilesetManager(), InstantiatePass1_VisualLayers(), and UnloadCurrentLevel().
|
private |
Definition at line 764 of file World.h.
Referenced by GetIsometricOriginX(), GetIsometricOriginY(), GetTileWidth(), InstantiatePass1_VisualLayers(), and World().