Compare commits

...

3 Commits

Author SHA1 Message Date
Fabian Neundorf
15fec495e5 Clear unknowns in Act2Brick (#1675) 2025-08-09 18:05:43 +02:00
Fabian Neundorf
61eaea8bb4 Clear unknowns in LegoAnimActorStruct and LegoAnimActor (#1673) 2025-08-09 17:40:12 +02:00
Fabian Neundorf
1a317a3ef8 Clear unknowns in LegoEntity (#1672) 2025-08-09 17:38:59 +02:00
18 changed files with 111 additions and 84 deletions

View File

@@ -8,6 +8,13 @@
// SIZE 0x194 // SIZE 0x194
class Act2Brick : public LegoPathActor { class Act2Brick : public LegoPathActor {
public: public:
enum {
e_removed = 0,
e_created = 1,
e_placed = 2,
e_atRest = 3,
};
Act2Brick(); Act2Brick();
~Act2Brick() override; // vtable+0x00 ~Act2Brick() override; // vtable+0x00
@@ -35,7 +42,7 @@ public:
MxResult Create(MxS32 p_index); MxResult Create(MxS32 p_index);
void Remove(); void Remove();
void FUN_1007a670(MxMatrix& p_param1, MxMatrix& p_param2, LegoPathBoundary* p_boundary); void Place(MxMatrix& p_localToWorld, MxMatrix& p_endLocalToWorld, LegoPathBoundary* p_boundary);
void PlayWhistleSound(); void PlayWhistleSound();
void StopWhistleSound(); void StopWhistleSound();
void Mute(MxBool p_muted); void Mute(MxBool p_muted);
@@ -44,12 +51,12 @@ private:
static const LegoChar* g_lodNames[]; static const LegoChar* g_lodNames[];
static MxLong g_lastHitActorTime; static MxLong g_lastHitActorTime;
LegoCacheSound* m_whistleSound; // 0x154 LegoCacheSound* m_whistleSound; // 0x154
undefined m_unk0x158[0x0c]; // 0x158 undefined m_unk0x158[0x0c]; // 0x158
undefined4 m_unk0x164; // 0x164 MxU32 m_state; // 0x164
Mx3DPointFloat m_unk0x168; // 0x168 Mx3DPointFloat m_localToWorldMovementStep; // 0x168
Mx3DPointFloat m_unk0x17c; // 0x17c Mx3DPointFloat m_endLocalToWorld; // 0x17c
MxS32 m_unk0x190; // 0x190 MxS32 m_step; // 0x190
}; };
#endif // ACT2BRICK_H #endif // ACT2BRICK_H

View File

@@ -8,13 +8,13 @@ class LegoAnim;
// SIZE 0x20 // SIZE 0x20
struct LegoAnimActorStruct { struct LegoAnimActorStruct {
LegoAnimActorStruct(float p_unk0x00, LegoAnim* p_AnimTreePtr, LegoROI** p_roiMap, MxU32 p_numROIs); LegoAnimActorStruct(float p_worldSpeed, LegoAnim* p_AnimTreePtr, LegoROI** p_roiMap, MxU32 p_numROIs);
~LegoAnimActorStruct(); ~LegoAnimActorStruct();
float GetDuration(); float GetDuration();
// FUNCTION: BETA10 0x1000fb10 // FUNCTION: BETA10 0x1000fb10
float GetUnknown0x00() { return m_unk0x00; } float GetWorldSpeed() { return m_worldSpeed; }
// FUNCTION: BETA10 0x10012210 // FUNCTION: BETA10 0x10012210
LegoAnim* GetAnimTreePtr() { return m_AnimTreePtr; } LegoAnim* GetAnimTreePtr() { return m_AnimTreePtr; }
@@ -23,7 +23,7 @@ struct LegoAnimActorStruct {
LegoROI** GetROIMap() { return m_roiMap; } LegoROI** GetROIMap() { return m_roiMap; }
// TODO: Possibly private // TODO: Possibly private
float m_unk0x00; // 0x00 float m_worldSpeed; // 0x00
LegoAnim* m_AnimTreePtr; // 0x04 LegoAnim* m_AnimTreePtr; // 0x04
LegoROI** m_roiMap; // 0x08 LegoROI** m_roiMap; // 0x08
MxU32 m_numROIs; // 0x0c MxU32 m_numROIs; // 0x0c
@@ -47,9 +47,14 @@ public:
void Animate(float p_time) override; // vtable+0x70 void Animate(float p_time) override; // vtable+0x70
void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 void VTable0x74(Matrix4& p_transform) override; // vtable+0x74
virtual MxResult FUN_1001c1f0(float& p_und); virtual MxResult GetTimeInCycle(float& p_timeInCycle);
virtual MxResult FUN_1001c360(float, Matrix4& p_transform); virtual MxResult AnimateWithTransform(float p_time, Matrix4& p_transform);
virtual MxResult FUN_1001c450(LegoAnim* p_AnimTreePtr, float p_unk0x00, LegoROI** p_roiMap, MxU32 p_numROIs); virtual MxResult CreateAnimActorStruct(
LegoAnim* p_AnimTreePtr,
float p_worldSpeed,
LegoROI** p_roiMap,
MxU32 p_numROIs
);
virtual void ClearMaps(); virtual void ClearMaps();
// FUNCTION: LEGO1 0x1000fba0 // FUNCTION: LEGO1 0x1000fba0

View File

@@ -76,9 +76,9 @@ public:
virtual void SwitchColor(LegoROI* p_roi); // vtable+0x48 virtual void SwitchColor(LegoROI* p_roi); // vtable+0x48
virtual void SwitchMood(); // vtable+0x4c virtual void SwitchMood(); // vtable+0x4c
void FUN_10010c30(); void TransformPointOfView();
void SetType(MxU8 p_type); void SetType(MxU8 p_type);
void SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool p_und); void SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool p_updateCamera);
Mx3DPointFloat GetWorldDirection(); Mx3DPointFloat GetWorldDirection();
Mx3DPointFloat GetWorldUp(); Mx3DPointFloat GetWorldUp();
Mx3DPointFloat GetWorldPosition(); Mx3DPointFloat GetWorldPosition();

View File

@@ -15,7 +15,7 @@ public:
void ParseAction(char* p_extra) override; // vtable+0x20 void ParseAction(char* p_extra) override; // vtable+0x20
MxResult FUN_1001c360(float p_und, Matrix4& p_transform) override; MxResult AnimateWithTransform(float p_time, Matrix4& p_transform) override;
virtual void FUN_10071c80(Vector3& p_vec); virtual void FUN_10071c80(Vector3& p_vec);

View File

@@ -144,7 +144,7 @@ void Act2Actor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
void Act2Actor::FUN_10018980() void Act2Actor::FUN_10018980()
{ {
for (MxS32 i = 0; i < m_animMaps.size(); i++) { for (MxS32 i = 0; i < m_animMaps.size(); i++) {
if (m_animMaps[i]->GetUnknown0x00() == -1.0f) { if (m_animMaps[i]->GetWorldSpeed() == -1.0f) {
m_shootAnim = m_animMaps[i]; m_shootAnim = m_animMaps[i];
} }
} }

View File

@@ -270,7 +270,7 @@ void Act3Cop::ParseAction(char* p_extra)
} }
for (i = 0; i < m_animMaps.size(); i++) { for (i = 0; i < m_animMaps.size(); i++) {
if (m_animMaps[i]->GetUnknown0x00() == -1.0f) { if (m_animMaps[i]->GetWorldSpeed() == -1.0f) {
m_eatAnim = m_animMaps[i]; m_eatAnim = m_animMaps[i];
} }
} }
@@ -558,7 +558,7 @@ void Act3Brickster::ParseAction(char* p_extra)
((Act3*) m_world)->SetBrickster(this); ((Act3*) m_world)->SetBrickster(this);
for (MxS32 i = 0; i < m_animMaps.size(); i++) { for (MxS32 i = 0; i < m_animMaps.size(); i++) {
if (m_animMaps[i]->GetUnknown0x00() == -1.0f) { if (m_animMaps[i]->GetWorldSpeed() == -1.0f) {
m_shootAnim = m_animMaps[i]; m_shootAnim = m_animMaps[i];
} }
} }

View File

@@ -342,7 +342,7 @@ MxLong Helicopter::HandleEndAnim(LegoEndAnimNotificationParam& p_param)
assert(m_world && m_world->GetCameraController()); assert(m_world && m_world->GetCameraController());
m_world->GetCameraController()->SetWorldTransform(at, dir, up); m_world->GetCameraController()->SetWorldTransform(at, dir, up);
FUN_10010c30(); TransformPointOfView();
result = 1; result = 1;
break; break;
} }
@@ -388,13 +388,13 @@ void Helicopter::VTable0x74(Matrix4& p_transform)
{ {
if (m_userNavFlag) { if (m_userNavFlag) {
m_roi->UpdateTransformationRelativeToParent(p_transform); m_roi->UpdateTransformationRelativeToParent(p_transform);
FUN_10010c30(); TransformPointOfView();
} }
else { else {
m_roi->SetLocal2World(p_transform); m_roi->SetLocal2World(p_transform);
m_roi->WrappedUpdateWorldData(); m_roi->WrappedUpdateWorldData();
if (m_cameraFlag) { if (m_cameraFlag) {
FUN_10010c30(); TransformPointOfView();
} }
} }
} }

View File

@@ -93,7 +93,7 @@ void IslePathActor::Enter()
SetUserActor(this); SetUserActor(this);
FUN_1001b660(); FUN_1001b660();
FUN_10010c30(); TransformPointOfView();
} }
} }
@@ -152,7 +152,7 @@ void IslePathActor::Exit()
} }
FUN_1001b660(); FUN_1001b660();
FUN_10010c30(); TransformPointOfView();
ResetViewVelocity(); ResetViewVelocity();
} }
@@ -633,7 +633,7 @@ void IslePathActor::VTable0xec(MxMatrix p_transform, LegoPathBoundary* p_boundar
m_roi->SetLocal2World(p_transform); m_roi->SetLocal2World(p_transform);
if (m_cameraFlag) { if (m_cameraFlag) {
ResetViewVelocity(); ResetViewVelocity();
FUN_10010c30(); TransformPointOfView();
} }
} }

