summaryrefslogtreecommitdiff
path: root/include/user/paf/resource.h
diff options
context:
space:
mode:
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);
};
}