#include <KartBoost.hh>
State management for boosts (start boost, mushrooms, mini-turbos)
Definition at line 9 of file KartBoost.hh.
Public Types | |
| enum class | Type { AllMt , MushroomAndBoostPanel , TrickAndZipper , Max } |
Public Member Functions | |
| bool | activate (Type type, s16 frames) |
| Starts/restarts a boost of the given type. | |
| bool | calc () |
| Computes the current frame's boost multiplier, acceleration, and speed limit. | |
| void | reset () |
| void | resetActive () |
Getters | |
| f32 | multiplier () const |
| f32 | acceleration () const |
| f32 | speedLimit () const |
Private Attributes | |
| std::array< s16, BOOST_TYPE_COUNT > | m_timers |
| Durations for the different boost types. | |
| std::array< bool, BOOST_TYPE_COUNT > | m_active |
| Whether the different boost types are active. | |
| f32 | m_multiplier |
| Multiplier applied to vehicle speed. | |
| f32 | m_acceleration |
| f32 | m_speedLimit |
Static Private Attributes | |
| static constexpr size_t | BOOST_TYPE_COUNT = static_cast<size_t>(Type::Max) |
|
strong |
Definition at line 11 of file KartBoost.hh.
|
0x80588D28 |
Definition at line 6 of file KartBoost.cc.
|
inlinenodiscard |
Definition at line 35 of file KartBoost.hh.
|
nodiscard0x80588DB0 |
Starts/restarts a boost of the given type.
| type | The type of boost (e.g. mini-turbo) |
| frames | The duration of the boost |
Definition at line 21 of file KartBoost.cc.
|
nodiscard0x80588E24 |
Computes the current frame's boost multiplier, acceleration, and speed limit.
Definition at line 38 of file KartBoost.cc.
|
inlinenodiscard |
Definition at line 31 of file KartBoost.hh.
|
0x80588D74 |
Definition at line 79 of file KartBoost.cc.
|
inline0x80588E18 |
Definition at line 26 of file KartBoost.hh.
|
inlinenodiscard |
Definition at line 39 of file KartBoost.hh.
|
staticconstexprprivate |
Definition at line 46 of file KartBoost.hh.
|
private |
Definition at line 51 of file KartBoost.hh.
|
private |
Whether the different boost types are active.
Definition at line 49 of file KartBoost.hh.
|
private |
Multiplier applied to vehicle speed.
Definition at line 50 of file KartBoost.hh.
|
private |
Definition at line 52 of file KartBoost.hh.
|
private |
Durations for the different boost types.
Definition at line 48 of file KartBoost.hh.