From b736e9e539a91f62afa1a391f85a115a44024d15 Mon Sep 17 00:00:00 2001 From: Aetias Date: Mon, 26 Feb 2024 21:12:35 +0100 Subject: [PATCH] Update `NONMATCH` macro --- include/global.h | 8 +++++--- src/ItemManager.cpp | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/global.h b/include/global.h index 9b65fa26..7247cb4b 100644 --- a/include/global.h +++ b/include/global.h @@ -4,13 +4,15 @@ #define NULL 0 #define GET_FLAG(arr, pos) (((1 << ((pos) & 0x1f)) & (arr)[((u32)(pos)) >> 5]) != 0) -#define SET_FLAG(arr, pos) ((arr)[((u32(pos))) >> 5] |= 1 << ((pos) & 0x1f)) +#define SET_FLAG(arr, pos) ((arr)[((u32)(pos)) >> 5] |= 1 << ((pos) & 0x1f)) #define RESET_FLAG(arr, pos) ((arr)[((u32)(pos)) >> 5] &= ~(1 << ((pos) & 0x1f))) +// NONMATCH(name) marks the function `name` as nonmatching +// The reason for the macro is to easily detect it in progress.py #ifdef NONMATCHING -#define NONMATCH +#define NONMATCH(name) name #else -#define NONMATCH asm +#define NONMATCH(name) asm name #endif // Prevent the IDE from reporting errors that the compiler/linker won't report diff --git a/src/ItemManager.cpp b/src/ItemManager.cpp index 2df007a9..19a7c594 100644 --- a/src/ItemManager.cpp +++ b/src/ItemManager.cpp @@ -241,7 +241,7 @@ extern unk32 data_027e0fc8; extern "C" bool func_ov00_020bbd80(unk32 param1, unk32 param2); extern "C" bool _ZNK11ItemManager7HasItemEi(); extern "C" void _ZN11ItemManager12GetEquipItemEi(); -ARM NONMATCH bool ItemManager::func_ov00_020ad790(unk32 param1) { +ARM bool NONMATCH(ItemManager::func_ov00_020ad790)(unk32 param1) { #ifndef NONMATCHING #include "../asm/ov00/ItemManager/ItemManager_func_ov00_020ad790.inc" #else