Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
KartItem.hh
1
#pragma once
2
3
#include "game/item/ItemInventory.hh"
4
5
#include "game/kart/KartObjectProxy.hh"
6
7
#include <egg/core/BitFlag.hh>
8
9
namespace
Kinoko::Item
{
10
13
class
KartItem
:
Kart::KartObjectProxy
{
14
public
:
15
KartItem
();
16
~KartItem
();
17
18
void
init(
size_t
playerIdx);
19
void
calc
();
20
void
clear();
21
22
void
activateMushroom();
23
void
useMushroom();
24
26
[[nodiscard]]
ItemInventory
&inventory() {
27
return
m_inventory;
28
}
29
30
[[nodiscard]]
const
ItemInventory
&inventory()
const
{
31
return
m_inventory;
32
}
34
35
private
:
36
enum class
eFlags {
37
Lockout = 10,
38
ItemButtonHold = 12,
39
ItemButtonActivation = 14,
40
};
41
typedef
EGG::TBitFlag<u16, eFlags>
Flags
;
42
43
Flags
m_flags;
44
ItemInventory
m_inventory;
45
};
46
47
}
// namespace Kinoko::Item
Kinoko::Item::ItemInventory
Definition
ItemInventory.hh:8
Kinoko::Item::KartItem
State management for item usage.
Definition
KartItem.hh:13
Kinoko::Item::KartItem::calc
void calc()
Calculates item activation based on the controller input state.
Definition
KartItem.cc:25
Kinoko::Kart::KartObjectProxy
Base class for most kart-related objects.
Definition
KartObjectProxy.hh:72
Kinoko::Item
Pertains to item handling.
Definition
ItemDirector.cc:5
Kinoko::EGG::TBitFlag
Wrapper around an integral type with an enum corresponding to its bits.
Definition
BitFlag.hh:23
game
item
KartItem.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.12.0