Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ItemDirector.hh
1
#pragma once
2
3
#include "game/item/KartItem.hh"
4
5
#include <span>
6
7
namespace
Kinoko {
8
9
namespace
Host {
10
11
class
Context;
12
13
}
// namespace Host
14
16
namespace
Item {
17
19
class
ItemDirector
:
EGG::Disposer
{
20
friend
class
Host::Context
;
21
22
public
:
23
void
init();
24
void
calc();
25
26
[[nodiscard]]
KartItem
&kartItem(
size_t
idx) {
27
ASSERT(idx < m_karts.size());
28
return
m_karts[idx];
29
}
30
31
static
ItemDirector
*CreateInstance();
32
static
void
DestroyInstance();
33
34
[[nodiscard]]
const
ItemInventory
&itemInventory(s16 idx)
const
{
35
return
m_karts[idx].inventory();
36
}
37
38
[[nodiscard]]
static
ItemDirector
*Instance() {
39
return
s_instance;
40
}
41
42
private
:
43
ItemDirector
();
44
~ItemDirector
()
override
;
45
46
owning_span<KartItem>
m_karts;
47
48
static
ItemDirector
*s_instance;
49
};
50
51
}
// namespace Item
52
53
}
// namespace Kinoko
Kinoko::EGG::Disposer
An interface for ensuring certain structures and classes are destroyed with the heap.
Definition
Disposer.hh:11
Kinoko::Host::Context
Contexts can be used to restore a previous memory state for the current session.
Definition
Context.hh:71
Kinoko::Item::ItemDirector
Definition
ItemDirector.hh:19
Kinoko::Item::ItemInventory
Definition
ItemInventory.hh:8
Kinoko::Item::KartItem
State management for item usage.
Definition
KartItem.hh:13
Kinoko::owning_span
A contiguous storage container that manages the lifecycle of a buffer of a given size.
Definition
Types.hh:29
game
item
ItemDirector.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.12.0