PSP2SDK  dirty-f9e4f2d
The free SDK for PSP2
include/psp2/types.h
Go to the documentation of this file.
00001 
00012 #ifndef _PSP2_TYPES_H_
00013 #define _PSP2_TYPES_H_
00014 
00015 #include <stddef.h>
00016 #include <stdint.h>
00017 
00018 /* SCE types */
00019 typedef int8_t SceChar8;
00020 typedef uint8_t SceUChar8;
00021 
00022 typedef int8_t SceInt8;
00023 typedef uint8_t SceUInt8;
00024 
00025 typedef int16_t SceShort16;
00026 typedef uint16_t SceUShort16;
00027 
00028 typedef int16_t  SceInt16;
00029 typedef uint16_t  SceUInt16;
00030 
00031 typedef int32_t SceInt32;
00032 typedef uint32_t SceUInt32;
00033 
00034 typedef int32_t SceInt;
00035 typedef uint32_t SceUInt;
00036 
00037 typedef int64_t SceInt64;
00038 typedef uint64_t SceUInt64;
00039 
00040 typedef int64_t SceLong64;
00041 typedef uint64_t SceULong64;
00042 
00043 typedef unsigned int SceSize;
00044 typedef int SceSSize;
00045 
00046 typedef int SceBool;
00047 
00048 enum {
00049     PSP2_FALSE,
00050     PSP2_TRUE
00051 };
00052 
00053 typedef float SceFloat;
00054 typedef float SceFloat32;
00055 
00056 typedef double SceDouble;
00057 typedef double SceDouble64;
00058 
00059 typedef signed char SceSByte;
00060 typedef signed char SceSByte8;
00061 
00062 typedef unsigned char SceByte;
00063 typedef unsigned char SceByte8;
00064 
00065 typedef uint16_t SceWChar16;
00066 typedef uint32_t SceWChar32;
00067 
00068 typedef void SceVoid;
00069 typedef void *ScePVoid;
00070 
00071 typedef int SceIntPtr;
00072 typedef unsigned int SceUIntPtr;
00073 typedef SceUIntPtr SceUIntVAddr;
00074 
00075 /* PSP2 Specific types */
00076 typedef struct SceIVector2 {
00077     SceInt x;
00078     SceInt y;
00079 } SceIVector2;
00080 
00081 typedef struct SceFVector2 {
00082     SceFloat x;
00083     SceFloat y;
00084 } SceFVector2;
00085 
00086 typedef struct SceIVector3 {
00087     SceInt x;
00088     SceInt y;
00089     SceInt z;
00090 } SceIVector3;
00091 
00092 typedef struct SceFVector3 {
00093     SceFloat x;
00094     SceFloat y;
00095     SceFloat z;
00096 } SceFVector3;
00097 
00098 typedef struct SceIVector4 {
00099     SceInt x;
00100     SceInt y;
00101     SceInt z;
00102     SceInt w;
00103 } SceIVector4;
00104 
00105 typedef struct SceUVector4 {
00106     SceUInt x;
00107     SceUInt y;
00108     SceUInt z;
00109     SceUInt w;
00110 } SceUVector4;
00111 
00112 typedef struct SceFVector4 {
00113     SceFloat x;
00114     SceFloat y;
00115     SceFloat z;
00116     SceFloat w;
00117 } SceFVector4;
00118 
00119 typedef struct SceIMatrix2 {
00120     SceIVector2 x;
00121     SceIVector2 y;
00122 } SceIMatrix2;
00123 
00124 typedef struct SceFMatrix2 {
00125     SceFVector2 x;
00126     SceFVector2 y;
00127 } SceFMatrix2;
00128 
00129 typedef struct SceIMatrix3 {
00130     SceIVector3 x;
00131     SceIVector3 y;
00132     SceIVector3 z;
00133 } SceIMatrix3;
00134 
00135 typedef struct SceFMatrix3 {
00136     SceFVector3 x;
00137     SceFVector3 y;
00138     SceFVector3 z;
00139 } SceFMatrix3;
00140 
00141 typedef struct SceIMatrix4 {
00142     SceIVector4 x;
00143     SceIVector4 y;
00144     SceIVector4 z;
00145     SceIVector4 w;
00146 } SceIMatrix4;
00147 
00148 typedef struct SceUMatrix4 {
00149     SceUVector4 x;
00150     SceUVector4 y;
00151     SceUVector4 z;
00152     SceUVector4 w;
00153 } SceUMatrix4;
00154 
00155 typedef struct SceFMatrix4 {
00156     SceFVector4 x;
00157     SceFVector4 y;
00158     SceFVector4 z;
00159     SceFVector4 w;
00160 } SceFMatrix4;
00161 
00162 typedef struct SceFQuaternion {
00163     SceFloat x;
00164     SceFloat y;
00165     SceFloat z;
00166     SceFloat w;
00167 } SceFQuaternion;
00168 
00169 typedef struct SceFColor {
00170     SceFloat r;
00171     SceFloat g;
00172     SceFloat b;
00173     SceFloat a;
00174 } SceFColor;
00175 
00176 typedef struct SceFPlane {
00177     SceFloat a;
00178     SceFloat b;
00179     SceFloat c;
00180     SceFloat d;
00181 } SceFPlane;
00182 
00183 typedef union SceUnion32 {
00184     unsigned int ui;
00185     int i;
00186     unsigned short us[2];
00187     short s[2];
00188     unsigned char uc[4];
00189     char c[4];
00190     float f;
00191     void *p;
00192 } SceUnion32;
00193 
00194 typedef union SceUnion64 {
00195     SceULong64 ull;
00196     SceLong64 ll;
00197     unsigned int ui[2];
00198     int i[2];
00199     unsigned short us[4];
00200     short s[4];
00201     unsigned char uc[8];
00202     char c[8];
00203     float f[2];
00204     SceFVector2 fv;
00205     SceIVector2 iv;
00206 } SceUnion64;
00207 
00208 typedef union SceUnion128 {
00209     SceULong64 ull[2];
00210     SceLong64 ll[2];
00211     unsigned int ui[4];
00212     int i[4];
00213     unsigned short us[8];
00214     short s[8];
00215     unsigned char uc[16];
00216     char c[16];
00217     float f[4];
00218     SceFVector4 fv;
00219     SceFQuaternion fq;
00220     SceFPlane fp;
00221     SceFColor fc;
00222     SceIVector4 iv;
00223 } SceUnion128;
00224 
00225 typedef struct SceDateTime {
00226     unsigned short year;
00227     unsigned short month;
00228     unsigned short day;
00229     unsigned short hour;
00230     unsigned short minute;
00231     unsigned short second;
00232     unsigned int microsecond;
00233 } SceDateTime;
00234 
00235 typedef int SceMode; 
00236 typedef SceInt64 SceOff; 
00237 
00238 typedef int SceUID; 
00239 
00240 typedef int ScePID; 
00241 #define PSP2_KERNEL_PROCESS_ID_SELF 0 //!< Current running process ID is always 0
00242 
00243 typedef char* SceName; 
00244 #define PSP2_UID_NAMELEN 31 //!< Maximum length for kernel object names
00245 
00246 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines