2022-04-04 14:22:31 +00:00
|
|
|
#ifndef __TYPES_H__
|
|
|
|
#define __TYPES_H__
|
2022-03-23 21:22:48 +00:00
|
|
|
|
2022-04-04 14:22:31 +00:00
|
|
|
#ifdef __cplusplus
|
2022-08-13 01:26:00 +00:00
|
|
|
#include "static_assert.hpp"
|
|
|
|
|
2022-04-04 14:22:31 +00:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
2022-03-23 21:22:48 +00:00
|
|
|
|
|
|
|
typedef unsigned char u8;
|
|
|
|
typedef unsigned short u16;
|
2022-04-15 19:24:52 +00:00
|
|
|
typedef unsigned int u32;
|
2022-03-23 21:22:48 +00:00
|
|
|
typedef unsigned long long u64;
|
|
|
|
|
2022-08-30 04:05:16 +00:00
|
|
|
typedef signed char s8;
|
|
|
|
typedef signed short s16;
|
|
|
|
typedef signed int s32;
|
|
|
|
typedef signed long long s64;
|
2022-03-23 21:22:48 +00:00
|
|
|
|
|
|
|
typedef volatile u8 vu8;
|
|
|
|
typedef volatile u16 vu16;
|
|
|
|
typedef volatile u32 vu32;
|
|
|
|
typedef volatile u64 vu64;
|
2022-04-04 14:22:31 +00:00
|
|
|
|
2022-03-23 21:22:48 +00:00
|
|
|
typedef volatile s8 vs8;
|
|
|
|
typedef volatile s16 vs16;
|
|
|
|
typedef volatile s32 vs32;
|
|
|
|
typedef volatile s64 vs64;
|
|
|
|
|
|
|
|
typedef float f32;
|
|
|
|
typedef double f64;
|
|
|
|
|
2022-04-04 14:22:31 +00:00
|
|
|
typedef volatile float vf32;
|
|
|
|
typedef volatile double vf64;
|
2022-03-23 21:22:48 +00:00
|
|
|
|
2022-04-30 08:32:00 +00:00
|
|
|
typedef s16 __OSInterrupt;
|
|
|
|
typedef s64 OSTime;
|
2022-08-05 10:23:49 +00:00
|
|
|
typedef u32 OSTick;
|
2022-04-30 08:32:00 +00:00
|
|
|
|
2022-03-23 21:22:48 +00:00
|
|
|
// Pointer to unknown, to be determined at a later date.
|
|
|
|
typedef void* unkptr;
|
|
|
|
|
|
|
|
#ifndef NULL
|
2022-04-04 14:22:31 +00:00
|
|
|
#define NULL 0
|
|
|
|
#endif
|
2022-03-23 21:22:48 +00:00
|
|
|
#ifndef nullptr
|
|
|
|
#define nullptr 0
|
2022-04-04 14:22:31 +00:00
|
|
|
#endif
|
2022-07-14 16:24:26 +00:00
|
|
|
#ifndef override
|
|
|
|
#define override
|
|
|
|
#endif
|
2022-03-23 21:22:48 +00:00
|
|
|
|
2022-08-30 04:05:16 +00:00
|
|
|
typedef int BOOL;
|
|
|
|
#ifndef TRUE
|
2022-04-04 14:22:31 +00:00
|
|
|
#define TRUE 1
|
|
|
|
#endif
|
2022-08-30 04:05:16 +00:00
|
|
|
#ifndef FALSE
|
|
|
|
#define FALSE 0
|
2022-04-04 14:22:31 +00:00
|
|
|
#endif
|
2022-03-23 21:22:48 +00:00
|
|
|
|
2022-07-27 05:11:36 +00:00
|
|
|
#ifndef ATTRIBUTE_ALIGN
|
|
|
|
#define ATTRIBUTE_ALIGN(num) __attribute__ ((aligned (num)))
|
|
|
|
#endif
|
|
|
|
|
2022-04-10 00:17:06 +00:00
|
|
|
// where should these go?
|
|
|
|
void srand(int);
|
2022-07-02 05:30:04 +00:00
|
|
|
int rand();
|
2022-04-10 00:17:06 +00:00
|
|
|
|
2022-04-04 14:22:31 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2022-03-23 21:22:48 +00:00
|
|
|
|
|
|
|
#endif
|