The IslePathActor's (#113)

* pizza: fix type m_unk90

* Initial implementation of a lot of IslePathActor's

All IslePathActor's seem to have (for the most part), the same few variables in common,
probably some ID. SkateBoard, Pizza and TowTrack seem to be a bit more complicated with additional
fields surrounding it.

* Add missing ClassName(s) and IsA(s)

* Add decomp size asserts

* Fix size assertions

* Make legopathactor fields protected for now, fix a type in Pizza

* Fix TowTrack structure

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Joshua Peisach 2023-09-10 08:01:39 -04:00 committed by GitHub
parent c4453fe49f
commit 1fa2fd9737
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 159 additions and 22 deletions

View file

@ -1,7 +1,21 @@
#include "ambulance.h"
// OFFSET: LEGO1 0x10035ee0 STUB
#include "decomp.h"
DECOMP_SIZE_ASSERT(Ambulance, 0x184);
// OFFSET: LEGO1 0x10035ee0
Ambulance::Ambulance()
{
// TODO
this->m_unk168 = 0;
this->m_unk16a = -1;
this->m_unk164 = 0;
this->m_unk16c = 0;
this->m_unk174 = -1;
this->m_unk16e = 0;
this->m_unk178 = -1;
this->m_unk170 = 0;
this->m_unk172 = 0;
this->m_unk13c = 40.0;
this->m_unk17c = 1.0;
}

View file

@ -22,7 +22,20 @@ class Ambulance : public IslePathActor
{
return !strcmp(name, Ambulance::ClassName()) || IslePathActor::IsA(name);
}
private:
// TODO: Ambulance fields
undefined m_unk160[4];
MxS32 m_unk164;
MxS16 m_unk168;
MxS16 m_unk16a;
MxS16 m_unk16c;
MxS16 m_unk16e;
MxS16 m_unk170;
MxS16 m_unk172;
MxS32 m_unk174;
MxS32 m_unk178;
MxFloat m_unk17c;
undefined m_unk180[4];
};
#endif // AMBULANCE_H

View file

@ -1,8 +1,12 @@
#include "bike.h"
// OFFSET: LEGO1 0x10076670 STUB
DECOMP_SIZE_ASSERT(Bike, 0x164);
// OFFSET: LEGO1 0x10076670
Bike::Bike()
{
// TODO
this->m_unk13c = 20.0;
this->m_unk150 = 3.0;
this->m_unk148 = 1;
}

View file

@ -1,6 +1,7 @@
#ifndef BIKE_H
#define BIKE_H
#include "decomp.h"
#include "islepathactor.h"
// VTABLE 0x100d9808
@ -22,7 +23,9 @@ class Bike : public IslePathActor
{
return !strcmp(name, Bike::ClassName()) || IslePathActor::IsA(name);
}
private:
// TODO: Bike fields
undefined m_unk160[4];
};

View file

@ -1,7 +1,12 @@
#include "dunebuggy.h"
// OFFSET: LEGO1 0x10067bb0 STUB
#include "decomp.h"
DECOMP_SIZE_ASSERT(DuneBuggy, 0x16c);
// OFFSET: LEGO1 0x10067bb0
DuneBuggy::DuneBuggy()
{
// TODO
this->m_unk13c = 25.0;
this->m_unk164 = 1.0;
}

View file

@ -1,6 +1,7 @@
#ifndef DUNEBUGGY_H
#define DUNEBUGGY_H
#include "decomp.h"
#include "islepathactor.h"
// VTABLE 0x100d8f98
@ -22,7 +23,11 @@ class DuneBuggy : public IslePathActor
{
return !strcmp(name, DuneBuggy::ClassName()) || IslePathActor::IsA(name);
}
private:
// TODO: Double check DuneBuggy field types
undefined4 m_unk160;
MxFloat m_unk164;
undefined4 m_unk168;
};
#endif // DUNEBUGGY_H

View file

@ -1,7 +1,11 @@
#include "jetski.h"
// OFFSET: LEGO1 0x1007e3b0 STUB
DECOMP_SIZE_ASSERT(Jetski, 0x164);
// OFFSET: LEGO1 0x1007e3b0
Jetski::Jetski()
{
// TODO
this->m_unk13c = 25.0;
this->m_unk150 = 2.0;
this->m_unk148 = 1;
}

View file

@ -1,6 +1,7 @@
#ifndef JETSKI_H
#define JETSKI_H
#include "decomp.h"
#include "islepathactor.h"
// VTABLE 0x100d9ec8
@ -22,7 +23,9 @@ class Jetski : public IslePathActor
{
return !strcmp(name, Jetski::ClassName()) || IslePathActor::IsA(name);
}
private:
// TODO: Jetski fields
undefined m_unk160[4];
};

