Implement/match LegoAnimationManager::AddExtra (#901)

* Implement/match LegoAnimationManager::AddExtra

* Rename member

* Fix param names

* Remove space
This commit is contained in:
Christian Semmler 2024-05-10 14:07:38 -04:00 committed by GitHub
parent a1388adcd7
commit d9a82323ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 522 additions and 226 deletions

View file

@ -345,12 +345,12 @@ add_library(lego1 SHARED
LEGO1/lego/legoomni/src/entity/legoactor.cpp LEGO1/lego/legoomni/src/entity/legoactor.cpp
LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp
LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp
LEGO1/lego/legoomni/src/entity/legocameralocations.cpp
LEGO1/lego/legoomni/src/entity/legocarraceactor.cpp LEGO1/lego/legoomni/src/entity/legocarraceactor.cpp
LEGO1/lego/legoomni/src/entity/legoentity.cpp LEGO1/lego/legoomni/src/entity/legoentity.cpp
LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp LEGO1/lego/legoomni/src/entity/legoentitypresenter.cpp
LEGO1/lego/legoomni/src/entity/legojetski.cpp LEGO1/lego/legoomni/src/entity/legojetski.cpp
LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp
LEGO1/lego/legoomni/src/entity/legolocations.cpp
LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp
LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp
LEGO1/lego/legoomni/src/entity/legoworld.cpp LEGO1/lego/legoomni/src/entity/legoworld.cpp

View file

@ -3,6 +3,7 @@
#include "actionsfwd.h" #include "actionsfwd.h"
#include "decomp.h" #include "decomp.h"
#include "legolocations.h"
#include "legotraninfolist.h" #include "legotraninfolist.h"
#include "mxcore.h" #include "mxcore.h"
#include "mxgeometry/mxgeometry3d.h" #include "mxgeometry/mxgeometry3d.h"
@ -10,9 +11,11 @@
class AnimState; class AnimState;
class LegoAnimPresenter; class LegoAnimPresenter;
class LegoEntity; class LegoEntity;
class LegoExtraActor;
class LegoFile; class LegoFile;
class LegoPathBoundary; class LegoPathBoundary;
class LegoROIList; class LegoROIList;
class LegoWorld;
struct ModelInfo; struct ModelInfo;
class MxDSAction; class MxDSAction;
@ -39,7 +42,7 @@ class LegoAnimationManager : public MxCore {
// SIZE 0x08 // SIZE 0x08
struct Vehicle { struct Vehicle {
char* m_name; // 0x00 char* m_name; // 0x00
undefined m_unk0x04; // 0x04 MxBool m_unk0x04; // 0x04
MxBool m_unk0x05; // 0x05 MxBool m_unk0x05; // 0x05
}; };
@ -99,7 +102,7 @@ class LegoAnimationManager : public MxCore {
LegoTranInfo* GetTranInfo(MxU32 p_index); LegoTranInfo* GetTranInfo(MxU32 p_index);
void FUN_10062770(); void FUN_10062770();
void PurgeExtra(MxBool p_und); void PurgeExtra(MxBool p_und);
void AddExtra(MxU32 p_cameraLocation, MxBool p_und); void AddExtra(MxS32 p_location, MxBool p_und);
void FUN_10063270(LegoROIList*, LegoAnimPresenter*); void FUN_10063270(LegoROIList*, LegoAnimPresenter*);
void FUN_10063780(LegoROIList* p_list); void FUN_10063780(LegoROIList* p_list);
void FUN_10064670(Vector3*); void FUN_10064670(Vector3*);
@ -143,7 +146,10 @@ class LegoAnimationManager : public MxCore {
MxBool FUN_10062650(Vector3& p_position, float p_und, LegoROI* p_roi); MxBool FUN_10062650(Vector3& p_position, float p_und, LegoROI* p_roi);
MxBool FUN_10062710(AnimInfo& p_info); MxBool FUN_10062710(AnimInfo& p_info);
void FUN_10063aa0(); void FUN_10063aa0();
MxBool FUN_10063b90(LegoWorld* p_world, LegoExtraActor* p_actor, MxU8 p_unk0x14, MxU32 p_characterId);
void FUN_10063d10(); void FUN_10063d10();
MxBool FUN_10063fb0(LegoLocation::Boundary* p_boundary, LegoWorld* p_world);
MxBool FUN_10064120(LegoLocation::Boundary* p_boundary, MxBool, MxBool);
void FUN_100648f0(LegoTranInfo*, MxLong); void FUN_100648f0(LegoTranInfo*, MxLong);
void FUN_10064b50(MxLong p_time); void FUN_10064b50(MxLong p_time);
@ -163,7 +169,7 @@ class LegoAnimationManager : public MxCore {
MxBool m_unk0x39; // 0x39 MxBool m_unk0x39; // 0x39
MxBool m_unk0x3a; // 0x3a MxBool m_unk0x3a; // 0x3a
Extra m_extras[40]; // 0x3c Extra m_extras[40]; // 0x3c
undefined4 m_unk0x3fc; // 0x3fc MxU32 m_lastExtraCharacterId; // 0x3fc
MxBool m_unk0x400; // 0x400 MxBool m_unk0x400; // 0x400
MxBool m_unk0x401; // 0x401 MxBool m_unk0x401; // 0x401
MxBool m_unk0x402; // 0x402 MxBool m_unk0x402; // 0x402
@ -171,7 +177,7 @@ class LegoAnimationManager : public MxCore {
MxLong m_unk0x408; // 0x408 MxLong m_unk0x408; // 0x408
MxLong m_unk0x40c; // 0x40c MxLong m_unk0x40c; // 0x40c
MxLong m_unk0x410; // 0x410 MxLong m_unk0x410; // 0x410
MxLong m_unk0x414; // 0x414 MxU32 m_unk0x414; // 0x414
MxU32 m_numAllowedExtras; // 0x418 MxU32 m_numAllowedExtras; // 0x418
undefined4 m_unk0x41c; // 0x41c undefined4 m_unk0x41c; // 0x41c
AnimState* m_animState; // 0x420 AnimState* m_animState; // 0x420

View file

@ -1,31 +0,0 @@
#ifndef LEGOCAMERALOCATIONS_H
#define LEGOCAMERALOCATIONS_H
#include "decomp.h"
#include "mxtypes.h"
// SIZE 0x60
struct LegoCameraLocation {
// SIZE 0x18
struct Path {
const char* m_name; // 0x00
MxS32 m_src; // 0x04
float m_srcScale; // 0x08
MxS32 m_dest; // 0x0c
float m_destScale; // 0x10
undefined4 m_unk0x10; // 0x14
};
MxU32 m_index; // 0x00
const char* m_name; // 0x04
float m_position[3]; // 0x08
float m_direction[3]; // 0x14
float m_up[3]; // 0x20
Path m_pathA; // 0x2c
Path m_pathB; // 0x44
undefined4 m_unk0x5c; // 0x5c
};
extern LegoCameraLocation g_cameraLocations[70];
#endif // LEGOCAMERALOCATIONS_H

View file

@ -59,6 +59,7 @@ class LegoCharacterManager {
static MxBool Exists(const char* p_key); static MxBool Exists(const char* p_key);
void FUN_100832a0(); void FUN_100832a0();
MxBool FUN_10083b20(const char* p_name);
MxU32 GetRefCount(LegoROI* p_roi); MxU32 GetRefCount(LegoROI* p_roi);
void FUN_10083c30(const char* p_name); void FUN_10083c30(const char* p_name);
void FUN_10083db0(LegoROI* p_roi); void FUN_10083db0(LegoROI* p_roi);
@ -69,6 +70,7 @@ class LegoCharacterManager {
LegoCharacterInfo* GetInfo(LegoROI* p_roi); LegoCharacterInfo* GetInfo(LegoROI* p_roi);
MxBool SwitchHat(LegoROI* p_roi); MxBool SwitchHat(LegoROI* p_roi);
MxU32 FUN_10085140(LegoROI* p_roi, MxBool p_und); MxU32 FUN_10085140(LegoROI* p_roi, MxBool p_und);
MxU8 FUN_10085180(LegoROI* p_roi);
LegoROI* FUN_10085210(const char* p_name, const char* p_lodName, MxBool p_createEntity); LegoROI* FUN_10085210(const char* p_name, const char* p_lodName, MxBool p_createEntity);
LegoROI* FUN_10085a80(const char* p_name, const char* p_lodName, MxBool p_createEntity); LegoROI* FUN_10085a80(const char* p_name, const char* p_lodName, MxBool p_createEntity);

View file

@ -49,11 +49,13 @@ class LegoExtraActor : public virtual LegoAnimActor {
MxResult WaitForAnimation() override; // vtable+0x9c MxResult WaitForAnimation() override; // vtable+0x9c
void VTable0xa4(MxU8& p_und1, MxS32& p_und2) override; // vtable+0xa4 void VTable0xa4(MxU8& p_und1, MxS32& p_und2) override; // vtable+0xa4
void VTable0xc4() override; // vtable+0xc4 void VTable0xc4() override; // vtable+0xc4
virtual MxResult VTable0xc8(); // vtable+0xc8
virtual MxResult FUN_1002aae0();
void Restart(); void Restart();
inline void FUN_1002ad8a(); inline void FUN_1002ad8a();
inline void SetUnknown0x0c(undefined p_unk0x0c) { m_unk0x0c = p_unk0x0c; }
// SYNTHETIC: LEGO1 0x1002b760 // SYNTHETIC: LEGO1 0x1002b760
// LegoExtraActor::`scalar deleting destructor' // LegoExtraActor::`scalar deleting destructor'

View file

@ -0,0 +1,31 @@
#ifndef LEGOLOCATIONS_H
#define LEGOLOCATIONS_H
#include "decomp.h"
#include "mxtypes.h"
// SIZE 0x60
struct LegoLocation {
// SIZE 0x18
struct Boundary {
const char* m_name; // 0x00
MxS32 m_src; // 0x04
float m_srcScale; // 0x08
MxS32 m_dest; // 0x0c
float m_destScale; // 0x10
MxBool m_unk0x10; // 0x14
};
MxU32 m_index; // 0x00
const char* m_name; // 0x04
float m_position[3]; // 0x08
float m_direction[3]; // 0x14
float m_up[3]; // 0x20
Boundary m_boundaryA; // 0x2c
Boundary m_boundaryB; // 0x44
undefined4 m_unk0x5c; // 0x5c
};
extern LegoLocation g_locations[70];
#endif // LEGOLOCATIONS_H

View file

@ -5,7 +5,7 @@
#include "mxcore.h" #include "mxcore.h"
#include "mxtypes.h" #include "mxtypes.h"
struct LegoCameraLocation; struct LegoLocation;
class Vector3; class Vector3;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -72,9 +72,9 @@ class LegoNavController : public MxCore {
float p_rs, float p_rs,
MxBool p_urs MxBool p_urs
); );
static MxResult UpdateCameraLocation(MxU32 p_location); static MxResult UpdateLocation(MxU32 p_location);
static MxResult UpdateCameraLocation(const char* p_location); static MxResult UpdateLocation(const char* p_location);
static LegoCameraLocation* GetCameraLocation(MxU32 p_location); static LegoLocation* GetLocation(MxU32 p_location);
inline void SetLinearVel(MxFloat p_linearVel) { m_linearVel = p_linearVel; } inline void SetLinearVel(MxFloat p_linearVel) { m_linearVel = p_linearVel; }
inline MxFloat GetLinearVel() { return m_linearVel; } inline MxFloat GetLinearVel() { return m_linearVel; }

View file

@ -46,7 +46,7 @@ class LegoPathController : public MxCore {
MxResult FUN_10045c20( MxResult FUN_10045c20(
LegoPathActor* p_actor, LegoPathActor* p_actor,
const char* p_path, const char* p_name,
MxS32 p_src, MxS32 p_src,
float p_srcScale, float p_srcScale,
MxS32 p_dest, MxS32 p_dest,

View file

@ -65,9 +65,9 @@ class LegoWorld : public LegoEntity {
MxBool PresentersPending(); MxBool PresentersPending();
void Remove(MxCore* p_object); void Remove(MxCore* p_object);
MxResult FUN_1001f720( MxResult PlaceActor(
IslePathActor* p_actor, LegoPathActor* p_actor,
const char* p_path, const char* p_name,
MxS32 p_src, MxS32 p_src,
float p_srcScale, float p_srcScale,
MxS32 p_dest, MxS32 p_dest,

View file

@ -482,7 +482,7 @@ void IslePathActor::SpawnPlayer(LegoGameState::Area p_area, MxBool p_und, MxU8 p
VTable0xe0(); VTable0xe0();
} }
m_world->FUN_1001f720( m_world->PlaceActor(
this, this,
g_spawnLocations[i].m_path, g_spawnLocations[i].m_path,
g_spawnLocations[i].m_src, g_spawnLocations[i].m_src,

View file

@ -11,6 +11,7 @@
#include "legoextraactor.h" #include "legoextraactor.h"
#include "legogamestate.h" #include "legogamestate.h"
#include "legomain.h" #include "legomain.h"
#include "legonavcontroller.h"
#include "legoroilist.h" #include "legoroilist.h"
#include "legovideomanager.h" #include "legovideomanager.h"
#include "legoworld.h" #include "legoworld.h"
@ -112,6 +113,9 @@ MxS32 g_legoAnimationManagerConfig = 1;
// GLOBAL: LEGO1 0x100f7500 // GLOBAL: LEGO1 0x100f7500
float g_unk0x100f7500 = 0.1f; float g_unk0x100f7500 = 0.1f;
// GLOBAL: LEGO1 0x100f7504
MxS32 g_unk0x100f7504 = 0;
// FUNCTION: LEGO1 0x1005eb50 // FUNCTION: LEGO1 0x1005eb50
void LegoAnimationManager::configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig) void LegoAnimationManager::configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig)
{ {
@ -213,7 +217,7 @@ void LegoAnimationManager::Suspend()
} }
if (m_scriptIndex == 0) { if (m_scriptIndex == 0) {
m_animState->FUN_10065240(m_animCount, m_anims, m_unk0x3fc); m_animState->FUN_10065240(m_animCount, m_anims, m_lastExtraCharacterId);
} }
if (!m_suspended) { if (!m_suspended) {
@ -316,7 +320,7 @@ void LegoAnimationManager::Init()
m_unk0x38 = FALSE; m_unk0x38 = FALSE;
m_unk0x39 = FALSE; m_unk0x39 = FALSE;
m_unk0x3a = TRUE; m_unk0x3a = TRUE;
m_unk0x3fc = 0; m_lastExtraCharacterId = 0;
m_unk0x400 = FALSE; m_unk0x400 = FALSE;
m_unk0x414 = 0; m_unk0x414 = 0;
m_numAllowedExtras = 5; m_numAllowedExtras = 5;
@ -335,7 +339,7 @@ void LegoAnimationManager::Init()
} }
for (i = 0; i < (MxS32) _countof(g_vehicles); i++) { for (i = 0; i < (MxS32) _countof(g_vehicles); i++) {
g_vehicles[i].m_unk0x04 = 0; g_vehicles[i].m_unk0x04 = FALSE;
g_vehicles[i].m_unk0x05 = FALSE; g_vehicles[i].m_unk0x05 = FALSE;
} }
@ -412,7 +416,7 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex)
} }
if (m_scriptIndex == 0) { if (m_scriptIndex == 0) {
m_animState->FUN_10065240(m_animCount, m_anims, m_unk0x3fc); m_animState->FUN_10065240(m_animCount, m_anims, m_lastExtraCharacterId);
} }
DeleteAnimations(); DeleteAnimations();
@ -524,7 +528,7 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex)
} }
if (p_scriptIndex == 0) { if (p_scriptIndex == 0) {
m_animState->FUN_100651d0(m_animCount, m_anims, m_unk0x3fc); m_animState->FUN_100651d0(m_animCount, m_anims, m_lastExtraCharacterId);
} }
} }
@ -1586,11 +1590,188 @@ void LegoAnimationManager::PurgeExtra(MxBool p_und)
} }
} }
// STUB: LEGO1 0x100629b0 // FUNCTION: LEGO1 0x100629b0
// FUNCTION: BETA10 0x10043c10 // FUNCTION: BETA10 0x10043c10
void LegoAnimationManager::AddExtra(MxU32 p_cameraLocation, MxBool p_und) void LegoAnimationManager::AddExtra(MxS32 p_location, MxBool p_und)
{ {
// TODO LegoLocation::Boundary* boundary = NULL;
if (p_und || (!m_unk0x39 && m_unk0x400)) {
LegoWorld* world = CurrentWorld();
if (world != NULL) {
PurgeExtra(FALSE);
IslePathActor* actor = CurrentActor();
if (actor == NULL || actor->GetWorldSpeed() <= 20.0f) {
MxU32 i;
for (i = 0; i < m_numAllowedExtras && m_extras[i].m_roi != NULL; i++) {
}
if (i != m_numAllowedExtras) {
MxU8 und = rand() % 2 != 0 ? 1 : 2;
MxBool bool1, bool2;
switch (g_unk0x100f7504 % 4) {
case 0:
bool1 = FALSE;
bool2 = FALSE;
break;
case 1:
bool1 = FALSE;
bool2 = TRUE;
break;
default:
bool1 = TRUE;
bool2 = FALSE;
break;
}
if (p_location < 0) {
boundary = new LegoLocation::Boundary;
if (!FUN_10064120(boundary, und == 2, bool2)) {
delete boundary;
boundary = NULL;
}
}
else {
LegoLocation* location = LegoNavController::GetLocation(p_location);
if (location != NULL) {
if (location->m_boundaryA.m_unk0x10 || FUN_10063fb0(&location->m_boundaryA, world)) {
boundary = &location->m_boundaryA;
}
else if (location->m_boundaryB.m_unk0x10 || FUN_10063fb0(&location->m_boundaryB, world)) {
boundary = &location->m_boundaryB;
}
}
bool1 = FALSE;
}
if (boundary != NULL) {
for (i = 0; i < m_numAllowedExtras; i++) {
if (m_extras[i].m_roi == NULL) {
m_lastExtraCharacterId++;
if (m_lastExtraCharacterId >= _countof(g_characters)) {
m_lastExtraCharacterId = 0;
}
MxU32 characterIdStart = m_lastExtraCharacterId;
MxBool active;
if (bool1) {
active = TRUE;
}
else {
active = rand() % 100 < 50;
}
nextCharacter:
if (g_characters[m_lastExtraCharacterId].m_unk0x09 &&
g_characters[m_lastExtraCharacterId].m_unk0x08 &&
!g_characters[m_lastExtraCharacterId].m_unk0x04 &&
g_characters[m_lastExtraCharacterId].m_active == active) {
if (!CharacterManager()->FUN_10083b20(g_characters[m_lastExtraCharacterId].m_name
)) {
m_extras[i].m_roi = CharacterManager()->GetROI(
g_characters[m_lastExtraCharacterId].m_name,
TRUE
);
LegoExtraActor* actor =
CharacterManager()->GetActor(g_characters[m_lastExtraCharacterId].m_name);
switch (g_unk0x100f7504++ % 4) {
case 0:
actor->SetUnknown0x0c(und != 1 ? 1 : 2);
break;
case 1: {
actor->SetUnknown0x0c(und);
MxS32 src = boundary->m_src;
boundary->m_src = boundary->m_dest;
boundary->m_dest = src;
break;
}
default:
actor->SetUnknown0x0c(und);
break;
}
if (world->PlaceActor(
actor,
boundary->m_name,
boundary->m_src,
boundary->m_srcScale,
boundary->m_dest,
boundary->m_destScale
) == SUCCESS) {
MxS32 vehicleId = g_characters[m_lastExtraCharacterId].m_vehicleId;
if (vehicleId >= 0) {
g_vehicles[vehicleId].m_unk0x04 =
rand() % 100 < g_characters[m_lastExtraCharacterId].m_unk0x15;
}
if (FUN_10063b90(
world,
actor,
CharacterManager()->FUN_10085180(m_extras[i].m_roi),
m_lastExtraCharacterId
)) {
m_extras[i].m_unk0x14 = TRUE;
g_vehicles[vehicleId].m_unk0x05 = TRUE;
}
else {
m_extras[i].m_unk0x14 = FALSE;
}
float speed;
if (m_extras[i].m_unk0x14) {
speed = ((float) (rand() * 1.5) / 32767.0f) + 0.9;
}
else {
speed = ((float) (rand() * 1.4) / 32767.0f) + 0.6;
}
actor->SetWorldSpeed(speed);
m_extras[i].m_characterId = m_lastExtraCharacterId;
g_characters[m_lastExtraCharacterId].m_unk0x04 = TRUE;
m_extras[i].m_unk0x08 = Timer()->GetTime();
m_extras[i].m_unk0x10 = -1;
m_extras[i].m_unk0x0d = FALSE;
m_unk0x414++;
return;
}
else {
CharacterManager()->FUN_10083db0(m_extras[i].m_roi);
m_extras[i].m_roi = NULL;
continue;
}
}
}
m_lastExtraCharacterId++;
if (m_lastExtraCharacterId >= _countof(g_characters)) {
m_lastExtraCharacterId = 0;
}
if (m_lastExtraCharacterId == characterIdStart) {
return;
}
goto nextCharacter;
}
}
}
}
}
}
}
} }
// STUB: LEGO1 0x10063270 // STUB: LEGO1 0x10063270
@ -1628,6 +1809,19 @@ void LegoAnimationManager::FUN_10063aa0()
} }
} }
// STUB: LEGO1 0x10063b90
// FUNCTION: BETA10 0x10044d46
MxBool LegoAnimationManager::FUN_10063b90(
LegoWorld* p_world,
LegoExtraActor* p_actor,
MxU8 p_unk0x14,
MxU32 p_characterId
)
{
// TODO
return TRUE;
}
// STUB: LEGO1 0x10063d10 // STUB: LEGO1 0x10063d10
// FUNCTION: BETA10 0x10045034 // FUNCTION: BETA10 0x10045034
void LegoAnimationManager::FUN_10063d10() void LegoAnimationManager::FUN_10063d10()
@ -1635,6 +1829,22 @@ void LegoAnimationManager::FUN_10063d10()
// TODO // TODO
} }
// STUB: LEGO1 0x10063fb0
// FUNCTION: BETA10 0x100452a7
MxBool LegoAnimationManager::FUN_10063fb0(LegoLocation::Boundary* p_boundary, LegoWorld* p_world)
{
// TODO
return TRUE;
}
// STUB: LEGO1 0x10064120
// FUNCTION: BETA10 0x100454f5
MxBool LegoAnimationManager::FUN_10064120(LegoLocation::Boundary* p_boundary, MxBool, MxBool)
{
// TODO
return TRUE;
}
// STUB: LEGO1 0x10064670 // STUB: LEGO1 0x10064670
void LegoAnimationManager::FUN_10064670(Vector3*) void LegoAnimationManager::FUN_10064670(Vector3*)
{ {

View file

@ -245,6 +245,14 @@ LegoROI* LegoCharacterManager::GetROI(const char* p_key, MxBool p_createEntity)
return NULL; return NULL;
} }
// STUB: LEGO1 0x10083b20
// FUNCTION: BETA10 0x10074608
MxBool LegoCharacterManager::FUN_10083b20(const char* p_name)
{
// TODO
return FALSE;
}
// FUNCTION: LEGO1 0x10083bc0 // FUNCTION: LEGO1 0x10083bc0
MxU32 LegoCharacterManager::GetRefCount(LegoROI* p_roi) MxU32 LegoCharacterManager::GetRefCount(LegoROI* p_roi)
{ {
@ -736,6 +744,14 @@ MxU32 LegoCharacterManager::FUN_10085140(LegoROI* p_roi, MxBool p_und)
return 0; return 0;
} }
// STUB: LEGO1 0x10085180
// FUNCTION: BETA10 0x100768c5
MxU8 LegoCharacterManager::FUN_10085180(LegoROI* p_roi)
{
// TODO
return 0;
}
// FUNCTION: LEGO1 0x100851a0 // FUNCTION: LEGO1 0x100851a0
void LegoCharacterManager::SetCustomizeAnimFile(const char* p_value) void LegoCharacterManager::SetCustomizeAnimFile(const char* p_value)
{ {

View file

@ -889,7 +889,7 @@ void LegoGameState::SwitchArea(Area p_area)
LoadIsle(); LoadIsle();
VariableTable()->SetVariable("VISIBILITY", "Hide Gas"); VariableTable()->SetVariable("VISIBILITY", "Hide Gas");
CurrentActor()->ResetWorldTransform(FALSE); CurrentActor()->ResetWorldTransform(FALSE);
NavController()->UpdateCameraLocation(59); // LCAMZG1 in g_cameraLocations NavController()->UpdateLocation(59); // LCAMZG1 in g_cameraLocations
VideoManager()->Get3DManager()->SetFrustrum(90, 0.1f, 250.0f); VideoManager()->Get3DManager()->SetFrustrum(90, 0.1f, 250.0f);
InvokeAction(Extra::ActionType::e_start, *g_isleScript, IsleScript::c_GaraDoor, NULL); InvokeAction(Extra::ActionType::e_start, *g_isleScript, IsleScript::c_GaraDoor, NULL);
break; break;

View file

@ -105,7 +105,7 @@ void CameraLocationVariable::SetValue(const char* p_value)
strcpy(buffer, p_value); strcpy(buffer, p_value);
char* location = strtok(buffer, ","); char* location = strtok(buffer, ",");
NavController()->UpdateCameraLocation(location); NavController()->UpdateLocation(location);
location = strtok(NULL, ","); location = strtok(NULL, ",");
if (location) { if (location) {

View file

@ -1,11 +1,24 @@
#include "legocameralocations.h" #include "legolocations.h"
DECOMP_SIZE_ASSERT(LegoCameraLocation, 0x60) DECOMP_SIZE_ASSERT(LegoLocation, 0x60)
DECOMP_SIZE_ASSERT(LegoCameraLocation::Path, 0x18) DECOMP_SIZE_ASSERT(LegoLocation::Boundary, 0x18)
// GLOBAL: LEGO1 0x100f4c60 // GLOBAL: LEGO1 0x100f4c60
LegoCameraLocation g_cameraLocations[] = { LegoLocation g_locations[] = {
{0, "look at origin from z=-8", 0, 1.25, -8, 0, 0, 1, 0, 1, 0, {NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, 0}, 0}, {0,
"look at origin from z=-8",
0,
1.25,
-8,
0,
0,
1,
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
FALSE},
{1, {1,
"LCAMBA1", "LCAMBA1",
0.852546, 0.852546,
@ -17,8 +30,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG02_13", 2, 0.75, 0, 0.25, 1}, {"EDG02_13", 2, 0.75, 0, 0.25, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
10240}, 10240},
{2, {2,
"LCAMBA2", "LCAMBA2",
@ -31,8 +44,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG02_37", 2, 0.75, 0, 0.25, 1}, {"EDG02_37", 2, 0.75, 0, 0.25, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
5120}, 5120},
{3, {3,
"LCAMBA3", "LCAMBA3",
@ -45,8 +58,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG02_26", 0, 0.75, 2, 0.25, 1}, {"EDG02_26", 0, 0.75, 2, 0.25, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
5120}, 5120},
{4, {4,
"LCAMBA4", "LCAMBA4",
@ -59,8 +72,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG00_146", 0, 0.5, 2, 0.5, 1}, {"EDG00_146", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
7680}, 7680},
{5, {5,
"LCAMCA1", "LCAMCA1",
@ -73,8 +86,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"INT01", 2, 0.5, 6, 0.5, 1}, {"INT01", 2, 0.5, 6, 0.5, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{6, {6,
"LCAMCA2", "LCAMCA2",
@ -87,8 +100,8 @@ LegoCameraLocation g_cameraLocations[] = {
0.000446, 0.000446,
0.999999, 0.999999,
-0.001387, -0.001387,
{"EDG00_104", 0, 0.5, 2, 0.5, 1}, {"EDG00_104", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{7, {7,
"LCAMCA3", "LCAMCA3",
@ -101,8 +114,8 @@ LegoCameraLocation g_cameraLocations[] = {
-0.000173, -0.000173,
0.999998, 0.999998,
0.001888, 0.001888,
{"EDG02_58", 2, 0.25, 0, 0.75, 1}, {"EDG02_58", 2, 0.25, 0, 0.75, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{8, {8,
"LCAMGS1", "LCAMGS1",
@ -115,8 +128,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG02_40", 2, 0.25, 0, 0.25, 1}, {"EDG02_40", 2, 0.25, 0, 0.25, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
17920}, 17920},
{9, {9,
"LCAMGS2", "LCAMGS2",
@ -129,8 +142,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"INT19", 1, 0.75, 0, 0.75, 1}, {"INT19", 1, 0.75, 0, 0.75, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{10, {10,
"LCAMGS3", "LCAMGS3",
@ -143,8 +156,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG00_74", 0, 0.5, 2, 0.5, 1}, {"EDG00_74", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{11, {11,
"LCAMHO1", "LCAMHO1",
@ -157,8 +170,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
12800}, 12800},
{12, {12,
"LCAMHO2", "LCAMHO2",
@ -171,8 +184,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{13, {13,
"LCAMHO3", "LCAMHO3",
@ -185,8 +198,8 @@ LegoCameraLocation g_cameraLocations[] = {
0.005781, 0.005781,
0.999976, 0.999976,
0.003708, 0.003708,
{"EDG02_27", 1, 0.89, 2, 0.89, 0}, {"EDG02_27", 1, 0.89, 2, 0.89, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{14, {14,
"LCAMHO4", "LCAMHO4",
@ -199,8 +212,8 @@ LegoCameraLocation g_cameraLocations[] = {
-0.034088, -0.034088,
0.999355, 0.999355,
-0.011255, -0.011255,
{"EDG02_27", 1, 0.89, 2, 0.89, 0}, {"EDG02_27", 1, 0.89, 2, 0.89, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
25600}, 25600},
{15, {15,
"LCAMIC1", "LCAMIC1",
@ -213,8 +226,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG00_69", 2, 0.5, 0, 0.5, 0}, {"EDG00_69", 2, 0.5, 0, 0.5, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{16, {16,
"LCAMIC2", "LCAMIC2",
@ -227,8 +240,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG02_66", 2, 0.5, 0, 0.5, 0}, {"EDG02_66", 2, 0.5, 0, 0.5, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{17, {17,
"LCAMIC3", "LCAMIC3",
@ -241,8 +254,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG02_68", 0, 0.5, 2, 0.5, 1}, {"EDG02_68", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
5120}, 5120},
{18, {18,
"LCAMJA1", "LCAMJA1",
@ -255,8 +268,8 @@ LegoCameraLocation g_cameraLocations[] = {
-0.006372, -0.006372,
0.999977, 0.999977,
-0.002478, -0.002478,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
25600}, 25600},
{19, {19,
"LCAMJA2", "LCAMJA2",
@ -269,8 +282,8 @@ LegoCameraLocation g_cameraLocations[] = {
-0.010811, -0.010811,
0.999927, 0.999927,
0.005453, 0.005453,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{20, {20,
"LCAMJA3", "LCAMJA3",
@ -283,8 +296,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"INT33", 1, 0.9, 3, 0.9, 0}, {"INT33", 1, 0.9, 3, 0.9, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{21, {21,
"LCAMJA4", "LCAMJA4",
@ -297,8 +310,8 @@ LegoCameraLocation g_cameraLocations[] = {
-0.001442, -0.001442,
0.999945, 0.999945,
0.010407, 0.010407,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{22, {22,
"LCAMJA5", "LCAMJA5",
@ -311,8 +324,8 @@ LegoCameraLocation g_cameraLocations[] = {
-0.007107, -0.007107,
0.999949, 0.999949,
-0.007199, -0.007199,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{23, {23,
"LCAMJS1", "LCAMJS1",
@ -325,8 +338,8 @@ LegoCameraLocation g_cameraLocations[] = {
0.000653, 0.000653,
0.999999, 0.999999,
-0.000932, -0.000932,
{"INT26", 0, 0.5, 3, 0.5, 0}, {"INT26", 0, 0.5, 3, 0.5, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
25600}, 25600},
{24, {24,
"LCAMJS2", "LCAMJS2",
@ -339,8 +352,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
25600}, 25600},
{25, {25,
"LCAMJS3", "LCAMJS3",
@ -353,8 +366,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
25600}, 25600},
{26, {26,
"LCAMJS4", "LCAMJS4",
@ -367,8 +380,8 @@ LegoCameraLocation g_cameraLocations[] = {
-0.000261, -0.000261,
0.999999, 0.999999,
-0.001364, -0.001364,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{27, {27,
"LCAMMT1", "LCAMMT1",
@ -381,8 +394,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
12800}, 12800},
{28, {28,
"LCAMMT2", "LCAMMT2",
@ -395,8 +408,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{29, {29,
"LCAMPK1", "LCAMPK1",
@ -409,8 +422,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG00_83", 0, 0.9, 2, 0.9, 0}, {"EDG00_83", 0, 0.9, 2, 0.9, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
12800}, 12800},
{30, {30,
"LCAMPK2", "LCAMPK2",
@ -423,8 +436,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{31, {31,
"LCAMPK4", "LCAMPK4",
@ -437,8 +450,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
6400}, 6400},
{32, {32,
"LCAMPO1", "LCAMPO1",
@ -451,8 +464,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
5120}, 5120},
{33, {33,
"LCAMPO2", "LCAMPO2",
@ -465,8 +478,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG00_191", 0, 0.5, 2, 0.5, 1}, {"EDG00_191", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{34, {34,
"LCAMPS1", "LCAMPS1",
@ -479,8 +492,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG02_40", 0, 0.5, 2, 0.5, 0}, {"EDG02_40", 0, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
6400}, 6400},
{35, {35,
"LCAMPS2", "LCAMPS2",
@ -493,8 +506,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
6400}, 6400},
{36, {36,
"LCAMPS3", "LCAMPS3",
@ -507,8 +520,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG02_66", 1, 0.15, 2, 0.15, 0}, {"EDG02_66", 1, 0.15, 2, 0.15, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
6400}, 6400},
{37, {37,
"LCAMPS4", "LCAMPS4",
@ -521,8 +534,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG02_40", 0, 0.5, 2, 0.5, 0}, {"EDG02_40", 0, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{38, {38,
"LCAMPZ1", "LCAMPZ1",
@ -535,8 +548,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
20480}, 20480},
{39, {39,
"LCAMPZ2", "LCAMPZ2",
@ -549,8 +562,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
23040}, 23040},
{40, {40,
"LCAMPZ3", "LCAMPZ3",
@ -563,10 +576,23 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG00_24", 0, 0.9, 2, 0.9, 1}, {"EDG00_24", 0, 0.9, 2, 0.9, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
25600}, 25600},
{41, "LCAMPZ4", -20.492962, 1.25, -43.951485, 0, 0, 1, 0, 1, 0, {NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, 0}, 0}, {41,
"LCAMPZ4",
-20.492962,
1.25,
-43.951485,
0,
0,
1,
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
FALSE},
{42, {42,
"LCAMPZ5", "LCAMPZ5",
-11.0625, -11.0625,
@ -578,8 +604,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
12800}, 12800},
{43, {43,
"LCAMPZ6", "LCAMPZ6",
@ -592,8 +618,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{44, {44,
"LCAMPZ7", "LCAMPZ7",
@ -606,8 +632,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{45, {45,
"LCAMRA1", "LCAMRA1",
@ -620,8 +646,8 @@ LegoCameraLocation g_cameraLocations[] = {
-0.007751, -0.007751,
0.998685, 0.998685,
-0.050677, -0.050677,
{"EDG00_03", 1, 0.5, 3, 0.5, 1}, {"EDG00_03", 1, 0.5, 3, 0.5, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{46, {46,
"LCAMRA2", "LCAMRA2",
@ -634,8 +660,8 @@ LegoCameraLocation g_cameraLocations[] = {
-0.000078, -0.000078,
1, 1,
0.000105, 0.000105,
{"EDG01_17", 0, 0.5, 3, 0.5, 1}, {"EDG01_17", 0, 0.5, 3, 0.5, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
6400}, 6400},
{47, {47,
"LCAMRA3", "LCAMRA3",
@ -648,8 +674,8 @@ LegoCameraLocation g_cameraLocations[] = {
-0.000112, -0.000112,
1, 1,
0.000021, 0.000021,
{"EDG01_40", 2, 0.5, 0, 0.5, 1}, {"EDG01_40", 2, 0.5, 0, 0.5, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{48, {48,
"LCAMRA4", "LCAMRA4",
@ -662,8 +688,8 @@ LegoCameraLocation g_cameraLocations[] = {
0.035939, 0.035939,
0.999346, 0.999346,
-0.00388, -0.00388,
{"EDG01_27", 0, 0.5, 2, 0.5, 1}, {"EDG01_27", 0, 0.5, 2, 0.5, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
6400}, 6400},
{49, {49,
"LCAMRA5", "LCAMRA5",
@ -676,8 +702,8 @@ LegoCameraLocation g_cameraLocations[] = {
0.024875, 0.024875,
0.999675, 0.999675,
-0.005499, -0.005499,
{"EDG01_08", 2, 0.7, 0, 0.7, 1}, {"EDG01_08", 2, 0.7, 0, 0.7, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
6400}, 6400},
{50, {50,
"LCAMRA6", "LCAMRA6",
@ -690,8 +716,8 @@ LegoCameraLocation g_cameraLocations[] = {
0.000378, 0.000378,
1, 1,
0.000009, 0.000009,
{"EDG01_13", 1, 0.2, 0, 0.2, 1}, {"EDG01_13", 1, 0.2, 0, 0.2, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{51, {51,
"LCAMRT1", "LCAMRT1",
@ -704,8 +730,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG03_10", 0, 0.5, 2, 0.5, 0}, {"EDG03_10", 0, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
20480}, 20480},
{52, {52,
"LCAMRT2", "LCAMRT2",
@ -718,8 +744,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG03_10", 0, 0.5, 2, 0.5, 0}, {"EDG03_10", 0, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
25600}, 25600},
{53, {53,
"LCAMRT3", "LCAMRT3",
@ -732,10 +758,23 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
25600}, 25600},
{54, "LCAMRT4", 0.4375, 1.25, 7, -0.748454, 0, -0.663187, 0, 1, 0, {NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, 0}, 0}, {54,
"LCAMRT4",
0.4375,
1.25,
7,
-0.748454,
0,
-0.663187,
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
FALSE},
{55, {55,
"LCAMRT5", "LCAMRT5",
-27.213715, -27.213715,
@ -747,8 +786,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG03_05", 1, 0.5, 2, 0.5, 0}, {"EDG03_05", 1, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{56, {56,
"LCAMRT6", "LCAMRT6",
@ -761,8 +800,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"EDG03_10", 0, 0.5, 2, 0.5, 0}, {"EDG03_10", 0, 0.5, 2, 0.5, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
15360}, 15360},
{57, {57,
"LCAMST1", "LCAMST1",
@ -775,8 +814,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
5120}, 5120},
{58, {58,
"LCAMST2", "LCAMST2",
@ -789,8 +828,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{59, {59,
"LCAMZG1", "LCAMZG1",
@ -803,11 +842,37 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{"INT22", 0, 0.4, 2, 0.4, 1}, {"INT22", 0, 0.4, 2, 0.4, TRUE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{60, "LCAMZI1", 93.37283, 10.1875, -10.382307, 0, 0, 1, 0, 1, 0, {NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, 0}, 0}, {60,
{61, "LCAMZI2", 93.37283, 19.4375, -10.382307, 0, 0, 1, 0, 1, 0, {NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, 0}, 0}, "LCAMZI1",
93.37283,
10.1875,
-10.382307,
0,
0,
1,
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
FALSE},
{61,
"LCAMZI2",
93.37283,
19.4375,
-10.382307,
0,
0,
1,
0,
1,
0,
{NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, FALSE},
FALSE},
{62, {62,
"LCAMZIE", "LCAMZIE",
93.375, 93.375,
@ -819,8 +884,8 @@ LegoCameraLocation g_cameraLocations[] = {
0.254493, 0.254493,
0.967075, 0.967075,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{63, {63,
"LCAMZIN", "LCAMZIN",
@ -833,8 +898,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
0.967203, 0.967203,
0.254006, 0.254006,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{64, {64,
"LCAMZIS", "LCAMZIS",
@ -847,8 +912,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
0.966946, 0.966946,
-0.254982, -0.254982,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{65, {65,
"LCAMZIW", "LCAMZIW",
@ -861,8 +926,8 @@ LegoCameraLocation g_cameraLocations[] = {
-0.254493, -0.254493,
0.967075, 0.967075,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{66, {66,
"LCAMZP1", "LCAMZP1",
@ -875,8 +940,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{67, {67,
"LCAMRT7", "LCAMRT7",
@ -889,8 +954,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
0}, 0},
{68, {68,
"LCAMJS5", "LCAMJS5",
@ -903,8 +968,8 @@ LegoCameraLocation g_cameraLocations[] = {
0, 0,
1, 1,
0, 0,
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
{NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, FALSE},
25600}, 25600},
{69, "overhead", 0, 135, 0, 0, -1, 0, 0, 0, 1, {NULL, 0, 0, 0, 0, 0}, {NULL, 0, 0, 0, 0, 0}, 0} {69, "overhead", 0, 135, 0, 0, -1, 0, 0, 0, 1, {NULL, 0, 0, 0, 0, FALSE}, {NULL, 0, 0, 0, 0, FALSE}, 0}
}; };

View file

@ -4,9 +4,9 @@
#include "infocenterstate.h" #include "infocenterstate.h"
#include "legoanimationmanager.h" #include "legoanimationmanager.h"
#include "legocameracontroller.h" #include "legocameracontroller.h"
#include "legocameralocations.h"
#include "legogamestate.h" #include "legogamestate.h"
#include "legoinputmanager.h" #include "legoinputmanager.h"
#include "legolocations.h"
#include "legomain.h" #include "legomain.h"
#include "legosoundmanager.h" #include "legosoundmanager.h"
#include "legoutils.h" #include "legoutils.h"
@ -403,21 +403,16 @@ MxBool LegoNavController::CalculateNewPosDir(
} }
// FUNCTION: LEGO1 0x10055500 // FUNCTION: LEGO1 0x10055500
MxResult LegoNavController::UpdateCameraLocation(const char* p_location) MxResult LegoNavController::UpdateLocation(const char* p_location)
{ {
MxResult result = FAILURE; MxResult result = FAILURE;
for (MxS32 i = 0; i < (MxS32) _countof(g_cameraLocations); i++) { for (MxS32 i = 0; i < (MxS32) _countof(g_locations); i++) {
if (!strcmpi(p_location, g_cameraLocations[i].m_name)) { if (!strcmpi(p_location, g_locations[i].m_name)) {
MxMatrix mat; MxMatrix mat;
LegoROI* viewROI = VideoManager()->GetViewROI(); LegoROI* viewROI = VideoManager()->GetViewROI();
CalcLocalTransform( CalcLocalTransform(g_locations[i].m_position, g_locations[i].m_direction, g_locations[i].m_up, mat);
g_cameraLocations[i].m_position,
g_cameraLocations[i].m_direction,
g_cameraLocations[i].m_up,
mat
);
Mx3DPointFloat vec; Mx3DPointFloat vec;
vec.Clear(); vec.Clear();
@ -441,18 +436,18 @@ MxResult LegoNavController::UpdateCameraLocation(const char* p_location)
} }
// FUNCTION: LEGO1 0x10055620 // FUNCTION: LEGO1 0x10055620
MxResult LegoNavController::UpdateCameraLocation(MxU32 p_location) MxResult LegoNavController::UpdateLocation(MxU32 p_location)
{ {
MxResult result = FAILURE; MxResult result = FAILURE;
if (p_location < _countof(g_cameraLocations)) { if (p_location < _countof(g_locations)) {
MxMatrix mat; MxMatrix mat;
LegoROI* viewROI = VideoManager()->GetViewROI(); LegoROI* viewROI = VideoManager()->GetViewROI();
CalcLocalTransform( CalcLocalTransform(
g_cameraLocations[p_location].m_position, g_locations[p_location].m_position,
g_cameraLocations[p_location].m_direction, g_locations[p_location].m_direction,
g_cameraLocations[p_location].m_up, g_locations[p_location].m_up,
mat mat
); );
@ -478,10 +473,10 @@ MxResult LegoNavController::UpdateCameraLocation(MxU32 p_location)
// FUNCTION: LEGO1 0x10055720 // FUNCTION: LEGO1 0x10055720
// FUNCTION: BETA10 0x1009c259 // FUNCTION: BETA10 0x1009c259
LegoCameraLocation* LegoNavController::GetCameraLocation(MxU32 p_location) LegoLocation* LegoNavController::GetLocation(MxU32 p_location)
{ {
if (p_location < _countof(g_cameraLocations)) { if (p_location < _countof(g_locations)) {
return &g_cameraLocations[p_location]; return &g_locations[p_location];
} }
return NULL; return NULL;

View file

@ -274,9 +274,9 @@ LegoCameraController* LegoWorld::VTable0x54()
// FUNCTION: LEGO1 0x1001f720 // FUNCTION: LEGO1 0x1001f720
// FUNCTION: BETA10 0x100da24b // FUNCTION: BETA10 0x100da24b
MxResult LegoWorld::FUN_1001f720( MxResult LegoWorld::PlaceActor(
IslePathActor* p_actor, LegoPathActor* p_actor,
const char* p_path, const char* p_name,
MxS32 p_src, MxS32 p_src,
float p_srcScale, float p_srcScale,
MxS32 p_dest, MxS32 p_dest,
@ -287,7 +287,7 @@ MxResult LegoWorld::FUN_1001f720(
LegoPathController* controller; LegoPathController* controller;
while (cursor.Next(controller)) { while (cursor.Next(controller)) {
if (controller->FUN_10045c20(p_actor, p_path, p_src, p_srcScale, p_dest, p_destScale) == SUCCESS) { if (controller->FUN_10045c20(p_actor, p_name, p_src, p_srcScale, p_dest, p_destScale) == SUCCESS) {
return SUCCESS; return SUCCESS;
} }
} }

View file

@ -128,7 +128,7 @@ void LegoExtraActor::VTable0xa4(MxU8& p_und1, MxS32& p_und2)
} }
// FUNCTION: LEGO1 0x1002aae0 // FUNCTION: LEGO1 0x1002aae0
MxResult LegoExtraActor::FUN_1002aae0() MxResult LegoExtraActor::VTable0xc8()
{ {
LegoPathBoundary* oldEdge = m_boundary; LegoPathBoundary* oldEdge = m_boundary;
Vector3 rightRef(m_unk0xec[0]); Vector3 rightRef(m_unk0xec[0]);
@ -203,7 +203,7 @@ MxResult LegoExtraActor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
} }
m_unk0x15 = 100; m_unk0x15 = 100;
FUN_1002aae0(); VTable0xc8();
} }
else { else {
MxU32 b = FALSE; MxU32 b = FALSE;

View file

@ -33,7 +33,7 @@ MxResult LegoPathController::Tickle()
// FUNCTION: BETA10 0x100b6d80 // FUNCTION: BETA10 0x100b6d80
MxResult LegoPathController::FUN_10045c20( MxResult LegoPathController::FUN_10045c20(
LegoPathActor* p_actor, LegoPathActor* p_actor,
const char* p_path, const char* p_name,
MxS32 p_src, MxS32 p_src,
float p_srcScale, float p_srcScale,
MxS32 p_dest, MxS32 p_dest,

View file

@ -487,15 +487,15 @@ void Isle::Enable(MxBool p_enable)
FUN_1003ef00(TRUE); FUN_1003ef00(TRUE);
if (m_act1state->m_unk0x018 == 0) { if (m_act1state->m_unk0x018 == 0) {
MxU32 cameraLocations[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; MxS32 locations[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
for (MxU32 i = 0; i < 5; i++) { for (MxU32 i = 0; i < 5; i++) {
MxS32 r = rand() % 5; MxS32 r = rand() % 5;
for (MxU32 j = 0; j < _countof(cameraLocations); j++) { for (MxU32 j = 0; j < _countof(locations); j++) {
if (cameraLocations[j] != 0 && r-- == 0) { if (locations[j] != 0 && r-- == 0) {
AnimationManager()->AddExtra(cameraLocations[j], TRUE); AnimationManager()->AddExtra(locations[j], TRUE);
cameraLocations[j] = 0; locations[j] = 0;
break; break;
} }
} }