vitasdk
Documentation of the vitasdk
types.h
Go to the documentation of this file.
1 
6 #ifndef _PSP2COMMON_TYPES_H_
7 #define _PSP2COMMON_TYPES_H_
8 
9 #include <stddef.h>
10 #include <stdint.h>
11 #include <vitasdk/build_utils.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 
18 /* SCE types */
19 
20 #if defined(_MSC_VER)
21 #define SCE_ALIGN(x) __declspec(align(x))
22 #define SCE_DEPRECATED(name) __declspec(deprecated) name
23 #define SCE_DEPRECATED_EX(name, __comment__) __declspec(deprecated(__comment__)) name
24 #else
25 #if defined(__GNUC__)
26 #define SCE_ALIGN(x) __attribute__ ((aligned(x)))
27 #define SCE_DEPRECATED(name) name __attribute__ ((deprecated))
28 #define SCE_DEPRECATED_EX(name, __comment__) name __attribute__ ((deprecated(__comment__)))
29 #endif
30 #endif
31 
32 typedef int8_t SceChar8;
33 typedef uint8_t SceUChar8;
34 
35 typedef int8_t SceInt8;
36 typedef uint8_t SceUInt8;
37 
38 typedef int16_t SceShort16;
39 typedef uint16_t SceUShort16;
40 
41 typedef int16_t SceInt16;
42 typedef uint16_t SceUInt16;
43 
44 typedef int32_t SceInt32;
45 typedef uint32_t SceUInt32;
46 
47 typedef int32_t SceInt;
48 typedef uint32_t SceUInt;
49 
50 typedef int64_t SceInt64;
51 typedef uint64_t SceUInt64;
52 
53 typedef int64_t SceLong64;
54 typedef uint64_t SceULong64;
55 
56 typedef unsigned int SceSize;
57 typedef signed int SceSSize;
58 
59 typedef int SceBool;
60 enum {
62  SCE_TRUE
63 };
64 
65 typedef float SceFloat;
66 typedef float SceFloat32;
67 
68 typedef double SceDouble;
69 typedef double SceDouble64;
70 
71 typedef signed char SceSByte;
72 typedef signed char SceSByte8;
73 
74 typedef unsigned char SceByte;
75 typedef unsigned char SceByte8;
76 
77 typedef uint16_t SceWChar16;
78 typedef uint32_t SceWChar32;
79 
80 typedef void SceVoid;
81 typedef void *ScePVoid;
82 
83 typedef int SceIntPtr;
84 typedef unsigned int SceUIntPtr;
86 
87 typedef int SceMode;
88 typedef SceInt64 SceOff;
89 
90 typedef int SceUID;
91 typedef int ScePID;
92 typedef unsigned int SceNID;
93 
94 typedef char* SceName;
95 
98 
99 #define SCE_KERNEL_THREAD_ID_SELF 0
100 #define SCE_KERNEL_PROCESS_ID_SELF 0
101 #define SCE_UID_NAMELEN 31
102 
103 
104 /* PSP2 Specific types */
105 typedef struct SceIVector2 {
108 } SceIVector2;
110 
111 typedef struct SceFVector2 {
114 } SceFVector2;
116 
117 typedef struct SceIVector3 {
121 } SceIVector3;
123 
124 typedef struct SceFVector3 {
128 } SceFVector3;
130 
131 typedef struct SceIVector4 {
136 } SceIVector4;
138 
139 typedef struct SceFVector4 {
144 } SceFVector4;
146 
147 typedef struct SceIMatrix2 {
150 } SceIMatrix2;
152 
153 typedef struct SceFMatrix2 {
156 } SceFMatrix2;
158 
159 typedef struct SceIMatrix3 {
163 } SceIMatrix3;
165 
166 typedef struct SceFMatrix3 {
170 } SceFMatrix3;
172 
173 typedef struct SceIMatrix4 {
178 } SceIMatrix4;
180 
181 typedef struct SceFMatrix4 {
186 } SceFMatrix4;
188 
189 typedef struct SceFQuaternion {
196 
197 typedef struct SceFColor {
202 } SceFColor;
204 
205 typedef struct SceFPlane {
210 } SceFPlane;
212 
213 typedef struct SceDateTime {
214  unsigned short year;
215  unsigned short month;
216  unsigned short day;
217  unsigned short hour;
218  unsigned short minute;
219  unsigned short second;
220  unsigned int microsecond;
221 } SceDateTime;
223 
224 
225 #define SCE_OK (0)
226 
227 
228 #define SCE_KERNEL_1KiB (0x400)
229 #define SCE_KERNEL_2KiB (0x800)
230 #define SCE_KERNEL_4KiB (0x1000)
231 #define SCE_KERNEL_8KiB (0x2000)
232 #define SCE_KERNEL_16KiB (0x4000)
233 #define SCE_KERNEL_32KiB (0x8000)
234 #define SCE_KERNEL_64KiB (0x10000)
235 #define SCE_KERNEL_128KiB (0x20000)
236 #define SCE_KERNEL_256KiB (0x40000)
237 #define SCE_KERNEL_512KiB (0x80000)
238 #define SCE_KERNEL_1MiB (0x100000)
239 #define SCE_KERNEL_2MiB (0x200000)
240 #define SCE_KERNEL_4MiB (0x400000)
241 #define SCE_KERNEL_8MiB (0x800000)
242 #define SCE_KERNEL_16MiB (0x1000000)
243 #define SCE_KERNEL_32MiB (0x2000000)
244 #define SCE_KERNEL_64MiB (0x4000000)
245 #define SCE_KERNEL_128MiB (0x8000000)
246 #define SCE_KERNEL_256MiB (0x10000000)
247 #define SCE_KERNEL_512MiB (0x20000000)
248 #define SCE_KERNEL_1GiB (0x40000000)
249 #define SCE_KERNEL_2GiB (0x80000000)
250 #define SCE_KERNEL_4GiB (0x100000000LL)
251 #define SCE_KERNEL_8GiB (0x200000000LL)
252 #define SCE_KERNEL_16GiB (0x400000000LL)
253 #define SCE_KERNEL_32GiB (0x800000000LL)
254 
255 
256 #ifdef __cplusplus
257 }
258 #endif
259 
260 #endif /* _PSP2COMMON_TYPES_H_ */
char * SceName
Names are used to describe object names.
Definition: types.h:94
SceInt x
Definition: types.h:132
unsigned short minute
Definition: types.h:218
signed int SceSSize
Definition: types.h:57
SceFloat d
Definition: types.h:209
int16_t SceInt16
Definition: types.h:41
SceInt y
Definition: types.h:133
int ScePID
Process ID.
Definition: types.h:91
VITASDK_BUILD_ASSERT_EQ(8, SceIVector2)
unsigned short day
Definition: types.h:216
SceIVector3 z
Definition: types.h:162
SceInt y
Definition: types.h:107
SceIVector4 z
Definition: types.h:176
SceFloat g
Definition: types.h:199
SceFloat y
Definition: types.h:191
SceFloat x
Definition: types.h:140
SceInt x
Definition: types.h:106
SceIVector2 x
Definition: types.h:148
void SceVoid
Definition: types.h:80
SceFloat a
Definition: types.h:206
SceFVector2 x
Definition: types.h:154
int8_t SceChar8
Definition: types.h:32
SceIVector4 y
Definition: types.h:175
SceIVector3 y
Definition: types.h:161
SceFloat z
Definition: types.h:127
unsigned short month
Definition: types.h:215
int SceBool
Definition: types.h:59
SceFloat y
Definition: types.h:113
SceIVector4 x
Definition: types.h:174
unsigned int SceUIntPtr
Definition: types.h:84
SceUIntPtr SceUIntVAddr
Definition: types.h:85
SceFloat b
Definition: types.h:207
SceFloat c
Definition: types.h:208
SceIVector3 x
Definition: types.h:160
int32_t SceInt32
Definition: types.h:44
SceFloat b
Definition: types.h:200
int16_t SceShort16
Definition: types.h:38
unsigned int SceSize
Definition: types.h:56
SceIVector2 y
Definition: types.h:149
SceFVector3 z
Definition: types.h:169
SceFloat z
Definition: types.h:192
unsigned int microsecond
Definition: types.h:220
double SceDouble
Definition: types.h:68
uint16_t SceUShort16
Definition: types.h:39
SceFloat x
Definition: types.h:112
uint32_t SceUInt
Definition: types.h:48
SceFVector4 w
Definition: types.h:185
void * ScePVoid
Definition: types.h:81
SceInt y
Definition: types.h:119
int64_t SceLong64
Definition: types.h:53
SceFloat w
Definition: types.h:143
SceFloat a
Definition: types.h:201
float SceFloat32
Definition: types.h:66
uint16_t SceUInt16
Definition: types.h:42
int SceUID
UIDs are used to describe many different kernel objects.
Definition: types.h:90
double SceDouble64
Definition: types.h:69
unsigned short hour
Definition: types.h:217
SceFloat y
Definition: types.h:126
SceFloat w
Definition: types.h:193
int64_t SceInt64
Definition: types.h:50
SceInt x
Definition: types.h:118
SceFloat r
Definition: types.h:198
SceInt z
Definition: types.h:120
uint64_t SceUInt64
Definition: types.h:51
unsigned int SceNID
Library/Function NID.
Definition: types.h:92
uint32_t SceUInt32
Definition: types.h:45
unsigned char SceByte8
Definition: types.h:75
uint32_t SceWChar32
Definition: types.h:78
unsigned short year
Definition: types.h:214
SceInt64 SceOff
Offset type.
Definition: types.h:88
SceInt z
Definition: types.h:134
uint16_t SceWChar16
Definition: types.h:77
SceFloat z
Definition: types.h:142
int SceMode
Mode for I/O functions.
Definition: types.h:87
SceFVector3 x
Definition: types.h:167
signed char SceSByte
Definition: types.h:71
unsigned short second
Definition: types.h:219
SceFVector3 y
Definition: types.h:168
SceFloat x
Definition: types.h:125
signed char SceSByte8
Definition: types.h:72
unsigned char SceByte
Definition: types.h:74
SceFloat y
Definition: types.h:141
int32_t SceInt
Definition: types.h:47
SceFVector2 y
Definition: types.h:155
int8_t SceInt8
Definition: types.h:35
SceIVector4 w
Definition: types.h:177
SceInt w
Definition: types.h:135
SceFVector4 z
Definition: types.h:184
uint64_t SceULong64
Definition: types.h:54
SceUInt64 SceKernelSysClock
64-bit system clock type.
Definition: types.h:97
SceFVector4 y
Definition: types.h:183
SceFloat x
Definition: types.h:190
int SceIntPtr
Definition: types.h:83
uint8_t SceUInt8
Definition: types.h:36
uint8_t SceUChar8
Definition: types.h:33
float SceFloat
Definition: types.h:65
SceFVector4 x
Definition: types.h:182
@ SCE_TRUE
Definition: types.h:62
@ SCE_FALSE
Definition: types.h:61
Definition: types.h:213
Definition: types.h:197
Definition: types.h:153
Definition: types.h:166
Definition: types.h:181
Definition: types.h:205
Definition: types.h:189
Definition: types.h:111
Definition: types.h:124
Definition: types.h:139
Definition: types.h:147
Definition: types.h:159
Definition: types.h:173
Definition: types.h:105
Definition: types.h:117
Definition: types.h:131