From f2eabdb6257c09cf2890dac5e9737912728542af Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Thu, 2 Feb 2023 17:29:19 -0400 Subject: global: Add rest of Dolphin SDK proper, add MSL, and MetroTRK Finally, it links properly. --- include/global_types.h | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 include/global_types.h (limited to 'include/global_types.h') diff --git a/include/global_types.h b/include/global_types.h new file mode 100644 index 0000000..77e1053 --- /dev/null +++ b/include/global_types.h @@ -0,0 +1,92 @@ +// This file was taken from the Metroid Prime decompilation project. +// https://github.com/PrimeDecomp/prime/blob/main/include/dolphin/types.h +#ifndef _DOLPHIN_TYPES +#define _DOLPHIN_TYPES + +#ifdef TARGET_PC +#include +typedef int8_t s8; +typedef int16_t s16; +typedef int32_t s32; +typedef int64_t s64; +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; +#else +typedef signed char s8; +typedef signed short int s16; +typedef signed long s32; +typedef signed long long int s64; +typedef unsigned char u8; +typedef unsigned short int u16; +typedef unsigned long u32; +typedef unsigned long long int u64; +#endif + +typedef volatile u8 vu8; +typedef volatile u16 vu16; +typedef volatile u32 vu32; +typedef volatile u64 vu64; + +typedef volatile s8 vs8; +typedef volatile s16 vs16; +typedef volatile s32 vs32; +typedef volatile s64 vs64; + +typedef float f32; +typedef double f64; + +typedef volatile f32 vf32; +typedef volatile f64 vf64; + +#if defined(TARGET_PC) && !defined(_WIN32) +#include +typedef bool BOOL; +#ifndef FALSE +#define FALSE false +#endif +#ifndef TRUE +#define TRUE true +#endif +#else +typedef int BOOL; +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#endif + +#ifdef TARGET_PC +#include +#else +#ifndef NULL +#define NULL 0 +#endif +#endif +#if !defined(__cplusplus) || __cplusplus < 201103L +#ifndef nullptr +#define nullptr NULL +#endif + +#if defined(__MWERKS__) +#ifndef override +#define override +#endif +#endif + +#endif + +#ifndef ATTRIBUTE_ALIGN +#if defined(__MWERKS__) || defined(__GNUC__) +#define ATTRIBUTE_ALIGN(num) __attribute__((aligned(num))) +#elif defined(_MSC_VER) +#define ATTRIBUTE_ALIGN(num) +#else +#error unknown compiler +#endif +#endif + +#endif // _DOLPHIN_TYPES -- cgit v1.2.3-13-gbd6f