Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Toggle main menu visibility
Loading...
Searching...
No Matches
RailManager.hh
1
#pragma once
2
3
#include "game/field/RailInterpolator.hh"
4
5
#include <egg/core/Allocator.hh>
6
7
#include <vector>
8
9
namespace
Kinoko {
10
11
namespace
Host
{
12
13
class
Context
;
14
15
}
// namespace Host
16
17
namespace
Field
{
18
19
// TODO: Inherit EGG::Disposer
20
class
RailManager {
21
friend
class
Host::Context
;
22
23
public
:
25
[[nodiscard]]
Rail
*rail(
size_t
idx) {
26
ASSERT(idx < m_rails.size());
27
return
m_rails[idx];
28
}
29
30
[[nodiscard]]
const
Rail
*rail(
size_t
idx)
const
{
31
ASSERT(idx < m_rails.size());
32
return
m_rails[idx];
33
}
35
36
static
RailManager *CreateInstance();
37
static
void
DestroyInstance();
38
39
[[nodiscard]]
static
RailManager *Instance() {
40
return
s_instance;
41
}
42
43
private
:
44
EGG_NEW_DELETE_FRIEND
45
46
RailManager();
47
~RailManager();
48
49
void
createPaths();
50
51
fixed_vector<Rail *>
m_rails;
52
u16 m_totalRails;
53
u16 m_extraInterplatorCount;
54
u16 m_pointCount;
55
56
static
RailManager *s_instance;
57
};
58
59
}
// namespace Field
60
61
}
// namespace Kinoko
Kinoko::Field::Rail
Definition
Rail.hh:22
Kinoko::Host::Context
Contexts can be used to restore a previous memory state for the current session.
Definition
Context.hh:71
Kinoko::fixed_vector
Dynamically sized array that only allocates once.
Definition
Types.hh:177
Kinoko::Field
Pertains to collision.
Definition
BoxColManager.cc:10
Kinoko::Host
Represents the host application.
Definition
HeapCommon.hh:11
game
field
RailManager.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.17.0