mirror of
https://github.com/zeldaret/st
synced 2026-05-23 23:05:25 -04:00
9f1695dc6a
Co-authored-by: NEPETAISCUTE <58563578+NEPETAISCUTE@users.noreply.github.com>
22 lines
608 B
C
22 lines
608 B
C
#ifndef GLOBAL_H
|
|
#define GLOBAL_H
|
|
|
|
#define ARRAY_LEN_U(arr) (u32)((sizeof(arr) / sizeof(*arr)))
|
|
#define ARRAY_LEN(arr) (s32)((sizeof(arr) / sizeof(*arr)))
|
|
|
|
// Prevent the IDE from reporting errors that the compiler/linker won't report
|
|
#ifdef __INTELLISENSE__
|
|
#endif
|
|
|
|
#define ARM _Pragma("thumb off")
|
|
#define THUMB _Pragma("thumb on")
|
|
|
|
// `override` was added in C++11 before the DS, so we only use the keyword to indicate overriden functions
|
|
#define override
|
|
|
|
// Define .sbss variables by using #pragma section sbss begin|end
|
|
#pragma define_section sbss ".data" \
|
|
".sbss"
|
|
|
|
#endif
|