Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
Context.hh
1
#pragma once
2
3
#include "
Common.hh
"
4
5
#include <filesystem>
6
#include <functional>
7
#include <optional>
8
9
namespace
Kinoko {
10
11
class
KSystem;
12
13
namespace
Abstract::g3d {
14
class
FrameCtrl;
15
class
ResAnmChr;
16
}
// namespace Abstract::g3d
17
18
namespace
Abstract::Memory {
19
class
MEMList;
20
}
// namespace Abstract::Memory
21
22
namespace
EGG {
23
class
Archive;
24
class
Heap;
25
class
SceneManager;
26
}
// namespace EGG
27
28
namespace
Field {
29
class
BoxColManager;
30
class
CollisionDirector;
31
class
CourseColMgr;
32
class
ObjectCollisionBase;
33
class
ObjectDirector;
34
class
ObjectDrivableDirector;
35
class
JugemDirector;
36
class
RailManager;
37
}
// namespace Field
38
39
namespace
Item {
40
class
ItemDirector;
41
}
// namespace Item
42
43
namespace
Kart {
44
class
KartObjectManager;
45
class
KartParamFileManager;
46
}
// namespace Kart
47
48
namespace
Render {
49
class
KartCamera;
50
}
// namespace Render
51
52
namespace
System {
53
class
CourseMap;
54
class
KPadDirector;
55
class
KPadHostController;
56
class
RaceConfig;
57
typedef
std::function<void(RaceConfig *,
void
*)> InitCallback;
58
class
RaceInputState;
59
class
RaceManager;
60
class
ResourceManager;
61
class
KSystem;
62
}
// namespace System
63
64
namespace
Host {
65
71
class
Context
{
72
public
:
73
Context
();
74
Context
(
const
Context
&c);
75
Context
(
Context
&&c);
76
~Context
();
77
78
Context
&operator=(
const
Context
&rhs);
79
Context
&operator=(
Context
&&rhs);
80
81
bool
operator==(
const
Context
&rhs)
const
;
82
83
static
void
SetActiveContext(
const
Context
&rhs);
84
85
private
:
86
struct
Statics
{
87
Abstract::Memory::MEMList
m_rootList;
88
Abstract::Memory::MEMList
m_archiveList;
89
Abstract::Memory::MEMList
m_heapList;
90
EGG::Heap
*m_currentHeap;
91
EGG::Heap
*m_allocatableHeap;
92
EGG::Heap
*m_heapForCreateScene;
93
u16
m_heapOptionFlg;
94
EGG::Heap
*m_rootHeap;
95
Field::BoxColManager
*m_boxColMgr;
96
Field::CollisionDirector
*m_colDir;
97
Field::CourseColMgr
*m_courseColMgr;
98
Field::JugemDirector
*m_jugemDir;
99
Field::ObjectDirector
*m_objDir;
100
Field::ObjectDrivableDirector
*m_objDrivableDir;
101
Field::RailManager
*m_railMgr;
102
Item::ItemDirector
*m_itemDir;
103
Kart::KartObjectManager
*m_kartObjMgr;
104
Kart::KartParamFileManager
*m_paramFileMgr;
105
System::CourseMap
*m_courseMap;
106
System::KPadDirector
*m_padDir;
107
System::RaceConfig
*m_raceConfig;
108
System::InitCallback m_onInitCallback;
109
void
*m_onInitCallbackArg;
110
System::RaceManager
*m_raceMgr;
111
System::ResourceManager
*m_resMgr;
112
Render::KartCamera
*m_kartCamera;
113
Abstract::g3d::ResAnmChr
*m_thunderScaleUpAnmChr;
114
Abstract::g3d::ResAnmChr
*m_thunderScaleDownAnmChr;
115
Abstract::g3d::ResAnmChr
*m_pressScaleUpAnmChr;
116
f32 m_frameCtrlBaseUpdateRate;
117
std::array<std::array<f32, 4>, 4> m_dotProductCache;
118
f32 m_wanwanMaxPitch;
119
f32 m_basabasaInitialXRange;
120
f32 m_basabasaInitialYRange;
121
u32 m_flamePoleCount;
122
};
123
124
void
*m_contextMemory;
125
Statics
m_statics;
126
};
127
128
}
// namespace Host
129
130
}
// namespace Kinoko
Common.hh
This header houses common data types such as our integral types and enums.
Kinoko::Abstract::g3d::ResAnmChr
Represents the CHR0 file format, which pertains to model movement animations.
Definition
ResAnmChr.hh:46
Kinoko::EGG::Heap
A high-level representation of a memory heap for managing dynamic memory allocation....
Definition
Heap.hh:24
Kinoko::Field::BoxColManager
Spatial indexing manager for entities with dynamic collision.
Definition
BoxColManager.hh:75
Kinoko::Field::CollisionDirector
Manages the caching of colliding KCL triangles and exposes queries for collision checks.
Definition
CollisionDirector.hh:23
Kinoko::Field::CourseColMgr
Manager for course KCL interactions.
Definition
CourseColMgr.hh:26
Kinoko::Field::JugemDirector
Manager class for the lifecycle of Jugem objects for players.
Definition
JugemDirector.hh:8
Kinoko::Field::ObjectDirector
Definition
ObjectDirector.hh:23
Kinoko::Field::ObjectDrivableDirector
Definition
ObjectDrivableDirector.hh:19
Kinoko::Field::RailManager
Definition
RailManager.hh:18
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::Kart::KartObjectManager
Responsible for the lifecycle and calculation of KartObjects.
Definition
KartObjectManager.hh:20
Kinoko::Kart::KartParamFileManager
Abstraction for the process of retrieving kart parameters from files.
Definition
KartParamFileManager.hh:20
Kinoko::Render::KartCamera
Manager class for the forward and backwards cameras.
Definition
KartCamera.hh:43
Kinoko::System::CourseMap
Contains course metadata, notably the starting position.
Definition
CourseMap.hh:35
Kinoko::System::KPadDirector
The highest level abstraction for controller processing.
Definition
KPadDirector.hh:17
Kinoko::System::RaceConfig
Initializes the player with parameters specified in the provided ghost file.
Definition
RaceConfig.hh:23
Kinoko::System::RaceManager
Manages the timers that track the stages of a race. Also acts as the interface between the physics en...
Definition
RaceManager.hh:27
Kinoko::System::ResourceManager
Highest level abstraction for archive management and subsequent file retrieval.
Definition
ResourceManager.hh:24
uint16_t
Kinoko::Abstract::Memory::MEMList
Intrusive doubly-linked list. Links are placed within the corresponding object.
Definition
List.hh:14
Kinoko::Host::Context::Statics
Definition
Context.hh:86
host
Context.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.12.0