diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index a22f685b..9985a3ca 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -149,7 +149,7 @@ IsleApp::~IsleApp() void IsleApp::Close() { MxDSAction ds; - ds.SetUnknown24(-2); + ds.SetFlags(-2); if (Lego()) { GameState()->Save(0); diff --git a/LEGO1/lego/legoomni/include/legoanimmmpresenter.h b/LEGO1/lego/legoomni/include/legoanimmmpresenter.h index d73cd55d..2ab22bb6 100644 --- a/LEGO1/lego/legoomni/include/legoanimmmpresenter.h +++ b/LEGO1/lego/legoomni/include/legoanimmmpresenter.h @@ -90,7 +90,7 @@ class LegoAnimMMPresenter : public MxCompositePresenter { MxU8 m_unk0x59; // 0x59 MxU32 m_animmanId; // 0x5c LegoTranInfo* m_tranInfo; // 0x60 - LegoWorld* m_unk0x64; // 0x64 + LegoWorld* m_world; // 0x64 MxMatrix* m_unk0x68; // 0x68 LegoROI** m_roiMap; // 0x6c MxU32 m_roiMapSize; // 0x70 diff --git a/LEGO1/lego/legoomni/include/legobuildingmanager.h b/LEGO1/lego/legoomni/include/legobuildingmanager.h index bac64396..e8d2f175 100644 --- a/LEGO1/lego/legoomni/include/legobuildingmanager.h +++ b/LEGO1/lego/legoomni/include/legobuildingmanager.h @@ -26,10 +26,10 @@ struct LegoBuildingInfo { MxU32 m_sound; // 0x08 MxU32 m_move; // 0x0c MxU8 m_mood; // 0x10 - MxS8 m_unk0x11; // 0x11 + MxS8 m_Downshift; // 0x11 MxS8 m_initialUnk0x11; // 0x12 - initial value loaded to m_unk0x11 MxU8 m_flags; // 0x13 - float m_unk0x14; // 0x14 + float m_downshiftScale; // 0x14 const char* m_boundaryName; // 0x18 float m_x; // 0x1c float m_y; // 0x20 diff --git a/LEGO1/lego/legoomni/include/legoinputmanager.h b/LEGO1/lego/legoomni/include/legoinputmanager.h index 9b47d7a8..a199d7d7 100644 --- a/LEGO1/lego/legoomni/include/legoinputmanager.h +++ b/LEGO1/lego/legoomni/include/legoinputmanager.h @@ -74,7 +74,7 @@ class LegoInputManager : public MxPresenter { c_right = 0x02, c_up = 0x04, c_down = 0x08, - c_bit5 = 0x10, + c_ctrl = 0x10, c_leftOrRight = c_left | c_right, c_upOrDown = c_up | c_down diff --git a/LEGO1/lego/legoomni/include/legonavcontroller.h b/LEGO1/lego/legoomni/include/legonavcontroller.h index ef882450..def81053 100644 --- a/LEGO1/lego/legoomni/include/legonavcontroller.h +++ b/LEGO1/lego/legoomni/include/legonavcontroller.h @@ -155,7 +155,7 @@ class LegoNavController : public MxCore { float m_unk0x60; // 0x60 float m_unk0x64; // 0x64 float m_unk0x68; // 0x68 - MxBool m_unk0x6c; // 0x6c + MxBool m_isAccelerating; // 0x6c // one copy of defaults (these can be set by App.) static int g_defdeadZone; diff --git a/LEGO1/lego/legoomni/include/legopointofviewcontroller.h b/LEGO1/lego/legoomni/include/legopointofviewcontroller.h index 9d1253aa..e299909e 100644 --- a/LEGO1/lego/legoomni/include/legopointofviewcontroller.h +++ b/LEGO1/lego/legoomni/include/legopointofviewcontroller.h @@ -30,14 +30,14 @@ class LegoMouseController : public MxCore { virtual void RightUp(int, int); // vtable+0x28 BOOL GetIsButtonDown() { return m_isButtonDown; } - MxDouble GetButtonX() { return m_buttonX; } - MxDouble GetButtonY() { return m_buttonY; } + MxDouble GetX() { return m_X; } + MxDouble GetY() { return m_Y; } private: BOOL m_isButtonDown; // 0x08 undefined4 m_unk0x0c; // 0x0c - MxDouble m_buttonX; // 0x10 - MxDouble m_buttonY; // 0x18 + MxDouble m_X; // 0x10 + MxDouble m_Y; // 0x18 }; // SYNTHETIC: LEGO1 0x100655b0 diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index 10ff56ab..e16f71d6 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -125,7 +125,7 @@ class LegoWorld : public LegoEntity { // LegoWorld::`scalar deleting destructor' protected: - LegoPathControllerList m_list0x68; // 0x68 + LegoPathControllerList m_controllerList; // 0x68 MxPresenterList m_animPresenters; // 0x80 LegoCameraController* m_cameraController; // 0x98 LegoEntityList* m_entityList; // 0x9c diff --git a/LEGO1/lego/legoomni/src/actors/act2actor.cpp b/LEGO1/lego/legoomni/src/actors/act2actor.cpp index d810c975..4d392c2c 100644 --- a/LEGO1/lego/legoomni/src/actors/act2actor.cpp +++ b/LEGO1/lego/legoomni/src/actors/act2actor.cpp @@ -719,11 +719,11 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param) switch (m_unk0x1d) { case 0: - if (buildingInfo[12].m_unk0x11) { + if (buildingInfo[12].m_Downshift) { result = buildingInfo[12].m_entity; *p_param = TRUE; } - else if (buildingInfo[14].m_unk0x11) { + else if (buildingInfo[14].m_Downshift) { result = buildingInfo[14].m_entity; *p_param = TRUE; } @@ -737,7 +737,7 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param) } break; case 1: - if (buildingInfo[13].m_unk0x11) { + if (buildingInfo[13].m_Downshift) { result = buildingInfo[13].m_entity; *p_param = TRUE; } @@ -751,11 +751,11 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param) } break; case 2: - if (buildingInfo[9].m_unk0x11) { + if (buildingInfo[9].m_Downshift) { result = buildingInfo[9].m_entity; *p_param = TRUE; } - else if (buildingInfo[11].m_unk0x11) { + else if (buildingInfo[11].m_Downshift) { result = buildingInfo[11].m_entity; *p_param = TRUE; } @@ -769,15 +769,15 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param) } break; case 3: - if (buildingInfo[7].m_unk0x11) { + if (buildingInfo[7].m_Downshift) { result = buildingInfo[7].m_entity; *p_param = TRUE; } - else if (buildingInfo[8].m_unk0x11) { + else if (buildingInfo[8].m_Downshift) { result = buildingInfo[8].m_entity; *p_param = TRUE; } - else if (buildingInfo[3].m_unk0x11) { + else if (buildingInfo[3].m_Downshift) { result = buildingInfo[3].m_entity; *p_param = TRUE; } @@ -791,11 +791,11 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param) } break; case 4: - if (buildingInfo[5].m_unk0x11) { + if (buildingInfo[5].m_Downshift) { result = buildingInfo[5].m_entity; *p_param = TRUE; } - else if (buildingInfo[10].m_unk0x11) { + else if (buildingInfo[10].m_Downshift) { result = buildingInfo[10].m_entity; *p_param = TRUE; } @@ -809,7 +809,7 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param) } break; case 5: - if (buildingInfo[4].m_unk0x11) { + if (buildingInfo[4].m_Downshift) { result = buildingInfo[4].m_entity; *p_param = TRUE; } @@ -823,7 +823,7 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param) } break; case 6: - if (buildingInfo[2].m_unk0x11) { + if (buildingInfo[2].m_Downshift) { result = buildingInfo[2].m_entity; *p_param = TRUE; } @@ -837,7 +837,7 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param) } break; case 7: - if (buildingInfo[6].m_unk0x11) { + if (buildingInfo[6].m_Downshift) { result = buildingInfo[6].m_entity; *p_param = TRUE; } @@ -862,7 +862,7 @@ LegoEntity* Act2Actor::FUN_10019b90(MxBool* p_param) return result; } - if (buildingInfo[15].m_unk0x11) { + if (buildingInfo[15].m_Downshift) { result = buildingInfo[15].m_entity; *p_param = TRUE; } diff --git a/LEGO1/lego/legoomni/src/actors/act3actors.cpp b/LEGO1/lego/legoomni/src/actors/act3actors.cpp index 683fcffc..d7533092 100644 --- a/LEGO1/lego/legoomni/src/actors/act3actors.cpp +++ b/LEGO1/lego/legoomni/src/actors/act3actors.cpp @@ -653,7 +653,7 @@ void Act3Brickster::Animate(float p_time) assert(SoundManager()->GetCacheSoundManager()); SoundManager()->GetCacheSoundManager()->Play("thpt", NULL, FALSE); - while (m_bInfo->m_unk0x11 > 0 || m_bInfo->m_unk0x11 == -1) { + while (m_bInfo->m_Downshift > 0 || m_bInfo->m_Downshift == -1) { if (!BuildingManager()->FUN_10030110(m_bInfo)) { break; } @@ -865,7 +865,7 @@ MxResult Act3Brickster::FUN_100417c0() float local124; for (MxS32 i = 0; i < length; i++) { - if (bInfo[i].m_unk0x11 < 0 && bInfo[i].m_boundary != NULL && bInfo[i].m_entity != NULL && i != 0 && + if (bInfo[i].m_Downshift < 0 && bInfo[i].m_boundary != NULL && bInfo[i].m_entity != NULL && i != 0 && (local120 == -1 || i != 15)) { Mx3DPointFloat local188(bInfo[i].m_x, bInfo[i].m_y, bInfo[i].m_z); diff --git a/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp b/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp index d89f5cd4..c4b1ed06 100644 --- a/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp +++ b/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp @@ -71,7 +71,7 @@ void MxBackgroundAudioManager::DestroyMusic() if (m_script.GetInternal()) { MxDSAction ds; ds.SetAtomId(m_script); - ds.SetUnknown24(-2); + ds.SetFlags(-2); DeleteObject(ds); Streamer()->Close(m_script.GetInternal()); m_enabled = FALSE; @@ -257,7 +257,7 @@ MxResult MxBackgroundAudioManager::PlayMusic( MxDSAction action; action.SetAtomId(GetCurrentAction().GetAtomId()); action.SetObjectId(GetCurrentAction().GetObjectId()); - action.SetUnknown24(GetCurrentAction().GetUnknown24()); + action.SetFlags(GetCurrentAction().GetFlags()); m_action2.SetAtomId(p_action.GetAtomId()); m_action2.SetObjectId(p_action.GetObjectId()); @@ -268,7 +268,7 @@ MxResult MxBackgroundAudioManager::PlayMusic( GetCurrentAction().SetAtomId(action.GetAtomId()); GetCurrentAction().SetObjectId(action.GetObjectId()); - GetCurrentAction().SetUnknown24(action.GetUnknown24()); + GetCurrentAction().SetFlags(action.GetFlags()); if (result == SUCCESS) { m_tickleState = p_tickleState; diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index 51f9cea1..08f6abed 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp @@ -1012,7 +1012,7 @@ MxResult LegoAnimationManager::FUN_100605e0( action.SetAtomId(*Lego()->GetWorldAtom(m_worldId)); action.SetObjectId(animInfo.m_objectId); - action.SetUnknown24(-1); + action.SetFlags(-1); action.AppendExtra(strlen(buf) + 1, buf); if (StartActionIfUnknown0x13c(action) == SUCCESS) { @@ -1079,7 +1079,7 @@ MxResult LegoAnimationManager::FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix action.SetAtomId(*Lego()->GetWorldAtom(m_worldId)); action.SetObjectId(p_objectId); - action.SetUnknown24(-1); + action.SetFlags(-1); action.AppendExtra(strlen(buf) + 1, buf); if (StartActionIfUnknown0x13c(action) == SUCCESS) { diff --git a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp index 21bad45d..d579beb1 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimmmpresenter.cpp @@ -30,7 +30,7 @@ LegoAnimMMPresenter::LegoAnimMMPresenter() m_unk0x59 = 0; m_tranInfo = NULL; m_unk0x54 = 0; - m_unk0x64 = NULL; + m_world = NULL; m_unk0x68 = NULL; m_roiMap = NULL; m_roiMapSize = 0; @@ -101,9 +101,9 @@ MxResult LegoAnimMMPresenter::StartAction(MxStreamController* p_controller, MxDS } } - m_unk0x64 = CurrentWorld(); - if (m_unk0x64) { - m_unk0x64->Add(this); + m_world = CurrentWorld(); + if (m_world) { + m_world->Add(this); } VideoManager()->RegisterPresenter(*this); @@ -133,8 +133,8 @@ void LegoAnimMMPresenter::EndAction() if (m_action != NULL) { MxCompositePresenter::EndAction(); - if (m_unk0x64 != NULL) { - m_unk0x64->Remove(this); + if (m_world != NULL) { + m_world->Remove(this); } } } @@ -429,11 +429,11 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time) LegoPathActor* actor = UserActor(); if (m_tranInfo != NULL && m_tranInfo->m_unk0x14 && m_tranInfo->m_location != -1 && actor != NULL) { - if (m_unk0x64 != NULL) { + if (m_world != NULL) { undefined4 und = 1; if (m_presenter != NULL) { - m_unk0x64->RemoveActor(actor); + m_world->RemoveActor(actor); if (m_tranInfo->m_unk0x29) { Mx3DPointFloat position, direction; @@ -442,7 +442,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time) direction = viewROI->GetWorldDirection(); position[1] -= 1.25; - und = m_unk0x64->PlaceActor(actor, m_presenter, position, direction); + und = m_world->PlaceActor(actor, m_presenter, position, direction); } else { und = 0; @@ -452,7 +452,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time) if (und != 0) { viewROI->WrappedSetLocalTransform(m_tranInfo->m_unk0x2c); VideoManager()->Get3DManager()->Moved(*viewROI); - m_unk0x64->PlaceActor(actor); + m_world->PlaceActor(actor); } if (m_tranInfo->m_unk0x29) { diff --git a/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp b/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp index fa6f83ef..37587951 100644 --- a/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp @@ -301,7 +301,7 @@ void LegoBuildingManager::CreateBuilding(MxS32 p_index, LegoWorld* p_world) LegoROI* roi = entity->GetROI(); AdjustHeight(p_index); MxMatrix mat = roi->GetLocal2World(); - mat[3][1] = g_buildingInfo[p_index].m_unk0x14; + mat[3][1] = g_buildingInfo[p_index].m_downshiftScale; roi->UpdateTransformationRelativeToParent(mat); VideoManager()->Get3DManager()->Moved(*roi); } @@ -376,11 +376,11 @@ MxResult LegoBuildingManager::Read(LegoStorage* p_storage) if (p_storage->Read(&info->m_mood, sizeof(info->m_mood)) != SUCCESS) { goto done; } - if (p_storage->Read(&info->m_unk0x11, sizeof(info->m_unk0x11)) != SUCCESS) { + if (p_storage->Read(&info->m_Downshift, sizeof(info->m_Downshift)) != SUCCESS) { goto done; } - info->m_initialUnk0x11 = info->m_unk0x11; + info->m_initialUnk0x11 = info->m_Downshift; AdjustHeight(i); } @@ -402,15 +402,15 @@ MxResult LegoBuildingManager::Read(LegoStorage* p_storage) // FUNCTION: BETA10 0x10063f1a void LegoBuildingManager::AdjustHeight(MxS32 p_index) { - if (g_buildingInfo[p_index].m_unk0x11 > 0) { - float value = g_buildingInfoDownshift[p_index] - g_buildingInfo[p_index].m_unk0x11; - g_buildingInfo[p_index].m_unk0x14 = - g_buildingInfoInit[p_index].m_unk0x14 - value * g_buildingInfoDownshiftScale[p_index]; + if (g_buildingInfo[p_index].m_Downshift > 0) { + float value = g_buildingInfoDownshift[p_index] - g_buildingInfo[p_index].m_Downshift; + g_buildingInfo[p_index].m_downshiftScale = + g_buildingInfoInit[p_index].m_downshiftScale - value * g_buildingInfoDownshiftScale[p_index]; } - else if (g_buildingInfo[p_index].m_unk0x11 == 0) { - float value = g_buildingInfoDownshift[p_index] - g_buildingInfo[p_index].m_unk0x11; - g_buildingInfo[p_index].m_unk0x14 = - g_buildingInfoInit[p_index].m_unk0x14 - value * g_buildingInfoDownshiftScale[p_index]; + else if (g_buildingInfo[p_index].m_Downshift == 0) { + float value = g_buildingInfoDownshift[p_index] - g_buildingInfo[p_index].m_Downshift; + g_buildingInfo[p_index].m_downshiftScale = + g_buildingInfoInit[p_index].m_downshiftScale - value * g_buildingInfoDownshiftScale[p_index]; if (g_buildingInfo[p_index].m_entity != NULL) { LegoROI* roi = g_buildingInfo[p_index].m_entity->GetROI(); @@ -420,7 +420,7 @@ void LegoBuildingManager::AdjustHeight(MxS32 p_index) } } else { - g_buildingInfo[p_index].m_unk0x14 = g_buildingInfoInit[p_index].m_unk0x14; + g_buildingInfo[p_index].m_downshiftScale = g_buildingInfoInit[p_index].m_downshiftScale; } } @@ -453,7 +453,7 @@ MxBool LegoBuildingManager::SwitchVariant(LegoEntity* p_entity) LegoBuildingInfo* info = GetInfo(p_entity); - if (info != NULL && info->m_flags & LegoBuildingInfo::c_hasVariants && info->m_unk0x11 == -1) { + if (info != NULL && info->m_flags & LegoBuildingInfo::c_hasVariants && info->m_Downshift == -1) { LegoROI* roi = p_entity->GetROI(); if (++m_nextVariant >= sizeOfArray(g_buildingInfoVariants)) { m_nextVariant = 0; @@ -621,25 +621,25 @@ MxBool LegoBuildingManager::FUN_10030030(MxS32 p_index) MxBool result = TRUE; - if (info->m_unk0x11 < 0) { - info->m_unk0x11 = g_buildingInfoDownshift[p_index]; + if (info->m_Downshift < 0) { + info->m_Downshift = g_buildingInfoDownshift[p_index]; } - if (info->m_unk0x11 <= 0) { + if (info->m_Downshift <= 0) { result = FALSE; } else { LegoROI* roi = info->m_entity->GetROI(); - info->m_unk0x11 -= 2; - if (info->m_unk0x11 == 1) { - info->m_unk0x11 = 0; + info->m_Downshift -= 2; + if (info->m_Downshift == 1) { + info->m_Downshift = 0; roi->SetVisibility(FALSE); } else { AdjustHeight(p_index); MxMatrix mat = roi->GetLocal2World(); - mat[3][1] = g_buildingInfo[p_index].m_unk0x14; + mat[3][1] = g_buildingInfo[p_index].m_downshiftScale; roi->UpdateTransformationRelativeToParent(mat); VideoManager()->Get3DManager()->Moved(*roi); } @@ -741,16 +741,16 @@ MxResult LegoBuildingManager::Tickle() if (entry->m_time < time) { LegoBuildingInfo* info = GetInfo(entry->m_entity); - if (info->m_unk0x11 && !m_unk0x28) { + if (info->m_Downshift && !m_unk0x28) { MxS32 index = info - g_buildingInfo; AdjustHeight(index); MxMatrix mat = entry->m_roi->GetLocal2World(); - mat[3][1] = g_buildingInfo[index].m_unk0x14; + mat[3][1] = g_buildingInfo[index].m_downshiftScale; entry->m_roi->UpdateTransformationRelativeToParent(mat); VideoManager()->Get3DManager()->Moved(*entry->m_roi); } else { - info->m_unk0x11 = 0; + info->m_Downshift = 0; entry->m_roi->SetVisibility(FALSE); } @@ -777,14 +777,14 @@ MxResult LegoBuildingManager::Tickle() void LegoBuildingManager::FUN_10030590() { for (MxS32 i = 0; i < sizeOfArray(g_buildingInfo); i++) { - g_buildingInfo[i].m_unk0x11 = -1; + g_buildingInfo[i].m_Downshift = -1; g_buildingInfo[i].m_initialUnk0x11 = -1; AdjustHeight(i); if (g_buildingInfo[i].m_entity != NULL) { LegoROI* roi = g_buildingInfo[i].m_entity->GetROI(); MxMatrix mat = roi->GetLocal2World(); - mat[3][1] = g_buildingInfo[i].m_unk0x14; + mat[3][1] = g_buildingInfo[i].m_downshiftScale; roi->UpdateTransformationRelativeToParent(mat); VideoManager()->Get3DManager()->Moved(*roi); } @@ -881,14 +881,14 @@ void LegoBuildingManager::FUN_100307b0(LegoEntity* p_entity, MxS32 p_adjust) LegoBuildingInfo* info = GetInfo(p_entity); if (info != NULL) { - if (info->m_unk0x11 < 0) { - info->m_unk0x11 = g_buildingInfoDownshift[info - g_buildingInfo]; + if (info->m_Downshift < 0) { + info->m_Downshift = g_buildingInfoDownshift[info - g_buildingInfo]; } - if (info->m_unk0x11 > 0) { - info->m_unk0x11 += p_adjust; - if (info->m_unk0x11 <= 1 && p_adjust < 0) { - info->m_unk0x11 = 0; + if (info->m_Downshift > 0) { + info->m_Downshift += p_adjust; + if (info->m_Downshift <= 1 && p_adjust < 0) { + info->m_Downshift = 0; } } } @@ -898,6 +898,6 @@ void LegoBuildingManager::FUN_100307b0(LegoEntity* p_entity, MxS32 p_adjust) void LegoBuildingManager::FUN_10030800() { for (MxU32 i = 0; i < sizeOfArray(g_buildingInfo); i++) { - g_buildingInfo[i].m_initialUnk0x11 = g_buildingInfo[i].m_unk0x11; + g_buildingInfo[i].m_initialUnk0x11 = g_buildingInfo[i].m_Downshift; } } diff --git a/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp index 8377e30f..30243d2b 100644 --- a/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp @@ -573,7 +573,7 @@ LegoROI* LegoCharacterManager::CreateActorROI(const char* p_key) } else if (g_actorLODs[i + 1].m_flags & LegoActorLOD::c_flag2 || (i == 0 && part.m_unk0x00[part.m_unk0x08] == 0)) { LegoFloat red, green, blue, alpha; - childROI->FUN_100a9bf0(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha); + childROI->GetColorFromGlobalHandlerOrAlias(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha); childROI->FUN_100a9170(red, green, blue, alpha); } @@ -796,7 +796,7 @@ MxBool LegoCharacterManager::SwitchColor(LegoROI* p_roi, LegoROI* p_targetROI) } LegoFloat red, green, blue, alpha; - LegoROI::FUN_100a9bf0(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha); + LegoROI::GetColorFromGlobalHandlerOrAlias(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha); p_targetROI->FUN_100a9170(red, green, blue, alpha); return TRUE; } @@ -832,7 +832,7 @@ MxBool LegoCharacterManager::SwitchVariant(LegoROI* p_roi) Tgl::Renderer* renderer = VideoManager()->GetRenderer(); LegoFloat red, green, blue, alpha; - LegoROI::FUN_100a9bf0(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha); + LegoROI::GetColorFromGlobalHandlerOrAlias(part.m_unk0x10[part.m_unk0x0c[part.m_unk0x14]], red, green, blue, alpha); for (MxS32 i = 0; i < lodSize; i++) { LegoLOD* lod = (LegoLOD*) (*lodList)[i]; diff --git a/LEGO1/lego/legoomni/src/common/legogamestate.cpp b/LEGO1/lego/legoomni/src/common/legogamestate.cpp index cd4a6f1b..6b07b91c 100644 --- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp +++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp @@ -176,7 +176,7 @@ LegoGameState::LegoGameState() // FUNCTION: LEGO1 0x10039720 LegoGameState::~LegoGameState() { - LegoROI::FUN_100a9d30(NULL); + LegoROI::SetGlobalROIHandler(NULL); if (m_stateCount) { for (MxS16 i = 0; i < m_stateCount; i++) { @@ -1062,7 +1062,7 @@ void LegoGameState::SetColors() // FUNCTION: LEGO1 0x1003bac0 void LegoGameState::SetROIHandlerFunction() { - LegoROI::FUN_100a9d30(&ROIHandlerFunction); + LegoROI::SetGlobalROIHandler(&ROIHandlerFunction); } // FUNCTION: LEGO1 0x1003bad0 diff --git a/LEGO1/lego/legoomni/src/common/legoutils.cpp b/LEGO1/lego/legoomni/src/common/legoutils.cpp index d141e32c..ac8066d7 100644 --- a/LEGO1/lego/legoomni/src/common/legoutils.cpp +++ b/LEGO1/lego/legoomni/src/common/legoutils.cpp @@ -294,7 +294,7 @@ void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p break; case Extra::ActionType::e_close: - action.SetUnknown24(-2); + action.SetFlags(-2); DeleteObject(action); Streamer()->Close(p_pAtom.GetInternal()); break; @@ -308,7 +308,7 @@ void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p break; case Extra::ActionType::e_stop: assert(p_streamId != DS_NOT_A_STREAM); - action.SetUnknown24(-2); + action.SetFlags(-2); if (!RemoveFromCurrentWorld(p_pAtom, p_streamId)) { DeleteObject(action); diff --git a/LEGO1/lego/legoomni/src/common/misc.cpp b/LEGO1/lego/legoomni/src/common/misc.cpp index 08072b7c..2431c092 100644 --- a/LEGO1/lego/legoomni/src/common/misc.cpp +++ b/LEGO1/lego/legoomni/src/common/misc.cpp @@ -239,7 +239,7 @@ void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last) MxDSAction action; action.SetAtomId(*p_id); - action.SetUnknown24(-2); + action.SetFlags(-2); for (MxS32 first = p_first, last = p_last; first <= last; first++) { action.SetObjectId(first); diff --git a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp index 24ea5af5..e1736e50 100644 --- a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp @@ -135,7 +135,7 @@ LegoNavController::LegoNavController() m_rotationalAccel = 0.0f; m_trackDefault = FALSE; m_unk0x5d = FALSE; - m_unk0x6c = FALSE; + m_isAccelerating = FALSE; m_unk0x64 = 0.0f; m_unk0x68 = 0.0f; m_unk0x60 = 0.0f; @@ -564,8 +564,8 @@ MxResult LegoNavController::ProcessJoystickInput(MxBool& p_und) // FUNCTION: LEGO1 0x100558b0 MxResult LegoNavController::ProcessKeyboardInput() { - MxBool bool1 = FALSE; - MxBool bool2 = FALSE; + MxBool skipRotationVelAndAccelCalc = FALSE; + MxBool skipLinearVelAndAccelCalc = FALSE; LegoInputManager* inputManager = LegoOmni::GetInstance()->GetInputManager(); MxU32 keyFlags; @@ -574,18 +574,18 @@ MxResult LegoNavController::ProcessKeyboardInput() } if (keyFlags == 0) { - if (m_unk0x6c) { + if (m_isAccelerating) { m_targetRotationalVel = 0.0; m_targetLinearVel = 0.0; m_rotationalAccel = m_maxRotationalDeccel; m_linearAccel = m_maxLinearDeccel; - m_unk0x6c = FALSE; + m_isAccelerating = FALSE; } return FAILURE; } - m_unk0x6c = TRUE; + m_isAccelerating = TRUE; MxS32 hMax; switch (keyFlags & LegoInputManager::c_leftOrRight) { @@ -598,7 +598,7 @@ MxResult LegoNavController::ProcessKeyboardInput() default: m_targetRotationalVel = 0.0; m_rotationalAccel = m_maxRotationalDeccel; - bool1 = TRUE; + skipRotationVelAndAccelCalc = TRUE; break; } @@ -613,23 +613,23 @@ MxResult LegoNavController::ProcessKeyboardInput() default: m_targetLinearVel = 0.0; m_linearAccel = m_maxLinearDeccel; - bool2 = TRUE; + skipLinearVelAndAccelCalc = TRUE; break; } - MxFloat val = keyFlags & LegoInputManager::c_bit5 ? 1.0f : 4.0f; - MxFloat val2 = keyFlags & LegoInputManager::c_bit5 ? 1.0f : 2.0f; + MxFloat maxAccelDivisor = keyFlags & LegoInputManager::c_ctrl ? 1.0f : 4.0f; + MxFloat minAccelDivisor = keyFlags & LegoInputManager::c_ctrl ? 1.0f : 2.0f; - if (!bool1) { + if (!skipRotationVelAndAccelCalc) { m_targetRotationalVel = CalculateNewTargetVel(hMax, m_hMax / 2, m_maxRotationalVel); m_rotationalAccel = - CalculateNewAccel(hMax, m_hMax / 2, m_maxRotationalAccel / val, (int) (m_minRotationalAccel / val2)); + CalculateNewAccel(hMax, m_hMax / 2, m_maxRotationalAccel / maxAccelDivisor, (int) (m_minRotationalAccel / minAccelDivisor)); } - if (!bool2) { + if (!skipLinearVelAndAccelCalc) { m_targetLinearVel = CalculateNewTargetVel(m_vMax - vMax, m_vMax / 2, m_maxLinearVel); m_linearAccel = - CalculateNewAccel(m_vMax - vMax, m_vMax / 2, m_maxLinearAccel / val, (int) (m_minLinearAccel / val2)); + CalculateNewAccel(m_vMax - vMax, m_vMax / 2, m_maxLinearAccel / maxAccelDivisor, (int) (m_minLinearAccel / minAccelDivisor)); } return SUCCESS; diff --git a/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp b/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp index 0cff228f..ea17e9f2 100644 --- a/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp @@ -34,46 +34,46 @@ LegoMouseController::~LegoMouseController() void LegoMouseController::LeftDown(int p_x, int p_y) { m_isButtonDown = TRUE; - m_buttonX = p_x; - m_buttonY = p_y; + m_X = p_x; + m_Y = p_y; } // FUNCTION: LEGO1 0x10065640 void LegoMouseController::LeftUp(int p_x, int p_y) { m_isButtonDown = FALSE; - m_buttonX = p_x; - m_buttonY = p_y; + m_X = p_x; + m_Y = p_y; } // FUNCTION: LEGO1 0x10065660 void LegoMouseController::LeftDrag(int p_x, int p_y) { - m_buttonX = p_x; - m_buttonY = p_y; + m_X = p_x; + m_Y = p_y; } // FUNCTION: LEGO1 0x10065680 void LegoMouseController::RightDown(int p_x, int p_y) { m_isButtonDown = TRUE; - m_buttonX = p_x; - m_buttonY = p_y; + m_X = p_x; + m_Y = p_y; } // FUNCTION: LEGO1 0x100656a0 void LegoMouseController::RightUp(int p_x, int p_y) { m_isButtonDown = FALSE; - m_buttonX = p_x; - m_buttonY = p_y; + m_X = p_x; + m_Y = p_y; } // FUNCTION: LEGO1 0x100656c0 void LegoMouseController::RightDrag(int p_x, int p_y) { - m_buttonX = p_x; - m_buttonY = p_y; + m_X = p_x; + m_Y = p_y; } ////////////////////////////////////////////////////////////////////// @@ -134,7 +134,7 @@ void LegoPointOfViewController::LeftDrag(int p_x, int p_y) // FUNCTION: LEGO1 0x10065900 void LegoPointOfViewController::AffectPointOfView() { - m_nav->SetTargets(GetButtonX(), GetButtonY(), GetIsButtonDown()); + m_nav->SetTargets(GetX(), GetY(), GetIsButtonDown()); } // FUNCTION: LEGO1 0x10065930 diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index 7ced4e38..a80b2b1b 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -32,7 +32,7 @@ DECOMP_SIZE_ASSERT(LegoCacheSoundList, 0x18) DECOMP_SIZE_ASSERT(LegoCacheSoundListCursor, 0x10) // FUNCTION: LEGO1 0x1001ca40 -LegoWorld::LegoWorld() : m_list0x68(TRUE) +LegoWorld::LegoWorld() : m_controllerList(TRUE) { m_startupTicks = e_four; m_cameraController = NULL; @@ -100,7 +100,7 @@ void LegoWorld::Destroy(MxBool p_fromDestructor) SetCurrentWorld(NULL); } - m_list0x68.DeleteAll(); + m_controllerList.DeleteAll(); if (m_cameraController) { delete m_cameraController; @@ -273,7 +273,7 @@ MxResult LegoWorld::PlaceActor( float p_destScale ) { - LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathControllerListCursor cursor(&m_controllerList); LegoPathController* controller; while (cursor.Next(controller)) { @@ -288,7 +288,7 @@ MxResult LegoWorld::PlaceActor( // FUNCTION: LEGO1 0x1001fa70 MxResult LegoWorld::PlaceActor(LegoPathActor* p_actor) { - LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathControllerListCursor cursor(&m_controllerList); LegoPathController* controller; while (cursor.Next(controller)) { @@ -308,7 +308,7 @@ MxResult LegoWorld::PlaceActor( Vector3& p_direction ) { - LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathControllerListCursor cursor(&m_controllerList); LegoPathController* controller; while (cursor.Next(controller)) { @@ -324,7 +324,7 @@ MxResult LegoWorld::PlaceActor( // FUNCTION: BETA10 0x100da4bf void LegoWorld::RemoveActor(LegoPathActor* p_actor) { - LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathControllerListCursor cursor(&m_controllerList); LegoPathController* controller; while (cursor.Next(controller)) { @@ -337,7 +337,7 @@ void LegoWorld::RemoveActor(LegoPathActor* p_actor) // FUNCTION: BETA10 0x100da560 MxBool LegoWorld::ActorExists(LegoPathActor* p_actor) { - LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathControllerListCursor cursor(&m_controllerList); LegoPathController* controller; while (cursor.Next(controller)) { @@ -353,7 +353,7 @@ MxBool LegoWorld::ActorExists(LegoPathActor* p_actor) // FUNCTION: BETA10 0x100da621 void LegoWorld::FUN_1001fda0(LegoAnimPresenter* p_presenter) { - LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathControllerListCursor cursor(&m_controllerList); LegoPathController* controller; while (cursor.Next(controller)) { @@ -365,7 +365,7 @@ void LegoWorld::FUN_1001fda0(LegoAnimPresenter* p_presenter) // FUNCTION: BETA10 0x100da6b5 void LegoWorld::FUN_1001fe90(LegoAnimPresenter* p_presenter) { - LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathControllerListCursor cursor(&m_controllerList); LegoPathController* controller; while (cursor.Next(controller)) { @@ -377,14 +377,14 @@ void LegoWorld::FUN_1001fe90(LegoAnimPresenter* p_presenter) void LegoWorld::AddPath(LegoPathController* p_controller) { p_controller->FUN_10046bb0(this); - m_list0x68.Append(p_controller); + m_controllerList.Append(p_controller); } // FUNCTION: LEGO1 0x10020020 // FUNCTION: BETA10 0x100da77c LegoPathBoundary* LegoWorld::FindPathBoundary(const char* p_name) { - LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathControllerListCursor cursor(&m_controllerList); LegoPathController* controller; while (cursor.Next(controller)) { @@ -401,7 +401,7 @@ LegoPathBoundary* LegoWorld::FindPathBoundary(const char* p_name) // FUNCTION: LEGO1 0x10020120 MxResult LegoWorld::GetCurrPathInfo(LegoPathBoundary** p_boundaries, MxS32& p_numL) { - LegoPathControllerListCursor cursor(&m_list0x68); + LegoPathControllerListCursor cursor(&m_controllerList); LegoPathController* controller; cursor.Next(controller); @@ -795,7 +795,7 @@ void LegoWorld::Enable(MxBool p_enable) } } - LegoPathControllerListCursor pathControllerCursor(&m_list0x68); + LegoPathControllerListCursor pathControllerCursor(&m_controllerList); while (pathControllerCursor.Next(controller)) { controller->Enable(FALSE); diff --git a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp index e3523ca9..f3c7a9d3 100644 --- a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp +++ b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp @@ -195,7 +195,7 @@ MxResult LegoInputManager::GetNavigationKeyStates(MxU32& p_keyFlags) } if ((m_keyboardState[DIK_LCONTROL] | m_keyboardState[DIK_RCONTROL]) & 0x80) { - keyFlags |= c_bit5; + keyFlags |= c_ctrl; } p_keyFlags = keyFlags; diff --git a/LEGO1/lego/legoomni/src/main/legomain.cpp b/LEGO1/lego/legoomni/src/main/legomain.cpp index fe37070c..e8848f4b 100644 --- a/LEGO1/lego/legoomni/src/main/legomain.cpp +++ b/LEGO1/lego/legoomni/src/main/legomain.cpp @@ -550,7 +550,7 @@ MxResult LegoOmni::Start(MxDSAction* p_dsAction) MxResult result = MxOmni::Start(p_dsAction); this->m_action.SetAtomId(p_dsAction->GetAtomId()); this->m_action.SetObjectId(p_dsAction->GetObjectId()); - this->m_action.SetUnknown24(p_dsAction->GetUnknown24()); + this->m_action.SetFlags(p_dsAction->GetFlags()); return result; } diff --git a/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp b/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp index e269f727..f8920357 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp @@ -114,11 +114,11 @@ void LegoPathStruct::FUN_1001bc40(const char* p_name, MxU32 p_data, MxBool p_boo action.SetAtomId(m_atomId); if (p_bool) { - action.SetUnknown24(-1); + action.SetFlags(-1); Start(&action); } else { - action.SetUnknown24(-2); + action.SetFlags(-2); DeleteObject(action); } } @@ -155,7 +155,7 @@ void LegoPathStruct::PlayMusic(MxBool p_direction, MxU32 p_data) MxDSAction action; action.SetAtomId(*g_jukeboxScript); - action.SetUnknown24(-1); + action.SetFlags(-1); if (p_data <= sizeOfArray(triggersReff)) { action.SetObjectId(music[triggersReff[p_data - 1][p_direction == FALSE] - 1]); diff --git a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp index 4c0b13f2..e20ca985 100644 --- a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp @@ -198,7 +198,7 @@ LegoChar* LegoAnimPresenter::FUN_10069150(const LegoChar* p_und1) } else { LegoChar buffer[32]; - sprintf(buffer, "%d", m_action->GetUnknown24()); + sprintf(buffer, "%d", m_action->GetFlags()); str = new LegoChar[strlen(p_und1) + strlen(buffer) + strlen(GetActionObjectName()) + 1]; if (str != NULL) { diff --git a/LEGO1/lego/legoomni/src/worlds/act3.cpp b/LEGO1/lego/legoomni/src/worlds/act3.cpp index daee3b2d..2e5d674c 100644 --- a/LEGO1/lego/legoomni/src/worlds/act3.cpp +++ b/LEGO1/lego/legoomni/src/worlds/act3.cpp @@ -588,7 +588,7 @@ MxLong Act3::Notify(MxParam& p_param) m_unk0x421e = 0; while (--length >= 0) { - if (info[length].m_unk0x11 < 0 && info[length].m_boundary != NULL && + if (info[length].m_Downshift < 0 && info[length].m_boundary != NULL && info[length].m_entity != NULL) { m_unk0x421e++; } diff --git a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp index 5cc9138c..c450a3df 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp @@ -1494,7 +1494,7 @@ void Infocenter::StopCredits() MxDSAction action; action.SetObjectId(CreditsScript::c_LegoCredits); action.SetAtomId(*g_creditsScript); - action.SetUnknown24(-2); + action.SetFlags(-2); DeleteObject(action); } @@ -1519,7 +1519,7 @@ void Infocenter::StopCurrentAction() MxDSAction action; action.SetObjectId(m_currentInfomainScript); action.SetAtomId(*g_infomainScript); - action.SetUnknown24(-2); + action.SetFlags(-2); DeleteObject(action); m_currentInfomainScript = InfomainScript::c_noneInfomain; } @@ -1540,7 +1540,7 @@ void Infocenter::StopBookAnimation() MxDSAction action; action.SetObjectId(SndanimScript::c_BookWig_Flic); action.SetAtomId(*g_sndAnimScript); - action.SetUnknown24(-2); + action.SetFlags(-2); DeleteObject(action); } diff --git a/LEGO1/lego/legoomni/src/worlds/isle.cpp b/LEGO1/lego/legoomni/src/worlds/isle.cpp index 5fb87505..1d255715 100644 --- a/LEGO1/lego/legoomni/src/worlds/isle.cpp +++ b/LEGO1/lego/legoomni/src/worlds/isle.cpp @@ -401,7 +401,7 @@ MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param) case IsleScript::c_Observe_LCab_Ctl: action.SetAtomId(*g_isleScript); action.SetObjectId(IsleScript::c_Observe_Monkey_Flc); - action.SetUnknown24(0); + action.SetFlags(0); Start(&action); break; case IsleScript::c_Observe_RCab_Ctl: diff --git a/LEGO1/lego/legoomni/src/worlds/legoact2.cpp b/LEGO1/lego/legoomni/src/worlds/legoact2.cpp index 9f8e7793..8bbf69f2 100644 --- a/LEGO1/lego/legoomni/src/worlds/legoact2.cpp +++ b/LEGO1/lego/legoomni/src/worlds/legoact2.cpp @@ -580,7 +580,7 @@ void LegoAct2::Enable(MxBool p_enable) if (m_unk0x1144 != (Act2mainScript::Script) 0) { MxDSAction action; action.SetAtomId(m_atomId); - action.SetUnknown24(-2); + action.SetFlags(-2); action.SetObjectId(m_unk0x1144); DeleteObject(action); m_unk0x1144 = (Act2mainScript::Script) 0; diff --git a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp index adc7c856..13a4c9f5 100644 --- a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp @@ -190,7 +190,7 @@ MxLong RegistrationBook::HandleKeyPress(MxU8 p_key) m_name[0][m_unk0x280.m_cursorPos] = m_alphabet[key - 'A']->Clone(); if (m_name[0][m_unk0x280.m_cursorPos] != NULL) { - m_alphabet[key - 'A']->GetAction()->SetUnknown24(m_alphabet[key - 'A']->GetAction()->GetUnknown24() + 1); + m_alphabet[key - 'A']->GetAction()->SetFlags(m_alphabet[key - 'A']->GetAction()->GetFlags() + 1); m_name[0][m_unk0x280.m_cursorPos]->Enable(TRUE); m_name[0][m_unk0x280.m_cursorPos]->SetTickleState(MxPresenter::e_repeating); m_name[0][m_unk0x280.m_cursorPos]->SetPosition(m_unk0x280.m_cursorPos * 23 + 343, 121); diff --git a/LEGO1/lego/legoomni/src/worlds/score.cpp b/LEGO1/lego/legoomni/src/worlds/score.cpp index b5b66d87..5181b306 100644 --- a/LEGO1/lego/legoomni/src/worlds/score.cpp +++ b/LEGO1/lego/legoomni/src/worlds/score.cpp @@ -71,7 +71,7 @@ void Score::DeleteScript() MxDSAction action; action.SetObjectId(InfoscorScript::c_iicc31in_PlayWav); action.SetAtomId(*g_infoscorScript); - action.SetUnknown24(-2); + action.SetFlags(-2); DeleteObject(action); m_state->SetTutorialFlag(FALSE); } diff --git a/LEGO1/lego/sources/roi/legolod.cpp b/LEGO1/lego/sources/roi/legolod.cpp index 7db2a0a9..ebbb8a56 100644 --- a/LEGO1/lego/sources/roi/legolod.cpp +++ b/LEGO1/lego/sources/roi/legolod.cpp @@ -13,7 +13,7 @@ DECOMP_SIZE_ASSERT(LegoLOD, 0x20) DECOMP_SIZE_ASSERT(LegoLOD::Mesh, 0x08) // GLOBAL: LEGO1 0x101013d4 -LPDIRECT3DRMMATERIAL g_unk0x101013d4 = NULL; +LPDIRECT3DRMMATERIAL g_d3d_material = NULL; // GLOBAL: LEGO1 0x101013dc const char* g_unk0x101013dc = "inh"; @@ -24,8 +24,8 @@ inline BOOL GetMeshData(IDirect3DRMMesh*& mesh, D3DRMGROUPINDEX& index, Tgl::Mes // FUNCTION: LEGO1 0x100aa380 LegoLOD::LegoLOD(Tgl::Renderer* p_renderer) : ViewLOD(p_renderer) { - if (g_unk0x101013d4 == NULL) { - GetD3DRM(p_renderer)->CreateMaterial(10.0, &g_unk0x101013d4); + if (g_d3d_material == NULL) { + GetD3DRM(p_renderer)->CreateMaterial(10.0, &g_d3d_material); } m_melems = NULL; @@ -211,7 +211,7 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text m_melems[meshIndex].m_tglMesh->SetShadingModel(shadingModel); if (textureName != NULL) { - if (mesh->GetUnknown0x21()) { + if (mesh->GetUseColorAlias()) { LegoROI::FUN_100a9cf0(textureName, paletteEntries, sizeOfArray(paletteEntries)); } @@ -231,8 +231,8 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text LegoFloat blue = 1.0F; LegoFloat alpha = 0.0F; - if (mesh->GetUnknown0x21()) { - LegoROI::FUN_100a9bf0(materialName, red, green, blue, alpha); + if (mesh->GetUseColorAlias()) { + LegoROI::GetColorFromGlobalHandlerOrAlias(materialName, red, green, blue, alpha); } else { red = mesh->GetColor().GetRed() / 255.0; @@ -248,7 +248,7 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text IDirect3DRMMesh* mesh; D3DRMGROUPINDEX index; GetMeshData(mesh, index, m_melems[meshIndex].m_tglMesh); - mesh->SetGroupMaterial(index, g_unk0x101013d4); + mesh->SetGroupMaterial(index, g_d3d_material); } if (mesh != NULL) { diff --git a/LEGO1/lego/sources/roi/legoroi.cpp b/LEGO1/lego/sources/roi/legoroi.cpp index 25d6fb36..f65cc41f 100644 --- a/LEGO1/lego/sources/roi/legoroi.cpp +++ b/LEGO1/lego/sources/roi/legoroi.cpp @@ -52,7 +52,7 @@ const char* g_unk0x10101380[] = {"bike", "moto", "haus", NULL}; const char* g_unk0x10101390[] = {"rcuser", "jsuser", "dunebugy", "chtrblad", "chtrbody", "chtrshld", NULL}; // GLOBAL: LEGO1 0x101013ac -ROIHandler g_unk0x101013ac = NULL; +ROIHandler g_roi_handler = NULL; // GLOBAL: LEGO1 0x101013b0 TextureHandler g_unk0x101013b0 = NULL; @@ -169,11 +169,11 @@ LegoResult LegoROI::Read( textureName = NULL; } - if (p_storage->Read(&m_unk0x100, sizeof(m_unk0x100)) != SUCCESS) { + if (p_storage->Read(&m_defined_elsewhere, sizeof(m_defined_elsewhere)) != SUCCESS) { goto done; } - if (m_unk0x100) { + if (m_defined_elsewhere) { for (roiLength = strlen(m_name); roiLength; roiLength--) { if (m_name[roiLength - 1] < '0' || m_name[roiLength - 1] > '9') { break; @@ -188,7 +188,7 @@ LegoResult LegoROI::Read( delete[] roiName; if (lodList == NULL) { - goto done; + goto done; // error } } else { @@ -307,7 +307,7 @@ LegoResult LegoROI::Read( LegoFloat green = 0.0F; LegoFloat blue = 1.0F; LegoFloat alpha = 0.0F; - FUN_100a9bf0(textureName, red, green, blue, alpha); + GetColorFromGlobalHandlerOrAlias(textureName, red, green, blue, alpha); FUN_100a9170(red, green, blue, alpha); } } @@ -755,15 +755,15 @@ void TimeROI::FUN_100a9b40(Matrix4& p_matrix, LegoTime p_time) } // FUNCTION: LEGO1 0x100a9bf0 -LegoBool LegoROI::FUN_100a9bf0(const LegoChar* p_param, float& p_red, float& p_green, float& p_blue, float& p_alpha) +LegoBool LegoROI::GetColorFromGlobalHandlerOrAlias(const LegoChar* p_param, float& p_red, float& p_green, float& p_blue, float& p_alpha) { if (p_param == NULL) { return FALSE; } - if (g_unk0x101013ac) { + if (g_roi_handler) { char buf[32]; - if (g_unk0x101013ac(p_param, buf, sizeof(buf))) { + if (g_roi_handler(p_param, buf, sizeof(buf))) { p_param = buf; } } @@ -804,9 +804,9 @@ LegoBool LegoROI::FUN_100a9cf0(const LegoChar* p_param, unsigned char* paletteEn } // FUNCTION: LEGO1 0x100a9d30 -void LegoROI::FUN_100a9d30(ROIHandler p_func) +void LegoROI::SetGlobalROIHandler(ROIHandler p_func) { - g_unk0x101013ac = p_func; + g_roi_handler = p_func; } // FUNCTION: LEGO1 0x100a9d40 diff --git a/LEGO1/lego/sources/roi/legoroi.h b/LEGO1/lego/sources/roi/legoroi.h index f69936dc..c1026ec5 100644 --- a/LEGO1/lego/sources/roi/legoroi.h +++ b/LEGO1/lego/sources/roi/legoroi.h @@ -54,8 +54,8 @@ class LegoROI : public ViewROI { static LegoResult FUN_100a8cb0(LegoAnimNodeData* p_data, LegoTime p_time, Matrix4& p_matrix); static void FUN_100a81b0(const LegoChar* p_error, const LegoChar* p_name); static void configureLegoROI(int p_roi); - static void FUN_100a9d30(ROIHandler p_func); - static LegoBool FUN_100a9bf0(const LegoChar* p_param, float& p_red, float& p_green, float& p_blue, float& p_alpha); + static void SetGlobalROIHandler(ROIHandler p_func); + static LegoBool GetColorFromGlobalHandlerOrAlias(const LegoChar* p_param, float& p_red, float& p_green, float& p_blue, float& p_alpha); static LegoBool ColorAliasLookup( const LegoChar* p_param, float& p_red, @@ -86,7 +86,7 @@ class LegoROI : public ViewROI { private: LegoChar* m_name; // 0xe4 BoundingSphere m_sphere; // 0xe8 - undefined m_unk0x100; // 0x100 + LegoU8 m_defined_elsewhere; // 0x100 LegoEntity* m_entity; // 0x104 }; diff --git a/LEGO1/lego/sources/shape/legomesh.cpp b/LEGO1/lego/sources/shape/legomesh.cpp index 51b61fb0..4f556f67 100644 --- a/LEGO1/lego/sources/shape/legomesh.cpp +++ b/LEGO1/lego/sources/shape/legomesh.cpp @@ -15,7 +15,7 @@ LegoMesh::LegoMesh() m_unk0x0d = 0; m_unk0x10 = NULL; m_unk0x20 = 0; - m_unk0x21 = FALSE; + m_use_color_alias = FALSE; m_materialName = NULL; } @@ -55,7 +55,7 @@ LegoResult LegoMesh::Read(LegoStorage* p_storage) if ((result = p_storage->Read(&m_unk0x20, sizeof(m_unk0x20))) != SUCCESS) { return result; } - if ((result = p_storage->Read(&m_unk0x21, sizeof(m_unk0x21))) != SUCCESS) { + if ((result = p_storage->Read(&m_use_color_alias, sizeof(m_use_color_alias))) != SUCCESS) { return result; } diff --git a/LEGO1/lego/sources/shape/legomesh.h b/LEGO1/lego/sources/shape/legomesh.h index da1b1a27..efac9170 100644 --- a/LEGO1/lego/sources/shape/legomesh.h +++ b/LEGO1/lego/sources/shape/legomesh.h @@ -56,7 +56,7 @@ class LegoMesh { LegoU8 GetUnknown0x0d() { return m_unk0x0d; } const LegoChar* GetTextureName() { return m_textureName; } const LegoChar* GetMaterialName() { return m_materialName; } - LegoBool GetUnknown0x21() { return m_unk0x21; } + LegoBool GetUseColorAlias() { return m_use_color_alias; } LegoResult Read(LegoStorage* p_storage); // SYNTHETIC: LEGO1 0x100d3840 @@ -72,7 +72,7 @@ class LegoMesh { LegoChar* m_textureName; // 0x18 LegoChar* m_materialName; // 0x1c undefined m_unk0x20; // 0x20 - unused - LegoBool m_unk0x21; // 0x21 + LegoBool m_use_color_alias; // 0x21 }; #endif // __LEGOMESH_H diff --git a/LEGO1/omni/include/mxactionnotificationparam.h b/LEGO1/omni/include/mxactionnotificationparam.h index 79c18ee0..db7e1282 100644 --- a/LEGO1/omni/include/mxactionnotificationparam.h +++ b/LEGO1/omni/include/mxactionnotificationparam.h @@ -26,7 +26,7 @@ class MxActionNotificationParam : public MxNotificationParam { m_action->SetAtomId(oldAction->GetAtomId()); m_action->SetObjectId(oldAction->GetObjectId()); - m_action->SetUnknown24(oldAction->GetUnknown24()); + m_action->SetFlags(oldAction->GetFlags()); } // FUNCTION: LEGO1 0x10051050 diff --git a/LEGO1/omni/include/mxdsobject.h b/LEGO1/omni/include/mxdsobject.h index 5f60bfee..dc1fc6d1 100644 --- a/LEGO1/omni/include/mxdsobject.h +++ b/LEGO1/omni/include/mxdsobject.h @@ -88,7 +88,7 @@ class MxDSObject : public MxCore { // FUNCTION: BETA10 0x10017940 const MxAtomId& GetAtomId() { return m_atomId; } - MxS16 GetUnknown24() { return m_unk0x24; } + MxS16 GetFlags() { return m_flags; } MxPresenter* GetUnknown28() { return m_unk0x28; } void SetType(Type p_type) { m_type = p_type; } @@ -97,7 +97,7 @@ class MxDSObject : public MxCore { void SetObjectId(MxU32 p_objectId) { m_objectId = p_objectId; } // FUNCTION: BETA10 0x10039570 - void SetUnknown24(MxS16 p_unk0x24) { m_unk0x24 = p_unk0x24; } + void SetFlags(MxS16 p_unk0x24) { m_flags = p_unk0x24; } void SetUnknown28(MxPresenter* p_unk0x28) { m_unk0x28 = p_unk0x28; } @@ -115,7 +115,7 @@ class MxDSObject : public MxCore { char* m_objectName; // 0x18 MxU32 m_objectId; // 0x1c MxAtomId m_atomId; // 0x20 - MxS16 m_unk0x24; // 0x24 + MxS16 m_flags; // 0x24 MxPresenter* m_unk0x28; // 0x28 }; diff --git a/LEGO1/omni/src/action/mxdsaction.cpp b/LEGO1/omni/src/action/mxdsaction.cpp index 8dc22fcf..eeb3dc68 100644 --- a/LEGO1/omni/src/action/mxdsaction.cpp +++ b/LEGO1/omni/src/action/mxdsaction.cpp @@ -256,9 +256,9 @@ void MxDSAction::AppendExtra(MxU16 p_extraLength, const char* p_extraData) // FUNCTION: LEGO1 0x100adf70 // FUNCTION: BETA10 0x1012ba6a -void MxDSAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24) +void MxDSAction::Deserialize(MxU8*& p_source, MxS16 p_flags) { - MxDSObject::Deserialize(p_source, p_unk0x24); + MxDSObject::Deserialize(p_source, p_flags); // clang-format off m_flags = *( MxU32*) p_source; p_source += sizeof(m_flags); diff --git a/LEGO1/omni/src/action/mxdsmediaaction.cpp b/LEGO1/omni/src/action/mxdsmediaaction.cpp index 00ed247a..dbd61ca4 100644 --- a/LEGO1/omni/src/action/mxdsmediaaction.cpp +++ b/LEGO1/omni/src/action/mxdsmediaaction.cpp @@ -129,9 +129,9 @@ MxU32 MxDSMediaAction::GetSizeOnDisk() // FUNCTION: LEGO1 0x100c8f60 // FUNCTION: BETA10 0x1015cc93 -void MxDSMediaAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24) +void MxDSMediaAction::Deserialize(MxU8*& p_source, MxS16 p_flags) { - MxDSAction::Deserialize(p_source, p_unk0x24); + MxDSAction::Deserialize(p_source, p_flags); CopyMediaSrcPath((char*) p_source); p_source += strlen(m_mediaSrcPath) + 1; diff --git a/LEGO1/omni/src/action/mxdsmultiaction.cpp b/LEGO1/omni/src/action/mxdsmultiaction.cpp index d1214d3d..579b7937 100644 --- a/LEGO1/omni/src/action/mxdsmultiaction.cpp +++ b/LEGO1/omni/src/action/mxdsmultiaction.cpp @@ -149,11 +149,11 @@ MxU32 MxDSMultiAction::GetSizeOnDisk() // FUNCTION: LEGO1 0x100ca7b0 // FUNCTION: BETA10 0x10159b79 -void MxDSMultiAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24) +void MxDSMultiAction::Deserialize(MxU8*& p_source, MxS16 p_flags) { - MxDSAction::Deserialize(p_source, p_unk0x24); + MxDSAction::Deserialize(p_source, p_flags); - MxU32 extraFlag = *(MxU32*) (p_source + 4) & 1; + MxU32 length = *(MxU32*) (p_source + 4) & 1; p_source += 12; MxU32 count = *(MxU32*) p_source; @@ -161,17 +161,17 @@ void MxDSMultiAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24) if (count) { while (count--) { - MxU32 extraFlag = *(MxU32*) (p_source + 4) & 1; + MxU32 length = *(MxU32*) (p_source + 4) & 1; p_source += 8; - MxDSAction* action = (MxDSAction*) DeserializeDSObjectDispatch(p_source, p_unk0x24); - p_source += extraFlag; + MxDSAction* action = (MxDSAction*) DeserializeDSObjectDispatch(p_source, p_flags); + p_source += length; m_actionList->Append(action); } } - p_source += extraFlag; + p_source += length; } // FUNCTION: LEGO1 0x100ca8c0 diff --git a/LEGO1/omni/src/action/mxdsobject.cpp b/LEGO1/omni/src/action/mxdsobject.cpp index 6cea1ea0..d36502ee 100644 --- a/LEGO1/omni/src/action/mxdsobject.cpp +++ b/LEGO1/omni/src/action/mxdsobject.cpp @@ -29,7 +29,7 @@ MxDSObject::MxDSObject() m_unk0x14 = 0; m_objectName = NULL; m_objectId = -1; - m_unk0x24 = -1; + m_flags = -1; m_unk0x28 = NULL; } @@ -49,7 +49,7 @@ void MxDSObject::CopyFrom(MxDSObject& p_dsObject) m_unk0x14 = p_dsObject.m_unk0x14; SetObjectName(p_dsObject.m_objectName); m_objectId = p_dsObject.m_objectId; - m_unk0x24 = p_dsObject.m_unk0x24; + m_flags = p_dsObject.m_flags; m_atomId = p_dsObject.m_atomId; m_unk0x28 = p_dsObject.m_unk0x28; } @@ -156,7 +156,7 @@ MxU32 MxDSObject::GetSizeOnDisk() // FUNCTION: LEGO1 0x100bfa20 // FUNCTION: BETA10 0x10147d73 -void MxDSObject::Deserialize(MxU8*& p_source, MxS16 p_unk0x24) +void MxDSObject::Deserialize(MxU8*& p_source, MxS16 p_flags) { SetSourceName((char*) p_source); p_source += strlen(m_sourceName) + 1; @@ -170,7 +170,7 @@ void MxDSObject::Deserialize(MxU8*& p_source, MxS16 p_unk0x24) m_objectId = *(MxU32*) p_source; p_source += sizeof(m_objectId); - m_unk0x24 = p_unk0x24; + m_flags = p_flags; } // FUNCTION: LEGO1 0x100bfa80 @@ -188,10 +188,10 @@ MxDSObject* MxDSObjectList::FindInternal(MxDSObject* p_action, MxBool p_delete) for (iterator it = begin(); it != end(); it++) { #endif if (p_action->GetObjectId() == -1 || p_action->GetObjectId() == (*it)->GetObjectId()) { - if (p_action->GetUnknown24() == -2 || p_action->GetUnknown24() == -3 || - p_action->GetUnknown24() == (*it)->GetUnknown24()) { + if (p_action->GetFlags() == -2 || p_action->GetFlags() == -3 || + p_action->GetFlags() == (*it)->GetFlags()) { found = *it; - if (p_action->GetUnknown24() != -3) { + if (p_action->GetFlags() != -3) { break; } } diff --git a/LEGO1/omni/src/action/mxdsselectaction.cpp b/LEGO1/omni/src/action/mxdsselectaction.cpp index d66e761f..125d8294 100644 --- a/LEGO1/omni/src/action/mxdsselectaction.cpp +++ b/LEGO1/omni/src/action/mxdsselectaction.cpp @@ -92,13 +92,13 @@ MxU32 MxDSSelectAction::GetSizeOnDisk() // FUNCTION: LEGO1 0x100cbf60 // FUNCTION: BETA10 0x1015aa30 -void MxDSSelectAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24) +void MxDSSelectAction::Deserialize(MxU8*& p_source, MxS16 p_flags) { MxDSAction* action = NULL; MxString string; - MxDSAction::Deserialize(p_source, p_unk0x24); + MxDSAction::Deserialize(p_source, p_flags); - MxU32 extraFlag = *(MxU32*) (p_source + 4) & 1; + MxU32 length = *(MxU32*) (p_source + 4) & 1; p_source += 12; m_unk0x9c = (char*) p_source; @@ -135,10 +135,10 @@ void MxDSSelectAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24) } for (i = 0; i < count; i++) { - MxU32 extraFlag = *(MxU32*) (p_source + 4) & 1; + MxU32 length = *(MxU32*) (p_source + 4) & 1; p_source += 8; - action = (MxDSAction*) DeserializeDSObjectDispatch(p_source, p_unk0x24); + action = (MxDSAction*) DeserializeDSObjectDispatch(p_source, p_flags); if (index == i) { m_actionList->Append(action); @@ -147,9 +147,9 @@ void MxDSSelectAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24) delete action; } - p_source += extraFlag; + p_source += length; } } - p_source += extraFlag; + p_source += length; } diff --git a/LEGO1/omni/src/action/mxdssound.cpp b/LEGO1/omni/src/action/mxdssound.cpp index 5a12aa90..b16214d5 100644 --- a/LEGO1/omni/src/action/mxdssound.cpp +++ b/LEGO1/omni/src/action/mxdssound.cpp @@ -58,9 +58,9 @@ MxDSAction* MxDSSound::Clone() // FUNCTION: LEGO1 0x100c95a0 // FUNCTION: BETA10 0x1015d272 -void MxDSSound::Deserialize(MxU8*& p_source, MxS16 p_unk0x24) +void MxDSSound::Deserialize(MxU8*& p_source, MxS16 p_flags) { - MxDSMediaAction::Deserialize(p_source, p_unk0x24); + MxDSMediaAction::Deserialize(p_source, p_flags); m_volume = *(MxS32*) p_source; p_source += sizeof(m_volume); } diff --git a/LEGO1/omni/src/common/mxmediapresenter.cpp b/LEGO1/omni/src/common/mxmediapresenter.cpp index 0a1b96d9..3c81c0e7 100644 --- a/LEGO1/omni/src/common/mxmediapresenter.cpp +++ b/LEGO1/omni/src/common/mxmediapresenter.cpp @@ -118,7 +118,7 @@ MxResult MxMediaPresenter::StartAction(MxStreamController* p_controller, MxDSAct m_subscriber = new MxDSSubscriber; if (!m_subscriber || - m_subscriber->Create(p_controller, p_action->GetObjectId(), p_action->GetUnknown24()) != SUCCESS) { + m_subscriber->Create(p_controller, p_action->GetObjectId(), p_action->GetFlags()) != SUCCESS) { goto done; } } diff --git a/LEGO1/omni/src/main/mxomni.cpp b/LEGO1/omni/src/main/mxomni.cpp index d7e79bb0..19ea2204 100644 --- a/LEGO1/omni/src/main/mxomni.cpp +++ b/LEGO1/omni/src/main/mxomni.cpp @@ -184,7 +184,7 @@ void MxOmni::Destroy() { MxDSAction action; action.SetObjectId(-1); - action.SetUnknown24(-2); + action.SetFlags(-2); DeleteObject(action); } diff --git a/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp b/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp index 40ae8ae9..a8f867b3 100644 --- a/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp +++ b/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp @@ -280,7 +280,7 @@ MxDSStreamingAction* MxDiskStreamController::FUN_100c7db0() MxDSStreamingAction* streamingAction = (MxDSStreamingAction*) *it2; if (streamingAction->GetObjectId() == data->GetObjectId() && - streamingAction->GetUnknown24() == data->GetUnknown24() && + streamingAction->GetFlags() == data->GetUnknown24() && streamingAction->GetBufferOffset() == data->GetData()) { m_nextActionList.erase(it); diff --git a/LEGO1/omni/src/stream/mxdsbuffer.cpp b/LEGO1/omni/src/stream/mxdsbuffer.cpp index 4b7386b2..734df8d8 100644 --- a/LEGO1/omni/src/stream/mxdsbuffer.cpp +++ b/LEGO1/omni/src/stream/mxdsbuffer.cpp @@ -171,7 +171,7 @@ MxResult MxDSBuffer::CreateObject( return FAILURE; } - MxCore* header = ReadChunk(this, p_data, p_action->GetUnknown24()); + MxCore* header = ReadChunk(this, p_data, p_action->GetFlags()); if (header == NULL) { return FAILURE; @@ -308,7 +308,7 @@ MxResult MxDSBuffer::ParseChunk( } if (p_header) { - if (p_header->SendChunk(p_controller->GetSubscriberList(), TRUE, p_action->GetUnknown24()) != SUCCESS) { + if (p_header->SendChunk(p_controller->GetSubscriberList(), TRUE, p_action->GetFlags()) != SUCCESS) { delete p_header; } } diff --git a/LEGO1/omni/src/stream/mxdssubscriber.cpp b/LEGO1/omni/src/stream/mxdssubscriber.cpp index 36051667..e1163138 100644 --- a/LEGO1/omni/src/stream/mxdssubscriber.cpp +++ b/LEGO1/omni/src/stream/mxdssubscriber.cpp @@ -143,7 +143,7 @@ MxDSSubscriber* MxDSSubscriberList::Find(MxDSObject* p_object) { for (iterator it = begin(); it != end(); it++) { if (p_object->GetObjectId() == -1 || p_object->GetObjectId() == (*it)->GetObjectId()) { - if (p_object->GetUnknown24() == -2 || p_object->GetUnknown24() == (*it)->GetUnknown48()) { + if (p_object->GetFlags() == -2 || p_object->GetFlags() == (*it)->GetUnknown48()) { return *it; } } diff --git a/LEGO1/omni/src/stream/mxramstreamcontroller.cpp b/LEGO1/omni/src/stream/mxramstreamcontroller.cpp index c856d695..583eda80 100644 --- a/LEGO1/omni/src/stream/mxramstreamcontroller.cpp +++ b/LEGO1/omni/src/stream/mxramstreamcontroller.cpp @@ -41,13 +41,13 @@ MxResult MxRAMStreamController::VTable0x20(MxDSAction* p_action) MxS32 unk0x24 = 0; MxResult result = FAILURE; - if (p_action->GetUnknown24() == -1) { - p_action->SetUnknown24(-3); + if (p_action->GetFlags() == -1) { + p_action->SetFlags(-3); MxDSObject* action = m_unk0x54.Find(p_action); if (action != NULL) { - unk0x24 = action->GetUnknown24() + 1; + unk0x24 = action->GetFlags() + 1; } - p_action->SetUnknown24(unk0x24); + p_action->SetFlags(unk0x24); } else { if (m_unk0x54.Find(p_action)) { diff --git a/LEGO1/omni/src/stream/mxstreamcontroller.cpp b/LEGO1/omni/src/stream/mxstreamcontroller.cpp index dadd03ca..76ca4628 100644 --- a/LEGO1/omni/src/stream/mxstreamcontroller.cpp +++ b/LEGO1/omni/src/stream/mxstreamcontroller.cpp @@ -127,7 +127,7 @@ MxResult MxStreamController::VTable0x24(MxDSAction* p_action) return FAILURE; } else { - p_action->SetUnknown24(m_action0x60->GetUnknown24()); + p_action->SetFlags(m_action0x60->GetFlags()); p_action->SetObjectId(m_action0x60->GetObjectId()); return FUN_100c1f00(m_action0x60); } @@ -138,7 +138,7 @@ MxResult MxStreamController::VTable0x24(MxDSAction* p_action) MxResult MxStreamController::FUN_100c1800(MxDSAction* p_action, MxU32 p_val) { MxNextActionDataStart* dataActionStart = - new MxNextActionDataStart(p_action->GetObjectId(), p_action->GetUnknown24(), p_val); + new MxNextActionDataStart(p_action->GetObjectId(), p_action->GetFlags(), p_val); if (dataActionStart == NULL) { return FAILURE; } @@ -151,7 +151,7 @@ MxResult MxStreamController::FUN_100c1800(MxDSAction* p_action, MxU32 p_val) // FUNCTION: BETA10 0x1014eb04 MxResult MxStreamController::FUN_100c1a00(MxDSAction* p_action, MxU32 p_offset) { - if (p_action->GetUnknown24() == -1) { + if (p_action->GetFlags() == -1) { MxS16 newUnknown24 = -1; // These loops might be a template function in the list classes @@ -159,7 +159,7 @@ MxResult MxStreamController::FUN_100c1a00(MxDSAction* p_action, MxU32 p_offset) MxDSObject* action = *it; if (action->GetObjectId() == p_action->GetObjectId()) { - newUnknown24 = Max(newUnknown24, action->GetUnknown24()); + newUnknown24 = Max(newUnknown24, action->GetFlags()); } } @@ -168,7 +168,7 @@ MxResult MxStreamController::FUN_100c1a00(MxDSAction* p_action, MxU32 p_offset) MxDSObject* action = *it; if (action->GetObjectId() == p_action->GetObjectId()) { - newUnknown24 = Max(newUnknown24, action->GetUnknown24()); + newUnknown24 = Max(newUnknown24, action->GetFlags()); } } @@ -183,7 +183,7 @@ MxResult MxStreamController::FUN_100c1a00(MxDSAction* p_action, MxU32 p_offset) } } - p_action->SetUnknown24(newUnknown24 + 1); + p_action->SetFlags(newUnknown24 + 1); } else { if (m_unk0x3c.Find(p_action)) { @@ -230,7 +230,7 @@ MxResult MxStreamController::VTable0x30(MxDSAction* p_action) MxDSObject* action = m_unk0x3c.FindAndErase(p_action); if (action != NULL) { - MxNextActionDataStart* data = m_nextActionList.FindAndErase(action->GetObjectId(), action->GetUnknown24()); + MxNextActionDataStart* data = m_nextActionList.FindAndErase(action->GetObjectId(), action->GetFlags()); delete action; delete data; result = SUCCESS; @@ -288,7 +288,7 @@ MxResult MxStreamController::FUN_100c1f00(MxDSAction* p_action) chunk->SetChunkFlags(DS_CHUNK_BIT3); chunk->SetObjectId(objectId); - if (chunk->SendChunk(m_subscribers, FALSE, p_action->GetUnknown24()) != SUCCESS) { + if (chunk->SendChunk(m_subscribers, FALSE, p_action->GetFlags()) != SUCCESS) { delete chunk; } @@ -311,7 +311,7 @@ MxResult MxStreamController::FUN_100c1f00(MxDSAction* p_action) // FUNCTION: BETA10 0x1014f37d MxNextActionDataStart* MxStreamController::FindNextActionDataStartFromStreamingAction(MxDSStreamingAction* p_action) { - return m_nextActionList.Find(p_action->GetObjectId(), p_action->GetUnknown24()); + return m_nextActionList.Find(p_action->GetObjectId(), p_action->GetFlags()); } // FUNCTION: LEGO1 0x100c20d0 diff --git a/LEGO1/omni/src/stream/mxstreamer.cpp b/LEGO1/omni/src/stream/mxstreamer.cpp index bb5f1cb5..2c69076b 100644 --- a/LEGO1/omni/src/stream/mxstreamer.cpp +++ b/LEGO1/omni/src/stream/mxstreamer.cpp @@ -98,7 +98,7 @@ MxStreamController* MxStreamer::Open(const char* p_name, MxU16 p_lookupType) MxLong MxStreamer::Close(const char* p_name) { MxDSAction ds; - ds.SetUnknown24(-2); + ds.SetFlags(-2); for (list::iterator it = m_controllers.begin(); it != m_controllers.end(); it++) { MxStreamController* c = *it; @@ -192,10 +192,10 @@ MxResult MxStreamer::DeleteObject(MxDSAction* p_dsAction) if (p_dsAction) { tempAction.SetObjectId(p_dsAction->GetObjectId()); tempAction.SetAtomId(p_dsAction->GetAtomId()); - tempAction.SetUnknown24(p_dsAction->GetUnknown24()); + tempAction.SetFlags(p_dsAction->GetFlags()); } else { - tempAction.SetUnknown24(-2); + tempAction.SetFlags(-2); } MxResult result = FAILURE; @@ -233,7 +233,7 @@ MxLong MxStreamer::Notify(MxParam& p_param) MxStreamController* c = s.GetController(); MxDSAction ds; - ds.SetUnknown24(-2); + ds.SetFlags(-2); if (c->IsStoped(&ds)) { delete c;