core: Library cleanup (#1631)

* core: Split error codes into separate files

* Reduces build times and is cleaner

* core: Bring structs and enums to codebase style

* core: More style changes
This commit is contained in:
TheTurtle 2024-11-30 22:37:36 +02:00 committed by GitHub
parent 3d0aacd43d
commit 5b6e0ab238
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
114 changed files with 2158 additions and 2509 deletions

View file

@ -97,24 +97,23 @@ struct PlaygoChunk {
class PlaygoFile {
public:
bool initialized;
OrbisPlayGoHandle handle;
OrbisPlayGoChunkId id;
OrbisPlayGoLocus locus;
OrbisPlayGoInstallSpeed speed;
s64 speed_tick;
OrbisPlayGoEta eta;
OrbisPlayGoLanguageMask langMask;
bool initialized = false;
OrbisPlayGoHandle handle = 0;
OrbisPlayGoChunkId id = 0;
OrbisPlayGoLocus locus = OrbisPlayGoLocus::NotDownloaded;
OrbisPlayGoInstallSpeed speed = OrbisPlayGoInstallSpeed::Trickle;
s64 speed_tick = 0;
OrbisPlayGoEta eta = 0;
OrbisPlayGoLanguageMask langMask = 0;
std::vector<PlaygoChunk> chunks;
public:
PlaygoFile()
: initialized(false), handle(0), id(0), locus(0), speed(ORBIS_PLAYGO_INSTALL_SPEED_TRICKLE),
speed_tick(0), eta(0), langMask(0), playgoHeader{0} {}
explicit PlaygoFile() = default;
~PlaygoFile() = default;
bool Open(const std::filesystem::path& filepath);
bool LoadChunks(const Common::FS::IOFile& file);
PlaygoHeader& GetPlaygoHeader() {
return playgoHeader;
}