mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-22 16:04:17 +00:00
Improve FUN_10061010
, other fixes (#1634)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
@@ -303,4 +303,7 @@ private:
|
|||||||
// TEMPLATE: LEGO1 0x10061750
|
// TEMPLATE: LEGO1 0x10061750
|
||||||
// MxListCursor<LegoTranInfo *>::MxListCursor<LegoTranInfo *>
|
// MxListCursor<LegoTranInfo *>::MxListCursor<LegoTranInfo *>
|
||||||
|
|
||||||
|
// TEMPLATE: BETA10 0x1004b5d0
|
||||||
|
// MxListCursor<LegoTranInfo *>::Next
|
||||||
|
|
||||||
#endif // LEGOANIMATIONMANAGER_H
|
#endif // LEGOANIMATIONMANAGER_H
|
||||||
|
@@ -28,9 +28,11 @@ public:
|
|||||||
// class MxPtrListCursor<LegoTranInfo>
|
// class MxPtrListCursor<LegoTranInfo>
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d8d20
|
// VTABLE: LEGO1 0x100d8d20
|
||||||
|
// VTABLE: BETA10 0x101bad70
|
||||||
// SIZE 0x10
|
// SIZE 0x10
|
||||||
class LegoTranInfoListCursor : public MxPtrListCursor<LegoTranInfo> {
|
class LegoTranInfoListCursor : public MxPtrListCursor<LegoTranInfo> {
|
||||||
public:
|
public:
|
||||||
|
// FUNCTION: BETA10 0x100496d0
|
||||||
LegoTranInfoListCursor(LegoTranInfoList* p_list) : MxPtrListCursor<LegoTranInfo>(p_list) {}
|
LegoTranInfoListCursor(LegoTranInfoList* p_list) : MxPtrListCursor<LegoTranInfo>(p_list) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -62,9 +64,14 @@ public:
|
|||||||
// MxPtrList<LegoTranInfo>::`scalar deleting destructor'
|
// MxPtrList<LegoTranInfo>::`scalar deleting destructor'
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100612f0
|
// SYNTHETIC: LEGO1 0x100612f0
|
||||||
|
// SYNTHETIC: BETA10 0x100498c0
|
||||||
// LegoTranInfoListCursor::`scalar deleting destructor'
|
// LegoTranInfoListCursor::`scalar deleting destructor'
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x10049770
|
||||||
|
// MxPtrListCursor<LegoTranInfo>::MxPtrListCursor<LegoTranInfo>
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10061360
|
// FUNCTION: LEGO1 0x10061360
|
||||||
|
// FUNCTION: BETA10 0x10049910
|
||||||
// MxPtrListCursor<LegoTranInfo>::~MxPtrListCursor<LegoTranInfo>
|
// MxPtrListCursor<LegoTranInfo>::~MxPtrListCursor<LegoTranInfo>
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100613b0
|
// SYNTHETIC: LEGO1 0x100613b0
|
||||||
@@ -77,6 +84,7 @@ public:
|
|||||||
// MxListCursor<LegoTranInfo *>::~MxListCursor<LegoTranInfo *>
|
// MxListCursor<LegoTranInfo *>::~MxListCursor<LegoTranInfo *>
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100614e0
|
// FUNCTION: LEGO1 0x100614e0
|
||||||
|
// FUNCTION: BETA10 0x10049ab0
|
||||||
// LegoTranInfoListCursor::~LegoTranInfoListCursor
|
// LegoTranInfoListCursor::~LegoTranInfoListCursor
|
||||||
|
|
||||||
#endif // LEGOTRANINFOLIST_H
|
#endif // LEGOTRANINFOLIST_H
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "mxbackgroundaudiomanager.h"
|
#include "mxbackgroundaudiomanager.h"
|
||||||
|
#include "mxdebug.h"
|
||||||
#include "mxmisc.h"
|
#include "mxmisc.h"
|
||||||
#include "mxnotificationmanager.h"
|
#include "mxnotificationmanager.h"
|
||||||
#include "mxticklemanager.h"
|
#include "mxticklemanager.h"
|
||||||
@@ -1225,12 +1226,10 @@ void LegoAnimationManager::CameraTriggerFire(LegoPathActor* p_actor, MxBool, MxU
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10061010
|
#ifdef BETA10
|
||||||
// FUNCTION: BETA10 0x100422cc
|
// FUNCTION: BETA10 0x100422cc
|
||||||
void LegoAnimationManager::FUN_10061010(MxBool p_und)
|
void LegoAnimationManager::FUN_10061010(MxBool p_und)
|
||||||
{
|
{
|
||||||
MxBool unk0x39 = FALSE;
|
|
||||||
|
|
||||||
FUN_10064b50(-1);
|
FUN_10064b50(-1);
|
||||||
|
|
||||||
if (m_tranInfoList != NULL) {
|
if (m_tranInfoList != NULL) {
|
||||||
@@ -1238,17 +1237,47 @@ void LegoAnimationManager::FUN_10061010(MxBool p_und)
|
|||||||
LegoTranInfo* tranInfo;
|
LegoTranInfo* tranInfo;
|
||||||
|
|
||||||
while (cursor.Next(tranInfo)) {
|
while (cursor.Next(tranInfo)) {
|
||||||
if (tranInfo->m_presenter != NULL) {
|
if (tranInfo->m_unk0x14 && tranInfo->m_location != -1) {
|
||||||
// TODO: Match
|
MxTrace("Releasing user from %d\n", tranInfo->m_objectId);
|
||||||
MxU32 flags = tranInfo->m_flags;
|
|
||||||
|
|
||||||
|
if (tranInfo->m_presenter != NULL) {
|
||||||
|
tranInfo->m_presenter->FUN_1004b8c0();
|
||||||
|
}
|
||||||
|
|
||||||
|
tranInfo->m_unk0x14 = FALSE;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MxTrace("Stopping %d\n", tranInfo->m_objectId);
|
||||||
|
|
||||||
|
if (tranInfo->m_presenter != NULL) {
|
||||||
|
tranInfo->m_presenter->FUN_1004b840();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_animRunning = FALSE;
|
||||||
|
m_unk0x404 = Timer()->GetTime();
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
// FUNCTION: LEGO1 0x10061010
|
||||||
|
void LegoAnimationManager::FUN_10061010(MxBool p_und)
|
||||||
|
{
|
||||||
|
MxBool animRunning = FALSE;
|
||||||
|
FUN_10064b50(-1);
|
||||||
|
|
||||||
|
if (m_tranInfoList != NULL) {
|
||||||
|
LegoTranInfoListCursor cursor(m_tranInfoList);
|
||||||
|
LegoTranInfo* tranInfo;
|
||||||
|
|
||||||
|
while (cursor.Next(tranInfo)) {
|
||||||
|
if (tranInfo->m_presenter) {
|
||||||
|
// LINE: LEGO1 0x100610e6
|
||||||
if (tranInfo->m_unk0x14 && tranInfo->m_location != -1 && p_und) {
|
if (tranInfo->m_unk0x14 && tranInfo->m_location != -1 && p_und) {
|
||||||
LegoAnim* anim;
|
if (tranInfo->m_presenter->GetPresenter() &&
|
||||||
|
tranInfo->m_presenter->GetPresenter()->GetAnimation() &&
|
||||||
if (tranInfo->m_presenter->GetPresenter() != NULL &&
|
tranInfo->m_presenter->GetPresenter()->GetAnimation()->GetCamAnim()) {
|
||||||
(anim = tranInfo->m_presenter->GetPresenter()->GetAnimation()) != NULL &&
|
if (tranInfo->m_flags & LegoTranInfo::c_bit2) {
|
||||||
anim->GetCamAnim() != NULL) {
|
|
||||||
if (flags & LegoTranInfo::c_bit2) {
|
|
||||||
BackgroundAudioManager()->RaiseVolume();
|
BackgroundAudioManager()->RaiseVolume();
|
||||||
tranInfo->m_flags &= ~LegoTranInfo::c_bit2;
|
tranInfo->m_flags &= ~LegoTranInfo::c_bit2;
|
||||||
}
|
}
|
||||||
@@ -1257,37 +1286,43 @@ void LegoAnimationManager::FUN_10061010(MxBool p_und)
|
|||||||
tranInfo->m_unk0x14 = FALSE;
|
tranInfo->m_unk0x14 = FALSE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
MxTrace("Releasing user from %d\n", tranInfo->m_objectId);
|
||||||
|
// LINE: LEGO1 0x10061137
|
||||||
tranInfo->m_presenter->FUN_1004b8c0();
|
tranInfo->m_presenter->FUN_1004b8c0();
|
||||||
|
animRunning = TRUE;
|
||||||
tranInfo->m_unk0x14 = FALSE;
|
tranInfo->m_unk0x14 = FALSE;
|
||||||
unk0x39 = TRUE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (flags & LegoTranInfo::c_bit2) {
|
if (tranInfo->m_flags & LegoTranInfo::c_bit2) {
|
||||||
|
// LINE: LEGO1 0x10061150
|
||||||
BackgroundAudioManager()->RaiseVolume();
|
BackgroundAudioManager()->RaiseVolume();
|
||||||
tranInfo->m_flags &= ~LegoTranInfo::c_bit2;
|
tranInfo->m_flags &= ~LegoTranInfo::c_bit2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MxTrace("Stopping %d\n", tranInfo->m_objectId);
|
||||||
tranInfo->m_presenter->FUN_1004b840();
|
tranInfo->m_presenter->FUN_1004b840();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (m_tranInfoList2 != NULL) {
|
if (m_tranInfoList2 != NULL) {
|
||||||
LegoTranInfoListCursor cursor(m_tranInfoList2);
|
LegoTranInfoListCursor cursor(m_tranInfoList2);
|
||||||
|
|
||||||
if (!cursor.Find(tranInfo)) {
|
if (!cursor.Find(tranInfo)) {
|
||||||
|
// TODO: For some reason, the embedded `MxListEntry` constructor is not inlined.
|
||||||
|
// This may be the key for getting this function to match correctly.
|
||||||
m_tranInfoList2->Append(tranInfo);
|
m_tranInfoList2->Append(tranInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unk0x39 = TRUE;
|
animRunning = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_animRunning = unk0x39;
|
m_animRunning = animRunning;
|
||||||
m_unk0x404 = Timer()->GetTime();
|
m_unk0x404 = Timer()->GetTime();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10061530
|
// FUNCTION: LEGO1 0x10061530
|
||||||
void LegoAnimationManager::FUN_10061530()
|
void LegoAnimationManager::FUN_10061530()
|
||||||
|
@@ -425,6 +425,21 @@ MxBool LegoAnimMMPresenter::FUN_1004b6b0(MxLong p_time)
|
|||||||
// FUNCTION: BETA10 0x1004ce18
|
// FUNCTION: BETA10 0x1004ce18
|
||||||
MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
|
MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
|
||||||
{
|
{
|
||||||
|
#ifdef BETA10
|
||||||
|
switch (m_unk0x58) {
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
LegoROI* viewROI = VideoManager()->GetViewROI();
|
LegoROI* viewROI = VideoManager()->GetViewROI();
|
||||||
LegoPathActor* actor = UserActor();
|
LegoPathActor* actor = UserActor();
|
||||||
|
|
||||||
@@ -455,9 +470,13 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
|
|||||||
m_world->PlaceActor(actor);
|
m_world->PlaceActor(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BETA10
|
||||||
|
actor->VTable0xa8();
|
||||||
|
#else
|
||||||
if (m_tranInfo->m_unk0x29) {
|
if (m_tranInfo->m_unk0x29) {
|
||||||
actor->VTable0xa8();
|
actor->VTable0xa8();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
actor->SetActorState(LegoPathActor::c_initial);
|
actor->SetActorState(LegoPathActor::c_initial);
|
||||||
@@ -491,9 +510,11 @@ void LegoAnimMMPresenter::FUN_1004b840()
|
|||||||
FUN_1004b6d0(0);
|
FUN_1004b6d0(0);
|
||||||
EndAction();
|
EndAction();
|
||||||
|
|
||||||
|
#ifndef BETA10
|
||||||
if (action != NULL) {
|
if (action != NULL) {
|
||||||
Streamer()->FUN_100b98f0(action);
|
Streamer()->FUN_100b98f0(action);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1004b8b0
|
// FUNCTION: LEGO1 0x1004b8b0
|
||||||
|
@@ -286,6 +286,7 @@ MxResult LegoWorld::PlaceActor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1001fa70
|
// FUNCTION: LEGO1 0x1001fa70
|
||||||
|
// FUNCTION: BETA10 0x100da328
|
||||||
MxResult LegoWorld::PlaceActor(LegoPathActor* p_actor)
|
MxResult LegoWorld::PlaceActor(LegoPathActor* p_actor)
|
||||||
{
|
{
|
||||||
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
LegoPathControllerListCursor cursor(&m_pathControllerList);
|
||||||
@@ -301,6 +302,7 @@ MxResult LegoWorld::PlaceActor(LegoPathActor* p_actor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1001fb70
|
// FUNCTION: LEGO1 0x1001fb70
|
||||||
|
// FUNCTION: BETA10 0x100da3f1
|
||||||
MxResult LegoWorld::PlaceActor(
|
MxResult LegoWorld::PlaceActor(
|
||||||
LegoPathActor* p_actor,
|
LegoPathActor* p_actor,
|
||||||
LegoAnimPresenter* p_presenter,
|
LegoAnimPresenter* p_presenter,
|
||||||
|
@@ -244,11 +244,11 @@ inline MxBool MxListCursor<T>::Next()
|
|||||||
template <class T>
|
template <class T>
|
||||||
inline MxBool MxListCursor<T>::Next(T& p_obj)
|
inline MxBool MxListCursor<T>::Next(T& p_obj)
|
||||||
{
|
{
|
||||||
if (!m_match) {
|
if (m_match) {
|
||||||
m_match = m_list->m_first;
|
m_match = m_match->GetNext();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_match = m_match->GetNext();
|
m_match = m_list->m_first;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_match) {
|
if (m_match) {
|
||||||
|
@@ -153,6 +153,7 @@ void OrientableROI::UpdateWorldDataWithTransformAndChildren(const Matrix4& p_tra
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a5a30
|
// FUNCTION: LEGO1 0x100a5a30
|
||||||
|
// FUNCTION: BETA10 0x10167d31
|
||||||
void OrientableROI::SetWorldVelocity(const Vector3& p_world_velocity)
|
void OrientableROI::SetWorldVelocity(const Vector3& p_world_velocity)
|
||||||
{
|
{
|
||||||
m_world_velocity = p_world_velocity;
|
m_world_velocity = p_world_velocity;
|
||||||
|
Reference in New Issue
Block a user