mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
Implement/match various small LegoAnimPresenter functions (#846)
* Implement/match various small LegoAnimPresenter functions * Fix location of anim function * fix
This commit is contained in:
parent
f898462d17
commit
410824bd0f
12 changed files with 71 additions and 26 deletions
|
@ -10,6 +10,7 @@
|
|||
class LegoWorld;
|
||||
class LegoAnimClass;
|
||||
class LegoAnimActor;
|
||||
class LegoPathBoundary;
|
||||
|
||||
struct LegoAnimStructComparator {
|
||||
MxBool operator()(const char* const& p_a, const char* const& p_b) const { return strcmp(p_a, p_b) < 0; }
|
||||
|
@ -62,7 +63,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
|
|||
virtual void VTable0x8c(); // vtable+0x8c
|
||||
virtual void VTable0x90(); // vtable+0x90
|
||||
virtual MxResult VTable0x94(Vector3&, Vector3&, float, float, Vector3&); // vtable+0x94
|
||||
virtual void VTable0x98(); // vtable+0x98
|
||||
virtual MxResult VTable0x98(LegoPathBoundary* p_boundary); // vtable+0x98
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c990
|
||||
virtual LegoROI** GetROIMap(MxU32& p_roiMapSize)
|
||||
|
@ -71,16 +72,14 @@ class LegoAnimPresenter : public MxVideoPresenter {
|
|||
return m_roiMap;
|
||||
} // vtable+0x9c
|
||||
|
||||
virtual void VTable0xa0(Matrix4*); // vtable+0xa0
|
||||
virtual void VTable0xa0(Matrix4& p_matrix); // vtable+0xa0
|
||||
|
||||
MxResult FUN_1006afc0(MxMatrix*& p_matrix, float p_und);
|
||||
MxResult FUN_1006b140(LegoROI* p_roi);
|
||||
void FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value);
|
||||
const char* GetActionObjectName();
|
||||
|
||||
inline LegoAnim* GetAnimation() { return m_anim; }
|
||||
|
||||
const char* GetActionObjectName();
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define LEGOEXTRAACTOR_H
|
||||
|
||||
#include "legoanimactor.h"
|
||||
#include "legoanimpresenter.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d6c00 LegoAnimActor
|
||||
// VTABLE: LEGO1 0x100d6c10 LegoPathActor
|
||||
|
|
|
@ -35,6 +35,8 @@ class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter {
|
|||
// SYNTHETIC: LEGO1 0x1006cfe0
|
||||
// LegoLocomotionAnimPresenter::`scalar deleting destructor'
|
||||
|
||||
void FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value);
|
||||
|
||||
inline void DecrementUnknown0xd4()
|
||||
{
|
||||
if (m_unk0xd4) {
|
||||
|
|
|
@ -43,6 +43,7 @@ class LegoPathController : public MxCore {
|
|||
|
||||
undefined4 FUN_10046770(LegoPathActor* p_actor);
|
||||
void FUN_100468f0(LegoAnimPresenter* p_presenter);
|
||||
void FUN_10046930(LegoAnimPresenter* p_presenter);
|
||||
MxResult FUN_10046b30(LegoPathBoundary** p_path, MxS32& p_value);
|
||||
void Enable(MxBool p_enable);
|
||||
void FUN_10046bb0(LegoWorld* p_world);
|
||||
|
|
|
@ -75,6 +75,7 @@ class LegoWorld : public LegoEntity {
|
|||
);
|
||||
void FUN_1001fc80(IslePathActor* p_actor);
|
||||
void FUN_1001fda0(LegoAnimPresenter* p_presenter);
|
||||
void FUN_1001fe90(LegoAnimPresenter* p_presenter);
|
||||
void AddPath(LegoPathController* p_controller);
|
||||
MxResult GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value);
|
||||
MxCore* Find(const char* p_class, const char* p_name);
|
||||
|
|
|
@ -149,7 +149,7 @@ void LegoAnimMMPresenter::ReadyTickle()
|
|||
}
|
||||
|
||||
if (m_tranInfo != NULL && m_tranInfo->m_unk0x0c != NULL) {
|
||||
m_presenter->VTable0xa0(m_tranInfo->m_unk0x0c);
|
||||
m_presenter->VTable0xa0(*m_tranInfo->m_unk0x0c);
|
||||
}
|
||||
|
||||
if (m_presenter != NULL) {
|
||||
|
|
|
@ -311,6 +311,18 @@ void LegoWorld::FUN_1001fda0(LegoAnimPresenter* p_presenter)
|
|||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1001fe90
|
||||
// FUNCTION: BETA10 0x100da6b5
|
||||
void LegoWorld::FUN_1001fe90(LegoAnimPresenter* p_presenter)
|
||||
{
|
||||
LegoPathControllerListCursor cursor(&m_list0x68);
|
||||
LegoPathController* controller;
|
||||
|
||||
while (cursor.Next(controller)) {
|
||||
controller->FUN_10046930(p_presenter);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1001ff80
|
||||
void LegoWorld::AddPath(LegoPathController* p_controller)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "legoanimactor.h"
|
||||
|
||||
#include "define.h"
|
||||
#include "legoanimpresenter.h"
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
#include "legoworld.h"
|
||||
#include "misc.h"
|
||||
#include "mxutilities.h"
|
||||
|
@ -200,7 +200,8 @@ void LegoAnimActor::ParseAction(char* p_extra)
|
|||
char* token = strtok(value, g_parseExtraTokens);
|
||||
|
||||
while (token) {
|
||||
LegoAnimPresenter* presenter = (LegoAnimPresenter*) world->Find("LegoAnimPresenter", token);
|
||||
LegoLocomotionAnimPresenter* presenter =
|
||||
(LegoLocomotionAnimPresenter*) world->Find("LegoAnimPresenter", token);
|
||||
|
||||
if (presenter != NULL) {
|
||||
token = strtok(NULL, g_parseExtraTokens);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "legoextraactor.h"
|
||||
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
#include "legosoundmanager.h"
|
||||
#include "misc.h"
|
||||
#include "mxmisc.h"
|
||||
|
@ -11,10 +12,10 @@ DECOMP_SIZE_ASSERT(LegoExtraActor, 0x1dc)
|
|||
LegoWorld* g_unk0x100f31d0 = NULL;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f31d4
|
||||
LegoAnimPresenter* m_assAnimP = NULL;
|
||||
LegoLocomotionAnimPresenter* m_assAnimP = NULL;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f31d8
|
||||
LegoAnimPresenter* m_disAnimP = NULL;
|
||||
LegoLocomotionAnimPresenter* m_disAnimP = NULL;
|
||||
|
||||
// GLOBAL: LEGO1 0x100f31dc
|
||||
MxS32 g_unk0x100f31dc = 0;
|
||||
|
@ -156,8 +157,8 @@ inline void LegoExtraActor::FUN_1002ad8a()
|
|||
|
||||
if (g_unk0x100f31d0 != w) {
|
||||
g_unk0x100f31d0 = w;
|
||||
m_assAnimP = (LegoAnimPresenter*) w->Find("LegoAnimPresenter", "BNsAss01");
|
||||
m_disAnimP = (LegoAnimPresenter*) w->Find("LegoAnimPresenter", "BNsDis01");
|
||||
m_assAnimP = (LegoLocomotionAnimPresenter*) w->Find("LegoAnimPresenter", "BNsAss01");
|
||||
m_disAnimP = (LegoLocomotionAnimPresenter*) w->Find("LegoAnimPresenter", "BNsDis01");
|
||||
}
|
||||
|
||||
if (!m_assAnim) {
|
||||
|
|
|
@ -39,6 +39,12 @@ void LegoPathController::FUN_100468f0(LegoAnimPresenter* p_presenter)
|
|||
{
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10046930
|
||||
// FUNCTION: BETA10 0x100b737b
|
||||
void LegoPathController::FUN_10046930(LegoAnimPresenter* p_presenter)
|
||||
{
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10046b30
|
||||
MxResult LegoPathController::FUN_10046b30(LegoPathBoundary** p_path, MxS32& p_value)
|
||||
{
|
||||
|
|
|
@ -805,10 +805,15 @@ void LegoAnimPresenter::ParseExtra()
|
|||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006c570
|
||||
void LegoAnimPresenter::VTable0xa0(Matrix4*)
|
||||
// FUNCTION: LEGO1 0x1006c570
|
||||
// FUNCTION: BETA10 0x10051ab3
|
||||
void LegoAnimPresenter::VTable0xa0(Matrix4& p_matrix)
|
||||
{
|
||||
// TODO
|
||||
if (m_unk0x78 != NULL) {
|
||||
delete m_unk0x78;
|
||||
}
|
||||
|
||||
m_unk0x78 = new MxMatrix(p_matrix);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006c620
|
||||
|
@ -882,10 +887,19 @@ void LegoAnimPresenter::VTable0x8c()
|
|||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006c860
|
||||
// FUNCTION: LEGO1 0x1006c860
|
||||
// FUNCTION: BETA10 0x10051f45
|
||||
void LegoAnimPresenter::VTable0x90()
|
||||
{
|
||||
// TODO
|
||||
if (m_currentWorld != NULL) {
|
||||
m_currentWorld->FUN_1001fe90(this);
|
||||
|
||||
if (m_compositePresenter != NULL && m_compositePresenter->IsA("LegoAnimMMPresenter")) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_currentWorld->Remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006c8a0
|
||||
|
@ -914,14 +928,17 @@ MxResult LegoAnimPresenter::VTable0x94(Vector3&, Vector3&, float, float, Vector3
|
|||
return SUCCESS;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006ca50
|
||||
void LegoAnimPresenter::VTable0x98()
|
||||
// FUNCTION: LEGO1 0x1006ca50
|
||||
// FUNCTION: BETA10 0x100521d0
|
||||
MxResult LegoAnimPresenter::VTable0x98(LegoPathBoundary* p_boundary)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
for (MxU32 i = 1; i <= m_roiMapSize; i++) {
|
||||
LegoEntity* entity = m_roiMap[i]->GetEntity();
|
||||
|
||||
// STUB: LEGO1 0x1006d680
|
||||
void LegoAnimPresenter::FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value)
|
||||
{
|
||||
// TODO
|
||||
if (entity != NULL) {
|
||||
p_boundary->AddActor((LegoPathActor*) entity);
|
||||
}
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
|
|
@ -113,3 +113,9 @@ void LegoLocomotionAnimPresenter::EndAction()
|
|||
MxVideoPresenter::EndAction();
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006d680
|
||||
void LegoLocomotionAnimPresenter::FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue