diff options
author | tron <tron@openttd.org> | 2005-12-18 12:10:46 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-12-18 12:10:46 +0000 |
commit | b06b3e2ca2789867580a5227ec346cd69a84eb53 (patch) | |
tree | a0ac2ff6091f2ec7e9b8c392fc45fc93c8b6b85f /ai/ai_event.h | |
parent | 2956b119b26c78df4973cf077e288501baeaf649 (diff) | |
download | openttd-b06b3e2ca2789867580a5227ec346cd69a84eb53.tar.xz |
(svn r3313) Remove GPMI related changes from trunk
Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
Diffstat (limited to 'ai/ai_event.h')
-rw-r--r-- | ai/ai_event.h | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/ai/ai_event.h b/ai/ai_event.h deleted file mode 100644 index 65812293d..000000000 --- a/ai/ai_event.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef AI_EVENT -#define AI_EVENT - -/* Make the ai_event macro set correctly */ -#ifdef GPMI -# include <gpmi.h> -# 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), _ai_current_uid, ##__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 - extern void CDECL empty_function(PlayerID player, int event, ...); -# endif -# define ai_event empty_function -#endif /* GPMI */ - -/* To make our life a bit easier; you now only have to define new - * events here, and automaticly they work in OpenTTD without including - * the ttai_event package. Just because of some lovely macro-shit ;) */ -#ifdef DEF_EVENTS -# define DEF_EVENTS -# define INITIAL_SET = -1 -#else -# define DEF_EVENTS extern -# define INITIAL_SET -#endif /* DEF_EVENTS */ - -/* ------------ All available events -------------- */ -DEF_EVENTS int ttai_Event_CommandFailed INITIAL_SET; // (tile, unique_id) -DEF_EVENTS int ttai_Event_CommandSucceeded INITIAL_SET; // (tile, unique_id) - -DEF_EVENTS int ttai_Event_BuildStation INITIAL_SET; // (station_index, station_tile) -DEF_EVENTS int ttai_Event_BuildRoadStation INITIAL_SET; // (station_index, station_tile) - -DEF_EVENTS int ttai_Event_BuildDepot INITIAL_SET; // (depot_index, depot_tile) -DEF_EVENTS int ttai_Event_BuildRoadDepot INITIAL_SET; // (depot_index, depot_tile) - -DEF_EVENTS int ttai_Event_BuildVehicle INITIAL_SET; // (vehicle_index, depot_tile) -DEF_EVENTS int ttai_Event_BuildRoadVehicle INITIAL_SET; // (vehicle_index, depot_tile) - -DEF_EVENTS int ttai_Event_VehicleEnterDepot INITIAL_SET; // (vehicle_index, depot_tile) -DEF_EVENTS int ttai_Event_RoadVehicleEnterDepot INITIAL_SET; // (vehicle_index, depot_tile) - -DEF_EVENTS int ttai_Event_GiveOrder INITIAL_SET; // (vehicle_index) - -DEF_EVENTS int ttai_Event_BuildRoad INITIAL_SET; // (road_tile, road_pieces) -/* ----------------- End of list ------------------ */ - -#endif /* AI_EVENT */ |