mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-11 18:51:16 +00:00
Renamed variables and functions related to the Car Build sections
This commit is contained in:
parent
9134dd791c
commit
463afc5d1d
@ -161,7 +161,7 @@ class LegoCarBuild : public LegoWorld {
|
||||
MxS32 FUN_10025ee0(undefined4 p_param1);
|
||||
|
||||
// FUNCTION: BETA10 0x100735b0
|
||||
void SetUnknown0x258(LegoCarBuildAnimPresenter* p_unk0x258) { m_unk0x258 = p_unk0x258; }
|
||||
void SetCarBuildAnimPresenter(LegoCarBuildAnimPresenter* p_animPresenter) { m_animPresenter = p_animPresenter; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10022a60
|
||||
// LegoCarBuild::`scalar deleting destructor'
|
||||
@ -193,7 +193,7 @@ class LegoCarBuild : public LegoWorld {
|
||||
// This is likely a location in pixel space
|
||||
MxS32 m_unk0x250[2]; // 0x250
|
||||
|
||||
LegoCarBuildAnimPresenter* m_unk0x258; // 0x258
|
||||
LegoCarBuildAnimPresenter* m_animPresenter; // 0x258
|
||||
MxQuaternionTransformer m_unk0x25c; // 0x25c
|
||||
|
||||
// These two are likely locations in pixel space
|
||||
|
||||
@ -78,7 +78,7 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter {
|
||||
void RotateAroundYAxis(MxFloat p_angle);
|
||||
MxBool FUN_10079c30(const LegoChar* p_name);
|
||||
MxBool PartIsPlaced(const LegoChar* p_name);
|
||||
void FUN_10079a90();
|
||||
void MoveShelfForward();
|
||||
MxBool StringEqualsPlatform(const LegoChar* p_string);
|
||||
MxBool StringEqualsShelf(const LegoChar* p_string);
|
||||
MxBool StringEndsOnY(const LegoChar* p_string);
|
||||
@ -87,10 +87,10 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter {
|
||||
void SetPartObjectIdByName(const LegoChar* p_name, MxS16 p_objectId);
|
||||
|
||||
// FUNCTION: BETA10 0x10070180
|
||||
void SetUnknown0xbc(undefined2 p_unk0xbc) { m_unk0xbc = p_unk0xbc; }
|
||||
void SetShelfState(undefined2 p_state) { m_shelfState = p_state; }
|
||||
|
||||
// FUNCTION: BETA10 0x100703b0
|
||||
Matrix4& GetUnknown0xe0() { return m_unk0xe0; }
|
||||
Matrix4& GetBuildViewMatrix() { return m_buildViewMatrix; }
|
||||
|
||||
MxBool StringEndsOnW(LegoChar* p_param);
|
||||
MxBool StringEndsOnYOrN(const LegoChar* p_string);
|
||||
@ -116,7 +116,7 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter {
|
||||
private:
|
||||
void Beta10Inline0x100733d0();
|
||||
|
||||
MxU16 m_unk0xbc; // 0xbc
|
||||
MxU16 m_shelfState; // 0xbc
|
||||
|
||||
// variable name verified by BETA10 0x1007184f
|
||||
MxS16 m_numberOfParts; // 0xbe
|
||||
@ -124,21 +124,21 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter {
|
||||
// name derived from LegoVehicleBuildState, field 0x4f
|
||||
MxS16 m_placedPartCount; // 0xc0
|
||||
|
||||
LegoAnimNodeData* m_unk0xc4; // 0xc4
|
||||
LegoAnim m_unk0xc8; // 0xc8
|
||||
MxMatrix m_unk0xe0; // 0xe0
|
||||
LegoAnimNodeData* m_platformAnimNodeData; // 0xc4
|
||||
LegoAnim m_platformAnim; // 0xc8
|
||||
MxMatrix m_buildViewMatrix; // 0xe0
|
||||
|
||||
// variable name verified by BETA10 0x100719f0
|
||||
UnknownListEntry* m_parts; // 0x128
|
||||
|
||||
MxFloat m_unk0x12c; // 0x12c
|
||||
MxFloat m_unk0x130; // 0x130
|
||||
MxFloat m_unk0x134; // 0x134
|
||||
MxFloat m_unk0x138; // 0x138
|
||||
MxULong m_unk0x13c; // 0x13c
|
||||
LegoEntity* m_unk0x140; // 0x140
|
||||
MxS32 m_unk0x144; // 0x144
|
||||
MxS32 m_unk0x148; // 0x148
|
||||
MxFloat m_ShelfFrameBuffer; // 0x12c
|
||||
MxFloat m_ShelfFrame; // 0x130
|
||||
MxFloat m_ShelfFrameMax; // 0x134
|
||||
MxFloat m_ShelfFrameInterval; // 0x138
|
||||
MxULong m_unk0x13c; // 0x13c
|
||||
LegoEntity* m_carBuildEntity; // 0x140
|
||||
MxS32 m_unk0x144; // 0x144
|
||||
MxS32 m_unk0x148; // 0x148
|
||||
|
||||
// name verified by BETA10 0x10070d63
|
||||
LegoChar* m_mainSourceId; // 0x14c
|
||||
|
||||
@ -96,7 +96,7 @@ LegoCarBuild::LegoCarBuild()
|
||||
m_unk0x110 = 0;
|
||||
m_unk0xf8 = c_unknownminusone;
|
||||
m_unk0x2d4 = FALSE;
|
||||
m_unk0x258 = 0;
|
||||
m_animPresenter = 0;
|
||||
m_ColorBook_Bitmap = NULL;
|
||||
m_Yellow_Ctl = NULL;
|
||||
m_Red_Ctl = NULL;
|
||||
@ -137,10 +137,10 @@ LegoCarBuild::~LegoCarBuild()
|
||||
m_unk0x100 = 0;
|
||||
m_unk0x110 = NULL;
|
||||
|
||||
if (m_unk0x258) {
|
||||
m_unk0x258->SetUnknown0xbc(0);
|
||||
m_unk0x258->SetTickleState(MxPresenter::e_idle);
|
||||
m_unk0x258 = NULL;
|
||||
if (m_animPresenter) {
|
||||
m_animPresenter->SetShelfState(0);
|
||||
m_animPresenter->SetTickleState(MxPresenter::e_idle);
|
||||
m_animPresenter = NULL;
|
||||
}
|
||||
|
||||
ControlManager()->Unregister(this);
|
||||
@ -290,7 +290,7 @@ void LegoCarBuild::FUN_10022f00()
|
||||
{
|
||||
if (m_unk0x110) {
|
||||
VTable0x6c();
|
||||
m_unk0x258->SetUnknown0xbc(0);
|
||||
m_animPresenter->SetShelfState(0);
|
||||
m_unk0x100 = 5;
|
||||
}
|
||||
}
|
||||
@ -303,13 +303,13 @@ void LegoCarBuild::FUN_10022f30()
|
||||
FUN_10024f70(FALSE);
|
||||
FUN_100250e0(FALSE);
|
||||
|
||||
if (m_unk0x258->PartIsPlaced(m_unk0x110->GetName())) {
|
||||
if (m_animPresenter->PartIsPlaced(m_unk0x110->GetName())) {
|
||||
m_PlaceBrick_Sound->Enable(FALSE);
|
||||
m_PlaceBrick_Sound->Enable(TRUE);
|
||||
}
|
||||
|
||||
m_unk0x258->SetUnknown0xbc(1);
|
||||
m_unk0x258->PutFrame();
|
||||
m_animPresenter->SetShelfState(1);
|
||||
m_animPresenter->PutFrame();
|
||||
m_unk0x110 = NULL;
|
||||
m_unk0x100 = 0;
|
||||
}
|
||||
@ -480,12 +480,12 @@ void LegoCarBuild::FUN_100236d0()
|
||||
|
||||
FUN_10024f70(FALSE);
|
||||
FUN_100250e0(FALSE);
|
||||
m_unk0x258->FUN_10079790(m_unk0x110->GetName());
|
||||
m_unk0x258->SetUnknown0xbc(1);
|
||||
m_animPresenter->FUN_10079790(m_unk0x110->GetName());
|
||||
m_animPresenter->SetShelfState(1);
|
||||
m_unk0x110 = NULL;
|
||||
m_unk0x100 = 0;
|
||||
|
||||
if (m_unk0x258->AllPartsPlaced()) {
|
||||
if (m_animPresenter->AllPartsPlaced()) {
|
||||
// Note the code duplication with LEGO1 0x10025ee0
|
||||
switch (m_carId) {
|
||||
case 1:
|
||||
@ -542,7 +542,7 @@ MxResult LegoCarBuild::Tickle()
|
||||
}
|
||||
|
||||
if (m_unk0x110) {
|
||||
if (m_unk0x258->PartIsPlaced(m_unk0x110->GetName())) {
|
||||
if (m_animPresenter->PartIsPlaced(m_unk0x110->GetName())) {
|
||||
FUN_10022f30();
|
||||
}
|
||||
}
|
||||
@ -824,7 +824,7 @@ undefined4 LegoCarBuild::FUN_100244e0(MxLong p_x, MxLong p_y)
|
||||
|
||||
LegoROI* roi = PickROI(p_x, p_y);
|
||||
|
||||
if (!roi || !m_unk0x258->StringEndsOnYOrN(roi->GetName())) {
|
||||
if (!roi || !m_animPresenter->StringEndsOnYOrN(roi->GetName())) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -835,7 +835,7 @@ undefined4 LegoCarBuild::FUN_100244e0(MxLong p_x, MxLong p_y)
|
||||
FUN_100250e0(TRUE);
|
||||
}
|
||||
|
||||
if (m_unk0x100 == 5 && m_unk0x258->PartIsPlaced(m_unk0x110->GetName())) {
|
||||
if (m_unk0x100 == 5 && m_animPresenter->PartIsPlaced(m_unk0x110->GetName())) {
|
||||
m_unk0x2d4 = TRUE;
|
||||
}
|
||||
else {
|
||||
@ -844,7 +844,7 @@ undefined4 LegoCarBuild::FUN_100244e0(MxLong p_x, MxLong p_y)
|
||||
FUN_10025450();
|
||||
VTable0x70();
|
||||
|
||||
if (m_unk0x258->PartIsPlaced(m_unk0x110->GetName())) {
|
||||
if (m_animPresenter->PartIsPlaced(m_unk0x110->GetName())) {
|
||||
if (m_unk0x100 != 5) {
|
||||
m_unk0x250[0] += m_unk0x290[0] - m_unk0x298[0];
|
||||
m_unk0x250[1] += m_unk0x290[1] - m_unk0x298[1];
|
||||
@ -855,8 +855,8 @@ undefined4 LegoCarBuild::FUN_100244e0(MxLong p_x, MxLong p_y)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (m_unk0x258->FUN_10079c30(m_unk0x110->GetName())) {
|
||||
m_unk0x114 = m_unk0x258->FUN_10079e20();
|
||||
if (m_animPresenter->FUN_10079c30(m_unk0x110->GetName())) {
|
||||
m_unk0x114 = m_animPresenter->FUN_10079e20();
|
||||
}
|
||||
}
|
||||
|
||||
@ -872,7 +872,7 @@ undefined4 LegoCarBuild::FUN_100244e0(MxLong p_x, MxLong p_y)
|
||||
m_GetBrick_Sound->Enable(FALSE);
|
||||
m_GetBrick_Sound->Enable(TRUE);
|
||||
|
||||
m_unk0x258->SetUnknown0xbc(0);
|
||||
m_animPresenter->SetShelfState(0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -892,7 +892,7 @@ undefined4 LegoCarBuild::FUN_100246e0(MxLong p_x, MxLong p_y)
|
||||
result = 1;
|
||||
break;
|
||||
case 6:
|
||||
if (m_unk0x258->PartIsPlaced(m_unk0x110->GetName()) &&
|
||||
if (m_animPresenter->PartIsPlaced(m_unk0x110->GetName()) &&
|
||||
SpheresIntersect(m_unk0x114, m_unk0x110->GetWorldBoundingSphere())) {
|
||||
FUN_10024f70(FALSE);
|
||||
FUN_100250e0(FALSE);
|
||||
@ -900,9 +900,9 @@ undefined4 LegoCarBuild::FUN_100246e0(MxLong p_x, MxLong p_y)
|
||||
m_unk0x110 = NULL;
|
||||
m_PlaceBrick_Sound->Enable(FALSE);
|
||||
m_PlaceBrick_Sound->Enable(TRUE);
|
||||
m_unk0x258->SetUnknown0xbc(1);
|
||||
m_animPresenter->SetShelfState(1);
|
||||
}
|
||||
else if (m_unk0x258->FUN_10079c30(m_unk0x110->GetName())) {
|
||||
else if (m_animPresenter->FUN_10079c30(m_unk0x110->GetName())) {
|
||||
if (SpheresIntersect(m_unk0x114, m_unk0x110->GetWorldBoundingSphere())) {
|
||||
m_PlaceBrick_Sound->Enable(FALSE);
|
||||
m_PlaceBrick_Sound->Enable(TRUE);
|
||||
@ -965,7 +965,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
|
||||
DeleteObjects(&m_atomId, 500, 510);
|
||||
}
|
||||
|
||||
m_unk0x258->SetUnknown0xbc(0);
|
||||
m_animPresenter->SetShelfState(0);
|
||||
m_destLocation = LegoGameState::e_infomain;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
result = 1;
|
||||
@ -979,12 +979,12 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
|
||||
DeleteObjects(&m_atomId, 500, 510);
|
||||
}
|
||||
|
||||
m_unk0x258->SetUnknown0xbc(0);
|
||||
m_animPresenter->SetShelfState(0);
|
||||
|
||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act2) {
|
||||
FUN_100243a0();
|
||||
}
|
||||
else if (m_unk0x258->AllPartsPlaced() || m_buildState->m_unk0x4d) {
|
||||
else if (m_animPresenter->AllPartsPlaced() || m_buildState->m_unk0x4d) {
|
||||
m_buildState->m_unk0x4d = TRUE;
|
||||
InvokeAction(Extra::e_start, m_atomId, m_carId, NULL);
|
||||
|
||||
@ -1021,7 +1021,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
|
||||
(m_Decals_Ctl5 && m_Decals_Ctl5->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
||||
(m_Decals_Ctl6 && m_Decals_Ctl6->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
||||
(m_Decals_Ctl7 && m_Decals_Ctl7->GetAction()->GetObjectId() == param->m_clickedObjectId)) {
|
||||
m_unk0x258->SetPartObjectIdByName(m_unk0x110->GetName(), param->m_clickedObjectId);
|
||||
m_animPresenter->SetPartObjectIdByName(m_unk0x110->GetName(), param->m_clickedObjectId);
|
||||
m_Decal_Sound->Enable(FALSE);
|
||||
m_Decal_Sound->Enable(TRUE);
|
||||
}
|
||||
@ -1054,16 +1054,16 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
|
||||
if (param->m_unk0x28) {
|
||||
switch (param->m_clickedObjectId) {
|
||||
case CopterScript::c_Info_Ctl:
|
||||
m_unk0x258->SetUnknown0xbc(0);
|
||||
m_animPresenter->SetShelfState(0);
|
||||
m_destLocation = LegoGameState::e_infomain;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
result = 1;
|
||||
break;
|
||||
case CopterScript::c_Exit_Ctl:
|
||||
if (m_buildState->m_animationState != LegoVehicleBuildState::e_exiting) {
|
||||
m_unk0x258->SetUnknown0xbc(0);
|
||||
m_animPresenter->SetShelfState(0);
|
||||
|
||||
if (m_unk0x258->AllPartsPlaced() || m_buildState->m_unk0x4d) {
|
||||
if (m_animPresenter->AllPartsPlaced() || m_buildState->m_unk0x4d) {
|
||||
m_buildState->m_unk0x4d = TRUE;
|
||||
|
||||
// GameState()->GetCurrentAct() returns an MxS16 in BETA10
|
||||
@ -1125,7 +1125,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param)
|
||||
(m_Decals_Ctl5 && m_Decals_Ctl5->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
||||
(m_Decals_Ctl6 && m_Decals_Ctl6->GetAction()->GetObjectId() == param->m_clickedObjectId) ||
|
||||
(m_Decals_Ctl7 && m_Decals_Ctl7->GetAction()->GetObjectId() == param->m_clickedObjectId)) {
|
||||
m_unk0x258->SetPartObjectIdByName(m_unk0x110->GetName(), param->m_clickedObjectId);
|
||||
m_animPresenter->SetPartObjectIdByName(m_unk0x110->GetName(), param->m_clickedObjectId);
|
||||
m_Decal_Sound->Enable(FALSE);
|
||||
m_Decal_Sound->Enable(TRUE);
|
||||
}
|
||||
@ -1202,7 +1202,7 @@ undefined4 LegoCarBuild::FUN_10024c20(MxNotificationParam* p_param)
|
||||
assert(destWorld);
|
||||
m_buildState->m_animationState = LegoVehicleBuildState::e_exiting;
|
||||
|
||||
if (!m_unk0x258->AllPartsPlaced()) {
|
||||
if (!m_animPresenter->AllPartsPlaced()) {
|
||||
FUN_100243a0();
|
||||
}
|
||||
else {
|
||||
@ -1261,7 +1261,7 @@ void LegoCarBuild::FUN_10024ef0()
|
||||
void LegoCarBuild::FUN_10024f30()
|
||||
{
|
||||
FUN_10022f30();
|
||||
m_unk0x258->SetUnknown0xbc(2);
|
||||
m_animPresenter->SetShelfState(2);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10024f50
|
||||
@ -1269,14 +1269,14 @@ void LegoCarBuild::FUN_10024f30()
|
||||
void LegoCarBuild::FUN_10024f50()
|
||||
{
|
||||
m_unk0x2d4 = FALSE;
|
||||
m_unk0x258->RotateAroundYAxis(g_rotationAngleStepYAxis);
|
||||
m_animPresenter->RotateAroundYAxis(g_rotationAngleStepYAxis);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10024f70
|
||||
// FUNCTION: BETA10 0x1006e002
|
||||
void LegoCarBuild::FUN_10024f70(MxBool p_enabled)
|
||||
{
|
||||
if (m_unk0x258->StringEndsOnY(m_unk0x110->GetName())) {
|
||||
if (m_animPresenter->StringEndsOnY(m_unk0x110->GetName())) {
|
||||
SetPresentersEnabled(p_enabled);
|
||||
}
|
||||
}
|
||||
@ -1311,7 +1311,7 @@ void LegoCarBuild::TogglePresentersEnabled()
|
||||
// FUNCTION: BETA10 0x1006e124
|
||||
void LegoCarBuild::FUN_100250e0(MxBool p_enabled)
|
||||
{
|
||||
if (m_unk0x258->StringDoesNotEndOnZero(m_unk0x110->GetName()) && m_Decals_Ctl) {
|
||||
if (m_animPresenter->StringDoesNotEndOnZero(m_unk0x110->GetName()) && m_Decals_Ctl) {
|
||||
if (strnicmp(m_unk0x110->GetName(), "JSFRNT", strlen("JSFRNT")) == 0) {
|
||||
m_Decal_Bitmap->Enable(p_enabled);
|
||||
m_Decals_Ctl->Enable(p_enabled);
|
||||
@ -1392,7 +1392,7 @@ void LegoCarBuild::FUN_10025450()
|
||||
m_unk0x1c0 = m_unk0x12c;
|
||||
|
||||
Vector3 lastColumnOfUnk0x1c0(m_unk0x1c0[3]);
|
||||
lastColumnOfUnk0x1c0 = Vector3(m_unk0x258->GetUnknown0xe0()[3]);
|
||||
lastColumnOfUnk0x1c0 = Vector3(m_animPresenter->GetBuildViewMatrix()[3]);
|
||||
|
||||
// This looks odd, but it improves the LEGO1 match while breaking the BETA10 match.
|
||||
// I don't know whether this is due to compiler entropy.
|
||||
@ -1401,7 +1401,7 @@ void LegoCarBuild::FUN_10025450()
|
||||
MxMatrix* unk0x178 = &m_unk0x178;
|
||||
*unk0x178 = m_unk0x12c;
|
||||
|
||||
if (m_unk0x258->PartIsPlaced(m_unk0x110->GetName())) {
|
||||
if (m_animPresenter->PartIsPlaced(m_unk0x110->GetName())) {
|
||||
m_unk0x2a4 = Vector4(m_unk0x110->GetWorldPosition());
|
||||
|
||||
if (!m_unk0x2d4) {
|
||||
@ -1418,11 +1418,11 @@ void LegoCarBuild::FUN_10025450()
|
||||
else {
|
||||
const LegoChar* wiredName;
|
||||
|
||||
if (!m_unk0x258->FUN_10079c30(m_unk0x110->GetName())) {
|
||||
wiredName = m_unk0x258->GetWiredNameByPartName(m_unk0x110->GetName());
|
||||
if (!m_animPresenter->FUN_10079c30(m_unk0x110->GetName())) {
|
||||
wiredName = m_animPresenter->GetWiredNameByPartName(m_unk0x110->GetName());
|
||||
}
|
||||
else {
|
||||
wiredName = m_unk0x258->GetWiredNameOfLastPlacedPart();
|
||||
wiredName = m_animPresenter->GetWiredNameOfLastPlacedPart();
|
||||
}
|
||||
|
||||
LegoROI* parentROI = (LegoROI*) m_unk0x110->GetParentROI();
|
||||
|
||||
@ -23,17 +23,17 @@ DECOMP_SIZE_ASSERT(LegoCarBuildAnimPresenter, 0x150)
|
||||
// FUNCTION: BETA10 0x100707c0
|
||||
LegoCarBuildAnimPresenter::LegoCarBuildAnimPresenter()
|
||||
{
|
||||
m_unk0xbc = 0;
|
||||
m_shelfState = 0;
|
||||
m_numberOfParts = 0;
|
||||
m_placedPartCount = 0;
|
||||
m_parts = NULL;
|
||||
m_unk0xc4 = NULL;
|
||||
m_unk0x130 = 0;
|
||||
m_unk0x12c = 0;
|
||||
m_unk0x134 = 0;
|
||||
m_unk0x138 = 0;
|
||||
m_platformAnimNodeData = NULL;
|
||||
m_ShelfFrame = 0;
|
||||
m_ShelfFrameBuffer = 0;
|
||||
m_ShelfFrameMax = 0;
|
||||
m_ShelfFrameInterval = 0;
|
||||
m_unk0x13c = 0;
|
||||
m_unk0x140 = NULL;
|
||||
m_carBuildEntity = NULL;
|
||||
m_unk0x144 = -1;
|
||||
m_unk0x148 = -1;
|
||||
m_mainSourceId = NULL;
|
||||
@ -51,8 +51,8 @@ LegoCarBuildAnimPresenter::~LegoCarBuildAnimPresenter()
|
||||
delete[] m_parts;
|
||||
}
|
||||
|
||||
m_unk0xc8.GetRoot()->SetNumChildren(0);
|
||||
*m_unk0xc8.GetRoot()->GetChildren() = NULL;
|
||||
m_platformAnim.GetRoot()->SetNumChildren(0);
|
||||
*m_platformAnim.GetRoot()->GetChildren() = NULL;
|
||||
|
||||
if (m_mainSourceId) {
|
||||
delete[] m_mainSourceId;
|
||||
@ -114,14 +114,14 @@ inline void LegoCarBuildAnimPresenter::Beta10Inline0x100733d0()
|
||||
// FUNCTION: BETA10 0x10070ab1
|
||||
void LegoCarBuildAnimPresenter::PutFrame()
|
||||
{
|
||||
switch (m_unk0xbc) {
|
||||
case 0:
|
||||
switch (m_shelfState) {
|
||||
case 0: //Selected piece for moving / recoloring / decal
|
||||
break;
|
||||
case 2:
|
||||
FUN_10079a90();
|
||||
case 1:
|
||||
if (m_unk0x140->GetROI()) {
|
||||
FUN_1006b9a0(m_anim, m_unk0x12c, NULL);
|
||||
case 2: //Shelf is moving
|
||||
MoveShelfForward();
|
||||
case 1: //Shelf is still, get next shelf
|
||||
if (m_carBuildEntity->GetROI()) {
|
||||
FUN_1006b9a0(m_anim, m_ShelfFrameBuffer, NULL);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
@ -150,24 +150,24 @@ void LegoCarBuildAnimPresenter::ReadyTickle()
|
||||
#endif
|
||||
}
|
||||
|
||||
m_unk0x140 = (LegoEntity*) m_currentWorld->Find("MxEntity", "Dunebld");
|
||||
m_carBuildEntity = (LegoEntity*) m_currentWorld->Find("MxEntity", "Dunebld");
|
||||
|
||||
if (!m_unk0x140) {
|
||||
m_unk0x140 = (LegoEntity*) m_currentWorld->Find("MxEntity", "Chptrbld");
|
||||
if (!m_carBuildEntity) {
|
||||
m_carBuildEntity = (LegoEntity*) m_currentWorld->Find("MxEntity", "Chptrbld");
|
||||
}
|
||||
|
||||
if (!m_unk0x140) {
|
||||
m_unk0x140 = (LegoEntity*) m_currentWorld->Find("MxEntity", "Jetbld");
|
||||
if (!m_carBuildEntity) {
|
||||
m_carBuildEntity = (LegoEntity*) m_currentWorld->Find("MxEntity", "Jetbld");
|
||||
}
|
||||
|
||||
if (!m_unk0x140) {
|
||||
m_unk0x140 = (LegoEntity*) m_currentWorld->Find("MxEntity", "bldrace");
|
||||
if (!m_carBuildEntity) {
|
||||
m_carBuildEntity = (LegoEntity*) m_currentWorld->Find("MxEntity", "bldrace");
|
||||
}
|
||||
|
||||
if (m_unk0x140) {
|
||||
((LegoCarBuild*) m_currentWorld)->SetUnknown0x258(this);
|
||||
if (m_carBuildEntity) {
|
||||
((LegoCarBuild*) m_currentWorld)->SetCarBuildAnimPresenter(this);
|
||||
m_placedPartCount = ((LegoCarBuild*) m_currentWorld)->GetPlacedPartCount();
|
||||
SetUnknown0xbc(1);
|
||||
SetShelfState(1);
|
||||
m_previousTickleStates |= 1 << m_currentTickleState;
|
||||
m_currentTickleState = e_starting;
|
||||
m_compositePresenter->SendToCompositePresenter(Lego());
|
||||
@ -182,7 +182,7 @@ void LegoCarBuildAnimPresenter::ReadyTickle()
|
||||
// FUNCTION: BETA10 0x10070cdd
|
||||
void LegoCarBuildAnimPresenter::StreamingTickle()
|
||||
{
|
||||
if (!m_unk0x140->GetROI()) {
|
||||
if (!m_carBuildEntity->GetROI()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ void LegoCarBuildAnimPresenter::StreamingTickle()
|
||||
|
||||
Lego3DView* lego3dview = videoManager->Get3DManager()->GetLego3DView();
|
||||
LegoROI* videoManagerROI = videoManager->GetViewROI();
|
||||
LegoROI* local60 = m_unk0x140->GetROI();
|
||||
LegoROI* local60 = m_carBuildEntity->GetROI();
|
||||
LegoROI* camera = NULL;
|
||||
MxFloat fov;
|
||||
|
||||
@ -271,7 +271,7 @@ void LegoCarBuildAnimPresenter::StreamingTickle()
|
||||
lego3dview->Moved(*videoManagerROI);
|
||||
videoManager->Get3DManager()->SetFrustrum(fov, 0.1, 250.0);
|
||||
|
||||
m_unk0xe0 = local60->FindChildROI("VIEW", local60)->GetLocal2World();
|
||||
m_buildViewMatrix = local60->FindChildROI("VIEW", local60)->GetLocal2World();
|
||||
|
||||
m_previousTickleStates |= 1 << m_currentTickleState;
|
||||
m_currentTickleState = e_repeating;
|
||||
@ -284,7 +284,7 @@ void LegoCarBuildAnimPresenter::EndAction()
|
||||
if (m_action) {
|
||||
AUTOLOCK(m_criticalSection);
|
||||
MxVideoPresenter::EndAction();
|
||||
m_unk0xbc = 0;
|
||||
m_shelfState = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -294,7 +294,7 @@ MxResult LegoCarBuildAnimPresenter::Serialize(LegoStorage* p_storage)
|
||||
{
|
||||
if (p_storage->IsReadMode()) {
|
||||
p_storage->ReadS16(m_placedPartCount);
|
||||
p_storage->ReadFloat(m_unk0x130);
|
||||
p_storage->ReadFloat(m_ShelfFrame);
|
||||
for (MxS16 i = 0; i < m_numberOfParts; i++) {
|
||||
p_storage->ReadString(m_parts[i].m_name);
|
||||
p_storage->ReadString(m_parts[i].m_wiredName);
|
||||
@ -303,7 +303,7 @@ MxResult LegoCarBuildAnimPresenter::Serialize(LegoStorage* p_storage)
|
||||
}
|
||||
else if (p_storage->IsWriteMode()) {
|
||||
p_storage->WriteS16(m_placedPartCount);
|
||||
p_storage->WriteFloat(m_unk0x130);
|
||||
p_storage->WriteFloat(m_ShelfFrame);
|
||||
for (MxS16 i = 0; i < m_numberOfParts; i++) {
|
||||
p_storage->WriteString(m_parts[i].m_name);
|
||||
p_storage->WriteString(m_parts[i].m_wiredName);
|
||||
@ -360,11 +360,11 @@ void LegoCarBuildAnimPresenter::FUN_10079160()
|
||||
name = data->GetName();
|
||||
|
||||
if (StringEqualsPlatform(name)) {
|
||||
m_unk0xc4 = data;
|
||||
if (m_unk0xc4->GetNumRotationKeys() == 0) {
|
||||
m_platformAnimNodeData = data;
|
||||
if (m_platformAnimNodeData->GetNumRotationKeys() == 0) {
|
||||
LegoRotationKey* key = new LegoRotationKey();
|
||||
m_unk0xc4->SetNumRotationKeys(1);
|
||||
m_unk0xc4->SetRotationKeys(key);
|
||||
m_platformAnimNodeData->SetNumRotationKeys(1);
|
||||
m_platformAnimNodeData->SetRotationKeys(key);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -372,9 +372,9 @@ void LegoCarBuildAnimPresenter::FUN_10079160()
|
||||
m_numberOfParts++;
|
||||
}
|
||||
else {
|
||||
if (m_unk0x134 == 0.0f && StringEqualsShelf(name)) {
|
||||
m_unk0x134 = m_anim->GetDuration();
|
||||
m_unk0x138 = m_unk0x134 / (data->GetNumTranslationKeys() - 1);
|
||||
if (m_ShelfFrameMax == 0.0f && StringEqualsShelf(name)) {
|
||||
m_ShelfFrameMax = m_anim->GetDuration();
|
||||
m_ShelfFrameInterval = m_ShelfFrameMax / (data->GetNumTranslationKeys() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -436,7 +436,7 @@ void LegoCarBuildAnimPresenter::FUN_10079160()
|
||||
*children = FindNodeByName(m_anim->GetRoot(), "PLATFORM");
|
||||
|
||||
destNode->SetChildren(children);
|
||||
m_unk0xc8.SetRoot(destNode);
|
||||
m_platformAnim.SetRoot(destNode);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100795d0
|
||||
@ -561,8 +561,8 @@ void LegoCarBuildAnimPresenter::FUN_10079790(const LegoChar* p_name)
|
||||
// FUNCTION: BETA10 0x1007225d
|
||||
void LegoCarBuildAnimPresenter::RotateAroundYAxis(MxFloat p_angle)
|
||||
{
|
||||
if (m_unk0xc4) {
|
||||
LegoRotationKey* rotationKey = m_unk0xc4->GetRotationKey(0);
|
||||
if (m_platformAnimNodeData) {
|
||||
LegoRotationKey* rotationKey = m_platformAnimNodeData->GetRotationKey(0);
|
||||
|
||||
Mx4DPointFloat
|
||||
currentRotation(rotationKey->GetX(), rotationKey->GetY(), rotationKey->GetZ(), rotationKey->GetAngle());
|
||||
@ -579,33 +579,33 @@ void LegoCarBuildAnimPresenter::RotateAroundYAxis(MxFloat p_angle)
|
||||
rotationKey->FUN_100739a0(FALSE);
|
||||
}
|
||||
|
||||
m_unk0xc4->GetRotationKey(0)->SetX(newRotation[0]);
|
||||
m_unk0xc4->GetRotationKey(0)->SetY(newRotation[1]);
|
||||
m_unk0xc4->GetRotationKey(0)->SetZ(newRotation[2]);
|
||||
m_unk0xc4->GetRotationKey(0)->SetAngle(newRotation[3]);
|
||||
m_platformAnimNodeData->GetRotationKey(0)->SetX(newRotation[0]);
|
||||
m_platformAnimNodeData->GetRotationKey(0)->SetY(newRotation[1]);
|
||||
m_platformAnimNodeData->GetRotationKey(0)->SetZ(newRotation[2]);
|
||||
m_platformAnimNodeData->GetRotationKey(0)->SetAngle(newRotation[3]);
|
||||
|
||||
if (m_unk0x140->GetROI()) {
|
||||
FUN_1006b9a0(&m_unk0xc8, m_unk0x12c, NULL);
|
||||
if (m_carBuildEntity->GetROI()) {
|
||||
FUN_1006b9a0(&m_platformAnim, m_ShelfFrameBuffer, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10079a90
|
||||
// FUNCTION: BETA10 0x10072412
|
||||
void LegoCarBuildAnimPresenter::FUN_10079a90()
|
||||
void LegoCarBuildAnimPresenter::MoveShelfForward()
|
||||
{
|
||||
if (m_unk0x12c >= m_unk0x134) {
|
||||
m_unk0x130 = 0.0;
|
||||
m_unk0x12c = m_unk0x130;
|
||||
m_unk0xbc = 1;
|
||||
if (m_ShelfFrameBuffer >= m_ShelfFrameMax) {
|
||||
m_ShelfFrame = 0.0;
|
||||
m_ShelfFrameBuffer = m_ShelfFrame;
|
||||
m_shelfState = 1;
|
||||
}
|
||||
else if (m_unk0x12c >= m_unk0x138 + m_unk0x130) {
|
||||
m_unk0x130 = m_unk0x138 + m_unk0x130;
|
||||
m_unk0x12c = m_unk0x130;
|
||||
m_unk0xbc = 1;
|
||||
else if (m_ShelfFrameBuffer >= m_ShelfFrameInterval + m_ShelfFrame) {
|
||||
m_ShelfFrame = m_ShelfFrameInterval + m_ShelfFrame;
|
||||
m_ShelfFrameBuffer = m_ShelfFrame;
|
||||
m_shelfState = 1;
|
||||
}
|
||||
else {
|
||||
m_unk0x12c = m_unk0x138 / 10.0f + m_unk0x12c;
|
||||
m_ShelfFrameBuffer = m_ShelfFrameInterval / 10.0f + m_ShelfFrameBuffer;
|
||||
}
|
||||
}
|
||||
|
||||
@ -706,6 +706,6 @@ void LegoCarBuildAnimPresenter::SetPartObjectIdByName(const LegoChar* p_name, Mx
|
||||
// FUNCTION: BETA10 0x10072959
|
||||
const BoundingSphere& LegoCarBuildAnimPresenter::FUN_10079e20()
|
||||
{
|
||||
LegoROI* roi = m_unk0x140->GetROI();
|
||||
LegoROI* roi = m_carBuildEntity->GetROI();
|
||||
return roi->FindChildROI(m_parts[m_placedPartCount].m_wiredName, roi)->GetWorldBoundingSphere();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user