silence some warnings (dhewg)
[libogc.git] / gc / gctypes.h
blob8d93799e4b82c546b827896c6ace8efa8216c146
1 #ifndef __GCTYPES_H__
2 #define __GCTYPES_H__
4 /*! \file gctypes.h
5 \brief Data type definitions
7 */
9 #include <stdbool.h>
10 #include <stdint.h>
12 #ifdef __cplusplus
13 extern "C" {
14 #endif /* __cplusplus */
16 /*+----------------------------------------------------------------------------------------------+*/
17 typedef uint8_t u8; ///< 8bit unsigned integer
18 typedef uint16_t u16; ///< 16bit unsigned integer
19 typedef uint32_t u32; ///< 32bit unsigned integer
20 typedef uint64_t u64; ///< 64bit unsigned integer
21 /*+----------------------------------------------------------------------------------------------+*/
22 typedef int8_t s8; ///< 8bit signed integer
23 typedef int16_t s16; ///< 16bit signed integer
24 typedef int32_t s32; ///< 32bit signed integer
25 typedef int64_t s64; ///< 64bit signed integer
26 /*+----------------------------------------------------------------------------------------------+*/
27 typedef volatile u8 vu8; ///< 8bit unsigned volatile integer
28 typedef volatile u16 vu16; ///< 16bit unsigned volatile integer
29 typedef volatile u32 vu32; ///< 32bit unsigned volatile integer
30 typedef volatile u64 vu64; ///< 64bit unsigned volatile integer
31 /*+----------------------------------------------------------------------------------------------+*/
32 typedef volatile s8 vs8; ///< 8bit signed volatile integer
33 typedef volatile s16 vs16; ///< 16bit signed volatile integer
34 typedef volatile s32 vs32; ///< 32bit signed volatile integer
35 typedef volatile s64 vs64; ///< 64bit signed volatile integer
36 /*+----------------------------------------------------------------------------------------------+*/
37 // fixed point math typedefs
38 typedef s16 sfp16; ///< signed 8:8 fixed point
39 typedef s32 sfp32; ///< signed 20:8 fixed point
40 typedef u16 ufp16; ///< unsigned 8:8 fixed point
41 typedef u32 ufp32; ///< unsigned 24:8 fixed point
42 /*+----------------------------------------------------------------------------------------------+*/
43 typedef float f32;
44 typedef double f64;
45 /*+----------------------------------------------------------------------------------------------+*/
46 typedef volatile float vf32;
47 typedef volatile double vf64;
48 /*+----------------------------------------------------------------------------------------------+*/
51 typedef unsigned int BOOL;
52 /*+----------------------------------------------------------------------------------------------+*/
53 // alias type typedefs
54 #define FIXED s32 ///< Alias type for sfp32
55 /*+----------------------------------------------------------------------------------------------+*/
56 #ifndef TRUE
57 #define TRUE 1 ///< True
58 #endif
59 /*+----------------------------------------------------------------------------------------------+*/
60 #ifndef FALSE
61 #define FALSE 0 ///< False
62 #endif
63 /*+----------------------------------------------------------------------------------------------+*/
64 #ifndef NULL
65 #define NULL 0 ///< Pointer to 0
66 #endif
67 /*+----------------------------------------------------------------------------------------------+*/
68 #ifndef LITTLE_ENDIAN
69 #define LITTLE_ENDIAN 3412
70 #endif /* LITTLE_ENDIAN */
71 /*+----------------------------------------------------------------------------------------------+*/
72 #ifndef BIG_ENDIAN
73 #define BIG_ENDIAN 1234
74 #endif /* BIGE_ENDIAN */
75 /*+----------------------------------------------------------------------------------------------+*/
76 #ifndef BYTE_ORDER
77 #define BYTE_ORDER BIG_ENDIAN
78 #endif /* BYTE_ORDER */
79 /*+----------------------------------------------------------------------------------------------+*/
82 //! argv structure
83 /*! \struct __argv
85 structure used to set up argc/argv
88 struct __argv {
89 int argvMagic; //!< argv magic number, set to 0x5f617267 ('_arg') if valid
90 char *commandLine; //!< base address of command line, set of null terminated strings
91 int length;//!< total length of command line
92 int argc;
93 char **argv;
94 char **endARGV;
97 //! Default location for the system argv structure.
98 extern struct __argv *__system_argv;
100 // argv struct magic number
101 #define ARGV_MAGIC 0x5f617267
103 #ifdef __cplusplus
105 #endif /* __cplusplus */
107 #endif /* TYPES_H */
110 /* END OF FILE */