--- a/ai/ai.c Wed Dec 14 14:38:23 2005 +0000
+++ b/ai/ai.c Wed Dec 14 15:54:23 2005 +0000
@@ -240,7 +240,7 @@
if (_ai_current_uid == 0)
return;
- ai_event(_current_player, succeeded ? ottd_Event_CommandSucceeded : ottd_Event_CommandFailed, _ai_current_tile);
+ ai_event(_current_player, succeeded ? ttai_Event_CommandSucceeded : ttai_Event_CommandFailed, _ai_current_tile);
}
/**
@@ -335,34 +335,34 @@
}
}
-void (*ottd_GetNextAIData)(char **library, char **param);
-void (*ottd_SetAIParam)(char *param);
+void (*ttai_GetNextAIData)(char **library, char **param);
+void (*ttai_SetAIParam)(char *param);
void AI_LoadAIControl(void)
{
/* Load module */
- _ai.gpmi_mod = gpmi_mod_load("ottd_ai_control_mod", NULL);
+ _ai.gpmi_mod = gpmi_mod_load("ttai_control_mod", NULL);
if (_ai.gpmi_mod == NULL) {
AI_ShutdownAIControl(true);
return;
}
/* Load package */
- if (gpmi_pkg_load("ottd_ai_control_pkg", 0, NULL, NULL, &_ai.gpmi_pkg)) {
+ if (gpmi_pkg_load("ttai_control_pkg", 0, NULL, NULL, &_ai.gpmi_pkg)) {
AI_ShutdownAIControl(true);
return;
}
/* Now link all the functions */
{
- ottd_GetNextAIData = gpmi_pkg_resolve(_ai.gpmi_pkg, "ottd_GetNextAIData");
- ottd_SetAIParam = gpmi_pkg_resolve(_ai.gpmi_pkg, "ottd_SetAIParam");
+ ttai_GetNextAIData = gpmi_pkg_resolve(_ai.gpmi_pkg, "ttai_GetNextAIData");
+ ttai_SetAIParam = gpmi_pkg_resolve(_ai.gpmi_pkg, "ttai_SetAIParam");
- if (ottd_GetNextAIData == NULL || ottd_SetAIParam == NULL)
+ if (ttai_GetNextAIData == NULL || ttai_SetAIParam == NULL)
AI_ShutdownAIControl(true);
}
- ottd_SetAIParam(_ai.gpmi_param);
+ ttai_SetAIParam(_ai.gpmi_param);
}
/**
@@ -391,7 +391,7 @@
char *library = NULL;
char *params = NULL;
- ottd_GetNextAIData(&library, ¶ms);
+ ttai_GetNextAIData(&library, ¶ms);
gpmi_error_stack_enable = 1;
if (library != NULL) {
--- a/ai/ai_event.h Wed Dec 14 14:38:23 2005 +0000
+++ b/ai/ai_event.h Wed Dec 14 15:54:23 2005 +0000
@@ -31,7 +31,7 @@
/* 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 ottd_event package. Just because of some lovely macro-shit ;) */
+ * the ttai_event package. Just because of some lovely macro-shit ;) */
#ifdef DEF_EVENTS
# define DEF_EVENTS
# define INITIAL_SET = -1
@@ -41,24 +41,24 @@
#endif /* DEF_EVENTS */
/* ------------ All available events -------------- */
-DEF_EVENTS int ottd_Event_CommandFailed INITIAL_SET; // (tile, unique_id)
-DEF_EVENTS int ottd_Event_CommandSucceeded INITIAL_SET; // (tile, unique_id)
-
-DEF_EVENTS int ottd_Event_BuildStation INITIAL_SET; // (station_index, station_tile)
-DEF_EVENTS int ottd_Event_BuildRoadStation INITIAL_SET; // (station_index, station_tile)
-
-DEF_EVENTS int ottd_Event_BuildDepot INITIAL_SET; // (depot_index, depot_tile)
-DEF_EVENTS int ottd_Event_BuildRoadDepot INITIAL_SET; // (depot_index, depot_tile)
+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 ottd_Event_BuildVehicle INITIAL_SET; // (vehicle_index, depot_tile)
-DEF_EVENTS int ottd_Event_BuildRoadVehicle INITIAL_SET; // (vehicle_index, depot_tile)
+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 ottd_Event_VehicleEnterDepot INITIAL_SET; // (vehicle_index, depot_tile)
-DEF_EVENTS int ottd_Event_RoadVehicleEnterDepot INITIAL_SET; // (vehicle_index, depot_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 ottd_Event_GiveOrder INITIAL_SET; // (vehicle_index)
+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 ottd_Event_BuildRoad INITIAL_SET; // (road_tile, road_pieces)
+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 */
--- a/order_cmd.c Wed Dec 14 14:38:23 2005 +0000
+++ b/order_cmd.c Wed Dec 14 15:54:23 2005 +0000
@@ -395,7 +395,7 @@
/* Make sure to rebuild the whole list */
RebuildVehicleLists();
- ai_event(_current_player, ottd_Event_GiveOrder, v->index);
+ ai_event(_current_player, ttai_Event_GiveOrder, v->index);
}
return 0;
--- a/road_cmd.c Wed Dec 14 14:38:23 2005 +0000
+++ b/road_cmd.c Wed Dec 14 15:54:23 2005 +0000
@@ -488,7 +488,7 @@
MarkTileDirtyByTile(tile);
- ai_event(_current_player, ottd_Event_BuildRoad, tile, pieces);
+ ai_event(_current_player, ttai_Event_BuildRoad, tile, pieces);
}
return cost;
}
@@ -674,8 +674,8 @@
(p1 | 0x20) /* map5 */
);
- ai_event(_current_player, ottd_Event_BuildDepot, dep->index, tile);
- ai_event(_current_player, ottd_Event_BuildRoadDepot, dep->index, tile);
+ ai_event(_current_player, ttai_Event_BuildDepot, dep->index, tile);
+ ai_event(_current_player, ttai_Event_BuildRoadDepot, dep->index, tile);
}
return cost + _price.build_road_depot;
}
@@ -1161,8 +1161,8 @@
if (_roadveh_enter_depot_unk0[GB(_m[tile].m5, 0, 2)] == v->u.road.state) {
RoadVehEnterDepot(v);
- ai_event(v->owner, ottd_Event_VehicleEnterDepot, v->index, tile);
- ai_event(v->owner, ottd_Event_RoadVehicleEnterDepot, v->index, tile);
+ ai_event(v->owner, ttai_Event_VehicleEnterDepot, v->index, tile);
+ ai_event(v->owner, ttai_Event_RoadVehicleEnterDepot, v->index, tile);
return 4;
}
--- a/roadveh_cmd.c Wed Dec 14 14:38:23 2005 +0000
+++ b/roadveh_cmd.c Wed Dec 14 15:54:23 2005 +0000
@@ -197,8 +197,8 @@
if (IsLocalPlayer())
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Road); // updates the replace Road window
- ai_event(_current_player, ottd_Event_BuildVehicle, v->index, tile);
- ai_event(_current_player, ottd_Event_BuildRoadVehicle, v->index, tile);
+ ai_event(_current_player, ttai_Event_BuildVehicle, v->index, tile);
+ ai_event(_current_player, ttai_Event_BuildRoadVehicle, v->index, tile);
}
return cost;
--- a/station_cmd.c Wed Dec 14 14:38:23 2005 +0000
+++ b/station_cmd.c Wed Dec 14 15:54:23 2005 +0000
@@ -1465,8 +1465,8 @@
UpdateStationAcceptance(st, false);
InvalidateWindow(WC_STATION_LIST, st->owner);
- ai_event(_current_player, ottd_Event_BuildStation, st->index, tile);
- ai_event(_current_player, ottd_Event_BuildRoadStation, st->index, tile);
+ ai_event(_current_player, ttai_Event_BuildStation, st->index, tile);
+ ai_event(_current_player, ttai_Event_BuildRoadStation, st->index, tile);
}
return cost;
}