pmd-red/include/global.h
nullableVoidPtr a611b9673e "Finish" decompiling bg_palette_buffer.s and m4a_2.s, and rename text variables
We all have our breaking points :matchlikethis:
2018-11-21 18:48:44 +08:00

32 lines
678 B
C

#ifndef GUARD_GLOBAL_H
#define GUARD_GLOBAL_H
#include <string.h>
#include "gba/gba.h"
// IDE support
#if defined(__APPLE__) || defined(__CYGWIN__)
#define _(x) x
#define __(x) x
#define INCBIN_U8 {0}
#define INCBIN_U16 {0}
#define INCBIN_U32 {0}
#define INCBIN_S8 {0}
#define INCBIN_S16 {0}
#define INCBIN_S32 {0}
#endif
// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");
// to help in decompiling
#define asm_comment(x) asm volatile("@ -- " x " -- ")
#define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided\n")
#define NAKED __attribute__((naked))
#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0]))
#endif // GUARD_GLOBAL_H