Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Toggle main menu visibility
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
Kinoko::Field
{
7
8
class
ObjectKuribo :
public
ObjectCollidable,
public
StateManager {
9
public
:
10
ObjectKuribo(
const
System::MapdataGeoObj
¶ms);
11
~ObjectKuribo()
override
;
12
13
void
init()
override
;
14
void
calc()
override
;
15
17
[[nodiscard]] u32 loadFlags()
const override
{
18
return
3;
19
}
20
21
void
loadAnims()
override
;
22
23
private
:
24
void
enterStateStub();
25
void
calcStateStub();
26
void
calcStateReroute
();
27
void
calcStateWalk
();
28
29
void
calcAnim();
30
void
calcRot();
31
void
checkSphereFull();
32
33
f32 m_speedStep;
34
f32 m_animStep;
35
EGG::Vector3f
m_origin;
36
f32 m_maxAnimTimer;
37
u32 m_frameCount;
38
f32 m_currSpeed;
39
EGG::Vector3f
m_rot;
40
EGG::Vector3f
m_floorNrm;
41
f32 m_animTimer;
42
43
static
constexpr
std::array<StateManagerEntry, 4> STATE_ENTRIES = {{
44
{StateEntry<ObjectKuribo, &ObjectKuribo::enterStateStub,
45
&
ObjectKuribo::calcStateReroute
>(0)},
46
{StateEntry<ObjectKuribo, &ObjectKuribo::enterStateStub, &ObjectKuribo::calcStateWalk>(
47
1)},
48
{StateEntry<ObjectKuribo, &ObjectKuribo::enterStateStub, &ObjectKuribo::calcStateStub>(
49
2)},
50
{StateEntry<ObjectKuribo, &ObjectKuribo::enterStateStub, &ObjectKuribo::calcStateStub>(
51
3)},
52
}};
53
};
54
55
}
// namespace Kinoko::Field
Kinoko::Field::ObjectKuribo::calcStateWalk
void calcStateWalk()
Called when Goomba is walking along the rail.
Definition
ObjectKuribo.cc:80
Kinoko::Field::ObjectKuribo::calcStateReroute
void calcStateReroute()
Called when the Goomba is changing direction.
Definition
ObjectKuribo.cc:68
Kinoko::System::MapdataGeoObj
Definition
MapdataGeoObj.hh:9
Kinoko::Field
Pertains to collision.
Definition
BoxColManager.cc:10
Kinoko::EGG::Vector3f
A 3D float vector.
Definition
Vector.hh:107
game
field
obj
ObjectKuribo.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.17.0