A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectKinoko.hh
1#pragma once
2
3#include "game/field/obj/ObjectKCL.hh"
4
5namespace Field {
6
7enum class KinokoType : u16 {
8 Light = 0,
9 Dark = 1,
10};
11
13class ObjectKinoko : public ObjectKCL {
14public:
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
31protected:
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 s16 m_pulseFalloff;
38 u16 m_oscFrame;
39};
40
45public:
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
61private:
62 u16 m_waitFrame;
63 s16 m_period;
64 s16 m_waitDuration;
65 s16 m_amplitude;
66 f32 m_angFreq;
67};
68
72public:
74 ~ObjectKinokoBend() override;
75 void calcOscillation() override;
76
78 void calcScale(u32) override {}
79
80private:
81 s16 m_currentFrame;
82 s16 m_period;
83 f32 m_amplitude;
84 f32 m_angFreq;
85};
86
88class ObjectKinokoNm : public ObjectKCL {
89public:
91 ~ObjectKinokoNm() override;
92
94 [[nodiscard]] const char *getKclName() const override {
95 return m_type == KinokoType::Light ? "kinoko_g" : "kinoko_d_g";
96 }
97
98private:
99 KinokoType m_type;
100};
101
102} // namespace Field
Mushrooms which bend in a certain direction.
The class for a mushroom object with normal road properties, for the most part.
Mushrooms which oscillate up and down. The stem does not move.
const char * getKclName() const override
The base class for a mushroom object with jump pad properties.
~ObjectKinoko() override
@adrr{0x80807A54}
u32 loadFlags() const override
@addr {0x80807DAC}
Pertains to collision.
A 3D float vector.
Definition Vector.hh:83