Skip to content
Merged
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
45 changes: 42 additions & 3 deletions include/Game/Enemy/Mogucchi.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,53 @@
#pragma once

#include "Game/NameObj/NameObj.hpp"
#include "Game/LiveActor/LiveActor.hpp"

class MogucchiHill;
class ModelObj;

class Mogucchi : public LiveActor {
public:
Mogucchi(const char*);
virtual ~Mogucchi();

private:
u8 mPad[(0xF4) - sizeof(LiveActor)];
virtual void init(const JMapInfoIter& rIter);
virtual void initAfterPlacement();
virtual void makeActorAppeared();
virtual void kill();
virtual void control();
virtual void attackSensor(HitSensor* pSender, HitSensor* pReceiver);
virtual bool receiveMsgPlayerAttack(u32 msg, HitSensor* pSender, HitSensor* pReceiver);

void exeStroll();
void endStroll();
void exeAppearDown();
void exeDive();
void exeScatter();
void exeDie();
void exeDown();
void initSensor();
void createMogucchiHill();
void createHole();
void updatePosition();
void updateReferenceMtx();
bool checkHipDrop() const;
void updateStrollSpeed();
void reflectStarPointer2P();
void makeEulerRotation();
void calcAttackDir(TVec3f*, const TVec3f&, const TVec3f&) const;
bool receiveAttackBySpinSensor(u32 msg, HitSensor* pSender, HitSensor* pReceiver);
bool receiveAttackByBodySensor(u32 msg, HitSensor* pSender, HitSensor* pReceiver);
void calcScatterVec(const TVec3f&, const TVec3f&);

/* 0x8C */ MogucchiHill* mHill;
/* 0x90 */ ModelObj* mHole;
/* 0x94 */ TPos3f mNewHolePos;
/* 0xC4 */ TVec3f mRailGravity;
/* 0xD0 */ bool mGrounded;
/* 0xD4 */ f32 mScatterPropulsionSpeed;
/* 0xD8 */ TVec3f mScatterNormal;
f32 _E4;
/* 0xE8 */ f32 mStrollSpeed;
/* 0xEC */ f32 mMaxStrollSpeed;
/* 0xF0 */ bool mIsStoppedByP2;
};
41 changes: 41 additions & 0 deletions include/Game/Enemy/MogucchiHill.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#pragma once

#include "Game/LiveActor/LiveActor.hpp"

class HitSensor;

class MogucchiHill : public LiveActor {
public:
MogucchiHill(LiveActor*, s32, const char*);

virtual void init();
virtual void control();

virtual void notifyAppearAttackToPlayer(HitSensor*, HitSensor*);
virtual void notifyWaitAttackToPlayer(HitSensor*, HitSensor*);

void start();
void end();
void startNaturally();
void endNaturally();
void setAppearNum(s32);

u32 _8C;
u32 _90;
s32 _94;
u32 _98;

Mtx _9C;

u8 _CC;
f32 _D0;
f32 _D4;
u32 _D8;
u32 _DC;
u32 _E0;
u32 _E4;
u8 _E8;
u32 _EC;
u32 _F0;
u32 _F4;
};
19 changes: 19 additions & 0 deletions libs/JSystem/include/JSystem/JGeometry/TMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,25 @@ namespace JGeometry {
}
void setXDir(const TVec3f& rSrc);
void setXDir(f32 x, f32 y, f32 z);

inline void setXDirInline(const TVec3f& rSrc) {
this->mMtx[0][0] = rSrc.x;
this->mMtx[1][0] = rSrc.y;
this->mMtx[2][0] = rSrc.z;
}

inline void setYDirInline(const TVec3f& rSrc) {
this->mMtx[0][1] = rSrc.x;
this->mMtx[1][1] = rSrc.y;
this->mMtx[2][1] = rSrc.z;
}

inline void setZDirInline(const TVec3f& rSrc) {
this->mMtx[0][2] = rSrc.x;
this->mMtx[1][2] = rSrc.y;
this->mMtx[2][2] = rSrc.z;
}

void setYDir(const TVec3f& rSrc);
void setYDir(f32 x, f32 y, f32 z);
void setZDir(const TVec3f& rSrc);
Expand Down
Loading
Loading