SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
include
Game
MapObj
CocoNut.hpp
1
#pragma once
2
3
#include "Game/LiveActor/LiveActor.hpp"
4
#include "Game/NameObj/NameObjArchiveListCollector.hpp"
5
6
class
CocoNut
:
public
LiveActor
{
7
public
:
8
CocoNut
(
const
char
*);
9
10
virtual
~CocoNut
();
11
virtual
void
init
(
const
JMapInfoIter
&);
12
virtual
void
initAfterPlacement();
13
virtual
void
startClipped();
14
virtual
void
calcAndSetBaseMtx
();
15
virtual
void
attackSensor(
HitSensor
*,
HitSensor
*);
16
virtual
bool
receiveMsgPush(
HitSensor
*,
HitSensor
*);
17
virtual
bool
receiveMsgPlayerAttack(u32,
HitSensor
*,
HitSensor
*);
18
virtual
bool
receiveOtherMsg(u32,
HitSensor
*,
HitSensor
*);
19
20
static
void
makeArchiveList(
NameObjArchiveListCollector
*,
const
JMapInfoIter
&);
21
22
void
initMapToolInfo(
const
JMapInfoIter
&);
23
void
initModel() NO_INLINE;
24
void
initSensor();
25
void
initEffect();
26
void
updateRotate(
float
);
27
void
updateGravity();
28
void
processMove();
29
bool
isOnGround()
const
;
30
float
calcMoveSpeed()
const
;
31
void
setFrontVec(
const
TVec3f &);
32
bool
getWallNormal(TVec3f *)
const
;
33
34
bool
sendMsgToBindedSensor();
35
bool
sendMsgEnemyAttackToBindedSensor(
HitSensor
*);
36
37
bool
tryHit(
HitSensor
*,
HitSensor
*);
38
bool
isPossibleToHit(
const
TVec3f &,
const
TVec3f &,
const
TVec3f &)
const
;
39
void
calcHitSpeedAndFrontVec(
float
*,
float
*, TVec3f *, TVec3f *,
const
TVec3f &,
const
TVec3f &)
const
;
40
void
hit(
const
TVec3f &,
float
);
41
bool
tryPushedFromActor(
HitSensor
*,
HitSensor
*);
42
43
void
reviseFrontVec();
44
void
statusToWait();
45
46
bool
isValidReceiveMsg(
const
HitSensor
*)
const
;
47
48
void
statusToHide();
49
void
emitEffectSpinHit(
const
HitSensor
*,
const
HitSensor
*);
50
51
void
tryMoveEnd();
52
53
bool
tryDisappear();
54
bool
isContactWithOtherCocoNut()
const
;
55
56
bool
isValidPushedFromPlayer(
const
HitSensor
*,
const
HitSensor
*)
const
;
57
58
void
calcHitSpeedAndFrontVec(f32 *, f32 *, TVec3f *, TVec3f *, TVec3f *, TVec3f *)
const
;
59
60
static
const
char
*getModelName();
61
static
const
char
*getBreakEffectName();
62
63
void
exeWait();
64
void
exeWaitOnBind();
65
void
exeMove();
66
void
exeInWater();
67
void
exeBreak();
68
69
inline
f32 getSize() {
return
_D0; }
70
71
private
:
72
float
_8C;
73
float
_90;
74
TVec3f _94;
75
TPos3f _A0;
76
float
_D0;
77
bool
_D4;
78
TPos3f _D8;
79
TPos3f _108;
80
s32 _138;
81
bool
_13C;
82
TVec3f mSpawnPosition;
// _140
83
bool
_14C;
84
TVec3f _150;
85
bool
mSphericalShadow;
// _15C, also affects some other properties besides shadow
86
bool
mRespawnWhenOutOfView;
// _15D
87
bool
_15E;
// something about clipping
88
bool
mContinueRolling;
// _15F
89
};
90
91
namespace
NrvCocoNut {
92
NERVE(CocoNutNrvWait)
93
NERVE(CocoNutNrvWaitOnBind)
94
NERVE(CocoNutNrvMove)
95
NERVE(CocoNutNrvInWater)
96
NERVE(CocoNutNrvBreak)
97
NERVE(CocoNutNrvReplaceReady)
98
}
CocoNut
Definition
CocoNut.hpp:6
CocoNut::init
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
Definition
CocoNut.cpp:35
CocoNut::calcAndSetBaseMtx
virtual void calcAndSetBaseMtx()
Calculates and sets the base matrix of the actor.
Definition
CocoNut.cpp:649
HitSensor
Definition
HitSensor.hpp:10
JMapInfoIter
Definition
JMapInfo.hpp:16
LiveActor
The basis of a drawable actor that can contain states (see: Nerve)
Definition
LiveActor.hpp:24
NameObjArchiveListCollector
Stores archive names of NameObjs.
Definition
NameObjArchiveListCollector.hpp:6
Generated by
1.10.0