sgdk: types.h Source File

sgdk

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

types.h
Go to the documentation of this file.

    00001
    00010 #ifndef _TYPES_H_
    00011 #define _TYPES_H_
    00012
    00017 #ifndef FALSE
    00018 #define FALSE   0
    00019 #endif
    00020
    00024 #ifndef TRUE
    00025 #define TRUE    1
    00026 #endif
    00027
    00031 #ifndef NULL
    00032 #define NULL    0
    00033 #endif
    00034
    00035 #ifndef MIN_U8
    00036 #define MIN_U8  0x00
    00037 #endif
    00038 #ifndef MAX_U8
    00039 #define MAX_U8  0xFF
    00040 #endif
    00041 #ifndef MIN_S8
    00042 #define MIN_S8  -0x80
    00043 #endif
    00044 #ifndef MAX_S8
    00045 #define MAX_S8  0x7F
    00046 #endif
    00047
    00048 #ifndef MIN_U16
    00049 #define MIN_U16 0x0000
    00050 #endif
    00051 #ifndef MAX_U16
    00052 #define MAX_U16 0xFFFF
    00053 #endif
    00054 #ifndef MIN_S16
    00055 #define MIN_S16 -0x8000
    00056 #endif
    00057 #ifndef MAX_S16
    00058 #define MAX_S16 0x7FFF
    00059 #endif
    00060
    00061 #ifndef MIN_U32
    00062 #define MIN_U32 0x0000
    00063 #endif
    00064 #ifndef MAX_U32
    00065 #define MAX_U32 0xFFFFFFFF
    00066 #endif
    00067 #ifndef MIN_S32
    00068 #define MIN_S32 -0x80000000
    00069 #endif
    00070 #ifndef MAX_S32
    00071 #define MAX_S32 0x7FFFFFFF
    00072 #endif
    00073
    00074
    00080 typedef unsigned short bool;
    00081
    00086 typedef char s8;
    00091 typedef short s16;
    00096 typedef long s32;
    00097
    00102 typedef unsigned char u8;
    00107 typedef unsigned short u16;
    00112 typedef unsigned long u32;
    00113
    00119 typedef volatile u16 vbool;
    00124 typedef volatile s8 vs8;
    00129 typedef volatile s16 vs16;
    00134 typedef volatile s32 vs32;
    00135
    00140 typedef volatile u8 vu8;
    00145 typedef volatile u16 vu16;
    00150 typedef volatile u32 vu32;
    00151
    00152
    00153 #if !defined(uint8_t) && !defined(__int8_t_defined)
    00154 #define uint8_t     u8
    00155 #define int8_t      s8
    00156 #endif
    00157 #if !defined(uint16_t) && !defined(__int16_t_defined)
    00158 #define uint16_t    u16
    00159 #define int16_t     s16
    00160 #endif
    00161 #if !defined(uint32_t) && !defined(__int32_t_defined)
    00162 #define uint32_t    u32
    00163 #define int32_t     s32
    00164 #endif
    00165
    00166
    00171 typedef s16 fix16;
    00176 typedef s32 fix32;
    00177
    00182 typedef s16 f16;
    00187 typedef s32 f32;
    00188
    00189
    00190 #define FASTCALL
    00191
    00205 typedef struct
    00206 {
    00207     s16 x;
    00208     s16 y;
    00209     u16 w;
    00210     u16 h;
    00211 } Box;
    00212
    00224 typedef struct
    00225 {
    00226     s16 x;
    00227     s16 y;
    00228     u16 ray;
    00229 } Circle;
    00230
    00231
    00232 typedef void VoidCallback();
    00233
    00234
    00235 u8  getZeroU8();
    00236 u16 getZeroU16();
    00237 u32 getZeroU32();
    00238
    00248 u8  rol8(u8 value, u16 number);
    00258 u16 rol16(u16 value, u16 number);
    00268 u32 rol32(u32 value, u16 number);
    00278 u8  ror8(u8 value, u16 number);
    00288 u16 ror16(u16 value, u16 number);
    00298 u32 ror32(u32 value, u16 number);
    00299
    00300
    00301 #endif // _TYPES_H_

All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines