Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectKuribo.hh
1
#pragma once
2
3
#include "game/field/StateManager.hh"
4
#include "game/field/obj/ObjectCollidable.hh"
5
6
namespace
Field
{
7
8
class
ObjectKuribo;
9
10
template
<>
11
class
StateManager
<
ObjectKuribo
> :
public
StateManagerBase
<ObjectKuribo> {
12
public
:
13
StateManager
(
ObjectKuribo
*obj);
14
~StateManager
()
override
;
15
16
private
:
17
static
const
std::array<StateManagerEntry<ObjectKuribo>, 4> STATE_ENTRIES;
18
};
19
20
class
ObjectKuribo
:
public
ObjectCollidable
,
public
StateManager
<ObjectKuribo> {
21
friend
StateManager<ObjectKuribo>
;
22
23
public
:
24
ObjectKuribo
(
const
System::MapdataGeoObj
¶ms);
25
~ObjectKuribo
()
override
;
26
27
void
init()
override
;
28
void
calc()
override
;
29
31
[[nodiscard]]
u32
loadFlags()
const override
{
32
return
3;
33
}
34
35
void
loadAnims()
override
;
36
37
private
:
38
void
enterStateStub();
39
void
calcStateStub();
40
void
calcStateReroute
();
41
void
calcStateWalk
();
42
43
void
calcAnim();
44
void
calcRot();
45
void
checkSphereFull();
46
EGG::Vector3f
interpolate(f32 scale,
const
EGG::Vector3f
&v0,
const
EGG::Vector3f
&v1)
const
;
47
48
f32 m_speedStep;
49
f32 m_animStep;
50
EGG::Vector3f
m_origin;
51
f32 m_maxAnimTimer;
52
u32
m_frameCount;
53
f32 m_currSpeed;
54
EGG::Vector3f
m_rot;
55
EGG::Vector3f
m_floorNrm;
56
f32 m_animTimer;
57
};
58
59
}
// namespace Field
Field::ObjectCollidable
Definition
ObjectCollidable.hh:16
Field::ObjectKuribo
Definition
ObjectKuribo.hh:20
Field::ObjectKuribo::calcStateReroute
void calcStateReroute()
Called when the Goomba is changing direction.
Definition
ObjectKuribo.cc:79
Field::ObjectKuribo::calcStateWalk
void calcStateWalk()
Called when Goomba is walking along the rail.
Definition
ObjectKuribo.cc:91
Field::StateManagerBase
Definition
StateManager.hh:20
Field::StateManager
Definition
StateManager.hh:40
System::MapdataGeoObj
Definition
MapdataGeoObj.hh:9
uint32_t
Field
Pertains to collision.
Definition
BoxColManager.cc:8
EGG::Vector3f
A 3D float vector.
Definition
Vector.hh:83
game
field
obj
ObjectKuribo.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.12.0