From 3a3ac590761e5fc576c49e7b5ae03895ecf10501 Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Fri, 18 Aug 2023 19:09:11 -0400 Subject: [PATCH] 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. --- LEGO1/ambulance.cpp | 14 ++++++++++++-- LEGO1/ambulance.h | 15 ++++++++++++++- LEGO1/bike.cpp | 6 ++++-- LEGO1/dunebuggy.cpp | 5 +++-- LEGO1/dunebuggy.h | 7 ++++++- LEGO1/jetski.cpp | 6 ++++-- LEGO1/legopathactor.h | 10 +++++++--- LEGO1/pizza.cpp | 2 +- LEGO1/racecar.cpp | 4 ++-- LEGO1/skateboard.cpp | 9 +++++++-- LEGO1/skateboard.h | 7 ++++++- LEGO1/towtrack.cpp | 12 ++++++++++-- LEGO1/towtrack.h | 13 ++++++++++++- 13 files changed, 88 insertions(+), 22 deletions(-) diff --git a/LEGO1/ambulance.cpp b/LEGO1/ambulance.cpp index 6b5e76ad..a62e6134 100644 --- a/LEGO1/ambulance.cpp +++ b/LEGO1/ambulance.cpp @@ -1,7 +1,17 @@ #include "ambulance.h" -// OFFSET: LEGO1 0x10035ee0 STUB +// 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; } \ No newline at end of file diff --git a/LEGO1/ambulance.h b/LEGO1/ambulance.h index dd89af3c..3371830f 100644 --- a/LEGO1/ambulance.h +++ b/LEGO1/ambulance.h @@ -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 diff --git a/LEGO1/bike.cpp b/LEGO1/bike.cpp index ac741a44..b0628357 100644 --- a/LEGO1/bike.cpp +++ b/LEGO1/bike.cpp @@ -1,8 +1,10 @@ #include "bike.h" -// OFFSET: LEGO1 0x10076670 STUB +// OFFSET: LEGO1 0x10076670 Bike::Bike() { - // TODO + this->m_unk13c = 20.0; + this->m_unk150 = 3.0; + this->m_unk148 = 1; } diff --git a/LEGO1/dunebuggy.cpp b/LEGO1/dunebuggy.cpp index babf21cb..50b09e05 100644 --- a/LEGO1/dunebuggy.cpp +++ b/LEGO1/dunebuggy.cpp @@ -1,7 +1,8 @@ #include "dunebuggy.h" -// OFFSET: LEGO1 0x10067bb0 STUB +// OFFSET: LEGO1 0x10067bb0 DuneBuggy::DuneBuggy() { - // TODO + this->m_unk13c = 25.0; + this->m_unk164 = 1.0; } \ No newline at end of file diff --git a/LEGO1/dunebuggy.h b/LEGO1/dunebuggy.h index 1f89784e..1a083207 100644 --- a/LEGO1/dunebuggy.h +++ b/LEGO1/dunebuggy.h @@ -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 diff --git a/LEGO1/jetski.cpp b/LEGO1/jetski.cpp index 50676253..995da506 100644 --- a/LEGO1/jetski.cpp +++ b/LEGO1/jetski.cpp @@ -1,7 +1,9 @@ #include "jetski.h" -// OFFSET: LEGO1 0x1007e3b0 STUB +// OFFSET: LEGO1 0x1007e3b0 Jetski::Jetski() { - // TODO + this->m_unk13c = 25.0; + this->m_unk150 = 2.0; + this->m_unk148 = 1; } \ No newline at end of file diff --git a/LEGO1/legopathactor.h b/LEGO1/legopathactor.h index 7e524b08..87bdbf51 100644 --- a/LEGO1/legopathactor.h +++ b/LEGO1/legopathactor.h @@ -26,10 +26,14 @@ class LegoPathActor : public LegoActor return !strcmp(name, LegoPathActor::ClassName()) || LegoActor::IsA(name); } - // TODO: the types. Pizza needs this as public: + // TODO: the types. IslePathActor-inherited classes (pizza, jetski, etc.) needs these as public: 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 diff --git a/LEGO1/pizza.cpp b/LEGO1/pizza.cpp index 5bdabdc3..c82f9e58 100644 --- a/LEGO1/pizza.cpp +++ b/LEGO1/pizza.cpp @@ -13,7 +13,7 @@ Pizza::Pizza() this->m_unk88 = 0; this->m_unk8c = -1; this->m_unk98 = 0; - this->m_unk90 = 0; + this->m_unk90 = 0.0; } // OFFSET: LEGO1 0x10038100 diff --git a/LEGO1/racecar.cpp b/LEGO1/racecar.cpp index 59bb5146..47758fab 100644 --- a/LEGO1/racecar.cpp +++ b/LEGO1/racecar.cpp @@ -1,9 +1,9 @@ #include "racecar.h" -// OFFSET: LEGO1 0x10028200 STUB +// OFFSET: LEGO1 0x10028200 RaceCar::RaceCar() { - // TODO + this->m_unk13c = 40.0; } // OFFSET: LEGO1 0x10028420 STUB diff --git a/LEGO1/skateboard.cpp b/LEGO1/skateboard.cpp index 42466206..fa5ec5ad 100644 --- a/LEGO1/skateboard.cpp +++ b/LEGO1/skateboard.cpp @@ -1,7 +1,12 @@ #include "skateboard.h" -// OFFSET: LEGO1 0x1000fd40 STUB +// 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); } diff --git a/LEGO1/skateboard.h b/LEGO1/skateboard.h index f290dc7b..1b39ffbf 100644 --- a/LEGO1/skateboard.h +++ b/LEGO1/skateboard.h @@ -1,7 +1,9 @@ #ifndef SKATEBOARD_H #define SKATEBOARD_H +#include "decomp.h" #include "islepathactor.h" +#include "mxomni.h" // VTABLE 0x100d55f0 // SIZE 0x168 @@ -9,7 +11,10 @@ class SkateBoard : public IslePathActor { public: SkateBoard(); - +private: + // TODO: SkateBoard types + undefined m_unk160; + undefined m_unk161[0x7]; }; #endif // SKATEBOARD_H diff --git a/LEGO1/towtrack.cpp b/LEGO1/towtrack.cpp index 90d3d018..62c76590 100644 --- a/LEGO1/towtrack.cpp +++ b/LEGO1/towtrack.cpp @@ -1,7 +1,15 @@ #include "towtrack.h" -// OFFSET: LEGO1 0x1004c720 STUB +// 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; } diff --git a/LEGO1/towtrack.h b/LEGO1/towtrack.h index 95e6885a..a74b63c3 100644 --- a/LEGO1/towtrack.h +++ b/LEGO1/towtrack.h @@ -1,6 +1,7 @@ #ifndef TOWTRACK_H #define TOWTRACK_H +#include "decomp.h" #include "islepathactor.h" // VTABLE 0x100d7ee0 @@ -9,7 +10,17 @@ class TowTrack : public IslePathActor { public: TowTrack(); - +private: + // TODO: TowTrack field types + undefined m_unk160[0x4]; + MxS32 m_unk164; + MxS16 m_unk168; + MxS16 m_unk16a; + MxS16 m_unk16c; + MxS16 m_unk16e; + MxS32 m_unk170; + MxS32 m_unk174; + MxFloat m_unk178; };