Fix Annotations and LegoAnimActor class structure. (#710)

* Fix size annotations for legoomni
Fix structure and add placeholder annotations for LegoAnimActor and subclasses

* Fix LegoCarRaceActor constructor
Fix function name in LegoRaceCar

* Add size assertions for legoomni and fix sizes

* Various style fixes

* Use other marker so vtable.py doesn't compare

* Revert "Use other marker so vtable.py doesn't compare"

This reverts commit 608985cd73.

* Fix copy/paste error

* Remove stale comment.

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Nathan M Gilbert
2024-03-22 21:30:58 -04:00
committed by GitHub
parent 96f7219811
commit fca8f74bd8
108 changed files with 778 additions and 82 deletions

View File

@@ -1,5 +1,7 @@
#include "act2brick.h"
DECOMP_SIZE_ASSERT(Act2Brick, 0x194)
// STUB: LEGO1 0x1007a2b0
Act2Brick::Act2Brick()
{

View File

@@ -1,5 +1,7 @@
#include "act2policestation.h"
DECOMP_SIZE_ASSERT(Act2PoliceStation, 0x68)
// STUB: LEGO1 0x1004e0e0
MxLong Act2PoliceStation::Notify(MxParam& p_param)
{

View File

@@ -3,6 +3,8 @@
#include "legoentity.h"
#include "misc.h"
DECOMP_SIZE_ASSERT(LegoActorPresenter, 0x50)
// FUNCTION: LEGO1 0x10076c30
void LegoActorPresenter::ReadyTickle()
{

View File

@@ -6,7 +6,7 @@
#include "misc.h"
#include "realtime/realtime.h"
DECOMP_SIZE_ASSERT(LegoCameraController, 0xc8);
DECOMP_SIZE_ASSERT(LegoCameraController, 0xc8)
// FUNCTION: LEGO1 0x10011d50
LegoCameraController::LegoCameraController()

View File

@@ -1,5 +1,14 @@
#include "legocarraceactor.h"
#include "mxmisc.h"
#include "mxvariabletable.h"
DECOMP_SIZE_ASSERT(LegoCarRaceActor, 0x1a0)
// GLOBAL: LEGO1 0x100f7af0
// STRING: LEGO1 0x100f7ae4
const char* g_fuel = "FUEL";
// STUB: LEGO1 0x10014130
void LegoCarRaceActor::VTable0x68()
{
@@ -20,6 +29,34 @@ MxS32 LegoCarRaceActor::VTable0x94()
return 0;
}
// FUNCTION: LEGO1 0x10080350
LegoCarRaceActor::LegoCarRaceActor()
{
m_unk0x08 = 1.0f;
m_unk0x70 = 0.0f;
m_unk0x0c = 0;
m_unk0x13c = 0.0f;
m_unk0x68 = 1.0f;
m_unk0x1c = 0;
m_unk0x10 = 0.65f;
m_unk0x14 = 0.03f;
m_unk0x18 = 0.6f;
m_unk0x140 = 0.1f;
m_unk0x150 = -5.0f;
m_unk0x148 = 1;
VariableTable()->SetVariable(g_fuel, "0.8");
}
// STUB: LEGO1 0x10080590
void LegoCarRaceActor::FUN_10080590()
{
}
// STUB: LEGO1 0x10080740
void LegoCarRaceActor::VTable0x1c()
{
}
// STUB: LEGO1 0x10081830
void LegoCarRaceActor::VTable0x6c()
{

View File

@@ -4,7 +4,7 @@
#include "legovideomanager.h"
#include "misc.h"
DECOMP_SIZE_ASSERT(LegoEntityPresenter, 0x50);
DECOMP_SIZE_ASSERT(LegoEntityPresenter, 0x50)
// FUNCTION: LEGO1 0x10053440
LegoEntityPresenter::LegoEntityPresenter()

View File

@@ -1,5 +1,29 @@
#include "legojetski.h"
#include "mxmisc.h"
#include "mxnotificationmanager.h"
DECOMP_SIZE_ASSERT(LegoJetski, 0x1dc)
// FUNCTION: LEGO1 0x100136f0
void LegoJetski::FUN_100136f0(float p_worldSpeed)
{
if (p_worldSpeed < 0) {
LegoCarRaceActor::m_unk0x0c = 2;
m_unk0x13c = 0;
SetWorldSpeed(0);
}
else {
m_unk0x13c = p_worldSpeed;
}
}
// FUNCTION: LEGO1 0x10013820
LegoJetski::LegoJetski()
{
NotificationManager()->Register(this);
}
// STUB: LEGO1 0x10013e70
MxLong LegoJetski::Notify(MxParam& p_param)
{

View File

@@ -1,5 +1,22 @@
#include "legojetskiraceactor.h"
DECOMP_SIZE_ASSERT(LegoJetskiRaceActor, 0x1a8)
// STUB: LEGO1 0x10014220
void LegoJetskiRaceActor::VTable0x1c()
{
// TODO
}
// FUNCTION: LEGO1 0x10080ef0
LegoJetskiRaceActor::LegoJetskiRaceActor()
{
m_unk0x10 = 0.95f;
m_unk0x14 = 0.04f;
m_unk0x18 = 0.5f;
m_unk0x150 = 1.5f;
}
// STUB: LEGO1 0x10081fc0
void LegoJetskiRaceActor::VTable0x6c()
{

View File

@@ -11,8 +11,8 @@
#include "realtime/realtime.h"
#include "roi/legoroi.h"
DECOMP_SIZE_ASSERT(LegoMouseController, 0x20);
DECOMP_SIZE_ASSERT(LegoPointOfViewController, 0x38);
DECOMP_SIZE_ASSERT(LegoMouseController, 0x20)
DECOMP_SIZE_ASSERT(LegoPointOfViewController, 0x38)
// GLOBAL: LEGO1 0x100f75ac
MxBool g_unk0x100f75ac = FALSE;

View File

@@ -29,6 +29,8 @@
#include <io.h>
DECOMP_SIZE_ASSERT(LegoWorldPresenter, 0x54)
// GLOBAL: LEGO1 0x100f75d4
MxS32 g_legoWorldPresenterQuality = 1;