Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ResourceManager.hh
1
#pragma once
2
3
#include "game/system/MultiDvdArchive.hh"
4
5
namespace
System
{
6
7
enum class
ArchiveId {
8
Core = 0,
9
Course = 1,
10
};
11
16
class
ResourceManager
:
EGG::Disposer
{
17
public
:
18
void
*getFile(
const
char
*filename,
size_t
*size, ArchiveId
id
);
19
void
*getBsp(Vehicle vehicle,
size_t
*size);
20
[[nodiscard]]
MultiDvdArchive
*load(Course courseId);
21
[[nodiscard]]
MultiDvdArchive
*load(s32 idx,
const
char
*filename);
22
void
unmount(
MultiDvdArchive
*archive);
23
25
[[nodiscard]]
static
const
char
*GetVehicleName(Vehicle vehicle) {
26
return
vehicle < Vehicle::Max ? VEHICLE_NAMES[static_cast<u8>(vehicle)] :
nullptr
;
27
}
28
29
static
ResourceManager
*CreateInstance();
30
static
void
DestroyInstance();
31
32
[[nodiscard]]
static
ResourceManager
*Instance() {
33
return
s_instance;
34
}
35
36
private
:
37
ResourceManager
();
38
~ResourceManager
()
override
;
39
40
// 0: Core archive
41
// 1: Course archive
42
MultiDvdArchive
**m_archives;
43
44
[[nodiscard]]
static
MultiDvdArchive
*Create(u8 i);
45
static
ResourceManager
*s_instance;
46
};
47
48
}
// namespace System
EGG::Disposer
An interface for ensuring certain structures and classes are destroyed with the heap.
Definition
Disposer.hh:11
System::MultiDvdArchive
Definition
MultiDvdArchive.hh:9
System::ResourceManager
Highest level abstraction for archive management and subsequent file retrieval.
Definition
ResourceManager.hh:16
System
High-level handling for generic system operations, such as input reading, race configuration,...
Definition
CourseMap.cc:5
game
system
ResourceManager.hh
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.12.0