coastline 0.0.4
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1#ifndef COASTLINE_TYPES_H
2#define COASTLINE_TYPES_H
3
8
9#if TGR_PLATFORM == TGR_PLATFORM_N64
10#include <PR/ultratypes.h>
11#elif TGR_PLATFORM == TGR_PLATFORM_SDL
12/*
13 * The SDL game includes the headers of libultra beside this one, and both declare the types the
14 * same way. uint64_t is unsigned long on 64-bit Unix, where libultra writes unsigned long long.
15 */
16#include <stddef.h>
17#include <stdint.h>
18/* bool is a keyword of C23, which the C of MSVC lacks. */
19#if !defined(__cplusplus) && defined(_MSC_VER)
20#include <stdbool.h>
21#endif
22
23#include <PR/ultratypes.h>
24
25#ifndef TRUE
26#define TRUE 1
27#define FALSE 0
28#endif
29
30/* The integer types of Windows that the code of the PC release uses, at their 32-bit widths. */
31typedef int BOOL;
32typedef unsigned short WORD;
33typedef uint32_t DWORD;
34typedef unsigned int UINT;
35typedef int32_t LONG;
36
37/* The calling conventions of 32-bit x86 do not exist on other processors. */
38#if !defined(_WIN32)
39#define __cdecl
40#define __stdcall
41#define __thiscall
42#define __fastcall
43#elif defined(_MSC_VER) && defined(_WIN64)
44#define __thiscall
45#endif
46#else
47#include <stddef.h>
48#include <stdint.h>
49
50#ifdef __cplusplus
51extern "C" {
52#endif
53
54#ifndef TRUE
55#define TRUE 1
56#define FALSE 0
57#endif
58
59typedef uint8_t u8;
60typedef uint16_t u16;
61typedef uint32_t u32;
62typedef uint64_t u64;
63
64typedef int8_t s8;
65typedef int16_t s16;
66typedef int32_t s32;
67typedef int64_t s64;
68
69typedef float f32;
70typedef double f64;
71
72#ifdef __cplusplus
73}
74#endif
75
76#endif /* TGR_PLATFORM */
77
78/*
79 * Marks a shared helper the compiler of Boss Rally inlined into its caller. The Nintendo 64 build
80 * compiles the helper as an ordinary function.
81 */
82#if TGR_BOSS_RALLY
84#define BOSS_RALLY_INLINE inline
85#else
87#define BOSS_RALLY_INLINE
88#endif
89
90#endif /* COASTLINE_TYPES_H */
Integer and floating-point types of libultra.
unsigned int u32
Definition ultratypes.h:20
signed char s8
Definition ultratypes.h:23
short s16
Definition ultratypes.h:24
float f32
Definition ultratypes.h:38
long long s64
Definition ultratypes.h:26
double f64
Definition ultratypes.h:39
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
unsigned long long u64
Definition ultratypes.h:21
unsigned char u8
Definition ultratypes.h:18
typedef BOOL
typedef DWORD
typedef LONG
typedef UINT
typedef WORD