Simulator::cGameNounManager class

The class that manages game objects, known in Spore code as 'nouns'.

Use this class to create or destroy instances of Simulator classes. To create a Simulator object, use simulator_new() (which calls this class). This class is also used to obtain all active instances of a certain object, using Simulator::GetData(). Use GameNounManager.GetAvatar() to obtain the player creature.

This is a singleton class, so use GameNounManager to access it.

Base classes

class App::IMessageListener
An interface that can receive messages sent through the app.
class cStrategy

Public static functions

static auto Get() -> cGameNounManager*
Returns the active Simulator game noun manager.

Public functions

auto CreateInstance(uint32_t nounID) -> cGameData*
Creates an instance of a simulator object of the given type.
auto DestroyInstance(cGameData* pInstance) -> void
auto UpdateModels() -> void
auto GetPlayer() -> cPlayer*
auto EnsurePlayer() -> void
If there is no cPlayer instance created, it creates one.
template<class T>
auto GetData(ContainerCreateCallback_t<T> pCreate, ContainerClearCallback_t<T> pClear, ContainerAddCallback_t<T> pAdd, ContainerFilterCallback_t pFilter, uint32_t nounID) -> tGameDataVectorT<T>&
Gets all the game data objects that use the given game noun ID.
auto GetAvatar() -> cCreatureAnimal*
auto SetAvatar(cCreatureAnimal* pAnimal) -> void
auto GetPlayerTribe() -> cTribe*
auto GetPlayerCivilization() -> cCivilization*
auto CreateHerd(const Vector3& position, cSpeciesProfile* pSpeciesProfile, int herdSize, bool isOwnedByAvatar, int creaturePersonality, bool createNest) -> cHerd*
auto CreateNest(const Vector3& position, cHerd* herd) -> cNest*

Public variables

eastl::hash_map<int, int> field_20
int field_40
int field_44
int field_48
int field_4C
int field_50
cCreatureAnimalPtr mpAvatar
cHerdPtr mpAvatarHerd
eastl::vector<cCreatureAnimalPtr> mPosseMembers
cTribePtr mpPlayerTribe
cPlayerPtr mpPlayer
eastl::intrusive_list<cGameData> mNouns
eastl::vector<ObjectPtr> field_80
int field_94
eastl::map<uint32_t, tGameDataVectorT<cGameData>> mNounMap
eastl::map<int, int> mPoliticalMap
eastl::map<int, ObjectPtr> field_D0
eastl::map<int, ObjectPtr> field_EC
int field_108
eastl::list<cGameDataPtr> mObjects
int field_118

Function documentation

cGameData* Simulator::cGameNounManager::CreateInstance(uint32_t nounID)

Creates an instance of a simulator object of the given type.

Parameters
nounID The ID of the object to create.
Returns The created object, as a Simulator::cGameData*.

The noun ID is one of the values in the Simulator::GameNounIDs enum.

template<class T>
tGameDataVectorT<T>& Simulator::cGameNounManager::GetData(ContainerCreateCallback_t<T> pCreate, ContainerClearCallback_t<T> pClear, ContainerAddCallback_t<T> pAdd, ContainerFilterCallback_t pFilter, uint32_t nounID)

Gets all the game data objects that use the given game noun ID.

To be more specific, first a container is created with the pCreate callback; then