mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
Implement LegoAnimationManager::FUN_10061010 (#888)
This commit is contained in:
parent
4b386fe738
commit
05edf96186
13 changed files with 93 additions and 16 deletions
|
@ -95,7 +95,7 @@ class LegoAnimationManager : public MxCore {
|
||||||
MxBool p_param8,
|
MxBool p_param8,
|
||||||
MxBool p_param9
|
MxBool p_param9
|
||||||
);
|
);
|
||||||
void FUN_10061010(undefined4);
|
void FUN_10061010(MxBool p_und);
|
||||||
void FUN_100617c0(MxS32, MxU16&, MxU16&);
|
void FUN_100617c0(MxS32, MxU16&, MxU16&);
|
||||||
LegoTranInfo* GetTranInfo(MxU32 p_index);
|
LegoTranInfo* GetTranInfo(MxU32 p_index);
|
||||||
void FUN_10062770();
|
void FUN_10062770();
|
||||||
|
|
|
@ -55,7 +55,11 @@ class LegoAnimMMPresenter : public MxCompositePresenter {
|
||||||
// SYNTHETIC: LEGO1 0x1004aa40
|
// SYNTHETIC: LEGO1 0x1004aa40
|
||||||
// LegoAnimMMPresenter::`scalar deleting destructor'
|
// LegoAnimMMPresenter::`scalar deleting destructor'
|
||||||
|
|
||||||
|
void FUN_1004b840();
|
||||||
MxBool FUN_1004b8b0();
|
MxBool FUN_1004b8b0();
|
||||||
|
void FUN_1004b8c0();
|
||||||
|
|
||||||
|
inline LegoAnimPresenter* GetPresenter() { return m_presenter; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxBool FUN_1004b450();
|
MxBool FUN_1004b450();
|
||||||
|
|
|
@ -83,7 +83,7 @@ void IslePathActor::VTable0xe0()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationManager()->FUN_10061010(0);
|
AnimationManager()->FUN_10061010(FALSE);
|
||||||
if (!m_cameraFlag) {
|
if (!m_cameraFlag) {
|
||||||
ResetWorldTransform(TRUE);
|
ResetWorldTransform(TRUE);
|
||||||
SetUserNavFlag(TRUE);
|
SetUserNavFlag(TRUE);
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
#include "legoanimationmanager.h"
|
#include "legoanimationmanager.h"
|
||||||
|
|
||||||
|
#include "anim/legoanim.h"
|
||||||
#include "animstate.h"
|
#include "animstate.h"
|
||||||
#include "define.h"
|
#include "define.h"
|
||||||
#include "islepathactor.h"
|
#include "islepathactor.h"
|
||||||
|
#include "legoanimmmpresenter.h"
|
||||||
|
#include "legoanimpresenter.h"
|
||||||
#include "legocharactermanager.h"
|
#include "legocharactermanager.h"
|
||||||
#include "legoendanimnotificationparam.h"
|
#include "legoendanimnotificationparam.h"
|
||||||
#include "legoextraactor.h"
|
#include "legoextraactor.h"
|
||||||
|
@ -130,7 +133,7 @@ LegoAnimationManager::~LegoAnimationManager()
|
||||||
{
|
{
|
||||||
TickleManager()->UnregisterClient(this);
|
TickleManager()->UnregisterClient(this);
|
||||||
|
|
||||||
FUN_10061010(0);
|
FUN_10061010(FALSE);
|
||||||
|
|
||||||
for (MxS32 i = 0; i < (MxS32) _countof(m_unk0x3c); i++) {
|
for (MxS32 i = 0; i < (MxS32) _countof(m_unk0x3c); i++) {
|
||||||
LegoROI* roi = m_unk0x3c[i].m_roi;
|
LegoROI* roi = m_unk0x3c[i].m_roi;
|
||||||
|
@ -215,7 +218,7 @@ void LegoAnimationManager::Suspend()
|
||||||
m_unk0x42a = m_unk0x402;
|
m_unk0x42a = m_unk0x402;
|
||||||
m_unk0x402 = FALSE;
|
m_unk0x402 = FALSE;
|
||||||
|
|
||||||
FUN_10061010(0);
|
FUN_10061010(FALSE);
|
||||||
|
|
||||||
MxS32 i;
|
MxS32 i;
|
||||||
for (i = 0; i < (MxS32) _countof(m_unk0x3c); i++) {
|
for (i = 0; i < (MxS32) _countof(m_unk0x3c); i++) {
|
||||||
|
@ -919,17 +922,75 @@ MxResult LegoAnimationManager::FUN_10060dc0(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found && p_param3 != 0) {
|
if (!found && p_param3 != FALSE) {
|
||||||
result = FUN_100609f0(p_objectId, p_matrix, p_param7, p_param8);
|
result = FUN_100609f0(p_objectId, p_matrix, p_param7, p_param8);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10061010
|
// FUNCTION: LEGO1 0x10061010
|
||||||
void LegoAnimationManager::FUN_10061010(undefined4)
|
// FUNCTION: BETA10 0x100422cc
|
||||||
|
void LegoAnimationManager::FUN_10061010(MxBool p_und)
|
||||||
{
|
{
|
||||||
// TODO
|
MxBool unk0x39 = FALSE;
|
||||||
|
|
||||||
|
FUN_10064b50(-1);
|
||||||
|
|
||||||
|
if (m_tranInfoList != NULL) {
|
||||||
|
LegoTranInfoListCursor cursor(m_tranInfoList);
|
||||||
|
LegoTranInfo* tranInfo;
|
||||||
|
|
||||||
|
while (cursor.Next(tranInfo)) {
|
||||||
|
if (tranInfo->m_presenter != NULL) {
|
||||||
|
// TODO: Match
|
||||||
|
MxU32 flags = tranInfo->m_flags;
|
||||||
|
|
||||||
|
if (tranInfo->m_unk0x14 && tranInfo->m_unk0x12 != -1 && p_und) {
|
||||||
|
LegoAnim* anim;
|
||||||
|
|
||||||
|
if (tranInfo->m_presenter->GetPresenter() != NULL &&
|
||||||
|
(anim = tranInfo->m_presenter->GetPresenter()->GetAnimation()) != NULL &&
|
||||||
|
anim->GetScene() != NULL) {
|
||||||
|
if (flags & LegoTranInfo::c_bit2) {
|
||||||
|
BackgroundAudioManager()->RaiseVolume();
|
||||||
|
tranInfo->m_flags &= ~LegoTranInfo::c_bit2;
|
||||||
|
}
|
||||||
|
|
||||||
|
tranInfo->m_presenter->FUN_1004b840();
|
||||||
|
tranInfo->m_unk0x14 = FALSE;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tranInfo->m_presenter->FUN_1004b8c0();
|
||||||
|
tranInfo->m_unk0x14 = FALSE;
|
||||||
|
unk0x39 = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (flags & LegoTranInfo::c_bit2) {
|
||||||
|
BackgroundAudioManager()->RaiseVolume();
|
||||||
|
tranInfo->m_flags &= ~LegoTranInfo::c_bit2;
|
||||||
|
}
|
||||||
|
|
||||||
|
tranInfo->m_presenter->FUN_1004b840();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (m_tranInfoList2 != NULL) {
|
||||||
|
LegoTranInfoListCursor cursor(m_tranInfoList2);
|
||||||
|
|
||||||
|
if (!cursor.Find(tranInfo)) {
|
||||||
|
m_tranInfoList2->Append(tranInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unk0x39 = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_unk0x39 = unk0x39;
|
||||||
|
m_unk0x404 = Timer()->GetTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10061530
|
// STUB: LEGO1 0x10061530
|
||||||
|
|
|
@ -465,9 +465,21 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1004b840
|
||||||
|
void LegoAnimMMPresenter::FUN_1004b840()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1004b8b0
|
// FUNCTION: LEGO1 0x1004b8b0
|
||||||
// FUNCTION: BETA10 0x1004d104
|
// FUNCTION: BETA10 0x1004d104
|
||||||
MxBool LegoAnimMMPresenter::FUN_1004b8b0()
|
MxBool LegoAnimMMPresenter::FUN_1004b8b0()
|
||||||
{
|
{
|
||||||
return m_tranInfo != NULL ? m_tranInfo->m_unk0x28 : TRUE;
|
return m_tranInfo != NULL ? m_tranInfo->m_unk0x28 : TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1004b8c0
|
||||||
|
void LegoAnimMMPresenter::FUN_1004b8c0()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
|
@ -622,7 +622,7 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VK_SPACE:
|
case VK_SPACE:
|
||||||
AnimationManager()->FUN_10061010(1);
|
AnimationManager()->FUN_10061010(TRUE);
|
||||||
break;
|
break;
|
||||||
case 'Z':
|
case 'Z':
|
||||||
// TODO
|
// TODO
|
||||||
|
|
|
@ -618,7 +618,7 @@ void LegoWorld::Enable(MxBool p_enable)
|
||||||
if (p_enable && !m_set0xd0.empty()) {
|
if (p_enable && !m_set0xd0.empty()) {
|
||||||
if (CurrentWorld() != this) {
|
if (CurrentWorld() != this) {
|
||||||
if (CurrentWorld()) {
|
if (CurrentWorld()) {
|
||||||
AnimationManager()->FUN_10061010(0);
|
AnimationManager()->FUN_10061010(FALSE);
|
||||||
CurrentWorld()->Enable(FALSE);
|
CurrentWorld()->Enable(FALSE);
|
||||||
|
|
||||||
LegoEntityListCursor cursor(m_entityList);
|
LegoEntityListCursor cursor(m_entityList);
|
||||||
|
|
|
@ -30,7 +30,7 @@ MxLong GasStationEntity::VTable0x50(MxParam& p_param)
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
isle->SetDestLocation(LegoGameState::Area::e_garage);
|
isle->SetDestLocation(LegoGameState::Area::e_garage);
|
||||||
|
|
||||||
AnimationManager()->FUN_10061010(0);
|
AnimationManager()->FUN_10061010(FALSE);
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ MxLong HospitalEntity::VTable0x50(MxParam& p_param)
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
isle->SetDestLocation(LegoGameState::Area::e_hospital);
|
isle->SetDestLocation(LegoGameState::Area::e_hospital);
|
||||||
|
|
||||||
AnimationManager()->FUN_10061010(0);
|
AnimationManager()->FUN_10061010(FALSE);
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ MxLong InfoCenterEntity::VTable0x50(MxParam& p_param)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationManager()->FUN_10061010(0);
|
AnimationManager()->FUN_10061010(FALSE);
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -28,7 +28,7 @@ MxLong BeachHouseEntity::VTable0x50(MxParam& p_param)
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
isle->SetDestLocation(LegoGameState::Area::e_jetskibuild);
|
isle->SetDestLocation(LegoGameState::Area::e_jetskibuild);
|
||||||
|
|
||||||
AnimationManager()->FUN_10061010(0);
|
AnimationManager()->FUN_10061010(FALSE);
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ MxLong PoliceEntity::VTable0x50(MxParam& p_param)
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
isle->SetDestLocation(LegoGameState::Area::e_police);
|
isle->SetDestLocation(LegoGameState::Area::e_police);
|
||||||
|
|
||||||
AnimationManager()->FUN_10061010(0);
|
AnimationManager()->FUN_10061010(FALSE);
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ MxLong RaceStandsEntity::VTable0x50(MxParam& p_param)
|
||||||
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
isle->SetDestLocation(LegoGameState::Area::e_racecarbuild);
|
isle->SetDestLocation(LegoGameState::Area::e_racecarbuild);
|
||||||
|
|
||||||
AnimationManager()->FUN_10061010(0);
|
AnimationManager()->FUN_10061010(FALSE);
|
||||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue