mirror of
https://github.com/encounter/ph.git
synced 2026-03-30 11:34:37 -07:00
cf8f5a80b1
* fix flags getters and associated relocs * explicit ARM and improve existing matches * match CopyTo * document a bit the flag system and progress on unmatched functions * remaining bottom functions * func_ov00_02097810 params and name fix * fix build issues * move flag base definition to its own file * document item flags --------- Co-authored-by: Yanis002 <Yanis002@users.noreply.github.com> Co-authored-by: Aetias <aetias@outlook.com>
26 lines
764 B
C
26 lines
764 B
C
#ifndef PH_GLOBAL_H
|
|
#define PH_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
|
|
|
|
// Puts variables in the DTCM module by using #pragma section dtcm begin|end
|
|
#pragma define_section dtcm ".dtcm" \
|
|
".dtcm"
|
|
|
|
// Define .sbss variables by using #pragma section sbss begin|end
|
|
#pragma define_section sbss ".data" \
|
|
".sbss"
|
|
|
|
#endif
|