mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Clear unknowns in Act3List
and Act3ListElement
(#1666)
This commit is contained in:
@@ -18,14 +18,20 @@ class MxQuaternionTransformer;
|
|||||||
|
|
||||||
// SIZE 0x0c
|
// SIZE 0x0c
|
||||||
struct Act3ListElement {
|
struct Act3ListElement {
|
||||||
MxU32 m_objectId; // 0x00
|
enum InsertMode {
|
||||||
undefined4 m_unk0x04; // 0x04
|
e_replaceAction = 1,
|
||||||
MxBool m_hasStarted; // 0x08
|
e_queueAction = 2,
|
||||||
|
e_onlyIfEmpty = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
MxU32 m_objectId; // 0x00
|
||||||
|
InsertMode m_insertMode; // 0x04
|
||||||
|
MxBool m_hasStarted; // 0x08
|
||||||
|
|
||||||
Act3ListElement() {}
|
Act3ListElement() {}
|
||||||
|
|
||||||
Act3ListElement(MxU32 p_objectId, undefined4 p_unk0x04, MxBool p_hasStarted)
|
Act3ListElement(MxU32 p_objectId, InsertMode p_insertMode, MxBool p_hasStarted)
|
||||||
: m_objectId(p_objectId), m_unk0x04(p_unk0x04), m_hasStarted(p_hasStarted)
|
: m_objectId(p_objectId), m_insertMode(p_insertMode), m_hasStarted(p_hasStarted)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,21 +42,15 @@ struct Act3ListElement {
|
|||||||
// SIZE 0x10
|
// SIZE 0x10
|
||||||
class Act3List : private list<Act3ListElement> {
|
class Act3List : private list<Act3ListElement> {
|
||||||
public:
|
public:
|
||||||
enum InsertMode {
|
Act3List() { m_cleared = FALSE; }
|
||||||
e_replaceAction = 1,
|
|
||||||
e_queueAction = 2,
|
|
||||||
e_onlyIfEmpty = 3
|
|
||||||
};
|
|
||||||
|
|
||||||
Act3List() { m_unk0x0c = 0; }
|
void Insert(MxS32 p_objectId, Act3ListElement::InsertMode p_option);
|
||||||
|
|
||||||
void Insert(MxS32 p_objectId, InsertMode p_option);
|
|
||||||
void DeleteActionWrapper();
|
void DeleteActionWrapper();
|
||||||
void Clear();
|
void Clear();
|
||||||
void RemoveByObjectIdOrFirst(MxU32 p_objectId);
|
void RemoveByObjectIdOrFirst(MxU32 p_objectId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
undefined4 m_unk0x0c; // 0x0c
|
MxU32 m_cleared; // 0x0c
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d4fc8
|
// VTABLE: LEGO1 0x100d4fc8
|
||||||
|
@@ -109,14 +109,14 @@ Act3Script::Script g_unk0x100d95e8[] =
|
|||||||
{Act3Script::c_tlp053in_RunAnim, Act3Script::c_tlp064la_RunAnim, Act3Script::c_tlp068in_RunAnim};
|
{Act3Script::c_tlp053in_RunAnim, Act3Script::c_tlp064la_RunAnim, Act3Script::c_tlp068in_RunAnim};
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10071d40
|
// FUNCTION: LEGO1 0x10071d40
|
||||||
void Act3List::Insert(MxS32 p_objectId, InsertMode p_option)
|
void Act3List::Insert(MxS32 p_objectId, Act3ListElement::InsertMode p_option)
|
||||||
{
|
{
|
||||||
if (m_unk0x0c) {
|
if (m_cleared) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (p_option) {
|
switch (p_option) {
|
||||||
case InsertMode::e_replaceAction:
|
case Act3ListElement::InsertMode::e_replaceAction:
|
||||||
if (!empty()) {
|
if (!empty()) {
|
||||||
DeleteActionWrapper();
|
DeleteActionWrapper();
|
||||||
push_back(Act3ListElement(p_objectId, p_option, FALSE));
|
push_back(Act3ListElement(p_objectId, p_option, FALSE));
|
||||||
@@ -126,7 +126,7 @@ void Act3List::Insert(MxS32 p_objectId, InsertMode p_option)
|
|||||||
push_back(Act3ListElement(p_objectId, p_option, TRUE));
|
push_back(Act3ListElement(p_objectId, p_option, TRUE));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case InsertMode::e_queueAction:
|
case Act3ListElement::InsertMode::e_queueAction:
|
||||||
if (empty()) {
|
if (empty()) {
|
||||||
push_back(Act3ListElement(p_objectId, p_option, TRUE));
|
push_back(Act3ListElement(p_objectId, p_option, TRUE));
|
||||||
InvokeAction(Extra::e_start, *g_act3Script, p_objectId, NULL);
|
InvokeAction(Extra::e_start, *g_act3Script, p_objectId, NULL);
|
||||||
@@ -135,7 +135,7 @@ void Act3List::Insert(MxS32 p_objectId, InsertMode p_option)
|
|||||||
push_back(Act3ListElement(p_objectId, p_option, FALSE));
|
push_back(Act3ListElement(p_objectId, p_option, FALSE));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case InsertMode::e_onlyIfEmpty:
|
case Act3ListElement::InsertMode::e_onlyIfEmpty:
|
||||||
if (empty()) {
|
if (empty()) {
|
||||||
push_back(Act3ListElement(p_objectId, p_option, TRUE));
|
push_back(Act3ListElement(p_objectId, p_option, TRUE));
|
||||||
InvokeAction(Extra::e_start, *g_act3Script, p_objectId, NULL);
|
InvokeAction(Extra::e_start, *g_act3Script, p_objectId, NULL);
|
||||||
@@ -153,7 +153,7 @@ void Act3List::DeleteActionWrapper()
|
|||||||
// FUNCTION: LEGO1 0x10071fb0
|
// FUNCTION: LEGO1 0x10071fb0
|
||||||
void Act3List::Clear()
|
void Act3List::Clear()
|
||||||
{
|
{
|
||||||
m_unk0x0c = 1;
|
m_cleared = TRUE;
|
||||||
BackgroundAudioManager()->Stop();
|
BackgroundAudioManager()->Stop();
|
||||||
|
|
||||||
if (empty()) {
|
if (empty()) {
|
||||||
@@ -176,7 +176,7 @@ void Act3List::Clear()
|
|||||||
// FUNCTION: LEGO1 0x100720d0
|
// FUNCTION: LEGO1 0x100720d0
|
||||||
void Act3List::RemoveByObjectIdOrFirst(MxU32 p_objectId)
|
void Act3List::RemoveByObjectIdOrFirst(MxU32 p_objectId)
|
||||||
{
|
{
|
||||||
if (m_unk0x0c) {
|
if (m_cleared) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,7 +214,7 @@ void Act3List::RemoveByObjectIdOrFirst(MxU32 p_objectId)
|
|||||||
it++;
|
it++;
|
||||||
|
|
||||||
while (it != end()) {
|
while (it != end()) {
|
||||||
if ((*it).m_unk0x04 == 1) {
|
if ((*it).m_insertMode == Act3ListElement::e_replaceAction) {
|
||||||
for (Act3List::iterator it2 = begin(); it2 != it; erase(it2++)) {
|
for (Act3List::iterator it2 = begin(); it2 != it; erase(it2++)) {
|
||||||
if ((*it2).m_hasStarted) {
|
if ((*it2).m_hasStarted) {
|
||||||
DeleteActionWrapper();
|
DeleteActionWrapper();
|
||||||
@@ -468,14 +468,14 @@ void Act3::TriggerHitSound(undefined4 p_param1)
|
|||||||
m_bricksterDonutSound = 0;
|
m_bricksterDonutSound = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_unk0x4220.Insert(g_bricksterDonutSounds[m_bricksterDonutSound++], Act3List::e_replaceAction);
|
m_unk0x4220.Insert(g_bricksterDonutSounds[m_bricksterDonutSound++], Act3ListElement::e_replaceAction);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_unk0x4220.Insert(objectId, Act3List::e_onlyIfEmpty);
|
m_unk0x4220.Insert(objectId, Act3ListElement::e_onlyIfEmpty);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10072c30
|
// FUNCTION: LEGO1 0x10072c30
|
||||||
|
Reference in New Issue
Block a user