Merge branch 'master' into crtmaster

This commit is contained in:
Christian Semmler 2024-05-18 15:08:56 -04:00
commit 17e1515785
18 changed files with 595 additions and 251 deletions

View File

@ -17,7 +17,7 @@ struct ModelInfo {
struct AnimInfo {
char* m_name; // 0x00
MxU32 m_objectId; // 0x04
MxS16 m_unk0x08; // 0x08
MxS16 m_location; // 0x08
MxBool m_unk0x0a; // 0x0a
MxU8 m_unk0x0b; // 0x0b
MxU8 m_unk0x0c; // 0x0c

View File

@ -38,7 +38,7 @@ class IslePathActor : public LegoPathActor {
float p_srcScale,
MxS16 p_dest,
float p_destScale,
undefined4 p_unk0x30,
MxU32 p_location,
JukeboxScript::Script p_music
)
{
@ -50,7 +50,7 @@ class IslePathActor : public LegoPathActor {
m_srcScale = p_srcScale;
m_dest = p_dest;
m_destScale = p_destScale;
m_unk0x30 = p_unk0x30;
m_location = p_location;
m_music = p_music;
}
@ -65,7 +65,7 @@ class IslePathActor : public LegoPathActor {
m_srcScale = p_location.m_srcScale;
m_dest = p_location.m_dest;
m_destScale = p_location.m_destScale;
m_unk0x30 = p_location.m_unk0x30;
m_location = p_location.m_location;
m_music = p_location.m_music;
return *this;
}
@ -78,7 +78,7 @@ class IslePathActor : public LegoPathActor {
float m_srcScale; // 0x24
MxS16 m_dest; // 0x28
float m_destScale; // 0x2c
undefined4 m_unk0x30; // 0x30
MxU32 m_location; // 0x30
JukeboxScript::Script m_music; // 0x34
};

View File

@ -9,12 +9,14 @@
#include "mxgeometry/mxgeometry3d.h"
class AnimState;
class IslePathActor;
class LegoAnimPresenter;
class LegoEntity;
class LegoExtraActor;
class LegoFile;
class LegoPathBoundary;
class LegoROIList;
struct LegoUnknown100db7f4;
class LegoWorld;
struct ModelInfo;
class MxDSAction;
@ -80,11 +82,13 @@ class LegoAnimationManager : public MxCore {
void Suspend();
void Resume();
void FUN_1005f6d0(MxBool p_unk0x400);
void FUN_1005f700(MxBool p_unk0x3a);
void EnableCamAnims(MxBool p_enableCamAnims);
MxResult LoadScriptInfo(MxS32 p_scriptIndex);
MxBool FindVehicle(const char* p_name, MxU32& p_index);
MxResult ReadAnimInfo(LegoFile* p_file, AnimInfo* p_info);
MxResult ReadModelInfo(LegoFile* p_file, ModelInfo* p_info);
void FUN_100604d0(MxBool p_unk0x08);
void FUN_10060540(MxBool p_unk0x29);
void FUN_10060570(MxBool p_unk0x1a);
MxResult StartEntityAction(MxDSAction& p_dsAction, LegoEntity* p_entity);
MxResult FUN_10060dc0(
@ -98,6 +102,7 @@ class LegoAnimationManager : public MxCore {
MxBool p_param8,
MxBool p_param9
);
void CameraTriggerFire(IslePathActor* p_actor, undefined4, MxU32 p_location, MxBool p_bool);
void FUN_10061010(MxBool p_und);
LegoTranInfo* GetTranInfo(MxU32 p_index);
void FUN_10062770();
@ -149,7 +154,8 @@ class LegoAnimationManager : public MxCore {
MxBool FUN_10063b90(LegoWorld* p_world, LegoExtraActor* p_actor, MxU8 p_unk0x14, MxU32 p_characterId);
void FUN_10063d10();
MxBool FUN_10063fb0(LegoLocation::Boundary* p_boundary, LegoWorld* p_world);
MxBool FUN_10064120(LegoLocation::Boundary* p_boundary, MxBool, MxBool);
MxBool FUN_10064010(LegoPathBoundary* p_boundary, LegoUnknown100db7f4* p_edge, float p_destScale);
MxBool FUN_10064120(LegoLocation::Boundary* p_boundary, MxBool p_bool1, MxBool p_bool2);
MxResult FUN_10064380(
const char* p_name,
const char* p_boundaryName,
@ -179,8 +185,8 @@ class LegoAnimationManager : public MxCore {
MxPresenter* m_unk0x28[2]; // 0x28
MxLong m_unk0x30[2]; // 0x30
MxBool m_unk0x38; // 0x38
MxBool m_unk0x39; // 0x39
MxBool m_unk0x3a; // 0x3a
MxBool m_animRunning; // 0x39
MxBool m_enableCamAnims; // 0x3a
Extra m_extras[40]; // 0x3c
MxU32 m_lastExtraCharacterId; // 0x3fc
MxBool m_unk0x400; // 0x400
@ -195,7 +201,7 @@ class LegoAnimationManager : public MxCore {
undefined4 m_unk0x41c; // 0x41c
AnimState* m_animState; // 0x420
LegoROIList* m_unk0x424; // 0x424
MxBool m_unk0x428; // 0x428
MxBool m_suspendedEnableCamAnims; // 0x428
MxBool m_unk0x429; // 0x429
MxBool m_unk0x42a; // 0x42a
MxBool m_suspended; // 0x42b

View File

@ -23,7 +23,8 @@ struct LegoLocation {
float m_up[3]; // 0x20
Boundary m_boundaryA; // 0x2c
Boundary m_boundaryB; // 0x44
undefined4 m_unk0x5c; // 0x5c
MxBool m_unk0x5c; // 0x5c
MxU8 m_frequency; // 0x5d
};
extern LegoLocation g_locations[70];

View File

@ -23,7 +23,7 @@ struct LegoTranInfo {
m_unk0x08 = NULL;
m_unk0x0c = NULL;
m_unk0x10 = 0;
m_unk0x12 = -1;
m_location = -1;
m_unk0x14 = FALSE;
m_unk0x1c = NULL;
m_unk0x20 = NULL;
@ -42,7 +42,7 @@ struct LegoTranInfo {
LegoROI* m_unk0x08; // 0x08
MxMatrix* m_unk0x0c; // 0x0c
MxU8 m_unk0x10; // 0x10
MxS16 m_unk0x12; // 0x12
MxS16 m_location; // 0x12
MxBool m_unk0x14; // 0x14
MxBool m_unk0x15; // 0x15
MxU32 m_objectId; // 0x18

View File

@ -24,10 +24,10 @@ Extra::ActionType MatchActionString(const char*);
void InvokeAction(Extra::ActionType p_actionId, const MxAtomId& p_pAtom, MxS32 p_targetEntityId, LegoEntity* p_sender);
void SetCameraControllerFromIsle();
void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bOut, float* p_gOut);
void FUN_1003ecc0(IslePathActor* p_actor, undefined4, undefined4, MxBool);
void PlayCamAnim(IslePathActor* p_actor, undefined4 p_unused, MxU32 p_location, MxBool p_bool);
void FUN_1003eda0();
MxBool RemoveFromCurrentWorld(const MxAtomId& p_atomId, MxS32 p_id);
void FUN_1003ef00(MxBool);
void FUN_1003ef00(MxBool p_enable);
void SetAppCursor(WPARAM p_wparam);
MxBool FUN_1003ef60();
MxBool RemoveFromWorld(MxAtomId& p_entityAtom, MxS32 p_entityId, MxAtomId& p_worldAtom, MxS32 p_worldEntityId);

View File

@ -498,10 +498,10 @@ void IslePathActor::SpawnPlayer(LegoGameState::Area p_area, MxBool p_und, MxU8 p
LegoVehicleBuildState* state = NULL;
if (p_flags & c_spawnBit1) {
MxBool und = FALSE;
MxBool camAnim = FALSE;
IsleScript::Script anim;
switch (g_spawnLocations[i].m_unk0x30) {
switch (g_spawnLocations[i].m_location) {
case 0x00:
case 0x44:
break;
@ -522,7 +522,7 @@ void IslePathActor::SpawnPlayer(LegoGameState::Area p_area, MxBool p_und, MxU8 p
anim = IsleScript::c_irt007in_RunAnim;
break;
default:
und = TRUE;
camAnim = TRUE;
break;
}
@ -530,12 +530,12 @@ void IslePathActor::SpawnPlayer(LegoGameState::Area p_area, MxBool p_und, MxU8 p
if (AnimationManager()->FUN_10060dc0(anim, NULL, TRUE, FALSE, NULL, FALSE, TRUE, TRUE, TRUE) ==
SUCCESS) {
state->m_unk0x4e = TRUE;
und = FALSE;
camAnim = FALSE;
}
}
if (und) {
FUN_1003ecc0(this, 0, g_spawnLocations[i].m_unk0x30, TRUE);
if (camAnim) {
PlayCamAnim(this, 0, g_spawnLocations[i].m_location, TRUE);
}
}

View File

@ -397,7 +397,7 @@ void LegoAnimationManager::Reset(MxBool p_und)
Init();
m_suspended = suspended;
m_unk0x428 = m_unk0x3a;
m_suspendedEnableCamAnims = m_enableCamAnims;
m_unk0x429 = m_unk0x400;
m_unk0x42a = m_unk0x402;
}
@ -417,7 +417,7 @@ void LegoAnimationManager::Suspend()
if (!m_suspended) {
m_suspended = TRUE;
m_unk0x428 = m_unk0x3a;
m_suspendedEnableCamAnims = m_enableCamAnims;
m_unk0x429 = m_unk0x400;
m_unk0x42a = m_unk0x402;
m_unk0x402 = FALSE;
@ -460,7 +460,7 @@ void LegoAnimationManager::Suspend()
m_unk0x18 = 0;
m_unk0x1a = FALSE;
m_unk0x3a = FALSE;
m_enableCamAnims = FALSE;
m_unk0x400 = FALSE;
m_unk0x414 = 0;
m_unk0x401 = FALSE;
@ -478,7 +478,7 @@ void LegoAnimationManager::Resume()
if (m_suspended) {
m_unk0x408 = m_unk0x40c = m_unk0x404 = Timer()->GetTime();
m_unk0x410 = 5000;
m_unk0x3a = m_unk0x428;
m_enableCamAnims = m_suspendedEnableCamAnims;
m_unk0x400 = m_unk0x429;
m_unk0x402 = m_unk0x42a;
m_suspended = FALSE;
@ -513,8 +513,8 @@ void LegoAnimationManager::Init()
}
m_unk0x38 = FALSE;
m_unk0x39 = FALSE;
m_unk0x3a = TRUE;
m_animRunning = FALSE;
m_enableCamAnims = TRUE;
m_lastExtraCharacterId = 0;
m_unk0x400 = FALSE;
m_unk0x414 = 0;
@ -564,13 +564,13 @@ void LegoAnimationManager::FUN_1005f6d0(MxBool p_unk0x400)
// FUNCTION: LEGO1 0x1005f700
// FUNCTION: BETA10 0x1004024c
void LegoAnimationManager::FUN_1005f700(MxBool p_unk0x3a)
void LegoAnimationManager::EnableCamAnims(MxBool p_enableCamAnims)
{
if (m_suspended) {
m_unk0x428 = p_unk0x3a;
m_suspendedEnableCamAnims = p_enableCamAnims;
}
else {
m_unk0x3a = p_unk0x3a;
m_enableCamAnims = p_enableCamAnims;
}
}
@ -597,7 +597,7 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex)
}
m_unk0x38 = FALSE;
m_unk0x39 = FALSE;
m_animRunning = FALSE;
m_unk0x430 = FALSE;
m_unk0x42c = NULL;
@ -681,7 +681,7 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex)
m_anims[j].m_unk0x2a[k] = -1;
}
if (m_anims[j].m_unk0x08 == -1) {
if (m_anims[j].m_location == -1) {
for (MxS32 l = 0; l < m_anims[j].m_modelCount; l++) {
MxS32 index = GetCharacterIndex(m_anims[j].m_models[l].m_name);
@ -714,10 +714,10 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex)
m_unk0x402 = TRUE;
if (m_suspended) {
m_unk0x428 = m_unk0x3a;
m_suspendedEnableCamAnims = m_enableCamAnims;
m_unk0x429 = m_unk0x400;
m_unk0x42a = TRUE;
m_unk0x3a = FALSE;
m_enableCamAnims = FALSE;
m_unk0x400 = FALSE;
m_unk0x402 = FALSE;
}
@ -769,7 +769,7 @@ MxResult LegoAnimationManager::ReadAnimInfo(LegoFile* p_file, AnimInfo* p_info)
goto done;
}
if (p_file->Read(&p_info->m_unk0x08, sizeof(p_info->m_unk0x08)) == FAILURE) {
if (p_file->Read(&p_info->m_location, sizeof(p_info->m_location)) == FAILURE) {
goto done;
}
if (p_file->Read(&p_info->m_unk0x0a, sizeof(p_info->m_unk0x0a)) == FAILURE) {
@ -874,11 +874,29 @@ void LegoAnimationManager::DeleteAnimations()
m_suspended = suspended;
}
// FUNCTION: LEGO1 0x100604d0
// FUNCTION: BETA10 0x10041335
void LegoAnimationManager::FUN_100604d0(MxBool p_unk0x08)
{
for (MxS32 i = 0; i < (MxS32) sizeOfArray(g_characters); i++) {
g_characters[i].m_unk0x08 = p_unk0x08;
}
}
// FUNCTION: LEGO1 0x10060540
// FUNCTION: BETA10 0x1004140f
void LegoAnimationManager::FUN_10060540(MxBool p_unk0x29)
{
for (MxS32 i = 0; i < m_animCount; i++) {
m_anims[i].m_unk0x29 = p_unk0x29;
}
}
// FUNCTION: LEGO1 0x10060570
// FUNCTION: BETA10 0x10041463
void LegoAnimationManager::FUN_10060570(MxBool p_unk0x1a)
{
m_unk0x39 = FALSE;
m_animRunning = FALSE;
m_unk0x430 = FALSE;
m_unk0x42c = NULL;
@ -920,7 +938,7 @@ MxResult LegoAnimationManager::FUN_100605e0(
AnimInfo& animInfo = m_anims[p_index];
if (!p_bool1) {
if (m_unk0x39 || !animInfo.m_unk0x29) {
if (m_animRunning || !animInfo.m_unk0x29) {
return FAILURE;
}
@ -940,7 +958,7 @@ MxResult LegoAnimationManager::FUN_100605e0(
tranInfo->m_index = ++m_unk0x1c;
tranInfo->m_unk0x10 = 0;
tranInfo->m_unk0x08 = p_roi;
tranInfo->m_unk0x12 = m_anims[p_index].m_unk0x08;
tranInfo->m_location = m_anims[p_index].m_location;
tranInfo->m_unk0x14 = p_unk0x0a;
tranInfo->m_objectId = animInfo.m_objectId;
tranInfo->m_unk0x15 = p_bool2;
@ -984,7 +1002,7 @@ MxResult LegoAnimationManager::FUN_100605e0(
}
}
m_unk0x39 = TRUE;
m_animRunning = TRUE;
result = SUCCESS;
}
}
@ -1006,7 +1024,7 @@ MxResult LegoAnimationManager::FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix
info->m_index = ++m_unk0x1c;
info->m_unk0x10 = 0;
info->m_unk0x08 = NULL;
info->m_unk0x12 = -1;
info->m_location = -1;
info->m_unk0x14 = FALSE;
info->m_objectId = p_objectId;
@ -1036,7 +1054,7 @@ MxResult LegoAnimationManager::FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix
if (StartActionIfUnknown0x13c(action) == SUCCESS) {
BackgroundAudioManager()->LowerVolume();
info->m_flags |= LegoTranInfo::c_bit2;
m_unk0x39 = TRUE;
m_animRunning = TRUE;
m_unk0x404 = Timer()->GetTime();
result = SUCCESS;
}
@ -1133,6 +1151,49 @@ MxResult LegoAnimationManager::FUN_10060dc0(
return result;
}
// FUNCTION: LEGO1 0x10060eb0
// FUNCTION: BETA10 0x1004206c
void LegoAnimationManager::CameraTriggerFire(IslePathActor* p_actor, undefined4, MxU32 p_location, MxBool p_bool)
{
if (Lego()->m_unk0x13c && m_enableCamAnims && !m_animRunning) {
LegoLocation* location = LegoNavController::GetLocation(p_location);
if (location != NULL) {
if (location->m_frequency == 0) {
return;
}
if (location->m_unk0x5c && location->m_frequency < rand() % 100) {
return;
}
}
MxU16 unk0x0e, unk0x10;
if (FUN_100617c0(p_location, unk0x0e, unk0x10) == SUCCESS) {
MxU16 index = unk0x0e;
MxU32 unk0x22 = -1;
MxBool success = FALSE;
for (MxU16 i = unk0x0e; i <= unk0x10; i++) {
AnimInfo& animInfo = m_anims[i];
if ((p_bool || !FUN_100623a0(animInfo)) && !FUN_10062710(animInfo) && animInfo.m_unk0x29 &&
animInfo.m_unk0x22 < unk0x22 && (animInfo.m_unk0x22 == 0 || *animInfo.m_name != 'i') &&
*animInfo.m_name != 'I') {
index = i;
unk0x22 = animInfo.m_unk0x22;
success = TRUE;
}
}
if (success) {
FUN_100605e0(index, m_anims[index].m_unk0x0a, NULL, TRUE, NULL, FALSE, TRUE, TRUE, TRUE);
location->m_unk0x5c = TRUE;
}
}
}
}
// FUNCTION: LEGO1 0x10061010
// FUNCTION: BETA10 0x100422cc
void LegoAnimationManager::FUN_10061010(MxBool p_und)
@ -1150,7 +1211,7 @@ void LegoAnimationManager::FUN_10061010(MxBool p_und)
// TODO: Match
MxU32 flags = tranInfo->m_flags;
if (tranInfo->m_unk0x14 && tranInfo->m_unk0x12 != -1 && p_und) {
if (tranInfo->m_unk0x14 && tranInfo->m_location != -1 && p_und) {
LegoAnim* anim;
if (tranInfo->m_presenter->GetPresenter() != NULL &&
@ -1193,7 +1254,7 @@ void LegoAnimationManager::FUN_10061010(MxBool p_und)
}
}
m_unk0x39 = unk0x39;
m_animRunning = unk0x39;
m_unk0x404 = Timer()->GetTime();
}
@ -1227,18 +1288,18 @@ void LegoAnimationManager::FUN_10061530()
// FUNCTION: LEGO1 0x100617c0
// FUNCTION: BETA10 0x1004240b
MxResult LegoAnimationManager::FUN_100617c0(MxS32 p_unk0x08, MxU16& p_unk0x0e, MxU16& p_unk0x10)
MxResult LegoAnimationManager::FUN_100617c0(MxS32 p_location, MxU16& p_unk0x0e, MxU16& p_unk0x10)
{
MxResult result = FAILURE;
MxU16 unk0x0e = 0;
MxU16 unk0x10 = 0;
MxBool success = FALSE;
if (p_unk0x08 == -1) {
if (p_location == -1) {
MxS32 i;
for (i = 0; i < m_animCount; i++) {
if (m_anims[i].m_unk0x08 == p_unk0x08) {
if (m_anims[i].m_location == p_location) {
unk0x0e = i;
success = TRUE;
break;
@ -1246,7 +1307,7 @@ MxResult LegoAnimationManager::FUN_100617c0(MxS32 p_unk0x08, MxU16& p_unk0x0e, M
}
if (success) {
for (; i < m_animCount && m_anims[i].m_unk0x08 == p_unk0x08; i++) {
for (; i < m_animCount && m_anims[i].m_location == p_location; i++) {
unk0x10 = i;
}
}
@ -1254,8 +1315,8 @@ MxResult LegoAnimationManager::FUN_100617c0(MxS32 p_unk0x08, MxU16& p_unk0x0e, M
else {
MxS32 i;
for (i = 0; m_animCount > i && m_anims[i].m_unk0x08 != -1; i++) {
if (m_anims[i].m_unk0x08 == p_unk0x08) {
for (i = 0; m_animCount > i && m_anims[i].m_location != -1; i++) {
if (m_anims[i].m_location == p_location) {
unk0x0e = i;
success = TRUE;
break;
@ -1263,7 +1324,7 @@ MxResult LegoAnimationManager::FUN_100617c0(MxS32 p_unk0x08, MxU16& p_unk0x0e, M
}
if (success) {
for (; i < m_animCount && m_anims[i].m_unk0x08 == p_unk0x08; i++) {
for (; i < m_animCount && m_anims[i].m_location == p_location; i++) {
unk0x10 = i;
}
}
@ -1322,7 +1383,7 @@ MxLong LegoAnimationManager::Notify(MxParam& p_param)
BackgroundAudioManager()->RaiseVolume();
}
m_unk0x39 = FALSE;
m_animRunning = FALSE;
m_unk0x404 = Timer()->GetTime();
found = TRUE;
@ -1423,7 +1484,7 @@ MxResult LegoAnimationManager::Tickle()
FUN_10064b50(time);
if (!m_unk0x39 && time - m_unk0x404 > 10000 && speed < g_unk0x100f74b0[0][0] && speed > g_unk0x100f74b0[5][0]) {
if (!m_animRunning && time - m_unk0x404 > 10000 && speed < g_unk0x100f74b0[0][0] && speed > g_unk0x100f74b0[5][0]) {
LegoPathBoundary* boundary = actor->GetBoundary();
Mx3DPointFloat position(roi->GetWorldPosition());
@ -1791,7 +1852,7 @@ void LegoAnimationManager::AddExtra(MxS32 p_location, MxBool p_und)
{
LegoLocation::Boundary* boundary = NULL;
if (p_und || (!m_unk0x39 && m_unk0x400)) {
if (p_und || (!m_animRunning && m_unk0x400)) {
LegoWorld* world = CurrentWorld();
if (world != NULL) {
@ -2059,20 +2120,137 @@ void LegoAnimationManager::FUN_10063d10()
}
}
// STUB: LEGO1 0x10063fb0
// FUNCTION: LEGO1 0x10063fb0
// FUNCTION: BETA10 0x100452a7
MxBool LegoAnimationManager::FUN_10063fb0(LegoLocation::Boundary* p_boundary, LegoWorld* p_world)
{
// TODO
return TRUE;
if (p_boundary->m_name != NULL) {
Mx3DPointFloat vec;
LegoPathBoundary* boundary = p_world->FindPathBoundary(p_boundary->m_name);
LegoUnknown100db7f4* pSrcE = (LegoUnknown100db7f4*) boundary->GetEdges()[p_boundary->m_src];
return FUN_10064010(boundary, pSrcE, p_boundary->m_srcScale);
}
return FALSE;
}
// STUB: LEGO1 0x10064120
// FUNCTION: BETA10 0x100454f5
MxBool LegoAnimationManager::FUN_10064120(LegoLocation::Boundary* p_boundary, MxBool, MxBool)
// FUNCTION: LEGO1 0x10064010
// FUNCTION: BETA10 0x100453a5
MxBool LegoAnimationManager::FUN_10064010(LegoPathBoundary* p_boundary, LegoUnknown100db7f4* p_edge, float p_destScale)
{
// TODO
return TRUE;
Mx3DPointFloat p1;
Vector3* v1 = p_edge->GetOpposingPoint(p_boundary);
Vector3* v2 = p_edge->GetPoint(p_boundary);
p1 = *v2;
((Vector3&) p1).Sub(v1);
((Vector3&) p1).Mul(p_destScale);
((Vector3&) p1).Add(v1);
BoundingBox boundingBox;
Mx3DPointFloat vec(1.0f, 1.0f, 1.0f);
boundingBox.Min() = p1;
boundingBox.Min().Sub(&vec);
boundingBox.Max() = p1;
boundingBox.Max().Add(&vec);
return GetViewManager()->FUN_100a6150(boundingBox) == FALSE;
}
// FUNCTION: LEGO1 0x10064120
// FUNCTION: BETA10 0x100454f5
MxBool LegoAnimationManager::FUN_10064120(LegoLocation::Boundary* p_boundary, MxBool p_bool1, MxBool p_bool2)
{
MxU32 local2c = 12;
float destScale = ((rand() * 0.5) / 32767.0) + 0.25;
IslePathActor* actor = CurrentActor();
if (actor == NULL) {
return FALSE;
}
LegoPathBoundary* boundary = actor->GetBoundary();
if (boundary == NULL) {
return FALSE;
}
Mx3DPointFloat direction = actor->GetWorldDirection();
float local4c = 0.0f;
LegoUnknown100db7f4* local50 = NULL;
LegoS32 numEdges = boundary->GetNumEdges();
Mx3DPointFloat vec;
LegoUnknown100db7f4* e;
MxS32 i;
for (i = 0; i < numEdges; i++) {
e = (LegoUnknown100db7f4*) boundary->GetEdges()[i];
e->FUN_1002ddc0(*boundary, vec);
float dot = vec.Dot(&direction, &vec);
if (dot > local4c) {
local50 = e;
local4c = dot;
}
}
e = local50;
do {
e = (LegoUnknown100db7f4*) e->GetCounterclockwiseEdge(boundary);
if (e->GetMask0x03()) {
break;
}
} while (e != local50);
if (e == local50) {
return FALSE;
}
LegoUnknown100db7f4* local34 = e;
LegoUnknown100db7f4* local8 = local50;
while (local2c--) {
if (local34 != NULL) {
if (local34->Unknown(*boundary, LegoWEGEdge::c_bit1) && FUN_10064010(boundary, local34, destScale) &&
(!p_bool2 || FUN_10064010(boundary, local8, destScale))) {
p_boundary->m_srcScale = p_boundary->m_destScale = destScale;
p_boundary->m_name = boundary->GetName();
numEdges = boundary->GetNumEdges();
for (i = 0; i < numEdges; i++) {
LegoUnknown100db7f4* e = (LegoUnknown100db7f4*) boundary->GetEdges()[i];
if (local34 == e) {
p_boundary->m_src = i;
}
else if (local8 == e) {
p_boundary->m_dest = i;
}
}
return TRUE;
}
local8 = local34;
boundary = (LegoPathBoundary*) local34->OtherFace(boundary);
local50 = local34;
do {
if (p_bool1) {
local34 = (LegoUnknown100db7f4*) local34->GetCounterclockwiseEdge(boundary);
}
else {
local34 = (LegoUnknown100db7f4*) local34->GetClockwiseEdge(boundary);
}
} while (!local34->GetMask0x03() && local34 != local50);
if (local34 == local50) {
return FALSE;
}
}
}
return FALSE;
}
// FUNCTION: LEGO1 0x10064380

View File

@ -427,7 +427,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
LegoROI* viewROI = VideoManager()->GetViewROI();
IslePathActor* actor = CurrentActor();
if (m_tranInfo != NULL && m_tranInfo->m_unk0x14 && m_tranInfo->m_unk0x12 != -1 && actor != NULL) {
if (m_tranInfo != NULL && m_tranInfo->m_unk0x14 && m_tranInfo->m_location != -1 && actor != NULL) {
if (m_unk0x64 != NULL) {
undefined4 und = 1;

View File

@ -4,6 +4,7 @@
#include "act1state.h"
#include "anim/legoanim.h"
#include "islepathactor.h"
#include "legoanimationmanager.h"
#include "legoanimpresenter.h"
#include "legogamestate.h"
#include "legoinputmanager.h"
@ -19,6 +20,7 @@
#include "mxmisc.h"
#include "mxnotificationmanager.h"
#include "mxstreamer.h"
#include "mxtype19notificationparam.h"
#include "mxtypes.h"
#include "mxutilities.h"
#include "mxvariabletable.h"
@ -340,11 +342,21 @@ void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bO
}
}
// STUB: LEGO1 0x1003ecc0
// FUNCTION: LEGO1 0x1003ecc0
// FUNCTION: BETA10 0x100d4b38
void FUN_1003ecc0(IslePathActor* p_actor, undefined4, undefined4, MxBool)
void PlayCamAnim(IslePathActor* p_actor, undefined4 p_unused, MxU32 p_location, MxBool p_bool)
{
// TODO
LegoWorld* world = CurrentWorld();
MxLong result = 0;
if (world != NULL) {
MxType19NotificationParam param(c_notificationType19, p_actor, 0x43, p_location);
result = world->Notify(param);
}
if (result == 0) {
AnimationManager()->CameraTriggerFire(p_actor, p_unused, p_location, p_bool);
}
}
// FUNCTION: LEGO1 0x1003eda0
@ -424,10 +436,16 @@ MxBool RemoveFromWorld(MxAtomId& p_entityAtom, MxS32 p_entityId, MxAtomId& p_wor
return FALSE;
}
// STUB: LEGO1 0x1003ef00
void FUN_1003ef00(MxBool)
// FUNCTION: LEGO1 0x1003ef00
void FUN_1003ef00(MxBool p_enable)
{
// TODO (something related to animation manager)
if (p_enable) {
AnimationManager()->Resume();
}
AnimationManager()->FUN_1005f6d0(p_enable);
AnimationManager()->FUN_10060540(p_enable);
AnimationManager()->FUN_100604d0(p_enable);
}
// FUNCTION: LEGO1 0x1003ef40

View File

@ -16,9 +16,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{1,
"LCAMBA1",
0.852546,
@ -30,9 +31,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG02_13", 2, 0.75, 0, 0.25, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
10240},
{"EDG02_13", 2, 0.75, 0, 0.25, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
40},
{2,
"LCAMBA2",
3.505301,
@ -44,9 +46,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG02_37", 2, 0.75, 0, 0.25, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
5120},
{"EDG02_37", 2, 0.75, 0, 0.25, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
20},
{3,
"LCAMBA3",
-7.472569,
@ -58,9 +61,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG02_26", 0, 0.75, 2, 0.25, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
5120},
{"EDG02_26", 0, 0.75, 2, 0.25, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
20},
{4,
"LCAMBA4",
38.55205,
@ -72,9 +76,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG00_146", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
7680},
{"EDG00_146", 0, 0.5, 2, 0.5, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
30},
{5,
"LCAMCA1",
-36.778473,
@ -86,8 +91,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"INT01", 2, 0.5, 6, 0.5, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
{"INT01", 2, 0.5, 6, 0.5, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{6,
"LCAMCA2",
@ -100,8 +106,9 @@ LegoLocation g_locations[] = {
0.000446,
0.999999,
-0.001387,
{"EDG00_104", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG00_104", 0, 0.5, 2, 0.5, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{7,
"LCAMCA3",
@ -114,8 +121,9 @@ LegoLocation g_locations[] = {
-0.000173,
0.999998,
0.001888,
{"EDG02_58", 2, 0.25, 0, 0.75, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG02_58", 2, 0.25, 0, 0.75, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{8,
"LCAMGS1",
@ -128,9 +136,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG02_40", 2, 0.25, 0, 0.25, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
17920},
{"EDG02_40", 2, 0.25, 0, 0.25, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
70},
{9,
"LCAMGS2",
25.153421,
@ -142,8 +151,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"INT19", 1, 0.75, 0, 0.75, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
{"INT19", 1, 0.75, 0, 0.75, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{10,
"LCAMGS3",
@ -156,8 +166,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG00_74", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG00_74", 0, 0.5, 2, 0.5, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{11,
"LCAMHO1",
@ -170,9 +181,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
12800},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
50},
{12,
"LCAMHO2",
90.92687,
@ -184,8 +196,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{13,
"LCAMHO3",
@ -198,8 +211,9 @@ LegoLocation g_locations[] = {
0.005781,
0.999976,
0.003708,
{"EDG02_27", 1, 0.89, 2, 0.89, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG02_27", 1, 0.89, 2, 0.89, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{14,
"LCAMHO4",
@ -212,9 +226,10 @@ LegoLocation g_locations[] = {
-0.034088,
0.999355,
-0.011255,
{"EDG02_27", 1, 0.89, 2, 0.89, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
25600},
{"EDG02_27", 1, 0.89, 2, 0.89, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
100},
{15,
"LCAMIC1",
80.11602,
@ -226,8 +241,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG00_69", 2, 0.5, 0, 0.5, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG00_69", 2, 0.5, 0, 0.5, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{16,
"LCAMIC2",
@ -240,8 +256,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG02_66", 2, 0.5, 0, 0.5, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG02_66", 2, 0.5, 0, 0.5, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{17,
"LCAMIC3",
@ -254,9 +271,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG02_68", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
5120},
{"EDG02_68", 0, 0.5, 2, 0.5, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
20},
{18,
"LCAMJA1",
95.05279,
@ -268,9 +286,10 @@ LegoLocation g_locations[] = {
-0.006372,
0.999977,
-0.002478,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
25600},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
100},
{19,
"LCAMJA2",
97.214066,
@ -282,8 +301,9 @@ LegoLocation g_locations[] = {
-0.010811,
0.999927,
0.005453,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{20,
"LCAMJA3",
@ -296,8 +316,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"INT33", 1, 0.9, 3, 0.9, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{"INT33", 1, 0.9, 3, 0.9, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{21,
"LCAMJA4",
@ -310,8 +331,9 @@ LegoLocation g_locations[] = {
-0.001442,
0.999945,
0.010407,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{22,
"LCAMJA5",
@ -324,8 +346,9 @@ LegoLocation g_locations[] = {
-0.007107,
0.999949,
-0.007199,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{23,
"LCAMJS1",
@ -338,9 +361,10 @@ LegoLocation g_locations[] = {
0.000653,
0.999999,
-0.000932,
{"INT26", 0, 0.5, 3, 0.5, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
25600},
{"INT26", 0, 0.5, 3, 0.5, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
100},
{24,
"LCAMJS2",
14.753909,
@ -352,9 +376,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
25600},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
100},
{25,
"LCAMJS3",
12.373611,
@ -366,9 +391,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
25600},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
100},
{26,
"LCAMJS4",
27.136557,
@ -380,8 +406,9 @@ LegoLocation g_locations[] = {
-0.000261,
0.999999,
-0.001364,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{27,
"LCAMMT1",
@ -394,9 +421,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
12800},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
50},
{28,
"LCAMMT2",
-58.28056,
@ -408,8 +436,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{29,
"LCAMPK1",
@ -422,9 +451,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG00_83", 0, 0.9, 2, 0.9, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
12800},
{"EDG00_83", 0, 0.9, 2, 0.9, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
50},
{30,
"LCAMPK2",
63.75,
@ -436,8 +466,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{31,
"LCAMPK4",
@ -450,9 +481,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
6400},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
25},
{32,
"LCAMPO1",
-24.38507,
@ -464,9 +496,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
5120},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
20},
{33,
"LCAMPO2",
-41.35899,
@ -478,8 +511,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG00_191", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG00_191", 0, 0.5, 2, 0.5, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{34,
"LCAMPS1",
@ -492,9 +526,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG02_40", 0, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
6400},
{"EDG02_40", 0, 0.5, 2, 0.5, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
25},
{35,
"LCAMPS2",
70.99095,
@ -506,9 +541,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
6400},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
25},
{36,
"LCAMPS3",
73.92391,
@ -520,9 +556,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG02_66", 1, 0.15, 2, 0.15, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
6400},
{"EDG02_66", 1, 0.15, 2, 0.15, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
25},
{37,
"LCAMPS4",
61.471172,
@ -534,8 +571,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG02_40", 0, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG02_40", 0, 0.5, 2, 0.5, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{38,
"LCAMPZ1",
@ -548,9 +586,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
20480},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
80},
{39,
"LCAMPZ2",
-21.870003,
@ -562,9 +601,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
23040},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
90},
{40,
"LCAMPZ3",
-21.860731,
@ -576,9 +616,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG00_24", 0, 0.9, 2, 0.9, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
25600},
{"EDG00_24", 0, 0.9, 2, 0.9, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
100},
{41,
"LCAMPZ4",
-20.492962,
@ -590,9 +631,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{42,
"LCAMPZ5",
-11.0625,
@ -604,9 +646,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
12800},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
50},
{43,
"LCAMPZ6",
-14.837131,
@ -618,8 +661,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{44,
"LCAMPZ7",
@ -632,8 +676,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{45,
"LCAMRA1",
@ -646,8 +691,9 @@ LegoLocation g_locations[] = {
-0.007751,
0.998685,
-0.050677,
{"EDG00_03", 1, 0.5, 3, 0.5, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG00_03", 1, 0.5, 3, 0.5, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{46,
"LCAMRA2",
@ -660,9 +706,10 @@ LegoLocation g_locations[] = {
-0.000078,
1,
0.000105,
{"EDG01_17", 0, 0.5, 3, 0.5, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
6400},
{"EDG01_17", 0, 0.5, 3, 0.5, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
25},
{47,
"LCAMRA3",
-57.06778,
@ -674,8 +721,9 @@ LegoLocation g_locations[] = {
-0.000112,
1,
0.000021,
{"EDG01_40", 2, 0.5, 0, 0.5, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG01_40", 2, 0.5, 0, 0.5, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{48,
"LCAMRA4",
@ -688,9 +736,10 @@ LegoLocation g_locations[] = {
0.035939,
0.999346,
-0.00388,
{"EDG01_27", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
6400},
{"EDG01_27", 0, 0.5, 2, 0.5, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
25},
{49,
"LCAMRA5",
-84.27638,
@ -702,9 +751,10 @@ LegoLocation g_locations[] = {
0.024875,
0.999675,
-0.005499,
{"EDG01_08", 2, 0.7, 0, 0.7, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
6400},
{"EDG01_08", 2, 0.7, 0, 0.7, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
25},
{50,
"LCAMRA6",
-86.96998,
@ -716,8 +766,9 @@ LegoLocation g_locations[] = {
0.000378,
1,
0.000009,
{"EDG01_13", 1, 0.2, 0, 0.2, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG01_13", 1, 0.2, 0, 0.2, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{51,
"LCAMRT1",
@ -730,9 +781,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG03_10", 0, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
20480},
{"EDG03_10", 0, 0.5, 2, 0.5, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
80},
{52,
"LCAMRT2",
-2.950222,
@ -744,9 +796,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG03_10", 0, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
25600},
{"EDG03_10", 0, 0.5, 2, 0.5, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
100},
{53,
"LCAMRT3",
-0.87654,
@ -758,9 +811,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
25600},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
100},
{54,
"LCAMRT4",
0.4375,
@ -772,9 +826,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{55,
"LCAMRT5",
-27.213715,
@ -786,8 +841,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG03_05", 1, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{"EDG03_05", 1, 0.5, 2, 0.5, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{56,
"LCAMRT6",
@ -800,9 +856,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"EDG03_10", 0, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
15360},
{"EDG03_10", 0, 0.5, 2, 0.5, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
60},
{57,
"LCAMST1",
-40.1615,
@ -814,9 +871,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
5120},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
20},
{58,
"LCAMST2",
-48.750553,
@ -828,8 +886,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{59,
"LCAMZG1",
@ -842,8 +901,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{"INT22", 0, 0.4, 2, 0.4, TRUE},
{NULL, 0, 0, 0, 0, FALSE},
{"INT22", 0, 0.4, 2, 0.4, 1},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{60,
"LCAMZI1",
@ -856,9 +916,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{61,
"LCAMZI2",
93.37283,
@ -870,9 +931,10 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{62,
"LCAMZIE",
93.375,
@ -884,8 +946,9 @@ LegoLocation g_locations[] = {
0.254493,
0.967075,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{63,
"LCAMZIN",
@ -898,8 +961,9 @@ LegoLocation g_locations[] = {
0,
0.967203,
0.254006,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{64,
"LCAMZIS",
@ -912,8 +976,9 @@ LegoLocation g_locations[] = {
0,
0.966946,
-0.254982,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{65,
"LCAMZIW",
@ -926,8 +991,9 @@ LegoLocation g_locations[] = {
-0.254493,
0.967075,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{66,
"LCAMZP1",
@ -940,8 +1006,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{67,
"LCAMRT7",
@ -954,8 +1021,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
0},
{68,
"LCAMJS5",
@ -968,8 +1036,9 @@ LegoLocation g_locations[] = {
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
25600},
{69, "overhead", 0, 135, 0, 0, -1, 0, 0, 0, 1, {NULL, 0, 0, 0, 0, FALSE}, {NULL, 0, 0, 0, 0, FALSE}, 0}
{NULL, 0, 0, 0, 0, 0},
{NULL, 0, 0, 0, 0, 0},
FALSE,
100},
{69, "overhead", 0, 135, 0, 0, -1, 0, 0, 0, 1, {NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, 0}, FALSE, 0}
};

View File

@ -722,7 +722,7 @@ void Isle::Enable(MxBool p_enable)
m_act1state->m_unk0x018 = 8;
AnimationManager()->FUN_1005f6d0(FALSE);
AnimationManager()->FUN_1005f700(FALSE);
AnimationManager()->EnableCamAnims(FALSE);
g_unk0x100f1198 &= ~c_bit7;
m_towtrack->FUN_1004dab0();
@ -731,7 +731,7 @@ void Isle::Enable(MxBool p_enable)
m_act1state->m_unk0x018 = 10;
AnimationManager()->FUN_1005f6d0(FALSE);
AnimationManager()->FUN_1005f700(FALSE);
AnimationManager()->EnableCamAnims(FALSE);
g_unk0x100f1198 &= ~c_bit7;
m_ambulance->FUN_10036e60();

View File

@ -2,7 +2,7 @@
#define __LEGOUNKNOWN100DB7F4_H
#include "legoedge.h"
#include "legoweedge.h"
#include "legowegedge.h"
#include "mxgeometry/mxgeometry3d.h"
// VTABLE: LEGO1 0x100db7f4
@ -34,6 +34,24 @@ struct LegoUnknown100db7f4 : public LegoEdge {
return SUCCESS;
}
// FUNCTION: BETA10 0x1004a830
LegoU32 Unknown(LegoWEGEdge& p_face, LegoU8 p_mask)
{
return (p_face.IsEqual(*m_faceB) && (m_flags & c_bit1) && (p_face.GetMask0x03() & p_mask) == p_mask) ||
(p_face.IsEqual(*m_faceA) && (m_flags & c_bit2) && (p_face.GetMask0x03() & p_mask) == p_mask);
}
// FUNCTION: BETA10 0x1001cbe0
LegoWEEdge* OtherFace(LegoWEEdge* p_other)
{
if (m_faceA == p_other) {
return m_faceB;
}
else {
return m_faceA;
}
}
LegoU32 GetMask0x03() { return m_flags & (c_bit1 | c_bit2); }
// SYNTHETIC: LEGO1 0x1009a6c0

View File

@ -13,6 +13,8 @@ struct LegoPathStruct;
class LegoWEGEdge : public LegoWEEdge {
public:
enum {
c_bit1 = 0x01,
c_bit2 = 0x02,
c_bit3 = 0x04,
c_bit5 = 0x10
};
@ -53,6 +55,8 @@ class LegoWEGEdge : public LegoWEEdge {
}
}
inline LegoU8 GetMask0x03() { return m_flags & (c_bit1 | c_bit2); }
// SYNTHETIC: LEGO1 0x1009a7e0
// LegoWEGEdge::`scalar deleting destructor'

View File

@ -38,6 +38,7 @@ enum NotificationId {
// SIZE 0x0c
class MxNotificationParam : public MxParam {
public:
inline MxNotificationParam() : m_type(c_notificationType0), m_sender(NULL) {}
inline MxNotificationParam(NotificationId p_type, MxCore* p_sender) : MxParam(), m_type(p_type), m_sender(p_sender)
{
}

View File

@ -7,9 +7,31 @@
// VTABLE: LEGO1 0x100d6230
// SIZE 0x10
class MxType19NotificationParam : public MxNotificationParam {
public:
MxType19NotificationParam(NotificationId p_type, MxCore* p_sender, MxU8 p_unk0x0e, MxU16 p_unk0x0c)
: MxNotificationParam()
{
m_type = p_type;
m_sender = p_sender;
m_unk0x0c = p_unk0x0c;
m_unk0x0e = p_unk0x0e;
}
// FUNCTION: LEGO1 0x1001bac0
MxNotificationParam* Clone() const override
{
return new MxType19NotificationParam(m_type, m_sender, m_unk0x0e, m_unk0x0c);
} // vtable+0x04
protected:
MxU16 m_unk0x0c; // 0x0c
MxU8 m_unk0x0e; // 0x0e
};
// SYNTHETIC: LEGO1 0x1001bb80
// MxType19NotificationParam::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x1001bbf0
// MxType19NotificationParam::~MxType19NotificationParam
#endif // MXTYPE19NOTIFICATIONPARAM_H

View File

@ -8,6 +8,9 @@
DECOMP_SIZE_ASSERT(ViewManager, 0x1bc)
// GLOBAL: LEGO1 0x100dbc78
int g_unk0x100dbc78[8][3] = {{0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {0, 1, 1}, {1, 0, 1}, {1, 1, 0}, {1, 1, 1}};
// GLOBAL: LEGO1 0x100dbcd8
int g_unk0x100dbcd8[18] = {0, 1, 5, 6, 2, 3, 3, 0, 4, 1, 2, 6, 0, 3, 2, 4, 5, 6};
@ -55,11 +58,35 @@ ViewManager::~ViewManager()
SetPOVSource(NULL);
}
// STUB: LEGO1 0x100a6150
// FUNCTION: LEGO1 0x100a6150
// FUNCTION: BETA10 0x10172164
undefined4 ViewManager::FUN_100a6150(const BoundingBox& p_bounding_box)
unsigned int ViewManager::FUN_100a6150(const BoundingBox& p_bounding_box)
{
return 1;
const Vector3* box[] = {&p_bounding_box.Min(), &p_bounding_box.Max()};
float und[8][3];
int i, j, k;
for (i = 0; i < 8; i++) {
for (j = 0; j < 3; j++) {
und[i][j] = box[g_unk0x100dbc78[i][j]]->operator[](j);
}
}
for (i = 0; i < 6; i++) {
for (k = 0; k < 8; k++) {
if (unk0x150[i][0] * und[k][0] + unk0x150[i][2] * und[k][2] + unk0x150[i][1] * und[k][1] + unk0x150[i][3] >=
0.0f) {
break;
}
}
if (k == 8) {
return FALSE;
}
}
return TRUE;
}
// FUNCTION: LEGO1 0x100a6410

View File

@ -23,7 +23,7 @@ class ViewManager {
void Remove(ViewROI* p_roi);
void RemoveAll(ViewROI* p_roi);
undefined4 FUN_100a6150(const BoundingBox& p_bounding_box);
unsigned int FUN_100a6150(const BoundingBox& p_bounding_box);
void UpdateROIDetailBasedOnLOD(ViewROI* p_roi, int p_und);
void RemoveROIDetailFromScene(ViewROI* p_roi);
void SetPOVSource(const OrientableROI* point_of_view);