A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
GameScene.hh
1#pragma once
2
3#include "game/system/MultiDvdArchive.hh"
4
5#include <egg/core/ExpHeap.hh>
6#include <egg/core/Scene.hh>
7
8#include <list>
9
11namespace Scene {
12
14class GameScene : public EGG::Scene {
15public:
16 GameScene();
17 ~GameScene() override;
18
19 void calc() final;
20 void enter() final;
21 void exit() final;
22 void reinit() final;
23
24 virtual void createEngines() = 0;
25 virtual void initEngines() = 0;
26 virtual void calcEngines() = 0;
27 virtual void destroyEngines() = 0;
28 virtual void configure() = 0;
29 virtual void onReinit() {}
30
31protected:
32 void appendResource(System::MultiDvdArchive *archive, s32 id);
33
34private:
35 struct Resource {
36 Resource(System::MultiDvdArchive *archive, s32 id);
37
39 s32 id;
40 };
41
42 void initScene();
43 void deinitScene();
44 void unmountResources();
45
46#ifdef BUILD_DEBUG
47 void checkMemory();
48 void getMemoryLeakTags();
49 size_t getMemoryLeakTagCount();
50
51 static void ViewTags(void *block, Abstract::Memory::MEMiHeapHead *heap, uintptr_t param);
52 static void IncreaseTagCount(void *block, Abstract::Memory::MEMiHeapHead *heap,
53 uintptr_t param);
54#endif // BUILD_DEBUG
55
56 EGG::ExpHeap::GroupSizeRecord m_groupSizeRecord;
57 std::list<Resource *> m_resources;
58 int m_nextSceneId;
59
60 size_t m_totalMemoryUsed;
61};
62
63} // namespace Scene
A low-level representation of a memory heap for managing dynamic memory allocation....
Definition HeapCommon.hh:13
Memory blocks have group IDs assigned to them (default 0). This class is a record of the total sum of...
Definition ExpHeap.hh:21
Base class for all scenes.
Definition Scene.hh:16
Interface for menu and race scenes.
Definition GameScene.hh:14
std::list< Resource * > m_resources
List of all active resources in the scene.
Definition GameScene.hh:57
Pertains to scene handling.
Definition GameScene.cc:8