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