1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
/*
Vita Development Suite Libraries
*/
#ifndef _VDSUITE_USER_PAF_GRAPHICS_H
#define _VDSUITE_USER_PAF_GRAPHICS_H
#include <kernel.h>
#include <gxm.h>
#include <scetypes.h>
#include <paf/misc.h>
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:
Texture() { };
~Texture() { };
Surface *texSurface;
private:
SceUChar8 unk[0x4];
};
}
}
#endif /* _VDSUITE_USER_PAF_GRAPHICS_H */
|