mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-04-24 15:07:47 -05:00
General clean up of most documented files of overlay 97 following the documentation of `overlay097/main_menu_util.c`. This also adds some forgotten parentheses in macros that could result in unintended behaviour.
31 lines
873 B
C
31 lines
873 B
C
#ifndef POKEPLATINUM_GLOBAL_H
|
|
#define POKEPLATINUM_GLOBAL_H
|
|
|
|
#include <nitro.h>
|
|
#pragma thumb on
|
|
#include <nnsys.h>
|
|
#include <stddef.h>
|
|
#include <string.h>
|
|
|
|
#include "global/assert.h"
|
|
#include "global/config.h" // MUST COME BEFORE ANY OTHER GAMEFREAK HEADERS
|
|
#include "global/pm_version.h"
|
|
|
|
#define NELEMS(a) (sizeof(a) / sizeof(*(a)))
|
|
#define XtOffset(pointer_type, field) ((unsigned int)&(((pointer_type)NULL)->field))
|
|
#define HI_HALF(i) (((i) >> 16) & 0xFFFF)
|
|
#define LO_HALF(i) ((i) & 0xFFFF)
|
|
#define HI_AND_LO(h, l) (((h) << 16) | l)
|
|
#define max(x, y) ((x) > (y) ? (x) : (y))
|
|
#define min(x, y) ((x) < (y) ? (x) : (y))
|
|
|
|
#define ALIGN_4 __attribute__((aligned(4)))
|
|
|
|
typedef struct {
|
|
int x;
|
|
int y;
|
|
int z;
|
|
} Vec32;
|
|
|
|
#endif // POKEPLATINUM_GLOBAL_H
|