A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
KartObjectManager.hh
1#pragma once
2
3#include "game/kart/KartObject.hh"
4
5#include <abstract/g3d/ResAnmChr.hh>
6
7namespace Host {
8
9class Context;
10
11} // namespace Host
12
13namespace Kart {
14
19 friend class Host::Context;
20
21public:
22 void init();
23 void calc();
24
27 [[nodiscard]] KartObject *object(size_t i) const {
28 ASSERT(i < m_count);
29 return m_objects[i];
30 }
32
33 static KartObjectManager *CreateInstance();
34 static void DestroyInstance();
35
36 [[nodiscard]] static const Abstract::g3d::ResAnmChr *PressScaleUpAnmChr() {
37 return s_pressScaleUpAnmChr;
38 }
39
40 [[nodiscard]] static KartObjectManager *Instance() {
41 return s_instance;
42 }
43
44private:
46 ~KartObjectManager() override;
47
48 void loadScaleAnimations();
49
50 size_t m_count;
51 KartObject **m_objects;
52
53 static Abstract::g3d::ResAnmChr *s_pressScaleUpAnmChr;
54 static KartObjectManager *s_instance;
55};
56
57} // namespace Kart
Represents the CHR0 file format, which pertains to model movement animations.
Definition ResAnmChr.hh:48
An interface for ensuring certain structures and classes are destroyed with the heap.
Definition Disposer.hh:11
Contexts can be used to restore a previous memory state for the current session.
Definition Context.hh:59
Responsible for the lifecycle and calculation of KartObjects.
The highest level abstraction for a kart.
Definition KartObject.hh:11
Represents the host application.
Definition HeapCommon.hh:9
Pertains to kart-related functionality.