Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Toggle main menu visibility
Loading...
Searching...
No Matches
KartHalfPipe.hh
1
#pragma once
2
3
#include "game/kart/KartObjectProxy.hh"
4
5
#include "game/system/KPadController.hh"
6
7
namespace
Kinoko::Kart
{
8
11
class
KartHalfPipe :
public
KartObjectProxy {
12
public
:
13
KartHalfPipe();
14
~KartHalfPipe();
15
16
void
reset();
17
void
calc();
18
void
calcTrick();
19
void
calcRot();
20
void
calcLanding(
bool
notAirborne);
21
void
activateTrick(s32 duration, System::Trick trick);
22
void
end(
bool
boost);
23
25
static
consteval
f32 TerminalVelocity() {
26
return
65.0f;
27
}
28
29
private
:
30
enum class
StuntType {
31
None = -1,
32
Backflip = 0,
33
Frontflip = 1,
34
Side360 = 2,
35
Backside = 3,
36
Frontside = 4,
37
Side720 = 5,
38
};
39
41
struct
StuntProperties
{
42
f32 angleDelta;
43
f32 angleDeltaMin;
44
f32 angleDeltaFactorMin;
45
f32 angleDeltaFactorDecr;
46
f32 finalAngleScalar;
47
f32 finalAngle;
48
};
49
50
struct
StuntManager
{
51
void
calcAngle();
52
void
setProperties(
size_t
idx);
53
54
f32 angle;
55
f32 angleDelta;
56
f32 angleDeltaFactor;
57
f32 angleDeltaFactorDecr;
58
f32 finalAngle;
59
StuntProperties
properties;
60
};
61
62
bool
m_touchingZipper;
63
s16 m_timer;
64
f32 m_nextSign;
65
s32
m_attemptedTrickTimer
;
66
EGG::Quatf
m_rot;
67
EGG::Vector3f
m_prevPos;
68
StuntType m_stunt;
69
f32 m_rotSign;
70
s16 m_nextTimer;
71
System::Trick m_trick;
72
EGG::Quatf
m_stuntRot;
73
StuntManager
m_stuntManager;
74
};
75
76
}
// namespace Kinoko::Kart
Kinoko::Kart::KartHalfPipe::m_attemptedTrickTimer
s32 m_attemptedTrickTimer
When attempting a trick, tracks how long the animation would be.
Definition
KartHalfPipe.hh:65
Kinoko::Kart
Pertains to kart-related functionality.
Definition
BoxColManager.hh:14
Kinoko::EGG::Quatf
A quaternion, used to represent 3D rotation.
Definition
Quat.hh:12
Kinoko::EGG::Vector3f
A 3D float vector.
Definition
Vector.hh:107
Kinoko::Kart::KartHalfPipe::StuntManager
Definition
KartHalfPipe.hh:50
Kinoko::Kart::KartHalfPipe::StuntProperties
Angle properties corresponding with the stunts.
Definition
KartHalfPipe.hh:41
game
kart
KartHalfPipe.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.17.0