From b3378bd4411c9e5a171437937cf66274c91ebf9c Mon Sep 17 00:00:00 2001 From: theAzack9 Date: Mon, 20 Oct 2025 21:15:23 +0200 Subject: [PATCH 1/3] Add TBathtub and add stubs for functions --- include/MoveBG/MapObjCorona.hpp | 55 +++++++++++++++++ src/MoveBG/MapObjCorona.cpp | 104 ++++++++++++++++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 include/MoveBG/MapObjCorona.hpp diff --git a/include/MoveBG/MapObjCorona.hpp b/include/MoveBG/MapObjCorona.hpp new file mode 100644 index 00000000..de94b5be --- /dev/null +++ b/include/MoveBG/MapObjCorona.hpp @@ -0,0 +1,55 @@ +#ifndef MOVE_BG_MAP_OBJ_CORONA_HPP +#define MOVE_BG_MAP_OBJ_CORONA_HPP + +#include + +class TBathtub : public TMapObjBase { +public: + TBathtub(const char*); + ~TBathtub(); + + void loadAfter(); + void hipdrop(const JGeometry::TVec3&); + void quake(const JGeometry::TVec3&); + u8 getNumGripsDead() const; + void tumble(float, float); + MtxPtr getTakingMtx(); + MtxPtr getSubmarineMtxInDemo(); + MtxPtr getPeachMtxInDemo(); + MtxPtr getKoopaJrMtxInDemo(); + BOOL receiveMessage(THitActor* sender, u32 message); + Mtx* getRootJointMtx() const; + void perform(unsigned long, JDrama::TGraphics*); + void control(); + void calcBathtubData(); + void setupCollisions_(); + void removeCollisions_(); // Unused + void startDemo(); + bool allowsTumble() const; + void calcRootMatrix(); + bool getNearGrip(const JGeometry::TVec3&, float, float*) const; + u8 getNextJuncture(const JGeometry::TVec3&, + const JGeometry::TVec3&) const; + bool getNextGrip(const JGeometry::TVec3&, + const JGeometry::TVec3&, float, float*) const; + void updatePosture_(); + void load(JSUMemoryInputStream&); + u8 getNumKillerLaunchable() const; + bool isKillerAttackable() const; + u8 getNumKillerBurstable() const; + bool isBreaking() const; // Unused + bool isKillerLaunchable() const; // Unused + void showMessage(unsigned long); // Unused + u8 getNearJuncture(const JGeometry::TVec3&) const; // Unused + MtxPtr getKoopaMtxInDemo(); // Unused + MtxPtr getWaterMtx(int); // Unused + MtxPtr getShineEffectMtx(); // Unused + MtxPtr getShineMtx(); // Unused + void liftMario(const JGeometry::TVec3&); // Unused + void trample(const JGeometry::TVec3&); // Unused + +public: + // Will start at 0x138 +}; + +#endif diff --git a/src/MoveBG/MapObjCorona.cpp b/src/MoveBG/MapObjCorona.cpp index e69de29b..25540aee 100644 --- a/src/MoveBG/MapObjCorona.cpp +++ b/src/MoveBG/MapObjCorona.cpp @@ -0,0 +1,104 @@ +#include "MoveBG/MapObjCorona.hpp" +#include "MoveBG/MapObjBase.hpp" + +void TBathtub::loadAfter() { } + +void TBathtub::hipdrop(const JGeometry::TVec3&) { } + +void TBathtub::quake(const JGeometry::TVec3&) { } + +u8 TBathtub::getNumGripsDead() const { return 0; } + +void TBathtub::tumble(float, float) { } + +MtxPtr TBathtub::getTakingMtx() { return nullptr; } + +MtxPtr TBathtub::getSubmarineMtxInDemo() { return nullptr; } + +MtxPtr TBathtub::getPeachMtxInDemo() { return nullptr; } + +MtxPtr TBathtub::getKoopaJrMtxInDemo() { return nullptr; } + +BOOL TBathtub::receiveMessage(THitActor* sender, u32 message) { return false; } + +Mtx* TBathtub::getRootJointMtx() const { return nullptr; } + +void TBathtub::perform(unsigned long, JDrama::TGraphics*) { } + +void TBathtub::control() { } + +void TBathtub::calcBathtubData() { } + +void TBathtub::setupCollisions_() { } + +void TBathtub::removeCollisions_() { } // Unused + +void TBathtub::startDemo() { } + +bool TBathtub::allowsTumble() const { return false; } + +void TBathtub::calcRootMatrix() { } + +bool TBathtub::getNearGrip(const JGeometry::TVec3&, float, float*) const +{ + return false; +} + +u8 TBathtub::getNextJuncture(const JGeometry::TVec3&, + const JGeometry::TVec3&) const +{ + return 0; +} + +bool TBathtub::getNextGrip(const JGeometry::TVec3&, + const JGeometry::TVec3&, float, float*) const +{ + return false; +} + +void TBathtub::updatePosture_() { } + +TBathtub::TBathtub(const char* name) + : TMapObjBase(name) +{ +} + +void TBathtub::load(JSUMemoryInputStream&) { } + +u8 TBathtub::getNumKillerLaunchable() const { return 0; } + +bool TBathtub::isKillerAttackable() const { return false; } + +u8 TBathtub::getNumKillerBurstable() const { return 0; } + +// Unused +bool TBathtub::isBreaking() const { return false; } + +// Unused +bool TBathtub::isKillerLaunchable() const { return false; } + +// Unused +void TBathtub::showMessage(unsigned long) { } + +// Unused +u8 TBathtub::getNearJuncture(const JGeometry::TVec3&) const { return 0; } + +// Unused +MtxPtr TBathtub::getKoopaMtxInDemo() { return nullptr; } + +// Unused +MtxPtr TBathtub::getWaterMtx(int) { return nullptr; } + +// Unused +MtxPtr TBathtub::getShineEffectMtx() { return nullptr; } + +// Unused +MtxPtr TBathtub::getShineMtx() { return nullptr; } + +// Unused +void TBathtub::liftMario(const JGeometry::TVec3&) { } + +// Unused +void TBathtub::trample(const JGeometry::TVec3&) { } + +TBathtub::~TBathtub() { } From 98f99fddc56fcedc11ca98d832bd42c3e4db3971 Mon Sep 17 00:00:00 2001 From: theAzack9 Date: Mon, 20 Oct 2025 22:05:26 +0200 Subject: [PATCH 2/3] Fix types in TBathtub --- include/MoveBG/MapObjCorona.hpp | 28 ++++++++++++++-------------- src/MoveBG/MapObjCorona.cpp | 30 +++++++++++++++--------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/include/MoveBG/MapObjCorona.hpp b/include/MoveBG/MapObjCorona.hpp index de94b5be..1c382718 100644 --- a/include/MoveBG/MapObjCorona.hpp +++ b/include/MoveBG/MapObjCorona.hpp @@ -9,17 +9,17 @@ class TBathtub : public TMapObjBase { ~TBathtub(); void loadAfter(); - void hipdrop(const JGeometry::TVec3&); - void quake(const JGeometry::TVec3&); + void hipdrop(const JGeometry::TVec3&); + void quake(const JGeometry::TVec3&); u8 getNumGripsDead() const; - void tumble(float, float); + void tumble(f32, f32); MtxPtr getTakingMtx(); MtxPtr getSubmarineMtxInDemo(); MtxPtr getPeachMtxInDemo(); MtxPtr getKoopaJrMtxInDemo(); BOOL receiveMessage(THitActor* sender, u32 message); Mtx* getRootJointMtx() const; - void perform(unsigned long, JDrama::TGraphics*); + void perform(u32, JDrama::TGraphics*); void control(); void calcBathtubData(); void setupCollisions_(); @@ -27,11 +27,11 @@ class TBathtub : public TMapObjBase { void startDemo(); bool allowsTumble() const; void calcRootMatrix(); - bool getNearGrip(const JGeometry::TVec3&, float, float*) const; - u8 getNextJuncture(const JGeometry::TVec3&, - const JGeometry::TVec3&) const; - bool getNextGrip(const JGeometry::TVec3&, - const JGeometry::TVec3&, float, float*) const; + bool getNearGrip(const JGeometry::TVec3&, f32, f32*) const; + u8 getNextJuncture(const JGeometry::TVec3&, + const JGeometry::TVec3&) const; + u8 getNextGrip(const JGeometry::TVec3&, + const JGeometry::TVec3&, f32, f32*) const; void updatePosture_(); void load(JSUMemoryInputStream&); u8 getNumKillerLaunchable() const; @@ -39,14 +39,14 @@ class TBathtub : public TMapObjBase { u8 getNumKillerBurstable() const; bool isBreaking() const; // Unused bool isKillerLaunchable() const; // Unused - void showMessage(unsigned long); // Unused - u8 getNearJuncture(const JGeometry::TVec3&) const; // Unused + void showMessage(u32); // Unused + u8 getNearJuncture(const JGeometry::TVec3&) const; // Unused MtxPtr getKoopaMtxInDemo(); // Unused - MtxPtr getWaterMtx(int); // Unused + MtxPtr getWaterMtx(s32); // Unused MtxPtr getShineEffectMtx(); // Unused MtxPtr getShineMtx(); // Unused - void liftMario(const JGeometry::TVec3&); // Unused - void trample(const JGeometry::TVec3&); // Unused + void liftMario(const JGeometry::TVec3&); // Unused + void trample(const JGeometry::TVec3&); // Unused public: // Will start at 0x138 diff --git a/src/MoveBG/MapObjCorona.cpp b/src/MoveBG/MapObjCorona.cpp index 25540aee..2c417ee8 100644 --- a/src/MoveBG/MapObjCorona.cpp +++ b/src/MoveBG/MapObjCorona.cpp @@ -3,13 +3,13 @@ void TBathtub::loadAfter() { } -void TBathtub::hipdrop(const JGeometry::TVec3&) { } +void TBathtub::hipdrop(const JGeometry::TVec3&) { } -void TBathtub::quake(const JGeometry::TVec3&) { } +void TBathtub::quake(const JGeometry::TVec3&) { } u8 TBathtub::getNumGripsDead() const { return 0; } -void TBathtub::tumble(float, float) { } +void TBathtub::tumble(f32, f32) { } MtxPtr TBathtub::getTakingMtx() { return nullptr; } @@ -23,7 +23,7 @@ BOOL TBathtub::receiveMessage(THitActor* sender, u32 message) { return false; } Mtx* TBathtub::getRootJointMtx() const { return nullptr; } -void TBathtub::perform(unsigned long, JDrama::TGraphics*) { } +void TBathtub::perform(u32, JDrama::TGraphics*) { } void TBathtub::control() { } @@ -39,21 +39,21 @@ bool TBathtub::allowsTumble() const { return false; } void TBathtub::calcRootMatrix() { } -bool TBathtub::getNearGrip(const JGeometry::TVec3&, float, float*) const +bool TBathtub::getNearGrip(const JGeometry::TVec3&, f32, f32*) const { return false; } -u8 TBathtub::getNextJuncture(const JGeometry::TVec3&, - const JGeometry::TVec3&) const +u8 TBathtub::getNextJuncture(const JGeometry::TVec3&, + const JGeometry::TVec3&) const { return 0; } -bool TBathtub::getNextGrip(const JGeometry::TVec3&, - const JGeometry::TVec3&, float, float*) const +u8 TBathtub::getNextGrip(const JGeometry::TVec3&, + const JGeometry::TVec3&, f32, f32*) const { - return false; + return 0; } void TBathtub::updatePosture_() { } @@ -78,16 +78,16 @@ bool TBathtub::isBreaking() const { return false; } bool TBathtub::isKillerLaunchable() const { return false; } // Unused -void TBathtub::showMessage(unsigned long) { } +void TBathtub::showMessage(u32) { } // Unused -u8 TBathtub::getNearJuncture(const JGeometry::TVec3&) const { return 0; } +u8 TBathtub::getNearJuncture(const JGeometry::TVec3&) const { return 0; } // Unused MtxPtr TBathtub::getKoopaMtxInDemo() { return nullptr; } // Unused -MtxPtr TBathtub::getWaterMtx(int) { return nullptr; } +MtxPtr TBathtub::getWaterMtx(s32) { return nullptr; } // Unused MtxPtr TBathtub::getShineEffectMtx() { return nullptr; } @@ -96,9 +96,9 @@ MtxPtr TBathtub::getShineEffectMtx() { return nullptr; } MtxPtr TBathtub::getShineMtx() { return nullptr; } // Unused -void TBathtub::liftMario(const JGeometry::TVec3&) { } +void TBathtub::liftMario(const JGeometry::TVec3&) { } // Unused -void TBathtub::trample(const JGeometry::TVec3&) { } +void TBathtub::trample(const JGeometry::TVec3&) { } TBathtub::~TBathtub() { } From 64d07f6bdfec35193f72b5008abe3645c99d7492 Mon Sep 17 00:00:00 2001 From: theAzack9 Date: Fri, 24 Oct 2025 09:08:50 +0200 Subject: [PATCH 3/3] Formatting --- include/MoveBG/MapObjCorona.hpp | 18 +++++++++--------- src/MoveBG/MapObjCorona.cpp | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/MoveBG/MapObjCorona.hpp b/include/MoveBG/MapObjCorona.hpp index 1c382718..3a471510 100644 --- a/include/MoveBG/MapObjCorona.hpp +++ b/include/MoveBG/MapObjCorona.hpp @@ -30,21 +30,21 @@ class TBathtub : public TMapObjBase { bool getNearGrip(const JGeometry::TVec3&, f32, f32*) const; u8 getNextJuncture(const JGeometry::TVec3&, const JGeometry::TVec3&) const; - u8 getNextGrip(const JGeometry::TVec3&, - const JGeometry::TVec3&, f32, f32*) const; + u8 getNextGrip(const JGeometry::TVec3&, const JGeometry::TVec3&, + f32, f32*) const; void updatePosture_(); void load(JSUMemoryInputStream&); u8 getNumKillerLaunchable() const; bool isKillerAttackable() const; u8 getNumKillerBurstable() const; - bool isBreaking() const; // Unused - bool isKillerLaunchable() const; // Unused - void showMessage(u32); // Unused + bool isBreaking() const; // Unused + bool isKillerLaunchable() const; // Unused + void showMessage(u32); // Unused u8 getNearJuncture(const JGeometry::TVec3&) const; // Unused - MtxPtr getKoopaMtxInDemo(); // Unused - MtxPtr getWaterMtx(s32); // Unused - MtxPtr getShineEffectMtx(); // Unused - MtxPtr getShineMtx(); // Unused + MtxPtr getKoopaMtxInDemo(); // Unused + MtxPtr getWaterMtx(s32); // Unused + MtxPtr getShineEffectMtx(); // Unused + MtxPtr getShineMtx(); // Unused void liftMario(const JGeometry::TVec3&); // Unused void trample(const JGeometry::TVec3&); // Unused diff --git a/src/MoveBG/MapObjCorona.cpp b/src/MoveBG/MapObjCorona.cpp index 2c417ee8..5a68f283 100644 --- a/src/MoveBG/MapObjCorona.cpp +++ b/src/MoveBG/MapObjCorona.cpp @@ -51,7 +51,7 @@ u8 TBathtub::getNextJuncture(const JGeometry::TVec3&, } u8 TBathtub::getNextGrip(const JGeometry::TVec3&, - const JGeometry::TVec3&, f32, f32*) const + const JGeometry::TVec3&, f32, f32*) const { return 0; }