Implement/match LegoPhonemePresenter::StartingTickle (#809)

* Implement/match LegoPhonemePresenter::StartingTickle

* Name vars

* Fix name
This commit is contained in:
Christian Semmler
2024-04-16 10:07:13 -04:00
committed by GitHub
parent 41281dcbec
commit 2600b1b421
17 changed files with 314 additions and 143 deletions

View File

@@ -61,6 +61,7 @@ public:
MxU32 GetRefCount(LegoROI* p_roi);
void FUN_10083db0(LegoROI* p_roi);
void FUN_10083f10(LegoROI* p_roi);
MxU32 FUN_100849a0(LegoROI* p_roi, LegoTextureInfo* p_textureInfo);
LegoExtraActor* GetActor(const char* p_key);
LegoCharacterData* GetData(const char* p_key);
LegoCharacterData* GetData(LegoROI* p_roi);

View File

@@ -0,0 +1,41 @@
#ifndef LEGOPHONEME_H
#define LEGOPHONEME_H
#include "decomp.h"
#include "mxstring.h"
class LegoTextureInfo;
// VTABLE: LEGO1 0x100d7c88
// SIZE 0x20
class LegoPhoneme {
public:
LegoPhoneme(const char* p_name, undefined4 p_unk0x14)
{
m_name = p_name;
m_name.ToUpperCase();
Init();
m_unk0x14 = p_unk0x14;
}
~LegoPhoneme();
virtual undefined4 VTable0x00(); // vtable+0x00
virtual void VTable0x04(undefined4 p_unk0x14); // vtable+0x04
virtual LegoTextureInfo* VTable0x08(); // vtable+0x08
virtual void VTable0x0c(LegoTextureInfo* p_unk0x18); // vtable+0x0c
virtual LegoTextureInfo* VTable0x10(); // vtable+0x10
virtual void VTable0x14(LegoTextureInfo* p_unk0x1c); // vtable+0x14
virtual void VTable0x18(); // vtable+0x18
virtual void Init(); // vtable+0x1c
virtual void VTable0x20(undefined4); // vtable+0x20
inline MxString& GetName() { return m_name; }
private:
MxString m_name; // 0x04
undefined4 m_unk0x14; // 0x14
LegoTextureInfo* m_unk0x18; // 0x18
LegoTextureInfo* m_unk0x1c; // 0x1c
};
#endif // LEGOPHONEME_H

View File

@@ -0,0 +1,75 @@
#ifndef LEGOPHONEMELIST_H
#define LEGOPHONEMELIST_H
#include "decomp.h"
#include "legophoneme.h"
#include "mxlist.h"
// VTABLE: LEGO1 0x100d9cd0
// class MxCollection<LegoPhoneme *>
// VTABLE: LEGO1 0x100d9ce8
// class MxList<LegoPhoneme *>
// VTABLE: LEGO1 0x100d9d00
// SIZE 0x18
class LegoPhonemeList : public MxList<LegoPhoneme*> {
public:
LegoPhonemeList() { SetDestroy(Destroy); }
// FUNCTION: LEGO1 0x1007b210
MxS8 Compare(LegoPhoneme* p_a, LegoPhoneme* p_b) override
{
MxString a(p_a->GetName());
MxString b(p_b->GetName());
return a.Equal(b) ? 0 : p_a < p_b ? -1 : 1;
} // vtable+0x14
// FUNCTION: LEGO1 0x1007b2e0
static void Destroy(LegoPhoneme* p_element) { delete p_element; }
};
// VTABLE: LEGO1 0x100d80c8
// class MxListCursor<LegoPhoneme *>
// VTABLE: LEGO1 0x100d80e0
// SIZE 0x10
class LegoPhonemeListCursor : public MxListCursor<LegoPhoneme*> {
public:
LegoPhonemeListCursor(LegoPhonemeList* p_list) : MxListCursor<LegoPhoneme*>(p_list) {}
};
// TEMPLATE: LEGO1 0x1004e680
// LegoPhonemeListCursor::`scalar deleting destructor'
// TEMPLATE: LEGO1 0x1004e6f0
// MxListCursor<LegoPhoneme *>::~MxListCursor<LegoPhoneme *>
// TEMPLATE: LEGO1 0x1004e740
// MxListCursor<LegoPhoneme *>::`scalar deleting destructor'
// TEMPLATE: LEGO1 0x1004e7b0
// LegoPhonemeListCursor::~LegoPhonemeListCursor
// TEMPLATE: LEGO1 0x1007b300
// MxCollection<LegoPhoneme *>::Compare
// TEMPLATE: LEGO1 0x1007b310
// MxCollection<LegoPhoneme *>::~MxCollection<LegoPhoneme *>
// TEMPLATE: LEGO1 0x1007b360
// MxCollection<LegoPhoneme *>::Destroy
// TEMPLATE: LEGO1 0x1007b370
// MxList<LegoPhoneme *>::~MxList<LegoPhoneme *>
// SYNTHETIC: LEGO1 0x1007b400
// LegoPhonemeList::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x1007b470
// MxCollection<LegoPhoneme *>::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x1007b4e0
// MxList<LegoPhoneme *>::`scalar deleting destructor'
#endif // LEGOPHONEMELIST_H

View File

@@ -6,6 +6,8 @@
#include "mxstring.h"
#include "mxtypes.h"
class LegoTextureInfo;
// VTABLE: LEGO1 0x100d8040
// SIZE 0x88
class LegoPhonemePresenter : public MxFlcPresenter {
@@ -31,11 +33,14 @@ public:
private:
void Init();
undefined4 m_unk0x68; // 0x68
undefined4 m_unk0x6c; // 0x6c
undefined m_unk0x70; // 0x70
MxString m_unk0x74; // 0x74
undefined m_unk0x84; // 0x84
undefined4 m_unk0x68; // 0x68
LegoTextureInfo* m_textureInfo; // 0x6c
MxBool m_unk0x70; // 0x70
MxString m_roiName; // 0x74
MxBool m_unk0x84; // 0x84
};
// TEMPLATE: LEGO1 0x1004eb20
// MxListEntry<LegoPhoneme *>::MxListEntry<LegoPhoneme *>
#endif // LEGOPHONEMEPRESENTER_H

View File

@@ -1,21 +0,0 @@
#ifndef LEGOUNKNOWN100D7C88_H
#define LEGOUNKNOWN100D7C88_H
#include "decomp.h"
#include "mxstring.h"
// VTABLE: LEGO1 0x100d7c88
// SIZE 0x18
class LegoUnknown100d7c88 {
public:
~LegoUnknown100d7c88();
virtual undefined4 VTable0x00(); // vtable+0x00
// More virtual functions
private:
MxString m_unk0x04; // 0x04
undefined4 m_unk0x14; // 0x14
};
#endif // LEGOUNKNOWN100D7C88_H

View File

@@ -1,48 +0,0 @@
#ifndef LEGOUNKNOWN100D9D00_H
#define LEGOUNKNOWN100D9D00_H
#include "decomp.h"
#include "legounknown100d7c88.h"
#include "mxlist.h"
// VTABLE: LEGO1 0x100d9cd0
// class MxCollection<LegoUnknown100d7c88 *>
// VTABLE: LEGO1 0x100d9ce8
// class MxList<LegoUnknown100d7c88 *>
// VTABLE: LEGO1 0x100d9d00
// SIZE 0x18
class LegoUnknown100d9d00 : public MxList<LegoUnknown100d7c88*> {
public:
LegoUnknown100d9d00() { SetDestroy(Destroy); }
// STUB: LEGO1 0x1007b210
MxS8 Compare(LegoUnknown100d7c88* p_a, LegoUnknown100d7c88* p_b) override { return -1; } // vtable+0x14
// FUNCTION: LEGO1 0x1007b2e0
static void Destroy(LegoUnknown100d7c88* p_element) { delete p_element; }
};
// TEMPLATE: LEGO1 0x1007b300
// MxCollection<LegoUnknown100d7c88 *>::Compare
// TEMPLATE: LEGO1 0x1007b310
// MxCollection<LegoUnknown100d7c88 *>::~MxCollection<LegoUnknown100d7c88 *>
// TEMPLATE: LEGO1 0x1007b360
// MxCollection<LegoUnknown100d7c88 *>::Destroy
// TEMPLATE: LEGO1 0x1007b370
// MxList<LegoUnknown100d7c88 *>::~MxList<LegoUnknown100d7c88 *>
// SYNTHETIC: LEGO1 0x1007b400
// LegoUnknown100d9d00::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x1007b470
// MxCollection<LegoUnknown100d7c88 *>::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x1007b4e0
// MxList<LegoUnknown100d7c88 *>::`scalar deleting destructor'
#endif // LEGOUNKNOWN100D9D00_H

View File

@@ -3,7 +3,7 @@
#include "3dmanager/lego3dmanager.h"
#include "decomp.h"
#include "legounknown100d9d00.h"
#include "legophonemelist.h"
#include "mxdirectx/mxdirect3d.h"
#include "mxdirectx/mxstopwatch.h"
#include "mxvideomanager.h"
@@ -34,7 +34,7 @@ public:
virtual MxPresenter* GetPresenterAt(MxS32 p_x, MxS32 p_y); // vtable+0x38
// FUNCTION: LEGO1 0x1007ab10
virtual LegoUnknown100d9d00* VTable0x3c() { return m_unk0x100d9d00; } // vtable+0x3c
virtual LegoPhonemeList* GetPhonemeList() { return m_phonemeRefList; } // vtable+0x3c
void SetSkyColor(float p_red, float p_green, float p_blue);
void OverrideSkyColor(MxBool p_shouldOverride);
@@ -57,40 +57,40 @@ private:
inline void DrawCursor();
Tgl::Renderer* m_renderer; // 0x64
Lego3DManager* m_3dManager; // 0x68
LegoROI* m_viewROI; // 0x6c
undefined4 m_unk0x70; // 0x70
MxDirect3D* m_direct3d; // 0x74
undefined4 m_unk0x78[27]; // 0x78
MxBool m_render3d; // 0xe4
MxBool m_unk0xe5; // 0xe5
MxBool m_unk0xe6; // 0xe6
PALETTEENTRY m_paletteEntries[256]; // 0xe7
undefined m_padding0x4e7; // 0x4e7
LegoUnknown100d9d00* m_unk0x100d9d00; // 0x4e8
MxBool m_isFullscreenMovie; // 0x4ec
MxPalette* m_palette; // 0x4f0
MxStopWatch* m_stopWatch; // 0x4f4
double m_elapsedSeconds; // 0x4f8
MxBool m_fullScreenMovie; // 0x500
MxBool m_drawCursor; // 0x501
MxS32 m_cursorXCopy; // 0x504
MxS32 m_cursorYCopy; // 0x508
MxS32 m_cursorX; // 0x50c
MxS32 m_cursorY; // 0x510
LPDIRECTDRAWSURFACE m_cursorSurface; // 0x514
RECT m_cursorRect; // 0x518
undefined4 m_unk0x528; // 0x528
MxBool m_drawFPS; // 0x52c
RECT m_fpsRect; // 0x530
HFONT m_arialFont; // 0x540
SIZE m_fpsSize; // 0x544
MxFloat m_unk0x54c; // 0x54c
MxFloat m_unk0x550; // 0x550
MxBool m_unk0x554; // 0x554
MxBool m_paused; // 0x555
undefined m_pad0x556[0x39]; // 0x556
Tgl::Renderer* m_renderer; // 0x64
Lego3DManager* m_3dManager; // 0x68
LegoROI* m_viewROI; // 0x6c
undefined4 m_unk0x70; // 0x70
MxDirect3D* m_direct3d; // 0x74
undefined4 m_unk0x78[27]; // 0x78
MxBool m_render3d; // 0xe4
MxBool m_unk0xe5; // 0xe5
MxBool m_unk0xe6; // 0xe6
PALETTEENTRY m_paletteEntries[256]; // 0xe7
undefined m_padding0x4e7; // 0x4e7
LegoPhonemeList* m_phonemeRefList; // 0x4e8
MxBool m_isFullscreenMovie; // 0x4ec
MxPalette* m_palette; // 0x4f0
MxStopWatch* m_stopWatch; // 0x4f4
double m_elapsedSeconds; // 0x4f8
MxBool m_fullScreenMovie; // 0x500
MxBool m_drawCursor; // 0x501
MxS32 m_cursorXCopy; // 0x504
MxS32 m_cursorYCopy; // 0x508
MxS32 m_cursorX; // 0x50c
MxS32 m_cursorY; // 0x510
LPDIRECTDRAWSURFACE m_cursorSurface; // 0x514
RECT m_cursorRect; // 0x518
undefined4 m_unk0x528; // 0x528
MxBool m_drawFPS; // 0x52c
RECT m_fpsRect; // 0x530
HFONT m_arialFont; // 0x540
SIZE m_fpsSize; // 0x544
MxFloat m_unk0x54c; // 0x54c
MxFloat m_unk0x550; // 0x550
MxBool m_unk0x554; // 0x554
MxBool m_paused; // 0x555
undefined m_pad0x556[0x39]; // 0x556
};
// SYNTHETIC: LEGO1 0x1007ab20