View File

@@ -31,7 +31,7 @@ MxLong Act2Brick::g_lastHitActorTime = 0;
Act2Brick::Act2Brick() Act2Brick::Act2Brick()
{ {
m_whistleSound = NULL; m_whistleSound = NULL;
m_unk0x164 = 0; m_state = Act2Brick::e_removed;
} }
// FUNCTION: LEGO1 0x1007a470 // FUNCTION: LEGO1 0x1007a470
@@ -72,7 +72,7 @@ MxResult Act2Brick::Create(MxS32 p_index)
m_roi->SetEntity(this); m_roi->SetEntity(this);
CurrentWorld()->Add(this); CurrentWorld()->Add(this);
m_unk0x164 = 1; m_state = Act2Brick::e_created;
return SUCCESS; return SUCCESS;
} }
@@ -88,27 +88,27 @@ void Act2Brick::Remove()
m_roi = NULL; m_roi = NULL;
} }
m_unk0x164 = 0; m_state = Act2Brick::e_removed;
} }
// FUNCTION: LEGO1 0x1007a670 // FUNCTION: LEGO1 0x1007a670
// FUNCTION: BETA10 0x10012c04 // FUNCTION: BETA10 0x10012c04
void Act2Brick::FUN_1007a670(MxMatrix& p_param1, MxMatrix& p_param2, LegoPathBoundary* p_boundary) void Act2Brick::Place(MxMatrix& p_localToWorld, MxMatrix& p_endLocalToWorld, LegoPathBoundary* p_boundary)
{ {
m_unk0x17c = p_param2[3]; m_endLocalToWorld = p_endLocalToWorld[3];
m_unk0x168 = p_param2[3]; m_localToWorldMovementStep = p_endLocalToWorld[3];
m_unk0x168 -= p_param1[3]; m_localToWorldMovementStep -= p_localToWorld[3];
m_unk0x168 /= 8.0f; m_localToWorldMovementStep /= 8.0f;
m_unk0x190 = 0; m_step = 0;
TickleManager()->RegisterClient(this, 20); TickleManager()->RegisterClient(this, 20);
m_unk0x164 = 2; m_state = Act2Brick::e_placed;
CurrentWorld()->PlaceActor(this); CurrentWorld()->PlaceActor(this);
p_boundary->AddActor(this); p_boundary->AddActor(this);
SetActorState(c_disabled); SetActorState(c_disabled);
m_roi->SetLocal2World(p_param1); m_roi->SetLocal2World(p_localToWorld);
m_roi->WrappedUpdateWorldData(); m_roi->WrappedUpdateWorldData();
m_roi->SetVisibility(TRUE); m_roi->SetVisibility(TRUE);
} }
@@ -136,15 +136,15 @@ MxResult Act2Brick::HitActor(LegoPathActor* p_actor, MxBool)
MxResult Act2Brick::Tickle() MxResult Act2Brick::Tickle()
{ {
MxMatrix local2world(m_roi->GetLocal2World()); MxMatrix local2world(m_roi->GetLocal2World());
m_unk0x190++; m_step++;
if (m_unk0x190 >= 8) { if (m_step >= 8) {
local2world.SetTranslation(m_unk0x17c[0], m_unk0x17c[1], m_unk0x17c[2]); local2world.SetTranslation(m_endLocalToWorld[0], m_endLocalToWorld[1], m_endLocalToWorld[2]);
m_unk0x164 = 3; m_state = Act2Brick::e_atRest;
TickleManager()->UnregisterClient(this); TickleManager()->UnregisterClient(this);
} }
else { else {
VPV3(local2world[3], local2world[3], m_unk0x168); VPV3(local2world[3], local2world[3], m_localToWorldMovementStep);
} }
m_roi->SetLocal2World(local2world); m_roi->SetLocal2World(local2world);
@@ -165,7 +165,7 @@ MxLong Act2Brick::Notify(MxParam& p_param)
StopWhistleSound(); StopWhistleSound();
} }
MxNotificationParam param(c_notificationType22, this); MxNotificationParam param(c_notificationAct2Brick, this);
NotificationManager()->Send(CurrentWorld(), param); NotificationManager()->Send(CurrentWorld(), param);
return 1; return 1;
} }

View File

@@ -155,7 +155,12 @@ void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
// FUNCTION: LEGO1 0x100109b0 // FUNCTION: LEGO1 0x100109b0
// FUNCTION: BETA10 0x1007e8b8 // FUNCTION: BETA10 0x1007e8b8
void LegoEntity::SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool p_und) void LegoEntity::SetLocation(
const Vector3& p_location,
const Vector3& p_direction,
const Vector3& p_up,
MxBool p_updateCamera
)
{ {
Mx3DPointFloat direction; Mx3DPointFloat direction;
Mx3DPointFloat up; Mx3DPointFloat up;
@@ -182,14 +187,14 @@ void LegoEntity::SetLocation(const Vector3& p_location, const Vector3& p_directi
m_roi->UpdateTransformationRelativeToParent(mat); m_roi->UpdateTransformationRelativeToParent(mat);
VideoManager()->Get3DManager()->Moved(*m_roi); VideoManager()->Get3DManager()->Moved(*m_roi);
if (p_und) { if (p_updateCamera) {
FUN_10010c30(); TransformPointOfView();
} }
} }
} }
// FUNCTION: LEGO1 0x10010c30 // FUNCTION: LEGO1 0x10010c30
void LegoEntity::FUN_10010c30() void LegoEntity::TransformPointOfView()
{ {
LegoWorld* world = CurrentWorld(); LegoWorld* world = CurrentWorld();

View File

@@ -13,9 +13,14 @@ DECOMP_SIZE_ASSERT(LegoAnimActorStruct, 0x20)
// FUNCTION: LEGO1 0x1001bf80 // FUNCTION: LEGO1 0x1001bf80
// FUNCTION: BETA10 0x1003dc10 // FUNCTION: BETA10 0x1003dc10
LegoAnimActorStruct::LegoAnimActorStruct(float p_unk0x00, LegoAnim* p_AnimTreePtr, LegoROI** p_roiMap, MxU32 p_numROIs) LegoAnimActorStruct::LegoAnimActorStruct(
float p_worldSpeed,
LegoAnim* p_AnimTreePtr,
LegoROI** p_roiMap,
MxU32 p_numROIs
)
{ {
m_unk0x00 = p_unk0x00; m_worldSpeed = p_worldSpeed;
m_AnimTreePtr = p_AnimTreePtr; m_AnimTreePtr = p_AnimTreePtr;
m_roiMap = p_roiMap; m_roiMap = p_roiMap;
m_numROIs = p_numROIs; m_numROIs = p_numROIs;
@@ -50,22 +55,22 @@ LegoAnimActor::~LegoAnimActor()
// FUNCTION: LEGO1 0x1001c1f0 // FUNCTION: LEGO1 0x1001c1f0
// FUNCTION: BETA10 0x1003f240 // FUNCTION: BETA10 0x1003f240
MxResult LegoAnimActor::FUN_1001c1f0(float& p_und) MxResult LegoAnimActor::GetTimeInCycle(float& p_timeInCycle)
{ {
float duration = (float) m_animMaps[m_curAnim]->m_AnimTreePtr->GetDuration(); float duration = (float) m_animMaps[m_curAnim]->m_AnimTreePtr->GetDuration();
p_und = m_actorTime - duration * ((MxS32) (m_actorTime / duration)); p_timeInCycle = m_actorTime - duration * ((MxS32) (m_actorTime / duration));
return SUCCESS; return SUCCESS;
} }
// FUNCTION: LEGO1 0x1001c240 // FUNCTION: LEGO1 0x1001c240
void LegoAnimActor::VTable0x74(Matrix4& p_transform) void LegoAnimActor::VTable0x74(Matrix4& p_transform)
{ {
float und; float timeInCycle;
LegoPathActor::VTable0x74(p_transform); LegoPathActor::VTable0x74(p_transform);
if (m_curAnim >= 0) { if (m_curAnim >= 0) {
FUN_1001c1f0(und); GetTimeInCycle(timeInCycle);
FUN_1001c360(und, p_transform); AnimateWithTransform(timeInCycle, p_transform);
} }
} }
@@ -81,10 +86,10 @@ void LegoAnimActor::Animate(float p_time)
if (m_actorState == c_initial && !m_userNavFlag && m_worldSpeed <= 0) { if (m_actorState == c_initial && !m_userNavFlag && m_worldSpeed <= 0) {
if (m_curAnim >= 0) { if (m_curAnim >= 0) {
MxMatrix matrix(m_unk0xec); MxMatrix transform(m_unk0xec);
float f; float timeInCycle;
FUN_1001c1f0(f); GetTimeInCycle(timeInCycle);
FUN_1001c360(f, matrix); AnimateWithTransform(timeInCycle, transform);
} }
m_lastTime = m_actorTime = p_time; m_lastTime = m_actorTime = p_time;
@@ -96,9 +101,9 @@ void LegoAnimActor::Animate(float p_time)
// FUNCTION: LEGO1 0x1001c360 // FUNCTION: LEGO1 0x1001c360
// FUNCTION: BETA10 0x1003e2d3 // FUNCTION: BETA10 0x1003e2d3
MxResult LegoAnimActor::FUN_1001c360(float p_und, Matrix4& p_transform) MxResult LegoAnimActor::AnimateWithTransform(float p_time, Matrix4& p_transform)
{ {
if (p_und >= 0) { if (p_time >= 0) {
assert((m_curAnim >= 0) && (m_curAnim < m_animMaps.size())); assert((m_curAnim >= 0) && (m_curAnim < m_animMaps.size()));
LegoROI** roiMap = m_animMaps[m_curAnim]->m_roiMap; LegoROI** roiMap = m_animMaps[m_curAnim]->m_roiMap;
@@ -133,11 +138,11 @@ MxResult LegoAnimActor::FUN_1001c360(float p_und, Matrix4& p_transform)
} }
for (MxS32 j = 0; j < n->GetNumChildren(); j++) { for (MxS32 j = 0; j < n->GetNumChildren(); j++) {
LegoROI::ApplyAnimationTransformation(n->GetChild(j), p_transform, p_und, roiMap); LegoROI::ApplyAnimationTransformation(n->GetChild(j), p_transform, p_time, roiMap);
} }
if (m_cameraFlag) { if (m_cameraFlag) {
FUN_10010c30(); TransformPointOfView();
} }
} }
@@ -150,15 +155,20 @@ MxResult LegoAnimActor::FUN_1001c360(float p_und, Matrix4& p_transform)
// FUNCTION: LEGO1 0x1001c450 // FUNCTION: LEGO1 0x1001c450
// FUNCTION: BETA10 0x1003e590 // FUNCTION: BETA10 0x1003e590
MxResult LegoAnimActor::FUN_1001c450(LegoAnim* p_AnimTreePtr, float p_unk0x00, LegoROI** p_roiMap, MxU32 p_numROIs) MxResult LegoAnimActor::CreateAnimActorStruct(
LegoAnim* p_AnimTreePtr,
float p_worldSpeed,
LegoROI** p_roiMap,
MxU32 p_numROIs
)
{ {
// the capitalization of `p_AnimTreePtr` was taken from BETA10 // the capitalization of `p_AnimTreePtr` was taken from BETA10
assert(p_AnimTreePtr && p_roiMap); assert(p_AnimTreePtr && p_roiMap);
LegoAnimActorStruct* laas = new LegoAnimActorStruct(p_unk0x00, p_AnimTreePtr, p_roiMap, p_numROIs); LegoAnimActorStruct* laas = new LegoAnimActorStruct(p_worldSpeed, p_AnimTreePtr, p_roiMap, p_numROIs);
for (vector<LegoAnimActorStruct*>::iterator it = m_animMaps.begin(); it != m_animMaps.end(); it++) { for (vector<LegoAnimActorStruct*>::iterator it = m_animMaps.begin(); it != m_animMaps.end(); it++) {
if (p_unk0x00 < (*it)->m_unk0x00) { if (p_worldSpeed < (*it)->m_worldSpeed) {
m_animMaps.insert(it, laas); m_animMaps.insert(it, laas);
SetWorldSpeed(m_worldSpeed); SetWorldSpeed(m_worldSpeed);
return SUCCESS; return SUCCESS;
@@ -196,12 +206,12 @@ void LegoAnimActor::SetWorldSpeed(MxFloat p_worldSpeed)
if (m_animMaps.size() > 0) { if (m_animMaps.size() > 0) {
m_curAnim = 0; m_curAnim = 0;
if (m_worldSpeed >= m_animMaps[m_animMaps.size() - 1]->m_unk0x00) { if (m_worldSpeed >= m_animMaps[m_animMaps.size() - 1]->m_worldSpeed) {
m_curAnim = m_animMaps.size() - 1; m_curAnim = m_animMaps.size() - 1;
} }
else { else {
for (MxU32 i = 0; i < m_animMaps.size(); i++) { for (MxU32 i = 0; i < m_animMaps.size(); i++) {
if (m_worldSpeed <= m_animMaps[i]->m_unk0x00) { if (m_worldSpeed <= m_animMaps[i]->m_worldSpeed) {
m_curAnim = i; m_curAnim = i;
break; break;
} }

View File

@@ -169,7 +169,7 @@ inline void LegoExtraActor::FUN_1002ad8a()
m_assAnimP->FUN_1006d680(this, -20.0f); m_assAnimP->FUN_1006d680(this, -20.0f);
for (MxS32 i = 0; i < m_animMaps.size(); i++) { for (MxS32 i = 0; i < m_animMaps.size(); i++) {
if (m_animMaps[i]->GetUnknown0x00() == -20.0f) { if (m_animMaps[i]->GetWorldSpeed() == -20.0f) {
m_assAnim = new LegoAnimActorStruct(*m_animMaps[i]); m_assAnim = new LegoAnimActorStruct(*m_animMaps[i]);
break; break;
} }
@@ -181,7 +181,7 @@ inline void LegoExtraActor::FUN_1002ad8a()
m_disAnimP->FUN_1006d680(this, -21.0f); m_disAnimP->FUN_1006d680(this, -21.0f);
for (MxS32 i = 0; i < m_animMaps.size(); i++) { for (MxS32 i = 0; i < m_animMaps.size(); i++) {
if (m_animMaps[i]->GetUnknown0x00() == -21.0f) { if (m_animMaps[i]->GetWorldSpeed() == -21.0f) {
m_disAnim = new LegoAnimActorStruct(*m_animMaps[i]); m_disAnim = new LegoAnimActorStruct(*m_animMaps[i]);
break; break;
} }
@@ -410,7 +410,7 @@ void LegoExtraActor::VTable0xc4()
if (b) { if (b) {
float duration = m_animMaps[m_curAnim]->GetDuration(); float duration = m_animMaps[m_curAnim]->GetDuration();
MxMatrix matrix(m_unk0xec); MxMatrix matrix(m_unk0xec);
LegoAnimActor::FUN_1001c360(duration, matrix); LegoAnimActor::AnimateWithTransform(duration, matrix);
} }
} }
} }

View File

@@ -162,7 +162,7 @@ MxResult LegoPathActor::VTable0x88(
} }
else { else {
m_boundary->AddActor(this); m_boundary->AddActor(this);
FUN_10010c30(); TransformPointOfView();
} }
m_unk0xec = m_roi->GetLocal2World(); m_unk0xec = m_roi->GetLocal2World();
@@ -222,7 +222,7 @@ MxResult LegoPathActor::VTable0x84(
if (m_cameraFlag && m_userNavFlag) { if (m_cameraFlag && m_userNavFlag) {
m_boundary->AddActor(this); m_boundary->AddActor(this);
FUN_10010c30(); TransformPointOfView();
} }
else { else {
p5.EqualsCross(*p_boundary->GetUp(), p3); p5.EqualsCross(*p_boundary->GetUp(), p3);
@@ -392,14 +392,14 @@ void LegoPathActor::VTable0x74(Matrix4& p_transform)
{ {
if (m_userNavFlag) { if (m_userNavFlag) {
m_roi->WrappedSetLocal2WorldWithWorldDataUpdate(p_transform); m_roi->WrappedSetLocal2WorldWithWorldDataUpdate(p_transform);
FUN_10010c30(); TransformPointOfView();
} }
else { else {
m_roi->WrappedSetLocal2WorldWithWorldDataUpdate(p_transform); m_roi->WrappedSetLocal2WorldWithWorldDataUpdate(p_transform);
m_roi->WrappedUpdateWorldData(); m_roi->WrappedUpdateWorldData();
if (m_cameraFlag) { if (m_cameraFlag) {
FUN_10010c30(); TransformPointOfView();
} }
} }
} }
@@ -745,7 +745,7 @@ void LegoPathActor::VTable0xa8()
if (m_userNavFlag) { if (m_userNavFlag) {
m_roi->WrappedSetLocal2WorldWithWorldDataUpdate(m_unk0xec); m_roi->WrappedSetLocal2WorldWithWorldDataUpdate(m_unk0xec);
FUN_10010c30(); TransformPointOfView();
} }
} }

View File

@@ -268,10 +268,10 @@ void LegoRaceCar::ParseAction(char* p_extra)
MxS32 i; MxS32 i;
for (i = 0; i < m_animMaps.size(); i++) { for (i = 0; i < m_animMaps.size(); i++) {
if (m_animMaps[i]->GetUnknown0x00() == -1.0f) { if (m_animMaps[i]->GetWorldSpeed() == -1.0f) {
m_skelKick1Anim = m_animMaps[i]; m_skelKick1Anim = m_animMaps[i];
} }
else if (m_animMaps[i]->GetUnknown0x00() == -2.0f) { else if (m_animMaps[i]->GetWorldSpeed() == -2.0f) {
m_skelKick2Anim = m_animMaps[i]; m_skelKick2Anim = m_animMaps[i];
} }
} }

View File

@@ -22,15 +22,15 @@ RaceSkel::~RaceSkel()
// FUNCTION: LEGO1 0x10071b50 // FUNCTION: LEGO1 0x10071b50
// FUNCTION: BETA10 0x100f13cf // FUNCTION: BETA10 0x100f13cf
MxResult RaceSkel::FUN_1001c360(float p_und, Matrix4& p_transform) MxResult RaceSkel::AnimateWithTransform(float p_time, Matrix4& p_transform)
{ {
p_transform[3][0] = -630.0f; p_transform[3][0] = -630.0f;
p_transform[3][1] = -4.688f; p_transform[3][1] = -4.688f;
p_transform[3][2] = 323.0f; p_transform[3][2] = 323.0f;
m_animPosition = p_und; m_animPosition = p_time;
return LegoAnimActor::FUN_1001c360(p_und, p_transform); return LegoAnimActor::AnimateWithTransform(p_time, p_transform);
} }
// FUNCTION: LEGO1 0x10071b90 // FUNCTION: LEGO1 0x10071b90

View File

@@ -1435,7 +1435,7 @@ void LegoLocomotionAnimPresenter::FUN_1006d680(LegoAnimActor* p_actor, MxFloat p
if (m_roiMap != NULL) { if (m_roiMap != NULL) {
m_roiMapList->Append(m_roiMap); m_roiMapList->Append(m_roiMap);
p_actor->FUN_1001c450(m_anim, p_value, m_roiMap, m_roiMapSize); p_actor->CreateAnimActorStruct(m_anim, p_value, m_roiMap, m_roiMapSize);
m_roiMap = NULL; m_roiMap = NULL;
} }

View File

@@ -294,7 +294,7 @@ MxLong LegoAct2::Notify(MxParam& p_param)
result = 1; result = 1;
break; break;
} }
case c_notificationType22: case c_notificationAct2Brick:
SoundManager()->GetCacheSoundManager()->Play("28bng", NULL, FALSE); SoundManager()->GetCacheSoundManager()->Play("28bng", NULL, FALSE);
m_unk0x10c1++; m_unk0x10c1++;
@@ -647,7 +647,7 @@ MxLong LegoAct2::HandlePathStruct(LegoPathStructNotificationParam& p_param)
local2world[3][1] += 1.5; local2world[3][1] += 1.5;
local2world2[3][1] -= 0.1; local2world2[3][1] -= 0.1;
m_bricks[m_nextBrick - 1].FUN_1007a670(local2world, local2world2, boundary); m_bricks[m_nextBrick - 1].Place(local2world, local2world2, boundary);
} }
return 0; return 0;
@@ -671,7 +671,7 @@ MxResult LegoAct2::FUN_100516b0()
local2world[3][1] += 1.3; local2world[3][1] += 1.3;
local2world2[3][1] -= 0.1; local2world2[3][1] -= 0.1;
brick.FUN_1007a670(local2world, local2world2, boundary); brick.Place(local2world, local2world2, boundary);
m_nextBrick++; m_nextBrick++;
m_unk0x10c4 = 9; m_unk0x10c4 = 9;
m_unk0x10d0 = 0; m_unk0x10d0 = 0;

View File

@@ -29,7 +29,7 @@ enum NotificationId {
c_notificationPathStruct = 19, // 100d6230 c_notificationPathStruct = 19, // 100d6230
c_notificationType20 = 20, c_notificationType20 = 20,
c_notificationNewPresenter = 21, c_notificationNewPresenter = 21,
c_notificationType22 = 22, c_notificationAct2Brick = 22,
c_notificationType23 = 23, c_notificationType23 = 23,
c_notificationTransitioned = 24 c_notificationTransitioned = 24
}; };