mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 17:04:17 +00:00
Implement/match LegoPathActor::VTable0xa4 and VTable0xa8 (#945)
* Implement/match LegoPathActor::VTable0xa4 * Implement/match LegoPathActor::VTable0xa8 * Name enum constants
This commit is contained in:
committed by
GitHub
parent
8fee73c525
commit
6774784b37
@@ -628,14 +628,49 @@ MxResult LegoPathActor::VTable0x9c()
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1002f650
|
||||
void LegoPathActor::VTable0xa4(MxBool&, MxS32&)
|
||||
// FUNCTION: LEGO1 0x1002f650
|
||||
// FUNCTION: BETA10 0x100afd67
|
||||
void LegoPathActor::VTable0xa4(MxBool& p_und1, MxS32& p_und2)
|
||||
{
|
||||
// TODO
|
||||
switch (GetActorId()) {
|
||||
case 1:
|
||||
p_und1 = TRUE;
|
||||
p_und2 = 2;
|
||||
break;
|
||||
case 2:
|
||||
p_und1 = FALSE;
|
||||
p_und2 = 1;
|
||||
break;
|
||||
case 3:
|
||||
p_und1 = TRUE;
|
||||
p_und2 = 1;
|
||||
break;
|
||||
case 4:
|
||||
case 6:
|
||||
p_und1 = TRUE;
|
||||
p_und2 = rand() % p_und2 + 1;
|
||||
break;
|
||||
case 5:
|
||||
p_und1 = FALSE;
|
||||
p_und2 = 2;
|
||||
break;
|
||||
default:
|
||||
p_und1 = TRUE;
|
||||
p_und2 = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1002f700
|
||||
// FUNCTION: LEGO1 0x1002f700
|
||||
// FUNCTION: BETA10 0x100afe4c
|
||||
void LegoPathActor::VTable0xa8()
|
||||
{
|
||||
// TODO
|
||||
m_lastTime = Timer()->GetTime();
|
||||
m_roi->FUN_100a58f0(m_unk0xec);
|
||||
m_roi->VTable0x14();
|
||||
|
||||
if (m_userNavFlag) {
|
||||
m_roi->WrappedSetLocalTransform(m_unk0xec);
|
||||
FUN_10010c30();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,19 +61,19 @@ void LegoPathBoundary::FUN_100575b0(Vector3& p_point1, Vector3& p_point2, LegoPa
|
||||
|
||||
if (dot2 > dot1) {
|
||||
for (MxS32 i = 0; i < m_unk0x48; i++) {
|
||||
LegoPathStruct* s = m_unk0x4c[i].m_pathStruct;
|
||||
LegoPathStruct* s = m_pathTrigger[i].m_pathStruct;
|
||||
|
||||
if (m_unk0x4c[i].m_unk0x08 >= dot1 && m_unk0x4c[i].m_unk0x08 < dot2) {
|
||||
s->HandleTrigger(p_actor, TRUE, m_unk0x4c[i].m_data);
|
||||
if (m_pathTrigger[i].m_unk0x08 >= dot1 && m_pathTrigger[i].m_unk0x08 < dot2) {
|
||||
s->HandleTrigger(p_actor, TRUE, m_pathTrigger[i].m_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (dot2 < dot1) {
|
||||
for (MxS32 i = 0; i < m_unk0x48; i++) {
|
||||
LegoPathStruct* s = m_unk0x4c[i].m_pathStruct;
|
||||
LegoPathStruct* s = m_pathTrigger[i].m_pathStruct;
|
||||
|
||||
if (m_unk0x4c[i].m_unk0x08 >= dot2 && m_unk0x4c[i].m_unk0x08 < dot1) {
|
||||
s->HandleTrigger(p_actor, FALSE, m_unk0x4c[i].m_data);
|
||||
if (m_pathTrigger[i].m_unk0x08 >= dot2 && m_pathTrigger[i].m_unk0x08 < dot1) {
|
||||
s->HandleTrigger(p_actor, FALSE, m_pathTrigger[i].m_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,21 +678,24 @@ MxResult LegoPathController::ReadBoundaries(LegoStorage* p_storage)
|
||||
|
||||
if (boundary.m_unk0x48 > 0) {
|
||||
boundary.m_unk0x50 = new Mx3DPointFloat;
|
||||
boundary.m_unk0x4c = new LegoWEGEdge::PathWithTrigger[boundary.m_unk0x48];
|
||||
boundary.m_pathTrigger = new LegoWEGEdge::PathWithTrigger[boundary.m_unk0x48];
|
||||
|
||||
for (j = 0; j < boundary.m_unk0x48; j++) {
|
||||
if (p_storage->Read(&s, sizeof(s)) != SUCCESS) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
boundary.m_unk0x4c[j].m_pathStruct = &m_structs[s];
|
||||
boundary.m_pathTrigger[j].m_pathStruct = &m_structs[s];
|
||||
|
||||
if (p_storage->Read(&boundary.m_unk0x4c[j].m_data, sizeof(boundary.m_unk0x4c[j].m_data)) != SUCCESS) {
|
||||
if (p_storage->Read(&boundary.m_pathTrigger[j].m_data, sizeof(boundary.m_pathTrigger[j].m_data)) !=
|
||||
SUCCESS) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (p_storage->Read(&boundary.m_unk0x4c[j].m_unk0x08, sizeof(boundary.m_unk0x4c[j].m_unk0x08)) !=
|
||||
SUCCESS) {
|
||||
if (p_storage->Read(
|
||||
&boundary.m_pathTrigger[j].m_unk0x08,
|
||||
sizeof(boundary.m_pathTrigger[j].m_unk0x08)
|
||||
) != SUCCESS) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ DECOMP_SIZE_ASSERT(LegoPathStructBase, 0x0c)
|
||||
DECOMP_SIZE_ASSERT(LegoPathStruct, 0x14)
|
||||
|
||||
// Flags used in isle.cpp
|
||||
extern MxU32 g_unk0x100f1198;
|
||||
extern MxU32 g_isleFlags;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f119c
|
||||
MxBool g_unk0x100f119c = FALSE;
|
||||
@@ -45,7 +45,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
||||
|
||||
switch (m_name[2]) {
|
||||
case c_camAnim:
|
||||
if (g_unk0x100f1198 & Isle::c_bit6) {
|
||||
if (g_isleFlags & Isle::c_playCamAnims) {
|
||||
PlayCamAnim(p_actor, bool2, p_data, TRUE);
|
||||
}
|
||||
break;
|
||||
@@ -75,7 +75,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction,
|
||||
break;
|
||||
}
|
||||
case c_music:
|
||||
if (g_unk0x100f1198 & Isle::c_bit7) {
|
||||
if (g_isleFlags & Isle::c_playMusic) {
|
||||
PlayMusic(p_direction, p_data);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user