Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 48 additions & 8 deletions include/MoveBG/MapObjBall.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define MOVE_BG_MAP_OBJ_BALL_HPP

#include <MoveBG/MapObjGeneral.hpp>
#include <Player/ModelWaterManager.hpp>

class TMapObjBall : public TMapObjGeneral {
public:
Expand All @@ -28,6 +29,29 @@ class TMapObjBall : public TMapObjGeneral {
virtual void calcCurrentMtx();

void boundByActor(THitActor*);

inline void kick();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very unrealistic code -- there's no symbol for this and inline crap is usually placed straight into the header -- no declaration/definition separation and no explicit inline keyword. Are you sure you need this inline at all? If so, put it in the header, I guess


/* 0x148 */ f32 unk148;
/* 0x14C */ f32 unk14C;
/* 0x150 */ f32 unk150;
/* 0x154 */ f32 unk154;
/* 0x158 */ f32 unk158;
/* 0x15C */ f32 unk15C;
/* 0x160 */ f32 unk160;
/* 0x164 */ f32 unk164;
/* 0x168 */ f32 unk168;
/* 0x16C */ f32 unk16C;
/* 0x170 */ f32 unk170;
/* 0x174 */ f32 unk174;
/* 0x178 */ f32 unk178;
/* 0x17C */ f32 unk17C;
/* 0x180 */ f32 unk180;
/* 0x184 */ f32 unk184;
/* 0x188 */ f32 unk188;
/* 0x18C */ f32 unk18C;
/* 0x190 */ f32 unk190;
/* 0x194 */ s32 unk194;
};

class TResetFruit : public TMapObjBall {
Expand All @@ -41,7 +65,9 @@ class TResetFruit : public TMapObjBall {
virtual void initMapObj();
virtual void touchActor(THitActor*);
virtual u32 touchWater(THitActor*);
virtual u32 getLivingTime() const;
// This definition is being occluded by TMapObjGeneral::getLivingTime for
// some reason
virtual u32 getLivingTime() const { return mFruitLivingTime; }
virtual void appearing();
virtual void breaking();
virtual void waitingToAppear();
Expand All @@ -61,18 +87,28 @@ class TResetFruit : public TMapObjBall {
void makeObjLiving();
void makeObjWaitingToAppear();

u32 mFruitLivingTime;
u32 mScaleUpSpeed;
u32 mRottingScaleSpeed;
u32 mBreakingScaleSpeed;
u32 mFruitWaitTimeToAppear;
u32 mRottenColor;
void touchKillSurface();

// fabricated
inline void hideTouchActor(THitActor*);
inline void unknownInline();

static u32 mFruitWaitTimeToAppear;
static f32 mScaleUpSpeed;
static u32 mFruitLivingTime;
static f32 mBreakingScaleSpeed;

f32 unk198;
GXColorS10 mFruitColor;
u8 unk1A4;
};

class TRandomFruit : public TResetFruit {
public:
TRandomFruit(const char* name = "ランダムフルーツ");
virtual void initMapObj();

char mFruitName[0x20];
};

class TCoverFruit : public TMapObjBase {
Expand All @@ -90,7 +126,7 @@ class TBigWatermelon : public TMapObjBall {

virtual void loadAfter();
virtual BOOL receiveMessage(THitActor* sender, u32 message);
virtual void control() { }
virtual void control();
virtual void kill();
virtual void initMapObj();
virtual void touchActor(THitActor*);
Expand All @@ -102,6 +138,10 @@ class TBigWatermelon : public TMapObjBall {
virtual void touchWaterSurface();

void startEvent();

TWaterEmitInfo* unk198;
s32 unk19C;
f32 unk1A0;
};

#endif
1 change: 1 addition & 0 deletions include/MoveBG/MapObjBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ struct TMapObjCollisionInfo {
// fabricated
struct TMapObjSoundData {
/* 0x0 */ u32 unk0[10];
/* 0x40 */ u32 unk40;
};

// fabricated
Expand Down
2 changes: 1 addition & 1 deletion include/MoveBG/MapObjGeneral.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class TMapObjGeneral : public TMapObjBase {
static f32 mNormalThrowSpeedRate;

public:
/* 0x138 */ const TBGCheckData* unk138; // TODO: maybe not const
/* 0x138 */ TBGCheckData* unk138;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to remove const for this commit? Almost all access to these structs is const throughout the game

/* 0x13C */ const TBGCheckData* unk13C;
/* 0x140 */ f32 unk140;
/* 0x144 */ f32 unk144;
Expand Down
Loading
Loading