summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ai/ai.c20
-rw-r--r--ai/ai_event.h26
-rw-r--r--order_cmd.c2
-rw-r--r--road_cmd.c10
-rw-r--r--roadveh_cmd.c4
-rw-r--r--station_cmd.c4
6 files changed, 33 insertions, 33 deletions
diff --git a/ai/ai.c b/ai/ai.c
index a66a42123..ffb5cccc3 100644
--- a/ai/ai.c
+++ b/ai/ai.c
@@ -240,7 +240,7 @@ void AI_CommandResult(bool succeeded)
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 AI_ShutdownAIControl(bool with_error)
}
}
-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 @@ void AI_StartNewAI(PlayerID player)
char *library = NULL;
char *params = NULL;
- ottd_GetNextAIData(&library, &params);
+ ttai_GetNextAIData(&library, &params);
gpmi_error_stack_enable = 1;
if (library != NULL) {
diff --git a/ai/ai_event.h b/ai/ai_event.h
index 81aa9e89a..65812293d 100644
--- a/ai/ai_event.h
+++ b/ai/ai_event.h
@@ -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 ttai_Event_CommandFailed INITIAL_SET; // (tile, unique_id)
+DEF_EVENTS int ttai_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 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_BuildDepot INITIAL_SET; // (depot_index, depot_tile)
-DEF_EVENTS int ottd_Event_BuildRoadDepot INITIAL_SET; // (depot_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_BuildVehicle INITIAL_SET; // (vehicle_index, depot_tile)
-DEF_EVENTS int ottd_Event_BuildRoadVehicle INITIAL_SET; // (vehicle_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 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_VehicleEnterDepot INITIAL_SET; // (vehicle_index, depot_tile)
+DEF_EVENTS int ttai_Event_RoadVehicleEnterDepot INITIAL_SET; // (vehicle_index, depot_tile)
-DEF_EVENTS int ottd_Event_GiveOrder INITIAL_SET; // (vehicle_index)
+DEF_EVENTS int ttai_Event_GiveOrder INITIAL_SET; // (vehicle_index)
-DEF_EVENTS int ottd_Event_BuildRoad INITIAL_SET; // (road_tile, road_pieces)
+DEF_EVENTS int ttai_Event_BuildRoad INITIAL_SET; // (road_tile, road_pieces)
/* ----------------- End of list ------------------ */
#endif /* AI_EVENT */
diff --git a/order_cmd.c b/order_cmd.c
index ae32c4184..59f4c436e 100644
--- a/order_cmd.c
+++ b/order_cmd.c
@@ -395,7 +395,7 @@ int32 CmdInsertOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2)
/* 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;
diff --git a/road_cmd.c b/road_cmd.c
index 3da86c3a6..55efcda9e 100644
--- a/road_cmd.c
+++ b/road_cmd.c
@@ -488,7 +488,7 @@ do_clear:;
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 @@ int32 CmdBuildRoadDepot(int x, int y, uint32 flags, uint32 p1, uint32 p2)
(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 @@ static uint32 VehicleEnter_Road(Vehicle *v, TileIndex tile, int x, int y)
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;
}
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index b45fb6e93..b836b8372 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -197,8 +197,8 @@ int32 CmdBuildRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2)
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;
diff --git a/station_cmd.c b/station_cmd.c
index c7357863a..4f81a2272 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -1465,8 +1465,8 @@ int32 CmdBuildRoadStop(int x, int y, uint32 flags, uint32 p1, uint32 p2)
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;
}