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/graphics.h | 107 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) (limited to 'include/user/paf/graphics.h') diff --git a/include/user/paf/graphics.h b/include/user/paf/graphics.h index 33889ee..101a94a 100644 --- a/include/user/paf/graphics.h +++ b/include/user/paf/graphics.h @@ -5,11 +5,116 @@ #ifndef _VDSUITE_USER_PAF_GRAPHICS_H #define _VDSUITE_USER_PAF_GRAPHICS_H +#include +#include #include +#include namespace paf { + namespace graphics { + class MemoryPool + { + public: + + class InitParam + { + public: + + ScePVoid pMemory; + SceSize size; + char *pName; + paf::Allocator::Opt *pAllocatorOpt; + ScePVoid pUnkAllocatorOpt; + SceUInt32 memoryType; + }; + + MemoryPool(InitParam *pInitParam); + + MemoryPool(ScePVoid pMemory, SceSize size, const char *pName, paf::Allocator::Opt *pAllocatorOpt = SCE_NULL, SceUInt32 memoryType = 0); + + virtual ~MemoryPool(); + + virtual int unkf1(); + virtual int unkf2(); + virtual int unkf3(); + + enum MemoryType + { + MemoryType_UserNC, + MemoryType_CDRAM, + MemoryType_Shared, + }; + + enum MemoryTypeSpecial + { + MemoryTypeSpecial_Unused, + MemoryTypeSpecial_Unk0xCF08060, + MemoryTypeSpecial_Phycont + }; + + enum GpuMapType + { + GpuMapType_Normal, + GpuMapType_VertexUsse, + GpuMapType_FragmentUsse, + GpuMapType_NoMap, + }; + + class MemBlockOptParam + { + public: + + MemoryTypeSpecial memoryTypeSpecial; + SceKernelAllocMemBlockOpt *memBlockOpt; + GpuMapType gpuMapType; + SceUInt32 mapAttribs; + SceUInt32 usseOffset; + SceUInt32 unused; + }; + + static ScePVoid AllocMemBlock(MemoryType memoryType, SceSize size, const char *pName, ScePVoid pOptParam = SCE_NULL); + + static SceVoid FreeMemBlock(MemoryType memoryType, ScePVoid pMemory); + + static MemoryPool *GetDefaultMemoryPool(); + + private: + + SceUChar8 m_work[0x48]; + + }; + + class Surface + { + public: + + Surface(MemoryPool *pMemPool, SceUInt32 width, SceUInt32 height, SceUInt32 format, SceUInt32 orderType, SceInt32 a7, SceUInt32 numLevel, SceInt32 a9); + + virtual ~Surface(); + + virtual int unkf1(); + virtual int unkf2(); + virtual int unkf3(); + virtual int unkf4(); + virtual int unkf5(); + virtual int unkf6(); + virtual int unkf7(); + virtual int unkf8(); + virtual int unkf9(); + virtual int unkf10(); + + void* operator new(size_t size); + + void operator delete(void*); + + private: + + SceUChar8 m_work[0x44]; + + }; + class Texture { public: @@ -18,7 +123,7 @@ namespace paf { ~Texture() { }; - + Surface *texSurface; private: -- cgit v1.2.3