summaryrefslogtreecommitdiff
path: root/include/user/paf/resource.h
diff options
context:
space:
mode:
authorGrapheneCt2021-04-17 12:13:59 -0400
committerReiko Asakura2021-04-17 14:32:37 -0400
commit9c2c72f154499a5083cba60974722fb5b971730c (patch)
treef8b3cef185a4bb2c6b23fb8a0a0d377df0f9982b /include/user/paf/resource.h
parentAdd kernel/npdrm.h (diff)
downloadvds-libraries-9c2c72f154499a5083cba60974722fb5b971730c.tar.gz
Update ScePaf NIDs and headers
Diffstat (limited to 'include/user/paf/resource.h')
-rw-r--r--include/user/paf/resource.h30
1 files changed, 27 insertions, 3 deletions
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);
};
}