Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Toggle main menu visibility
Loading...
Searching...
No Matches
ObjectKinoko.hh
1
#pragma once
2
3
#include "game/field/obj/ObjectKCL.hh"
4
5
namespace
Kinoko::Field
{
6
7
enum class
KinokoType : u16 {
8
Light = 0,
9
Dark = 1,
10
};
11
13
class
ObjectKinoko :
public
ObjectKCL {
14
public
:
15
ObjectKinoko(
const
System::MapdataGeoObj
¶ms);
16
~ObjectKinoko()
override
;
17
18
void
calc()
override
;
19
21
[[nodiscard]] u32
loadFlags
()
const override
{
22
return
1;
23
}
24
26
[[nodiscard]]
const
char
*getKclName()
const override
{
27
return
m_type == KinokoType::Light ?
"kinoko_r"
:
"kinoko_d_r"
;
28
}
29
virtual
void
calcOscillation() = 0;
30
31
protected
:
32
KinokoType m_type;
33
const
EGG::Vector3f
m_objPos;
// the initial position of the object
34
const
EGG::Vector3f
m_objRot;
// the initial rotation of the object
35
s16 m_pulseFrame;
36
s16 m_restFrame;
37
f32 m_pulseFalloff;
38
u16 m_oscFrame;
39
};
40
44
class
ObjectKinokoUd :
public
ObjectKinoko {
45
public
:
46
ObjectKinokoUd(
const
System::MapdataGeoObj
¶ms);
47
~ObjectKinokoUd()
override
;
48
49
void
calcOscillation()
override
;
50
54
[[nodiscard]]
const
char
*
getKclName
()
const override
{
55
return
"kinoko_r"
;
56
}
57
59
void
calcScale(u32)
override
{}
60
61
private
:
62
u16 m_waitFrame;
63
s16 m_period;
64
s16 m_waitDuration;
65
s16 m_amplitude;
66
f32 m_angFreq;
67
};
68
71
class
ObjectKinokoBend :
public
ObjectKinoko {
72
public
:
73
ObjectKinokoBend(
const
System::MapdataGeoObj
¶ms);
74
~ObjectKinokoBend()
override
;
75
void
calcOscillation()
override
;
76
78
void
calcScale(u32)
override
{}
79
80
private
:
81
s16 m_currentFrame;
82
s16 m_period;
83
f32 m_amplitude;
84
f32 m_angFreq;
85
};
86
88
class
ObjectKinokoNm :
public
ObjectKCL {
89
public
:
90
ObjectKinokoNm(
const
System::MapdataGeoObj
¶ms);
91
~ObjectKinokoNm()
override
;
92
94
[[nodiscard]]
const
char
*getKclName()
const override
{
95
return
m_type == KinokoType::Light ?
"kinoko_g"
:
"kinoko_d_g"
;
96
}
97
98
private
:
99
KinokoType m_type;
100
};
101
102
}
// namespace Kinoko::Field
Kinoko::Field::ObjectKinokoUd::getKclName
const char * getKclName() const override
Definition
ObjectKinoko.hh:54
Kinoko::Field::ObjectKinoko::loadFlags
u32 loadFlags() const override
@addr {0x80807DAC}
Definition
ObjectKinoko.hh:21
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
ObjectKinoko.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.17.0