From 9c2c72f154499a5083cba60974722fb5b971730c Mon Sep 17 00:00:00 2001 From: GrapheneCt Date: Sat, 17 Apr 2021 12:13:59 -0400 Subject: Update ScePaf NIDs and headers --- include/user/paf/resource.h | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'include/user/paf/resource.h') diff --git a/include/user/paf/resource.h b/include/user/paf/resource.h index 156320f..f5470df 100644 --- a/include/user/paf/resource.h +++ b/include/user/paf/resource.h @@ -10,14 +10,34 @@ namespace paf { + class Allocator; + class Resource { public: - Resource(); + enum Error + { + SCE_PAF_ERROR_RESOURCE_NOT_FOUND = 0x80AF0601 + }; + + typedef void(*ResourceMemAllocator)(SceUInt32 opType, paf::Allocator *allocator, ScePVoid ptrIn, SceSize sizeIn, ScePVoid **ptrOut, SceSize *sizeOut); + + class LoadParam + { + public: + + SceUInt32 flags; + paf::Allocator *memAllocator; + ResourceMemAllocator memAllocFunction; + }; + + Resource(const char *resourcePath, LoadParam *resLoadParam); ~Resource(); + static SceVoid DefaultMemAllocator(SceUInt32 opType, paf::Allocator *allocator, ScePVoid ptrIn, SceSize sizeIn, ScePVoid **ptrOut, SceSize *sizeOut); + class Element { public: @@ -32,11 +52,15 @@ namespace paf { } - SceUInt32 GetHashByName(Element *src); + SceUInt32 GetHashById(Element *src); - paf::String name; + paf::String id; SceUInt32 hash; }; + + SceInt32 GetString(SceUInt32 hash, SceWChar16 **ppString, SceSize *pStringSize); + + SceInt32 GetString(const char *id, SceWChar16 **ppString, SceSize *pStringSize); }; } -- cgit v1.2.3