Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1#ifndef COMMON_H
2#define COMMON_H
3
4#include "version.h"
5#include "include_asm.h"
6
7typedef signed char s8;
8typedef unsigned char u8;
9typedef signed short s16;
10typedef unsigned short u16;
11typedef signed int s32;
12typedef unsigned int u32;
13typedef signed long long s64;
14typedef unsigned long long u64;
15
16#ifndef NULL
17#define NULL ((void *)0)
18#endif
19
20/*
21 * The length of an array that ends a struct and runs as far as each object
22 * of it needs: s32 seps[FLEXIBLE]. GCC 2.8 has no flexible array members,
23 * [], but takes [0], and an initializer for it; a modern GCC drops the
24 * elements a [0] array is initialized with.
25 */
26#if __GNUC__ >= 3
27#define FLEXIBLE
28#else
29#define FLEXIBLE 0
30#endif
31
32/*
33 * A variable that an interrupt's callback writes while the game waits for
34 * it in a loop: the original reads it again in each pass, as GCC 2.8.1
35 * compiles the loop, where GCC 12 reads it once unless it is volatile
36 * (make TOOLCHAIN=gcc)
37 */
38#if __GNUC__ >= 3
39#define INTERRUPT_SHARED volatile
40#else
41#define INTERRUPT_SHARED
42#endif
43
44#endif /* COMMON_H */
signed int s32
Definition common.h:11
unsigned int u32
Definition common.h:12
signed char s8
Definition common.h:7
signed long long s64
Definition common.h:13
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
unsigned long long u64
Definition common.h:14
unsigned char u8
Definition common.h:8