papermario/include/macros.h

11 lines
342 B
C
Raw Normal View History

#ifndef _MACROS_H_
#define _MACROS_H_
2020-08-04 08:49:11 +02:00
#define INCLUDE_ASM(FOLDER, NAME, ARGS...) \
2020-08-09 09:11:16 +02:00
__attribute__((naked)) NAME(ARGS) { __asm__( ".include \"asm/nonmatchings/"#FOLDER"/"#NAME".s\"\n.set reorder\n.set at"); }
2020-08-09 04:17:37 +02:00
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
#endif