A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
DvdArchive.hh
1#pragma once
2
3#include <egg/core/Archive.hh>
4
5namespace System {
6
7class DvdArchive {
8public:
9 enum class State {
10 Cleared = 0,
11 Ripped = 1,
12 Decompressed = 2,
13 Mounted = 3,
14 };
15
16 DvdArchive();
18
19 void decompress();
20 void *getFile(const char *filename, size_t *size) const;
21 void load(const char *path, bool decompress_);
22 void load(const DvdArchive *other);
23 void load(void *fileStart, size_t fileSize, bool decompress_);
24 void mount();
25 void move();
26 void rip(const char *path);
27
28 void clear();
29 void clearArchive();
30 void clearFile();
31 void unmount();
32
33 [[nodiscard]] bool isLoaded() const {
34 return m_state == State::Mounted;
35 }
36
37 [[nodiscard]] bool isRipped() const {
38 return m_state == State::Ripped;
39 }
40
41private:
42 EGG::Archive *m_archive;
43 void *m_archiveStart;
44 size_t m_archiveSize;
45 void *m_fileStart;
46 size_t m_fileSize;
47 State m_state;
48};
49
50} // namespace System
High-level handling for generic system operations, such as input reading, race configuration,...
Definition CourseMap.cc:5