mirror of
https://github.com/zeldaret/botw
synced 2026-08-18 05:18:13 -04:00
ksys: Start adding OverlayArenaSystem
This commit is contained in:
@@ -86,6 +86,8 @@ target_sources(uking PRIVATE
|
||||
resCurrentResNameMgr.h
|
||||
resEntryFactory.cpp
|
||||
resEntryFactory.h
|
||||
resHandle.cpp
|
||||
resHandle.h
|
||||
|
||||
resResource.cpp
|
||||
resResource.h
|
||||
@@ -105,4 +107,6 @@ target_sources(uking PRIVATE
|
||||
resResourceLod.h
|
||||
resResourceRecipe.cpp
|
||||
resResourceRecipe.h
|
||||
|
||||
resSystem.h
|
||||
)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#include "KingSystem/Resource/resHandle.h"
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
Handle::Handle() = default;
|
||||
|
||||
} // namespace ksys::res
|
||||
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <prim/seadRuntimeTypeInfo.h>
|
||||
#include <prim/seadTypedBitFlag.h>
|
||||
#include "KingSystem/Utils/Thread/ManagedTaskHandle.h"
|
||||
#include "KingSystem/Utils/Types.h"
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
class ResourceUnit;
|
||||
|
||||
// FIXME: incomplete
|
||||
class Handle {
|
||||
SEAD_RTTI_BASE(Handle)
|
||||
public:
|
||||
enum class Status {
|
||||
_0 = 0,
|
||||
};
|
||||
|
||||
Handle();
|
||||
virtual ~Handle();
|
||||
|
||||
Status getStatus() const;
|
||||
|
||||
private:
|
||||
enum class Flag : u8 {
|
||||
_1 = 0x1,
|
||||
};
|
||||
|
||||
sead::TypedBitFlag<Flag> mFlags = Flag::_1;
|
||||
Status mStatus = Status::_0;
|
||||
ResourceUnit* mUnit = nullptr;
|
||||
util::ManagedTaskHandle mTaskHandle;
|
||||
void* _40 = nullptr;
|
||||
void* _48 = nullptr;
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(Handle, 0x50);
|
||||
|
||||
} // namespace ksys::res
|
||||
@@ -0,0 +1 @@
|
||||
#include "KingSystem/Resource/resResourceMgrTask.h"
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
namespace ksys {
|
||||
class OverlayArena;
|
||||
}
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
// FIXME: very, very incomplete.
|
||||
class ResourceMgrTask {
|
||||
public:
|
||||
static ResourceMgrTask* instance() { return sInstance; }
|
||||
|
||||
void insertOverlayArena(OverlayArena* arena);
|
||||
OverlayArena* getSomeArena() const;
|
||||
|
||||
private:
|
||||
static ResourceMgrTask* sInstance;
|
||||
};
|
||||
|
||||
} // namespace ksys::res
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
// In release builds, the only thing this function does is return 1.
|
||||
// TODO: figure out what this is used for. Stubbed log function?
|
||||
bool stubbedLogFunction();
|
||||
|
||||
// In release builds, the only thing this function does is return 0.
|
||||
// TODO: figure out what this is used for. Stubbed log function?
|
||||
bool returnFalse();
|
||||
|
||||
} // namespace ksys::res
|
||||
Reference in New Issue
Block a user