mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-26 01:44:19 +00:00
Implement LegoRaceCar::FUN_10012ff0(), refactoring (#1063)
* Implement `LegoRaceCar::FUN_10012ff0()`, refactor based on BETA10 * Add BETA10 annotations * Rename functions and variables based on BETA10 assertions * Address issues raised by linter * Rename variable, add BETA10 vtables * Rename legoracecar files to legoracers --------- Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
@@ -785,7 +785,7 @@ LegoAnim::LegoAnim()
|
||||
m_duration = 0;
|
||||
m_actors = NULL;
|
||||
m_numActors = 0;
|
||||
m_scene = NULL;
|
||||
m_camAnim = NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a0bc0
|
||||
@@ -799,8 +799,8 @@ LegoAnim::~LegoAnim()
|
||||
delete[] m_actors;
|
||||
}
|
||||
|
||||
if (m_scene != NULL) {
|
||||
delete m_scene;
|
||||
if (m_camAnim != NULL) {
|
||||
delete m_camAnim;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -845,9 +845,9 @@ LegoResult LegoAnim::Read(LegoStorage* p_storage, LegoS32 p_parseScene)
|
||||
}
|
||||
|
||||
if (p_parseScene) {
|
||||
m_scene = new LegoAnimScene();
|
||||
m_camAnim = new LegoAnimScene();
|
||||
|
||||
result = m_scene->Read(p_storage);
|
||||
result = m_camAnim->Read(p_storage);
|
||||
|
||||
if (result != SUCCESS) {
|
||||
goto done;
|
||||
|
||||
@@ -208,6 +208,7 @@ struct LegoAnimActorEntry {
|
||||
undefined4 m_unk0x04; // 0x04
|
||||
};
|
||||
|
||||
// TODO: Possibly called `LegoCameraAnim(ation)`?
|
||||
// SIZE 0x24
|
||||
class LegoAnimScene {
|
||||
public:
|
||||
@@ -242,7 +243,10 @@ class LegoAnim : public LegoTree {
|
||||
public:
|
||||
LegoAnim();
|
||||
~LegoAnim() override;
|
||||
|
||||
// FUNCTION: BETA10 0x100284c0
|
||||
LegoTime GetDuration() { return m_duration; }
|
||||
|
||||
LegoU32 GetNumActors() { return m_numActors; }
|
||||
LegoResult Write(LegoStorage* p_storage) override; // vtable+0x08
|
||||
virtual LegoResult Read(LegoStorage* p_storage, LegoS32 p_parseScene); // vtable+0x10
|
||||
@@ -250,7 +254,8 @@ public:
|
||||
const LegoChar* GetActorName(LegoU32 p_index);
|
||||
undefined4 GetActorUnknown0x04(LegoU32 p_index);
|
||||
|
||||
LegoAnimScene* GetScene() { return m_scene; }
|
||||
// FUNCTION: BETA10 0x1005abf0
|
||||
LegoAnimScene* GetCamAnim() { return m_camAnim; }
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100a0ba0
|
||||
// LegoAnim::`scalar deleting destructor'
|
||||
@@ -259,7 +264,7 @@ protected:
|
||||
LegoTime m_duration; // 0x08
|
||||
LegoAnimActorEntry* m_actors; // 0x0c
|
||||
LegoU32 m_numActors; // 0x10
|
||||
LegoAnimScene* m_scene; // 0x14
|
||||
LegoAnimScene* m_camAnim; // 0x14
|
||||
|
||||
// FUNCTION: LEGO1 0x100a1040
|
||||
LegoTreeNodeData* CreateData() override { return new LegoAnimNodeData(); } // vtable+0x0c
|
||||
|
||||
@@ -16,7 +16,10 @@ public:
|
||||
virtual LegoResult VTable0x04(); // vtable+0x04
|
||||
|
||||
LegoU8 GetNumEdges() { return m_numEdges; }
|
||||
|
||||
// FUNCTION: BETA10 0x1001cc30
|
||||
LegoEdge** GetEdges() { return m_edges; }
|
||||
|
||||
LegoU32 IsEqual(LegoWEEdge& p_other) { return this == &p_other; }
|
||||
|
||||
void SetEdges(LegoEdge** p_edges, LegoU8 p_numEdges)
|
||||
|
||||
Reference in New Issue
Block a user