2025-02-10 11:20:42 -08:00
|
|
|
#ifndef _DOLPHIN_TYPES_H_
|
|
|
|
|
#define _DOLPHIN_TYPES_H_
|
2020-08-29 17:54:55 -04:00
|
|
|
|
2025-10-19 10:30:49 -07:00
|
|
|
#ifdef __REVOLUTION_SDK__
|
|
|
|
|
#include <revolution/types.h>
|
|
|
|
|
#else
|
2025-02-10 11:20:42 -08:00
|
|
|
typedef signed char s8;
|
|
|
|
|
typedef unsigned char u8;
|
|
|
|
|
typedef signed short int s16;
|
|
|
|
|
typedef unsigned short int u16;
|
|
|
|
|
typedef signed long s32;
|
|
|
|
|
typedef unsigned long u32;
|
|
|
|
|
typedef signed long long int s64;
|
|
|
|
|
typedef unsigned long long int u64;
|
2020-08-29 17:54:55 -04:00
|
|
|
|
2025-02-10 11:20:42 -08:00
|
|
|
typedef volatile u8 vu8;
|
2020-12-26 11:31:49 -05:00
|
|
|
typedef volatile u16 vu16;
|
|
|
|
|
typedef volatile u32 vu32;
|
|
|
|
|
typedef volatile u64 vu64;
|
2025-02-10 11:20:42 -08:00
|
|
|
typedef volatile s8 vs8;
|
2020-12-26 11:31:49 -05:00
|
|
|
typedef volatile s16 vs16;
|
|
|
|
|
typedef volatile s32 vs32;
|
|
|
|
|
typedef volatile s64 vs64;
|
2020-08-29 17:54:55 -04:00
|
|
|
|
2025-02-10 11:20:42 -08:00
|
|
|
typedef float f32;
|
2020-12-26 11:31:49 -05:00
|
|
|
typedef double f64;
|
2025-02-10 11:20:42 -08:00
|
|
|
|
2020-12-26 11:31:49 -05:00
|
|
|
typedef volatile f32 vf32;
|
|
|
|
|
typedef volatile f64 vf64;
|
2020-08-29 17:54:55 -04:00
|
|
|
|
2025-02-10 11:20:42 -08:00
|
|
|
typedef char *Ptr;
|
|
|
|
|
|
2020-12-26 11:31:49 -05:00
|
|
|
typedef int BOOL;
|
2020-08-29 17:54:55 -04:00
|
|
|
|
2025-03-22 21:00:51 -04:00
|
|
|
typedef unsigned int uint;
|
|
|
|
|
|
2020-08-29 17:54:55 -04:00
|
|
|
#define FALSE 0
|
2025-02-10 11:20:42 -08:00
|
|
|
#define TRUE 1
|
2020-08-29 17:54:55 -04:00
|
|
|
|
2025-02-10 11:20:42 -08:00
|
|
|
#if defined(__MWERKS__)
|
|
|
|
|
#define AT_ADDRESS(addr) : (addr)
|
|
|
|
|
#elif defined(__GNUC__)
|
|
|
|
|
//#define AT_ADDRESS(addr) __attribute__((address((addr))))
|
|
|
|
|
#define AT_ADDRESS(addr) // was removed in GCC. define in linker script instead.
|
|
|
|
|
#else
|
2025-11-30 14:23:42 -08:00
|
|
|
#define AT_ADDRESS(addr)
|
2025-02-10 11:20:42 -08:00
|
|
|
#endif
|
2023-07-21 19:30:25 +03:00
|
|
|
|
2025-11-30 14:23:42 -08:00
|
|
|
#ifndef ATTRIBUTE_ALIGN
|
|
|
|
|
#if defined(__MWERKS__) || defined(__GNUC__)
|
2025-02-10 11:20:42 -08:00
|
|
|
#define ATTRIBUTE_ALIGN(num) __attribute__((aligned(num)))
|
2025-11-30 14:23:42 -08:00
|
|
|
#elif defined(_MSC_VER)
|
|
|
|
|
#define ATTRIBUTE_ALIGN(num)
|
|
|
|
|
#else
|
|
|
|
|
#error unknown compiler
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef DECL_WEAK
|
|
|
|
|
#if defined(__MWERKS__)
|
|
|
|
|
#define DECL_WEAK __declspec(weak)
|
|
|
|
|
#elif defined(__GNUC__)
|
|
|
|
|
#define DECL_WEAK __attribute__((weak))
|
|
|
|
|
#elif defined(_MSC_VER)
|
|
|
|
|
#define DECL_WEAK
|
|
|
|
|
#else
|
|
|
|
|
#error unknown compiler
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
2025-02-10 11:20:42 -08:00
|
|
|
|
|
|
|
|
#ifndef NULL
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
#define NULL 0
|
|
|
|
|
#else
|
|
|
|
|
#define NULL ((void*)0)
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
2024-01-19 16:22:19 -08:00
|
|
|
|
2025-12-07 00:08:05 -05:00
|
|
|
#ifdef __MWERKS__
|
|
|
|
|
#define __REGISTER register
|
|
|
|
|
#else
|
|
|
|
|
#define __REGISTER
|
|
|
|
|
#endif
|
|
|
|
|
|
2026-01-05 06:50:45 -05:00
|
|
|
#include <cstddef>
|
2020-08-29 17:54:55 -04:00
|
|
|
|
2024-10-12 22:43:10 -06:00
|
|
|
#endif
|
2025-10-19 10:30:49 -07:00
|
|
|
#endif
|