18#ifndef INCLUDED_OBJECTMANAGER
19#define INCLUDED_OBJECTMANAGER
27#include <unordered_map>
48 ObjectKey(
const CStr& identifier,
const std::vector<u8>& var)
87 std::pair<bool, CActorDef&>
FindActorDef(
const CStrW& actorName);
147 std::map<ObjectKey, Hotloadable<CObjectEntry>>
m_Objects;
Represents an actor file.
Definition: ObjectBase.h:215
Definition: ConfigDB.h:212
Definition: MeshManager.h:32
Maintains the tree of possible objects from a specific actor definition at a given quality level.
Definition: ObjectBase.h:47
Definition: ObjectEntry.h:38
Definition: ObjectManager.h:42
CMeshManager & m_MeshManager
Definition: ObjectManager.h:128
CMeshManager & GetMeshManager() const
Definition: ObjectManager.h:77
CObjectManager(CMeshManager &meshManager, CSkeletonAnimManager &skeletonAnimManager, CSimulation2 &simulation)
Definition: ObjectManager.cpp:49
std::map< ObjectKey, Hotloadable< CObjectEntry > > m_Objects
Definition: ObjectManager.h:147
CSkeletonAnimManager & m_SkeletonAnimManager
Definition: ObjectManager.h:129
std::unordered_map< CStrW, Hotloadable< CActorDef > > m_ActorDefs
Definition: ObjectManager.h:148
CSimulation2 & m_Simulation
Definition: ObjectManager.h:130
CObjectEntry * FindObjectVariation(const CActorDef *actor, const std::vector< std::set< CStr > > &selections, uint32_t seed)
Get the object entry for a given actor & the given selections list.
Definition: ObjectManager.cpp:94
void ActorQualityChanged()
Reload actors that have a quality setting.
Definition: ObjectManager.cpp:196
VariantDiversity
Governs how random variants are selected by ObjectBase.
Definition: ObjectManager.h:62
VariantDiversity GetVariantDiversity() const
Definition: ObjectManager.cpp:147
VariantDiversity m_VariantDiversity
Definition: ObjectManager.h:135
void UnloadObjects()
Definition: ObjectManager.cpp:152
~CObjectManager()
Definition: ObjectManager.cpp:61
std::pair< bool, CActorDef & > FindActorDef(const CStrW &actorName)
Get the actor definition for the given path name.
Definition: ObjectManager.cpp:68
u8 m_QualityLevel
Definition: ObjectManager.h:132
std::unique_ptr< CConfigDBHook > m_VariantDiversityHook
Definition: ObjectManager.h:136
NONCOPYABLE(CObjectManager)
std::unique_ptr< CConfigDBHook > m_QualityHook
Definition: ObjectManager.h:133
Status ReloadChangedFile(const VfsPath &path)
Reload any scripts that were loaded from the given filename.
Definition: ObjectManager.cpp:158
CTerrain * GetTerrain()
Get the terrain object that actors managed by this manager should be linked with (primarily for the p...
Definition: ObjectManager.cpp:139
void VariantDiversityChanged()
Reload actors.
Definition: ObjectManager.cpp:214
CObjectEntry * FindObjectVariation(const CStrW &objname, const std::vector< const std::set< CStr > * > &completeSelections)
CSkeletonAnimManager & GetSkeletonAnimManager() const
Definition: ObjectManager.h:78
Public API for simulation system.
Definition: Simulation2.h:47
Definition: SkeletonAnimManager.h:39
Definition: ShaderDefines.cpp:31
i64 Status
Error handling system.
Definition: status.h:173
Definition: ObjectManager.h:140
bool outdated
Definition: ObjectManager.h:143
std::unique_ptr< T > obj
Definition: ObjectManager.h:144
Hotloadable(std::unique_ptr< T > &&ptr)
Definition: ObjectManager.h:142
Definition: ObjectManager.h:47
CStr ObjectBaseIdentifier
Definition: ObjectManager.h:54
ObjectKey(const CStr &identifier, const std::vector< u8 > &var)
Definition: ObjectManager.h:48
std::vector< u8 > ActorVariation
Definition: ObjectManager.h:55
bool operator<(const CObjectManager::ObjectKey &a) const
Definition: ObjectManager.cpp:34
uint8_t u8
Definition: types.h:37
unsigned int uint32_t
Definition: wposix_types.h:53