View file

@ -25,11 +25,15 @@ class LegoPathActor : public LegoActor
{
return !strcmp(name, LegoPathActor::ClassName()) || LegoActor::IsA(name);
}
// TODO: the types. Pizza needs this as public:
protected:
// TODO: the types
undefined unk78[0xc4];
MxS32 m_unk13c;
undefined unk140[0x14];
MxFloat m_unk13c;
MxS32 m_unk140;
MxS32 m_unk144;
undefined m_unk148;
MxS32 m_unk14c;
MxFloat m_unk150;
};
#endif // LEGOPATHACTOR_H

View file

@ -1,9 +1,11 @@
#include "racecar.h"
// OFFSET: LEGO1 0x10028200 STUB
DECOMP_SIZE_ASSERT(RaceCar, 0x164);
// OFFSET: LEGO1 0x10028200
RaceCar::RaceCar()
{
// TODO
this->m_unk13c = 40.0;
}
// OFFSET: LEGO1 0x10028420 STUB

View file

@ -1,6 +1,7 @@
#ifndef RACECAR_H
#define RACECAR_H
#include "decomp.h"
#include "islepathactor.h"
// VTABLE 0x100d6918
@ -10,6 +11,22 @@ class RaceCar : public IslePathActor
public:
RaceCar();
virtual ~RaceCar() override; // vtable+0x0
// OFFSET: LEGO1 0x10028270
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f03e0
return "RaceCar";
}
// OFFSET: LEGO1 0x10028280
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, RaceCar::ClassName()) || IslePathActor::IsA(name);
}
private:
// TODO: RaceCar fields
undefined m_unk160[4];
};
#endif // RACECAR_H

View file

@ -1,7 +1,17 @@
#include "skateboard.h"
#include "mxomni.h"
// OFFSET: LEGO1 0x1000fd40 STUB
#include "decomp.h"
DECOMP_SIZE_ASSERT(SkateBoard, 0x168);
// OFFSET: LEGO1 0x1000fd40
SkateBoard::SkateBoard()
{
// TODO
this->m_unk160 = 0;
this->m_unk13c = 15.0;
this->m_unk150 = 3.5;
this->m_unk148 = 1;
NotificationManager()->Register(this);
}

View file

@ -1,6 +1,7 @@
#ifndef SKATEBOARD_H
#define SKATEBOARD_H
#include "decomp.h"
#include "islepathactor.h"
// VTABLE 0x100d55f0
@ -10,6 +11,22 @@ class SkateBoard : public IslePathActor
public:
SkateBoard();
// OFFSET: LEGO1 0x1000fdd0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f041c
return "SkateBoard";
}
// OFFSET: LEGO1 0x1000fde0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, SkateBoard::ClassName()) || IslePathActor::IsA(name);
}
private:
// TODO: SkateBoard types
undefined m_unk160;
undefined m_unk161[0x7];
};
#endif // SKATEBOARD_H

View file

@ -1,7 +1,17 @@
#include "towtrack.h"
// OFFSET: LEGO1 0x1004c720 STUB
DECOMP_SIZE_ASSERT(TowTrack, 0x180);
// OFFSET: LEGO1 0x1004c720
TowTrack::TowTrack()
{
// TODO
this->m_unk168 = 0;
this->m_unk16a = -1;
this->m_unk164 = 0;
this->m_unk16c = 0;
this->m_unk170 = -1;
this->m_unk16e = 0;
this->m_unk174 = -1;
this->m_unk13c = 40.0;
this->m_unk178 = 1.0;
}

View file

@ -1,6 +1,7 @@
#ifndef TOWTRACK_H
#define TOWTRACK_H
#include "decomp.h"
#include "islepathactor.h"
// VTABLE 0x100d7ee0
@ -10,6 +11,31 @@ class TowTrack : public IslePathActor
public:
TowTrack();
// OFFSET: LEGO1 0x1004c7c0
inline virtual const char *ClassName() const override // vtable+0x0c
{
// 0x100f03b8
return "TowTrack";
}
// OFFSET: LEGO1 0x1004c7d0
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{
return !strcmp(name, TowTrack::ClassName()) || IslePathActor::IsA(name);
}
private:
// TODO: TowTrack field types
undefined m_unk154[4];
MxS32 m_unk164;
MxS16 m_unk168;
MxS16 m_unk16a;
MxS16 m_unk16c;
MxS16 m_unk16e;
MxS32 m_unk170;
MxS32 m_unk174;
MxFloat m_unk178;
undefined4 m_unk17c;
};