Simulator::cScenarioData class

Base classes

class App::IUnmanagedMessageListener
Same as App::IMessageListener, but this one does not use ref-counting.
class Editors::INameableEntity
class DefaultRefCounted
The default implementation of a reference counted class.

Public static functions

static auto GetEditModeActIndex() -> int
Returns the index of the current act in the adventure edit mode.
static auto CreateObjectInstance(const ResourceKey& name, const Vector3& position, const Quaternion& orientation, float scale, bool isAvatar, int scenarioClassIndex, cScenarioMarker* pMarker, cScenarioMarkerAct* pActs, int actIndex) -> cGameData*
Create an Simulator object instance for a scenario object class.
static auto CreatePowerupObjectInstance(App::PropertyList* pPropList, cScenarioMarker* pMarker, int scenarioClassIndex) -> cGameData*
Called by CreateObjectInstance() (and another method related with respawners), creates the object instance of a powerup adventure object.

Public functions

auto GetGenre() -> ScenarioGenre virtual
auto SetGenre(ScenarioGenre genre) -> void virtual
auto Initialize(bool) -> void
auto StartHistoryEntry() -> void
Starts a history entry (i.e.
auto CommitHistoryEntry() -> void
Commits an on-going history entry (i.e.
auto GetClass(int index) -> cScenarioClass*
Returns the scenario class identified by the given index.
auto GetCurrentClassAct(cGameData* pObject) -> cScenarioClassAct*
Retrieves the scenario act-specific data of a certain object.
auto GetObjectForMarker(cScenarioMarker* pMarker) -> cGameData*
Returns the game data object that represents the given marker.
auto GetMarkerForObject(cGameData* pGameData) -> cScenarioMarker*
Returns the scenario marker information that is represented by the given game data object.

Public variables

cScenarioResourcePtr mpResource
bool mHadMissingAssets
int field_18
bool field_1C
int field_20
int field_24
int field_28
bool field_2C
int field_30
int field_34
TexturePtr mThumbnail
TexturePtr mLargeThumbnail
int field_40
int field_44
int field_48
eastl::string16 mName
Whenever the name is changed (use the SetName() method) it sends a 0x7AA519DC message.
eastl::string16 mDescription
Whenever the description is changed (use the SetDescription() method) it sends a 0x14418C3F message.
eastl::string16 mTags
Whenever the tags are changed (use the SetTags() method) it sends a 0x73127E6 message.
ScenarioGenre mGenre
int field_80
bool mGenreHasChanged
Set by the SetGenre() function when the genre changes.
bool mMetadataHasChanged
Set to true when the name, description, or tags are changed.
int field_88
cScenarioMarker* mpAvatarMarker
eastl::hash_map<cGameData*, int> mObjectsToMarkersMap
Maps to each scenario marker (its index) its instantiated cGameData object.
eastl::hash_map<int, cGameDataPtr> mMarkersToObjectsMap
Maps each scenario marker (its index) to its instantiated cGameData object.
cScenarioDataEconomyPtr mpEconomy
App::MessageListenerData field_D4
int field_E8
int field_EC
int field_F0
int field_F4
int field_F8
int field_FC
int field_100
int field_104
int field_108
int field_10C
int field_110
int field_114
int field_118
int field_11C
int field_120
bool mHasLoaded
eastl::vector<int> field_128
eastl::hash_map<int, int> field_13C
eastl::hash_map<int, int> field_15C
eastl::hash_map<int, int> field_17C
eastl::hash_map<int, int> field_19C
eastl::hash_map<int, int> field_1BC
eastl::hash_map<int, int> field_1DC

Function documentation

static cGameData* Simulator::cScenarioData::CreateObjectInstance(const ResourceKey& name, const Vector3& position, const Quaternion& orientation, float scale, bool isAvatar, int scenarioClassIndex, cScenarioMarker* pMarker, cScenarioMarkerAct* pActs, int actIndex)

Create an Simulator object instance for a scenario object class.

Parameters
name File name of the object to create (usually a .crt, .bld, .prop etc)
position World position for the newly created object
orientation World orientation for the newly created object
scale Scale of the object
isAvatar True if the object being created is the avatar (i.e. the player creature)
scenarioClassIndex Index to the scenario class that describes this object (within the cScenarioResource classes vector)
pMarker
pActs
actIndex

It also calls the cGameNounManager::UpdateModels() method.

static cGameData* Simulator::cScenarioData::CreatePowerupObjectInstance(App::PropertyList* pPropList, cScenarioMarker* pMarker, int scenarioClassIndex)

Called by CreateObjectInstance() (and another method related with respawners), creates the object instance of a powerup adventure object.

Parameters
pPropList
pMarker
scenarioClassIndex
Returns The created game object

The instance is a cOrnament for most objects, or a cInteractiveOrnament for objects that can be picked up. Teleporters create two objects (for the entrance and exit teleporters) and return the entrance one.

void Simulator::cScenarioData::StartHistoryEntry()

Starts a history entry (i.e.

one undo/redo action) based on the current state of the scenario data (the mpResource field). This must be called before changing the data; after the data has been modified, call CommitHistoryEntry() to finish this history entry.

void Simulator::cScenarioData::CommitHistoryEntry()

Commits an on-going history entry (i.e.

one undo/redo action) based on the current state of the scenario data (the mpResource field). This must be called after changing the data; before modifying the data you must have called StartHistoryEntry().

cScenarioClass* Simulator::cScenarioData::GetClass(int index)

Returns the scenario class identified by the given index.

Parameters
index

cScenarioClassAct* Simulator::cScenarioData::GetCurrentClassAct(cGameData* pObject)

Retrieves the scenario act-specific data of a certain object.

Parameters
pObject

cGameData* Simulator::cScenarioData::GetObjectForMarker(cScenarioMarker* pMarker)

Returns the game data object that represents the given marker.

Parameters
pMarker

cScenarioMarker* Simulator::cScenarioData::GetMarkerForObject(cGameData* pGameData)

Returns the scenario marker information that is represented by the given game data object.

Parameters
pGameData