16 m_type = e_selectAction;
31 m_unk0x9c = p_dsSelectAction.m_unk0x9c;
37 while (cursor.
Next(
string)) {
52 if (
this != &p_dsSelectAction) {
78 totalSizeOnDisk += strlen(m_unk0x9c.
GetData()) + 1;
82 while (cursor.
Next(
string)) {
83 totalSizeOnDisk += strlen(
string.GetData()) + 1;
90 return totalSizeOnDisk;
101 MxU32 extraFlag = *(
MxU32*) (p_source + 4) & 1;
104 m_unk0x9c = (
char*) p_source;
106 if (strnicmp(m_unk0x9c.
GetData(),
"RANDOM_", strlen(
"RANDOM_")) != 0) {
111 MxS16 value = atoi(&m_unk0x9c.
GetData()[strlen(
"RANDOM_")]);
113 srand(
Timer()->GetTime());
114 MxS32 random = rand() % value;
115 string = itoa((
MxS16) random, buffer, 10);
118 p_source += strlen((
char*) p_source) + 1;
121 p_source +=
sizeof(
MxU32);
128 for (i = 0; i < count; i++) {
129 if (!strcmp(
string.GetData(), (
char*) p_source)) {
133 m_unk0xac->
Append((
char*) p_source);
134 p_source += strlen((
char*) p_source) + 1;
137 for (i = 0; i < count; i++) {
138 MxU32 extraFlag = *(
MxU32*) (p_source + 4) & 1;
150 p_source += extraFlag;
154 p_source += extraFlag;
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
MxU32 GetSizeOnDisk() override
[AI] Serializes the size on disk of this action (all fields + extra data length)
void Deserialize(MxU8 *&p_source, MxS16 p_unk0x24) override
[AI] Deserializes this action's data from a binary buffer.
MxDSActionList * m_actionList
[AI] List of contained actions (ownership: this owns and deletes subactions).
MxU32 m_sizeOnDisk
[AI] Stores the last-computed disk storage size for m_actionList and metadata.
[AI] Represents an action that can play multiple MxDSActions in parallel.
MxDSParallelAction & operator=(MxDSParallelAction &p_dsParallelAction)
[AI] Assignment operator.
[AI] Represents a "select" action within a DS (Script/Scene) file, deserialized from SI files to sele...
MxDSAction * Clone() override
[AI] Creates a deep copy ("clone") of this select action, including its internal strings and selected...
~MxDSSelectAction() override
[AI] Destructor.
void CopyFrom(MxDSSelectAction &p_dsSelectAction)
[AI] Copies all internal data from another MxDSSelectAction including string list and selection varia...
MxDSSelectAction()
[AI] Default constructor.
void Deserialize(MxU8 *&p_source, MxS16 p_unk0x24) override
[AI] Loads (deserializes) this action from a binary source buffer.
MxU32 GetSizeOnDisk() override
[AI] Computes the total size needed to serialize this object to disk, including selection strings and...
MxDSSelectAction & operator=(MxDSSelectAction &p_dsSelectAction)
[AI] Assignment operator; performs a deep copy of the source select action, including all sub-actions...
[AI] Cursor class for traversing an MxStringList.
[AI] Specialized list class for storing MxString objects.
Mindscape custom string class for managing dynamic C-strings within the game engine.
char * GetData() const
Returns a pointer to the internal character buffer.
const char * GetVariable(const char *p_key)
Returns the value for the variable with a given key, or an empty string if not found.
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
MxDSObject * DeserializeDSObjectDispatch(MxU8 *&, MxS16)
[AI] Reads and deserializes a DS object of the specific type from an SI buffer.
MxTimer * Timer()
[AI] Returns the global simulation timer.
MxVariableTable * VariableTable()
[AI] Returns the variable table used for script variables and global key/value state.