mirror of
https://github.com/zeldaret/botw
synced 2026-06-23 00:30:00 -04:00
ksys/res: Implement EntryFactory (base class and template)
Also adds a heap-related function that's used by EntryFactory (and many other functions)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#include "KingSystem/Resource/resEntryFactory.h"
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
static EntryFactory<Resource> sDefaultEntryFactory;
|
||||
|
||||
u32 EntryFactoryBase::getResourceSize() const {
|
||||
KSYS_CHECK_SIZE_NX150(sead::DirectResource, 0x20);
|
||||
return sizeof(sead::DirectResource);
|
||||
}
|
||||
|
||||
u32 EntryFactoryBase::getLoadDataAlignment() const {
|
||||
return sizeof(void*);
|
||||
}
|
||||
|
||||
EntryFactory<Resource>& getDefaultResourceFactory() {
|
||||
return sDefaultEntryFactory;
|
||||
}
|
||||
|
||||
} // namespace ksys::res
|
||||
Reference in New Issue
Block a user