summaryrefslogtreecommitdiffhomepage
path: root/src/gamedata.h
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2024-05-21 21:25:19 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2024-05-21 21:25:19 +0100
commit29389a446859d0d92145ecb395a3b4bff2e0f8be (patch)
tree03286956cc807ddea39573dfb0db5168d4d8140a /src/gamedata.h
parent2d0ac38fa0e023d29b32a867240df7fc38c5afaa (diff)
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.
Diffstat (limited to 'src/gamedata.h')
-rw-r--r--src/gamedata.h8
1 files changed, 7 insertions, 1 deletions
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 <mikesmiffy128@gmail.com>
+ * Copyright © 2024 Michael Smith <mikesmiffy128@gmail.com>
*
* 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 <gamedata.gen.h> // generated by build/mkgamedata.c
#include <entprops.gen.h> // 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);