mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 23:48:12 -05:00
Implement/match LegoPathActor::ParseAction (#946)
* Implement/match LegoPathActor::ParseAction * Fix naming * Space
This commit is contained in:
parent
6774784b37
commit
db90807d53
25 changed files with 137 additions and 75 deletions
|
@ -20,6 +20,10 @@ const char* g_strAUTO_CREATE = "AUTO_CREATE";
|
||||||
// STRING: LEGO1 0x10102000
|
// STRING: LEGO1 0x10102000
|
||||||
const char* g_strBOTTOM_TO_TOP = "BOTTOM_TO_TOP";
|
const char* g_strBOTTOM_TO_TOP = "BOTTOM_TO_TOP";
|
||||||
|
|
||||||
|
// GLOBAL: LEGO1 0x10102060
|
||||||
|
// STRING: LEGO1 0x10101ff4
|
||||||
|
const char* g_strCOLLIDEBOX = "COLLIDEBOX";
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x10102064
|
// GLOBAL: LEGO1 0x10102064
|
||||||
// STRING: LEGO1 0x10101fec
|
// STRING: LEGO1 0x10101fec
|
||||||
const char* g_strSTYLE = "STYLE";
|
const char* g_strSTYLE = "STYLE";
|
||||||
|
@ -68,6 +72,14 @@ const char* g_strMUST_SUCCEED = "MUST_SUCCEED";
|
||||||
// STRING: LEGO1 0x10101f58
|
// STRING: LEGO1 0x10101f58
|
||||||
const char* g_strOBJECT = "OBJECT";
|
const char* g_strOBJECT = "OBJECT";
|
||||||
|
|
||||||
|
// GLOBAL: LEGO1 0x101020a0
|
||||||
|
// STRING: LEGO1 0x10101f50
|
||||||
|
const char* g_strPATH = "PATH";
|
||||||
|
|
||||||
|
// GLOBAL: LEGO1 0x101020a4
|
||||||
|
// STRING: LEGO1 0x10101f40
|
||||||
|
const char* g_strPERMIT_NAVIGATE = "PERMIT_NAVIGATE";
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x101020a8
|
// GLOBAL: LEGO1 0x101020a8
|
||||||
// STRING: LEGO1 0x10101f38
|
// STRING: LEGO1 0x10101f38
|
||||||
const char* g_strPTATCAM = "PTATCAM";
|
const char* g_strPTATCAM = "PTATCAM";
|
||||||
|
|
|
@ -34,5 +34,8 @@ extern const char* g_strVARIABLE;
|
||||||
extern const char* g_strBMP_ISMAP;
|
extern const char* g_strBMP_ISMAP;
|
||||||
extern const char* g_strAUTO_CREATE;
|
extern const char* g_strAUTO_CREATE;
|
||||||
extern const char* g_strDB_CREATE;
|
extern const char* g_strDB_CREATE;
|
||||||
|
extern const char* g_strPERMIT_NAVIGATE;
|
||||||
|
extern const char* g_strPATH;
|
||||||
|
extern const char* g_strCOLLIDEBOX;
|
||||||
|
|
||||||
#endif // DEFINE_H
|
#endif // DEFINE_H
|
||||||
|
|
|
@ -59,7 +59,7 @@ class Isle : public LegoWorld {
|
||||||
|
|
||||||
MxBool VTable0x64() override; // vtable+64
|
MxBool VTable0x64() override; // vtable+64
|
||||||
void Enable(MxBool p_enable) override; // vtable+68
|
void Enable(MxBool p_enable) override; // vtable+68
|
||||||
virtual void VTable0x6c(IslePathActor* p_actor); // vtable+6c
|
virtual void VTable0x6c(LegoPathActor* p_actor); // vtable+6c
|
||||||
|
|
||||||
MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
|
MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
|
||||||
MxLong HandleClick(LegoControlManagerEvent& p_param);
|
MxLong HandleClick(LegoControlManagerEvent& p_param);
|
||||||
|
|
|
@ -137,7 +137,7 @@ class IslePathActor : public LegoPathActor {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
LegoWorld* m_world; // 0x154
|
LegoWorld* m_world; // 0x154
|
||||||
IslePathActor* m_unk0x158; // 0x158
|
LegoPathActor* m_unk0x158; // 0x158
|
||||||
MxFloat m_unk0x15c; // 0x15c
|
MxFloat m_unk0x15c; // 0x15c
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include "mxomni.h"
|
#include "mxomni.h"
|
||||||
|
|
||||||
class Isle;
|
class Isle;
|
||||||
class IslePathActor;
|
|
||||||
class LegoAnimationManager;
|
class LegoAnimationManager;
|
||||||
class LegoBuildingManager;
|
class LegoBuildingManager;
|
||||||
class LegoCharacterManager;
|
class LegoCharacterManager;
|
||||||
|
@ -14,6 +13,7 @@ class LegoEntity;
|
||||||
class LegoGameState;
|
class LegoGameState;
|
||||||
class LegoInputManager;
|
class LegoInputManager;
|
||||||
class LegoNavController;
|
class LegoNavController;
|
||||||
|
class LegoPathActor;
|
||||||
class LegoPathBoundary;
|
class LegoPathBoundary;
|
||||||
class LegoPlantManager;
|
class LegoPlantManager;
|
||||||
class LegoROI;
|
class LegoROI;
|
||||||
|
@ -127,7 +127,7 @@ class LegoOmni : public MxOmni {
|
||||||
ViewLODListManager* GetViewLODListManager() { return m_viewLODListManager; }
|
ViewLODListManager* GetViewLODListManager() { return m_viewLODListManager; }
|
||||||
LegoWorld* GetCurrentWorld() { return m_currentWorld; }
|
LegoWorld* GetCurrentWorld() { return m_currentWorld; }
|
||||||
LegoNavController* GetNavController() { return m_navController; }
|
LegoNavController* GetNavController() { return m_navController; }
|
||||||
IslePathActor* GetCurrentActor() { return m_currentActor; }
|
LegoPathActor* GetCurrentActor() { return m_currentActor; }
|
||||||
LegoPlantManager* GetLegoPlantManager() { return m_plantManager; }
|
LegoPlantManager* GetLegoPlantManager() { return m_plantManager; }
|
||||||
LegoAnimationManager* GetAnimationManager() { return m_animationManager; }
|
LegoAnimationManager* GetAnimationManager() { return m_animationManager; }
|
||||||
LegoBuildingManager* GetLegoBuildingManager() { return m_buildingManager; }
|
LegoBuildingManager* GetLegoBuildingManager() { return m_buildingManager; }
|
||||||
|
@ -139,7 +139,7 @@ class LegoOmni : public MxOmni {
|
||||||
LegoWorldList* GetWorldList() { return m_worldList; }
|
LegoWorldList* GetWorldList() { return m_worldList; }
|
||||||
|
|
||||||
inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; }
|
inline void SetNavController(LegoNavController* p_navController) { m_navController = p_navController; }
|
||||||
inline void SetCurrentActor(IslePathActor* p_currentActor) { m_currentActor = p_currentActor; }
|
inline void SetCurrentActor(LegoPathActor* p_currentActor) { m_currentActor = p_currentActor; }
|
||||||
inline void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
inline void SetCurrentWorld(LegoWorld* p_currentWorld) { m_currentWorld = p_currentWorld; }
|
||||||
inline void SetExit(MxBool p_exit) { m_exit = p_exit; }
|
inline void SetExit(MxBool p_exit) { m_exit = p_exit; }
|
||||||
inline MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction)
|
inline MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction)
|
||||||
|
@ -162,7 +162,7 @@ class LegoOmni : public MxOmni {
|
||||||
LegoWorld* m_currentWorld; // 0x7c
|
LegoWorld* m_currentWorld; // 0x7c
|
||||||
MxBool m_exit; // 0x80
|
MxBool m_exit; // 0x80
|
||||||
LegoNavController* m_navController; // 0x84
|
LegoNavController* m_navController; // 0x84
|
||||||
IslePathActor* m_currentActor; // 0x88
|
LegoPathActor* m_currentActor; // 0x88
|
||||||
LegoCharacterManager* m_characterManager; // 0x8c
|
LegoCharacterManager* m_characterManager; // 0x8c
|
||||||
LegoPlantManager* m_plantManager; // 0x90
|
LegoPlantManager* m_plantManager; // 0x90
|
||||||
LegoAnimationManager* m_animationManager; // 0x94
|
LegoAnimationManager* m_animationManager; // 0x94
|
||||||
|
|
|
@ -155,7 +155,7 @@ class LegoPathActor : public LegoActor {
|
||||||
MxU32 m_state; // 0xdc
|
MxU32 m_state; // 0xdc
|
||||||
LegoUnknown100db7f4* m_destEdge; // 0xe0
|
LegoUnknown100db7f4* m_destEdge; // 0xe0
|
||||||
MxFloat m_unk0xe4; // 0xe4
|
MxFloat m_unk0xe4; // 0xe4
|
||||||
undefined m_unk0xe8; // 0xe8
|
MxBool m_collideBox; // 0xe8
|
||||||
undefined m_unk0xe9; // 0xe9
|
undefined m_unk0xe9; // 0xe9
|
||||||
MxBool m_userNavFlag; // 0xea
|
MxBool m_userNavFlag; // 0xea
|
||||||
MxMatrix m_unk0xec; // 0xec
|
MxMatrix m_unk0xec; // 0xec
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "mxpresenterlist.h"
|
#include "mxpresenterlist.h"
|
||||||
#include "roi/legoroi.h"
|
#include "roi/legoroi.h"
|
||||||
|
|
||||||
class IslePathActor;
|
|
||||||
class LegoCameraController;
|
class LegoCameraController;
|
||||||
class LegoPathBoundary;
|
class LegoPathBoundary;
|
||||||
class LegoHideAnimPresenter;
|
class LegoHideAnimPresenter;
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include "lego/legoomni/include/actions/actionsfwd.h"
|
#include "lego/legoomni/include/actions/actionsfwd.h"
|
||||||
#include "mxtypes.h"
|
#include "mxtypes.h"
|
||||||
|
|
||||||
class IslePathActor;
|
|
||||||
class LegoAnimationManager;
|
class LegoAnimationManager;
|
||||||
class LegoBuildingManager;
|
class LegoBuildingManager;
|
||||||
class LegoCharacterManager;
|
class LegoCharacterManager;
|
||||||
|
@ -16,6 +15,7 @@ class LegoGameState;
|
||||||
class LegoInputManager;
|
class LegoInputManager;
|
||||||
class LegoNavController;
|
class LegoNavController;
|
||||||
class LegoOmni;
|
class LegoOmni;
|
||||||
|
class LegoPathActor;
|
||||||
class LegoPlantManager;
|
class LegoPlantManager;
|
||||||
class LegoROI;
|
class LegoROI;
|
||||||
class LegoSoundManager;
|
class LegoSoundManager;
|
||||||
|
@ -40,7 +40,7 @@ LegoControlManager* ControlManager();
|
||||||
LegoGameState* GameState();
|
LegoGameState* GameState();
|
||||||
LegoAnimationManager* AnimationManager();
|
LegoAnimationManager* AnimationManager();
|
||||||
LegoNavController* NavController();
|
LegoNavController* NavController();
|
||||||
IslePathActor* CurrentActor();
|
LegoPathActor* CurrentActor();
|
||||||
LegoWorld* CurrentWorld();
|
LegoWorld* CurrentWorld();
|
||||||
LegoCharacterManager* CharacterManager();
|
LegoCharacterManager* CharacterManager();
|
||||||
ViewManager* GetViewManager();
|
ViewManager* GetViewManager();
|
||||||
|
@ -51,7 +51,7 @@ ViewLODListManager* GetViewLODListManager();
|
||||||
void FUN_10015820(MxBool p_disable, MxU16 p_flags);
|
void FUN_10015820(MxBool p_disable, MxU16 p_flags);
|
||||||
LegoROI* FindROI(const char* p_name);
|
LegoROI* FindROI(const char* p_name);
|
||||||
void SetROIVisible(const char* p_name, MxBool p_visible);
|
void SetROIVisible(const char* p_name, MxBool p_visible);
|
||||||
void SetCurrentActor(IslePathActor* p_currentActor);
|
void SetCurrentActor(LegoPathActor* p_currentActor);
|
||||||
MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction);
|
MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction);
|
||||||
void DeleteAction();
|
void DeleteAction();
|
||||||
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
||||||
|
|
|
@ -78,7 +78,8 @@ void Helicopter::VTable0xe4()
|
||||||
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
|
||||||
GameState()->SetCurrentArea(LegoGameState::e_copter);
|
GameState()->SetCurrentArea(LegoGameState::e_copter);
|
||||||
if (CurrentActor() && CurrentActor()->IsA("IslePathActor")) {
|
if (CurrentActor() && CurrentActor()->IsA("IslePathActor")) {
|
||||||
CurrentActor()->SpawnPlayer(
|
((IslePathActor*) CurrentActor())
|
||||||
|
->SpawnPlayer(
|
||||||
LegoGameState::e_unk55,
|
LegoGameState::e_unk55,
|
||||||
TRUE,
|
TRUE,
|
||||||
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
||||||
|
@ -116,7 +117,7 @@ MxU32 Helicopter::VTable0xcc()
|
||||||
|
|
||||||
if (CurrentActor()) {
|
if (CurrentActor()) {
|
||||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
CurrentActor()->VTable0xe4();
|
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ IslePathActor::IslePathActor()
|
||||||
m_world = NULL;
|
m_world = NULL;
|
||||||
m_unk0x13c = 6.0;
|
m_unk0x13c = 6.0;
|
||||||
m_unk0x15c = 1.0;
|
m_unk0x15c = 1.0;
|
||||||
m_unk0x158 = 0;
|
m_unk0x158 = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1001a280
|
// FUNCTION: LEGO1 0x1001a280
|
||||||
|
|
|
@ -38,7 +38,7 @@ MxLong JukeBoxEntity::Notify(MxParam& p_param)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
CurrentActor()->VTable0xe4();
|
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||||
}
|
}
|
||||||
|
|
||||||
((Isle*) FindWorld(*g_isleScript, 0))->SetDestLocation(LegoGameState::e_jukeboxw);
|
((Isle*) FindWorld(*g_isleScript, 0))->SetDestLocation(LegoGameState::e_jukeboxw);
|
||||||
|
|
|
@ -87,7 +87,7 @@ MxU32 SkateBoard::VTable0xcc()
|
||||||
|
|
||||||
if (GameState()->GetActorId() != CurrentActor()->GetActorId()) {
|
if (GameState()->GetActorId() != CurrentActor()->GetActorId()) {
|
||||||
if (!CurrentActor()->IsA("SkateBoard")) {
|
if (!CurrentActor()->IsA("SkateBoard")) {
|
||||||
CurrentActor()->VTable0xe4();
|
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -994,7 +994,7 @@ MxResult LegoAnimationManager::FUN_100605e0(
|
||||||
FUN_100648f0(tranInfo, m_unk0x404);
|
FUN_100648f0(tranInfo, m_unk0x404);
|
||||||
}
|
}
|
||||||
else if (p_unk0x0a) {
|
else if (p_unk0x0a) {
|
||||||
IslePathActor* actor = CurrentActor();
|
LegoPathActor* actor = CurrentActor();
|
||||||
|
|
||||||
if (actor != NULL) {
|
if (actor != NULL) {
|
||||||
actor->SetState(4);
|
actor->SetState(4);
|
||||||
|
@ -1432,7 +1432,7 @@ MxResult LegoAnimationManager::Tickle()
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
IslePathActor* actor = CurrentActor();
|
LegoPathActor* actor = CurrentActor();
|
||||||
LegoROI* roi;
|
LegoROI* roi;
|
||||||
|
|
||||||
if (actor == NULL || (roi = actor->GetROI()) == NULL) {
|
if (actor == NULL || (roi = actor->GetROI()) == NULL) {
|
||||||
|
@ -1655,7 +1655,7 @@ MxBool LegoAnimationManager::FUN_100623a0(AnimInfo& p_info)
|
||||||
|
|
||||||
LegoEntityListCursor cursor(entityList);
|
LegoEntityListCursor cursor(entityList);
|
||||||
LegoEntity* entity;
|
LegoEntity* entity;
|
||||||
IslePathActor* actor = CurrentActor();
|
LegoPathActor* actor = CurrentActor();
|
||||||
|
|
||||||
while (cursor.Next(entity)) {
|
while (cursor.Next(entity)) {
|
||||||
if (entity != actor && entity->IsA("LegoPathActor")) {
|
if (entity != actor && entity->IsA("LegoPathActor")) {
|
||||||
|
@ -1858,7 +1858,7 @@ void LegoAnimationManager::AddExtra(MxS32 p_location, MxBool p_und)
|
||||||
if (world != NULL) {
|
if (world != NULL) {
|
||||||
PurgeExtra(FALSE);
|
PurgeExtra(FALSE);
|
||||||
|
|
||||||
IslePathActor* actor = CurrentActor();
|
LegoPathActor* actor = CurrentActor();
|
||||||
if (actor == NULL || actor->GetWorldSpeed() <= 20.0f) {
|
if (actor == NULL || actor->GetWorldSpeed() <= 20.0f) {
|
||||||
MxU32 i;
|
MxU32 i;
|
||||||
for (i = 0; i < m_numAllowedExtras && m_extras[i].m_roi != NULL; i++) {
|
for (i = 0; i < m_numAllowedExtras && m_extras[i].m_roi != NULL; i++) {
|
||||||
|
@ -2163,7 +2163,7 @@ MxBool LegoAnimationManager::FUN_10064120(LegoLocation::Boundary* p_boundary, Mx
|
||||||
{
|
{
|
||||||
MxU32 local2c = 12;
|
MxU32 local2c = 12;
|
||||||
float destScale = ((rand() * 0.5) / 32767.0) + 0.25;
|
float destScale = ((rand() * 0.5) / 32767.0) + 0.25;
|
||||||
IslePathActor* actor = CurrentActor();
|
LegoPathActor* actor = CurrentActor();
|
||||||
|
|
||||||
if (actor == NULL) {
|
if (actor == NULL) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -425,7 +425,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6b0(MxLong p_time)
|
||||||
MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
|
MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
|
||||||
{
|
{
|
||||||
LegoROI* viewROI = VideoManager()->GetViewROI();
|
LegoROI* viewROI = VideoManager()->GetViewROI();
|
||||||
IslePathActor* actor = CurrentActor();
|
LegoPathActor* actor = CurrentActor();
|
||||||
|
|
||||||
if (m_tranInfo != NULL && m_tranInfo->m_unk0x14 && m_tranInfo->m_location != -1 && actor != NULL) {
|
if (m_tranInfo != NULL && m_tranInfo->m_unk0x14 && m_tranInfo->m_location != -1 && actor != NULL) {
|
||||||
if (m_unk0x64 != NULL) {
|
if (m_unk0x64 != NULL) {
|
||||||
|
|
|
@ -172,7 +172,7 @@ void LegoGameState::SetActor(MxU8 p_actorId)
|
||||||
m_actorId = p_actorId;
|
m_actorId = p_actorId;
|
||||||
}
|
}
|
||||||
|
|
||||||
IslePathActor* oldActor = CurrentActor();
|
LegoPathActor* oldActor = CurrentActor();
|
||||||
SetCurrentActor(NULL);
|
SetCurrentActor(NULL);
|
||||||
|
|
||||||
IslePathActor* newActor = new IslePathActor();
|
IslePathActor* newActor = new IslePathActor();
|
||||||
|
@ -199,7 +199,7 @@ void LegoGameState::SetActor(MxU8 p_actorId)
|
||||||
// FUNCTION: LEGO1 0x10039910
|
// FUNCTION: LEGO1 0x10039910
|
||||||
void LegoGameState::RemoveActor()
|
void LegoGameState::RemoveActor()
|
||||||
{
|
{
|
||||||
IslePathActor* actor = CurrentActor();
|
LegoPathActor* actor = CurrentActor();
|
||||||
SetCurrentActor(NULL);
|
SetCurrentActor(NULL);
|
||||||
delete actor;
|
delete actor;
|
||||||
m_actorId = 0;
|
m_actorId = 0;
|
||||||
|
@ -209,7 +209,7 @@ void LegoGameState::RemoveActor()
|
||||||
void LegoGameState::ResetROI()
|
void LegoGameState::ResetROI()
|
||||||
{
|
{
|
||||||
if (m_actorId) {
|
if (m_actorId) {
|
||||||
IslePathActor* actor = CurrentActor();
|
LegoPathActor* actor = CurrentActor();
|
||||||
|
|
||||||
if (actor) {
|
if (actor) {
|
||||||
LegoROI* roi = actor->GetROI();
|
LegoROI* roi = actor->GetROI();
|
||||||
|
@ -906,7 +906,8 @@ void LegoGameState::SwitchArea(Area p_area)
|
||||||
AnimationManager()->Resume();
|
AnimationManager()->Resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentActor()->SpawnPlayer(
|
((IslePathActor*) CurrentActor())
|
||||||
|
->SpawnPlayer(
|
||||||
p_area,
|
p_area,
|
||||||
TRUE,
|
TRUE,
|
||||||
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
||||||
|
@ -922,7 +923,8 @@ void LegoGameState::SwitchArea(Area p_area)
|
||||||
SetCameraControllerFromIsle();
|
SetCameraControllerFromIsle();
|
||||||
CurrentActor()->ResetWorldTransform(TRUE);
|
CurrentActor()->ResetWorldTransform(TRUE);
|
||||||
AnimationManager()->Resume();
|
AnimationManager()->Resume();
|
||||||
CurrentActor()->SpawnPlayer(
|
((IslePathActor*) CurrentActor())
|
||||||
|
->SpawnPlayer(
|
||||||
p_area,
|
p_area,
|
||||||
TRUE,
|
TRUE,
|
||||||
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
||||||
|
|
|
@ -67,7 +67,7 @@ LegoNavController* NavController()
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10015790
|
// FUNCTION: LEGO1 0x10015790
|
||||||
IslePathActor* CurrentActor()
|
LegoPathActor* CurrentActor()
|
||||||
{
|
{
|
||||||
return LegoOmni::GetInstance()->GetCurrentActor();
|
return LegoOmni::GetInstance()->GetCurrentActor();
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ void SetROIVisible(const char* p_name, MxBool p_visible)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10015880
|
// FUNCTION: LEGO1 0x10015880
|
||||||
void SetCurrentActor(IslePathActor* p_currentActor)
|
void SetCurrentActor(LegoPathActor* p_currentActor)
|
||||||
{
|
{
|
||||||
LegoOmni::GetInstance()->SetCurrentActor(p_currentActor);
|
LegoOmni::GetInstance()->SetCurrentActor(p_currentActor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
|
|
||||||
#include "anim/legoanim.h"
|
#include "anim/legoanim.h"
|
||||||
#include "islepathactor.h"
|
|
||||||
#include "legoanimationmanager.h"
|
#include "legoanimationmanager.h"
|
||||||
#include "legoanimpresenter.h"
|
#include "legoanimpresenter.h"
|
||||||
#include "legobuildingmanager.h"
|
#include "legobuildingmanager.h"
|
||||||
|
@ -701,7 +700,7 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||||
else if (!p_enable && m_set0xd0.empty()) {
|
else if (!p_enable && m_set0xd0.empty()) {
|
||||||
MxPresenter* presenter;
|
MxPresenter* presenter;
|
||||||
LegoPathController* controller;
|
LegoPathController* controller;
|
||||||
IslePathActor* actor = CurrentActor();
|
LegoPathActor* actor = CurrentActor();
|
||||||
|
|
||||||
if (actor) {
|
if (actor) {
|
||||||
RemovePathActor(actor);
|
RemovePathActor(actor);
|
||||||
|
|
|
@ -24,7 +24,7 @@ MxLong GasStationEntity::VTable0x50(MxParam& p_param)
|
||||||
state->SetUnknown18(0);
|
state->SetUnknown18(0);
|
||||||
|
|
||||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
CurrentActor()->VTable0xe4();
|
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||||
}
|
}
|
||||||
|
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
|
|
|
@ -24,7 +24,7 @@ MxLong HospitalEntity::VTable0x50(MxParam& p_param)
|
||||||
act1State->SetUnknown18(0);
|
act1State->SetUnknown18(0);
|
||||||
|
|
||||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
CurrentActor()->VTable0xe4();
|
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||||
}
|
}
|
||||||
|
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
|
|
|
@ -26,7 +26,7 @@ MxLong InfoCenterEntity::VTable0x50(MxParam& p_param)
|
||||||
switch (GameState()->GetCurrentAct()) {
|
switch (GameState()->GetCurrentAct()) {
|
||||||
case LegoGameState::Act::e_act1: {
|
case LegoGameState::Act::e_act1: {
|
||||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
CurrentActor()->VTable0xe4();
|
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||||
}
|
}
|
||||||
|
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
|
|
|
@ -22,7 +22,7 @@ MxLong BeachHouseEntity::VTable0x50(MxParam& p_param)
|
||||||
state->SetUnknown18(0);
|
state->SetUnknown18(0);
|
||||||
|
|
||||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
CurrentActor()->VTable0xe4();
|
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||||
}
|
}
|
||||||
|
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "legopathactor.h"
|
#include "legopathactor.h"
|
||||||
|
|
||||||
|
#include "define.h"
|
||||||
#include "geom/legounkown100db7f4.h"
|
#include "geom/legounkown100db7f4.h"
|
||||||
#include "legocachesoundmanager.h"
|
#include "legocachesoundmanager.h"
|
||||||
#include "legocameracontroller.h"
|
#include "legocameracontroller.h"
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "mxmisc.h"
|
#include "mxmisc.h"
|
||||||
#include "mxtimer.h"
|
#include "mxtimer.h"
|
||||||
|
#include "mxutilities.h"
|
||||||
#include "mxvariabletable.h"
|
#include "mxvariabletable.h"
|
||||||
|
|
||||||
#include <vec.h>
|
#include <vec.h>
|
||||||
|
@ -44,7 +46,7 @@ LegoPathActor::LegoPathActor()
|
||||||
m_state = 0;
|
m_state = 0;
|
||||||
m_grec = NULL;
|
m_grec = NULL;
|
||||||
m_controller = NULL;
|
m_controller = NULL;
|
||||||
m_unk0xe8 = 0;
|
m_collideBox = FALSE;
|
||||||
m_unk0x148 = 0;
|
m_unk0x148 = 0;
|
||||||
m_unk0x14c = 0;
|
m_unk0x14c = 0;
|
||||||
m_unk0x140 = 0.0099999999f;
|
m_unk0x140 = 0.0099999999f;
|
||||||
|
@ -454,7 +456,7 @@ MxU32 LegoPathActor::VTable0x6c(
|
||||||
LegoROI* roi = actor->GetROI();
|
LegoROI* roi = actor->GetROI();
|
||||||
|
|
||||||
if (roi != NULL && (roi->GetVisibility() || actor->GetCameraFlag())) {
|
if (roi != NULL && (roi->GetVisibility() || actor->GetCameraFlag())) {
|
||||||
if (roi->FUN_100a9410(p_v1, p_v2, p_f1, p_f2, p_v3, m_unk0xe8 != 0 && actor->m_unk0xe8 != 0)) {
|
if (roi->FUN_100a9410(p_v1, p_v2, p_f1, p_f2, p_v3, m_collideBox && actor->m_collideBox)) {
|
||||||
VTable0x94(actor, TRUE);
|
VTable0x94(actor, TRUE);
|
||||||
actor->VTable0x94(this, FALSE);
|
actor->VTable0x94(this, FALSE);
|
||||||
return 2;
|
return 2;
|
||||||
|
@ -540,10 +542,50 @@ inline MxU32 LegoPathActor::FUN_1002edd0(
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1002f020
|
// FUNCTION: LEGO1 0x1002f020
|
||||||
|
// FUNCTION: BETA10 0x100af54a
|
||||||
void LegoPathActor::ParseAction(char* p_extra)
|
void LegoPathActor::ParseAction(char* p_extra)
|
||||||
{
|
{
|
||||||
LegoActor::ParseAction(p_extra);
|
LegoActor::ParseAction(p_extra);
|
||||||
|
|
||||||
|
char value[256];
|
||||||
|
value[0] = '\0';
|
||||||
|
|
||||||
|
if (KeyValueStringParse(value, g_strPERMIT_NAVIGATE, p_extra)) {
|
||||||
|
SetUserNavFlag(TRUE);
|
||||||
|
NavController()->ResetLinearVel(m_worldSpeed);
|
||||||
|
SetCurrentActor(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
char* token;
|
||||||
|
if (KeyValueStringParse(value, g_strPATH, p_extra)) {
|
||||||
|
char name[12];
|
||||||
|
|
||||||
|
token = strtok(value, g_parseExtraTokens);
|
||||||
|
strcpy(name, token);
|
||||||
|
|
||||||
|
token = strtok(NULL, g_parseExtraTokens);
|
||||||
|
MxS32 src = atoi(token);
|
||||||
|
|
||||||
|
token = strtok(NULL, g_parseExtraTokens);
|
||||||
|
float srcScale = atof(token);
|
||||||
|
|
||||||
|
token = strtok(NULL, g_parseExtraTokens);
|
||||||
|
MxS32 dest = atoi(token);
|
||||||
|
|
||||||
|
token = strtok(NULL, g_parseExtraTokens);
|
||||||
|
float destScale = atof(token);
|
||||||
|
|
||||||
|
LegoWorld* world = CurrentWorld();
|
||||||
|
if (world != NULL) {
|
||||||
|
world->PlaceActor(this, name, src, srcScale, dest, destScale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (KeyValueStringParse(value, g_strCOLLIDEBOX, p_extra)) {
|
||||||
|
token = strtok(value, g_parseExtraTokens);
|
||||||
|
m_collideBox = atoi(token);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002f1b0
|
// FUNCTION: LEGO1 0x1002f1b0
|
||||||
|
|
|
@ -24,7 +24,7 @@ MxLong PoliceEntity::VTable0x50(MxParam& p_param)
|
||||||
state->SetUnknown18(0);
|
state->SetUnknown18(0);
|
||||||
|
|
||||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
CurrentActor()->VTable0xe4();
|
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||||
}
|
}
|
||||||
|
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
|
|
|
@ -22,7 +22,7 @@ MxLong RaceStandsEntity::VTable0x50(MxParam& p_param)
|
||||||
state->SetUnknown18(0);
|
state->SetUnknown18(0);
|
||||||
|
|
||||||
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
CurrentActor()->VTable0xe4();
|
((IslePathActor*) CurrentActor())->VTable0xe4();
|
||||||
}
|
}
|
||||||
|
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
|
|
|
@ -503,7 +503,7 @@ void Isle::Enable(MxBool p_enable)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CurrentActor() != NULL && CurrentActor()->IsA("Jetski")) {
|
if (CurrentActor() != NULL && CurrentActor()->IsA("Jetski")) {
|
||||||
IslePathActor* actor = CurrentActor();
|
IslePathActor* actor = (IslePathActor*) CurrentActor();
|
||||||
actor->SpawnPlayer(
|
actor->SpawnPlayer(
|
||||||
LegoGameState::e_unk45,
|
LegoGameState::e_unk45,
|
||||||
FALSE,
|
FALSE,
|
||||||
|
@ -657,7 +657,8 @@ void Isle::Enable(MxBool p_enable)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5: {
|
case 5: {
|
||||||
CurrentActor()->SpawnPlayer(
|
((IslePathActor*) CurrentActor())
|
||||||
|
->SpawnPlayer(
|
||||||
LegoGameState::e_jetrace2,
|
LegoGameState::e_jetrace2,
|
||||||
FALSE,
|
FALSE,
|
||||||
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
||||||
|
@ -689,7 +690,8 @@ void Isle::Enable(MxBool p_enable)
|
||||||
}
|
}
|
||||||
case 6: {
|
case 6: {
|
||||||
GameState()->m_currentArea = LegoGameState::e_carraceExterior;
|
GameState()->m_currentArea = LegoGameState::e_carraceExterior;
|
||||||
CurrentActor()->SpawnPlayer(
|
((IslePathActor*) CurrentActor())
|
||||||
|
->SpawnPlayer(
|
||||||
LegoGameState::e_unk21,
|
LegoGameState::e_unk21,
|
||||||
FALSE,
|
FALSE,
|
||||||
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
||||||
|
@ -738,7 +740,8 @@ void Isle::Enable(MxBool p_enable)
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
m_act1state->m_unk0x018 = 0;
|
m_act1state->m_unk0x018 = 0;
|
||||||
CurrentActor()->SpawnPlayer(
|
((IslePathActor*) CurrentActor())
|
||||||
|
->SpawnPlayer(
|
||||||
LegoGameState::e_unk54,
|
LegoGameState::e_unk54,
|
||||||
TRUE,
|
TRUE,
|
||||||
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
||||||
|
@ -789,7 +792,7 @@ void Isle::FUN_10032620()
|
||||||
case LegoGameState::e_unk66: {
|
case LegoGameState::e_unk66: {
|
||||||
MxMatrix mat(CurrentActor()->GetROI()->GetLocal2World());
|
MxMatrix mat(CurrentActor()->GetROI()->GetLocal2World());
|
||||||
LegoPathBoundary* boundary = CurrentActor()->GetBoundary();
|
LegoPathBoundary* boundary = CurrentActor()->GetBoundary();
|
||||||
CurrentActor()->VTable0xec(mat, boundary, TRUE);
|
((IslePathActor*) CurrentActor())->VTable0xec(mat, boundary, TRUE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LegoGameState::e_unk4:
|
case LegoGameState::e_unk4:
|
||||||
|
@ -802,7 +805,8 @@ void Isle::FUN_10032620()
|
||||||
case LegoGameState::e_hospitalExterior:
|
case LegoGameState::e_hospitalExterior:
|
||||||
case LegoGameState::e_unk31:
|
case LegoGameState::e_unk31:
|
||||||
case LegoGameState::e_policeExterior:
|
case LegoGameState::e_policeExterior:
|
||||||
CurrentActor()->SpawnPlayer(
|
((IslePathActor*) CurrentActor())
|
||||||
|
->SpawnPlayer(
|
||||||
GameState()->m_currentArea,
|
GameState()->m_currentArea,
|
||||||
TRUE,
|
TRUE,
|
||||||
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
IslePathActor::c_spawnBit1 | IslePathActor::c_playMusic | IslePathActor::c_spawnBit3
|
||||||
|
@ -1065,7 +1069,7 @@ void Isle::Add(MxCore* p_object)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10033050
|
// FUNCTION: LEGO1 0x10033050
|
||||||
void Isle::VTable0x6c(IslePathActor* p_actor)
|
void Isle::VTable0x6c(LegoPathActor* p_actor)
|
||||||
{
|
{
|
||||||
LegoWorld::Remove(p_actor);
|
LegoWorld::Remove(p_actor);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue