ksys: Add Revision

This commit is contained in:
Léo Lam
2021-05-09 12:11:05 +02:00
parent b8eb5960ec
commit 52c4ba1fc0
4 changed files with 56 additions and 5 deletions
+2
View File
@@ -16,6 +16,8 @@ target_sources(uking PRIVATE
PlayReportMgr.h
ProductReporter.cpp
ProductReporter.h
Revision.cpp
Revision.h
StageInfo.cpp
StageInfo.h
StringBoard.h
+13
View File
@@ -0,0 +1,13 @@
#include "KingSystem/System/Revision.h"
namespace ksys {
SEAD_SINGLETON_DISPOSER_IMPL(Revision)
// Stubbed in release builds
void Revision::init(sead::Heap* heap) {}
void Revision::loadInfo() {}
} // namespace ksys
+36
View File
@@ -0,0 +1,36 @@
#pragma once
#include <heap/seadDisposer.h>
#include <hostio/seadHostIONode.h>
#include "KingSystem/Utils/Types.h"
namespace ksys {
class Revision final : public sead::hostio::Node {
SEAD_SINGLETON_DISPOSER(Revision)
Revision() = default;
public:
void init(sead::Heap* heap);
void loadInfo();
void* get28() const { return _28; }
int getResourceVer() const { return mResourceVer; }
int getProgramVer() const { return mProgramVer; }
const sead::SafeString* getBuilderName() const { return mBuilderName; }
const sead::SafeString* getStageSelectName() const { return mStageSelectName; }
int get48() const { return _48; }
int get4C() const { return _4c; }
private:
void* _28{};
int mResourceVer = -1;
int mProgramVer = -1;
const sead::SafeString* mBuilderName{};
const sead::SafeString* mStageSelectName{};
int _48 = -1;
int _4c = 0;
};
KSYS_CHECK_SIZE_NX150(Revision, 0x50);
} // namespace ksys