From 29389a446859d0d92145ecb395a3b4bff2e0f8be Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 21 May 2024 21:25:19 +0100 Subject: Deal with the stupid NVDTOR situation Bill suggested using abi.h for this. Not sure if it's 100% ideal to need to pull in the whole header for this one macro but it's arguably better than most alternatives and definitely better than just continuing to duplicate it ad nauseam. --- src/gamedata.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/gamedata.h') diff --git a/src/gamedata.h b/src/gamedata.h index 2e58ef6..050d3b8 100644 --- a/src/gamedata.h +++ b/src/gamedata.h @@ -1,5 +1,5 @@ /* - * Copyright © 2023 Michael Smith + * Copyright © 2024 Michael Smith * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -17,14 +17,20 @@ #ifndef INC_GAMEDATA_H #define INC_GAMEDATA_H +// STUPID HACK to avoid pollution if abi.h not already included (only because +// generated gamedata stuff relies on this being defined) +#ifndef NVDTOR #ifdef _WIN32 #define NVDTOR 1 #else #define NVDTOR 2 #endif +#endif #include // generated by build/mkgamedata.c #include // generated by build/mkentprops.c +#ifndef INC_ABI_H // YUCK YUCK YUCK #undef NVDTOR +#endif /* Called as part of plugin init to set up various metadata about the game. */ void gamedata_init(void); -- cgit v1.2.3