mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-27 10:24:18 +00:00
Implement/match several functions in Act3, refactor (#1197)
* Implement/match several functions in Act3, refactor * Fix naming * Rename * Add comment * Add annotation * Add BETA assert
This commit is contained in:
committed by
GitHub
parent
97fb6e4f15
commit
1aff40dd94
@@ -117,7 +117,7 @@ MxResult Act2Actor::VTable0x9c()
|
||||
|
||||
// STUB: LEGO1 0x10018c30
|
||||
// STUB: BETA10 0x1000cb52
|
||||
void Act2Actor::VTable0x70(float p_und)
|
||||
void Act2Actor::VTable0x70(float p_time)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ Act3Actor::Act3Actor()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003fb70
|
||||
MxU32 Act3Actor::VTable0x90(float p_float, Matrix4& p_transform)
|
||||
MxU32 Act3Actor::VTable0x90(float p_time, Matrix4& p_transform)
|
||||
{
|
||||
// Note: Code duplication with LegoExtraActor::VTable0x90
|
||||
switch (m_state & 0xff) {
|
||||
@@ -23,10 +23,10 @@ MxU32 Act3Actor::VTable0x90(float p_float, Matrix4& p_transform)
|
||||
case 1:
|
||||
return TRUE;
|
||||
case 2:
|
||||
m_unk0x1c = p_float + 2000.0f;
|
||||
m_unk0x1c = p_time + 2000.0f;
|
||||
m_state = 3;
|
||||
m_actorTime += (p_float - m_lastTime) * m_worldSpeed;
|
||||
m_lastTime = p_float;
|
||||
m_actorTime += (p_time - m_lastTime) * m_worldSpeed;
|
||||
m_lastTime = p_time;
|
||||
return FALSE;
|
||||
case 3:
|
||||
assert(!m_userNavFlag);
|
||||
@@ -34,7 +34,7 @@ MxU32 Act3Actor::VTable0x90(float p_float, Matrix4& p_transform)
|
||||
|
||||
p_transform = m_roi->GetLocal2World();
|
||||
|
||||
if (m_unk0x1c > p_float) {
|
||||
if (m_unk0x1c > p_time) {
|
||||
Mx3DPointFloat position;
|
||||
|
||||
position = positionRef;
|
||||
@@ -42,8 +42,8 @@ MxU32 Act3Actor::VTable0x90(float p_float, Matrix4& p_transform)
|
||||
p_transform.RotateX(0.6);
|
||||
positionRef = position;
|
||||
|
||||
m_actorTime += (p_float - m_lastTime) * m_worldSpeed;
|
||||
m_lastTime = p_float;
|
||||
m_actorTime += (p_time - m_lastTime) * m_worldSpeed;
|
||||
m_lastTime = p_time;
|
||||
|
||||
VTable0x74(p_transform);
|
||||
return FALSE;
|
||||
|
||||
@@ -21,7 +21,7 @@ void Act3Brickster::ParseAction(char* p_extra)
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10041050
|
||||
void Act3Brickster::VTable0x70(float p_und)
|
||||
void Act3Brickster::VTable0x70(float p_time)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ void Act3Cop::ParseAction(char* p_extra)
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100401f0
|
||||
void Act3Cop::VTable0x70(float p_und)
|
||||
void Act3Cop::VTable0x70(float p_time)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ MxResult Act3Shark::FUN_10042ce0(void*)
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10042d40
|
||||
void Act3Shark::VTable0x70(float p_float)
|
||||
void Act3Shark::VTable0x70(float p_time)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@@ -40,11 +40,11 @@ MxResult Doors::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
|
||||
|
||||
// FUNCTION: LEGO1 0x10066190
|
||||
// FUNCTION: BETA10 0x1002696b
|
||||
MxFloat Doors::VTable0xcc(float p_float)
|
||||
MxFloat Doors::VTable0xcc(float p_time)
|
||||
{
|
||||
MxFloat fVar1;
|
||||
|
||||
fVar1 = p_float - m_unk0x158;
|
||||
fVar1 = p_time - m_unk0x158;
|
||||
|
||||
if (fVar1 <= 0.0f) {
|
||||
return 0.0f;
|
||||
@@ -65,7 +65,7 @@ MxFloat Doors::VTable0xcc(float p_float)
|
||||
|
||||
// FUNCTION: LEGO1 0x10066250
|
||||
// FUNCTION: BETA10 0x10026a45
|
||||
void Doors::VTable0x70(float p_float)
|
||||
void Doors::VTable0x70(float p_time)
|
||||
{
|
||||
assert(m_ltDoor && m_rtDoor);
|
||||
|
||||
@@ -80,7 +80,7 @@ void Doors::VTable0x70(float p_float)
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
float local8 = VTable0xcc(p_float);
|
||||
float local8 = VTable0xcc(p_time);
|
||||
|
||||
if (local8 > 0.0f) {
|
||||
MxMatrix local58(m_ltDoorLocal);
|
||||
@@ -102,7 +102,7 @@ void Doors::VTable0x70(float p_float)
|
||||
m_unk0x1f4 = local8;
|
||||
}
|
||||
|
||||
if (m_unk0x158 + g_unk0x100d8e84 < p_float) {
|
||||
if (m_unk0x158 + g_unk0x100d8e84 < p_time) {
|
||||
m_ltDoor->FUN_100a58f0(m_ltDoorLocal);
|
||||
m_rtDoor->FUN_100a58f0(m_rtDoorLocal);
|
||||
m_ltDoor->VTable0x14();
|
||||
|
||||
@@ -354,16 +354,16 @@ void Helicopter::VTable0x74(Matrix4& p_transform)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10003ee0
|
||||
void Helicopter::VTable0x70(float p_float)
|
||||
void Helicopter::VTable0x70(float p_time)
|
||||
{
|
||||
MxU32 state = m_state->GetUnkown8();
|
||||
switch (state) {
|
||||
default:
|
||||
LegoPathActor::VTable0x70(p_float);
|
||||
LegoPathActor::VTable0x70(p_time);
|
||||
return;
|
||||
case 4:
|
||||
case 5:
|
||||
float f = m_unk0x1f0 - p_float + 3000;
|
||||
float f = m_unk0x1f0 - p_time + 3000;
|
||||
if (f >= 0) {
|
||||
float f2 = f / 3000 + 1;
|
||||
if (f2 < 0) {
|
||||
|
||||
Reference in New Issue
Block a user