From 1dc8a3583d8a49912e3782dfb717d5963b5ebad1 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Wed, 21 Oct 2020 14:12:24 +0100 Subject: [PATCH] declare M in map.h --- include/macros.h | 3 +++ include/map.h | 2 ++ src/world/area_kmr/kmr_12/kmr_12.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/macros.h b/include/macros.h index e3a3854285..29beb68336 100644 --- a/include/macros.h +++ b/include/macros.h @@ -48,4 +48,7 @@ // Fixed-point short literal #define F16(f) (s16)(f * 327.67f) +#define _NAMESPACE(x, y) x ## _ ## y +#define NAMESPACE(x, y) _NAMESPACE(x, y) + #endif diff --git a/include/map.h b/include/map.h index eda5ad5bf1..956fa203a1 100644 --- a/include/map.h +++ b/include/map.h @@ -7,6 +7,8 @@ // TODO: consider moving Npc here +#define M(sym) NAMESPACE(MAP_NAME, sym) + #define ENTRY_COUNT(entryList) (sizeof(entryList) / sizeof(Vec4f)) typedef Vec4f EntryList[]; diff --git a/src/world/area_kmr/kmr_12/kmr_12.h b/src/world/area_kmr/kmr_12/kmr_12.h index 609ebfd5a3..6cb287685a 100644 --- a/src/world/area_kmr/kmr_12/kmr_12.h +++ b/src/world/area_kmr/kmr_12/kmr_12.h @@ -1,7 +1,7 @@ #include "common.h" #include "map.h" -#define M(sym) kmr_12 ## _ ## sym +#define MAP_NAME kmr_12 #define NpcId_GOOMBA 0