summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-12-06 17:12:19 +0000
committertruelight <truelight@openttd.org>2005-12-06 17:12:19 +0000
commit4f9bb11846d04003102d985c620a6a81cf10b8ba (patch)
tree25fd0c1a87132e54a339daf596c37d0cc64a4f23
parentaf87b2916ad54b889a18c174d48db0ca1371b543 (diff)
downloadopenttd-4f9bb11846d04003102d985c620a6a81cf10b8ba.tar.xz
(svn r3266) -Codechange: added comments for why the revert of r3625 inside the code.
Also, I forgot to tnx GraphiteNL for his help with this problem. Tnx GraphiteNL :)
-rw-r--r--ai/ai_event.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ai/ai_event.h b/ai/ai_event.h
index 0be131653..d1daf7804 100644
--- a/ai/ai_event.h
+++ b/ai/ai_event.h
@@ -7,12 +7,20 @@
# include "ai.h"
/* This is how we call events (with safety-check) to GPMI */
+/* XXX -- This macro works only for some compilers (all GCCs for example).
+ * Some compilers on the other hand (MSCV!!) doesn't support variadic macros
+ * causing this to fail. There is no known solution. If you know any, please
+ * tell us ASAP! */
# define ai_event(player, event, ...) \
if ((player) < MAX_PLAYERS && _ai_player[(player)].module != NULL) \
gpmi_event(_ai_player[(player)].module, (event), ##__VA_ARGS__)
#else /* GPMI */
+/* XXX -- Some compilers (like MSVC :() doesn't support variadic macros,
+ * which means we have to go to a lot of trouble to get the ai_event() ignored
+ * in case GPMI is disabled... KILL KILL KILL!
+ */
# ifdef DEF_EVENTS
void CDECL empty_function(PlayerID player, int event, ...) {}
# else