18 #ifndef INCLUDED_OBJECTBASE 19 #define INCLUDED_OBJECTBASE 31 #include <boost/random/mersenne_twister.hpp> 35 #include <unordered_set> 76 Prop() : m_minHeight(0.f), m_maxHeight(0.f), m_selectable(true) {}
97 Decal() : m_SizeX(0.f), m_SizeZ(0.f), m_Angle(0.f), m_OffsetX(0.f), m_OffsetZ(0.f) {}
226 std::vector<u8> QualityLevels()
const;
233 std::set<CStr> PickSelectionsAtRandom(
uint32_t seed)
const;
240 const std::shared_ptr<CObjectBase>& GetBase(
u8 QualityLevel)
const;
252 void LoadErrorPlaceholder(
const VfsPath& pathname);
bool m_selectable
Definition: ObjectBase.h:84
CStrW m_ModelName
Definition: ObjectBase.h:80
std::vector< u8 > CalculateVariationKey(const std::vector< const std::set< CStr > *> &selections) const
Definition: ObjectBase.cpp:348
float m_SoundPos
Definition: ObjectBase.h:70
void GetQualitySplits(std::vector< u8 > &splits) const
Get all quality levels at which this object changes (includes props).
Definition: ObjectBase.cpp:725
CActorDef & m_ActorDef
Definition: ObjectBase.h:201
std::vector< std::shared_ptr< CObjectBase > > m_ObjectBases
Definition: ObjectBase.h:267
VfsPath m_ModelFilename
Definition: ObjectBase.h:112
VfsPath m_Material
Definition: ObjectBase.h:169
CStr m_AnimName
Definition: ObjectBase.h:58
CObjectManager & m_ObjectManager
Definition: ObjectBase.h:264
float m_Angle
Definition: ObjectBase.h:101
float m_maxHeight
Definition: ObjectBase.h:83
Definition: ObjectManager.h:41
Decal decal
Definition: ObjectBase.h:125
Decal()
Definition: ObjectBase.h:97
float m_Speed
Definition: ObjectBase.h:65
Definition: XMBData.h:135
std::vector< Prop > m_Props
Definition: ObjectBase.h:118
Represents an actor file.
Definition: ObjectBase.h:214
Definition: ObjectBase.h:95
float m_SizeX
Definition: ObjectBase.h:99
bool Load(const CXeromyces &XeroFile, const XMBElement &base)
Definition: ObjectBase.cpp:80
CStr m_VariantName
Definition: ObjectBase.h:110
VfsPath m_FileName
Definition: ObjectBase.h:63
std::set< CStr > CalculateRandomRemainingSelections(uint32_t seed, const std::vector< std::set< CStr >> &initialSelections) const
Definition: ObjectBase.cpp:510
std::vector< std::vector< CStr > > GetVariantGroups() const
Definition: ObjectBase.cpp:660
uint8_t u8
Definition: types.h:37
VfsPath particles
Definition: ObjectBase.h:126
CStr color
Definition: ObjectBase.h:127
CStrIntern m_SamplerName
Definition: ObjectBase.h:90
VfsPath m_Particles
Definition: ObjectBase.h:114
std::vector< std::vector< Variant > > m_VariantGroups
Definition: ObjectBase.h:206
Variant()
Definition: ObjectBase.h:108
Definition: ObjectBase.h:87
const Variation BuildVariation(const std::vector< u8 > &variationKey) const
Definition: ObjectBase.cpp:436
CStr m_ID
Definition: ObjectBase.h:60
Interned 8-bit strings.
Definition: CStrIntern.h:37
std::multimap< CStr, Samp > samplers
Definition: ObjectBase.h:130
VfsPath m_Pathname
Definition: ObjectBase.h:261
std::vector< Anim > m_Anims
Definition: ObjectBase.h:117
boost::mt19937 rng_t
Definition: ObjectBase.h:186
float m_ActionPos2
Definition: ObjectBase.h:69
std::vector< Samp > m_Samplers
Definition: ObjectBase.h:119
struct CObjectBase::@7 m_Properties
CStr m_Identifier
Definition: ObjectBase.h:204
std::multimap< CStr, Prop > props
Definition: ObjectBase.h:128
u8 m_QualityLevel
Definition: ObjectBase.h:172
Anim()
Definition: ObjectBase.h:56
CObjectManager & m_ObjectManager
Definition: ObjectBase.h:207
Prop()
Definition: ObjectBase.h:76
float m_OffsetX
Definition: ObjectBase.h:102
CObjectBase(CObjectManager &objectManager, CActorDef &actorDef, u8 QualityLevel)
Definition: ObjectBase.cpp:59
VfsPath GetPathname() const
Definition: ObjectBase.h:228
Definition: ObjectBase.h:73
friend CActorDef
Definition: ObjectBase.h:48
CStr m_PropPointName
Definition: ObjectBase.h:78
int m_Frequency
Definition: ObjectBase.h:61
CStr m_Color
Definition: ObjectBase.h:115
Definition: Xeromyces.h:40
std::unique_ptr< CObjectBase > CopyWithQuality(u8 newQualityLevel) const
Acts as an explicit copy constructor, for a new quality level.
Definition: ObjectBase.cpp:70
std::multimap< CStr, Anim > anims
Definition: ObjectBase.h:129
VfsPath model
Definition: ObjectBase.h:124
unsigned int uint32_t
Definition: wposix_types.h:53
Maintains the tree of possible objects from a specific actor definition at a given quality level...
Definition: ObjectBase.h:46
const CStr & GetIdentifier() const
Definition: ObjectBase.cpp:769
bool UsesFile(const VfsPath &pathname) const
Returns whether this object (including any possible props) uses the given file.
Definition: ObjectBase.cpp:774
bool m_CastShadows
Definition: ObjectBase.h:163
std::unordered_set< VfsPath > m_UsedFiles
Definition: ObjectBase.h:269
bool m_FloatOnWater
Definition: ObjectBase.h:165
float m_SizeZ
Definition: ObjectBase.h:100
Decal m_Decal
Definition: ObjectBase.h:113
float m_OffsetZ
Definition: ObjectBase.h:103
Definition: ObjectBase.h:122
Definition: ObjectBase.h:106
VfsPath m_SamplerFile
Definition: ObjectBase.h:92
bool LoadVariant(const CXeromyces &XeroFile, const XMBElement &variant, Variant ¤tVariant)
Definition: ObjectBase.cpp:160
float m_ActionPos
Definition: ObjectBase.h:68
Definition: ObjectBase.h:53
Definition: ObjectEntry.h:38
float m_minHeight
Definition: ObjectBase.h:82
int m_Frequency
Definition: ObjectBase.h:111