diff options
author | rubidium <rubidium@openttd.org> | 2009-01-10 00:31:47 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-10 00:31:47 +0000 |
commit | 11da45ee55957c243854cd78705d81543541c061 (patch) | |
tree | 29e703244d28f29c8634b2d30f42b34852fe74bc /src/ai/trolly | |
parent | c3839648f75ebfdca2f7d95b7d6a2b29445ab1c2 (diff) | |
download | openttd-11da45ee55957c243854cd78705d81543541c061.tar.xz |
(svn r14949) -Cleanup: pointer coding style
Diffstat (limited to 'src/ai/trolly')
-rw-r--r-- | src/ai/trolly/pathfinder.cpp | 4 | ||||
-rw-r--r-- | src/ai/trolly/trolly.cpp | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/ai/trolly/pathfinder.cpp b/src/ai/trolly/pathfinder.cpp index 288ac1660..0e08ddf77 100644 --- a/src/ai/trolly/pathfinder.cpp +++ b/src/ai/trolly/pathfinder.cpp @@ -58,7 +58,7 @@ static bool IsRoad(TileIndex tile) // Check if the current tile is in our end-area static int32 AyStar_AiPathFinder_EndNodeCheck(AyStar *aystar, OpenListNode *current) { - const Ai_PathFinderInfo* PathFinderInfo = (Ai_PathFinderInfo*)aystar->user_target; + const Ai_PathFinderInfo *PathFinderInfo = (Ai_PathFinderInfo*)aystar->user_target; // It is not allowed to have a station on the end of a bridge or tunnel ;) if (current->path.node.user_data[0] != 0) return AYSTAR_DONE; @@ -171,7 +171,7 @@ void clean_AyStar_AiPathFinder(AyStar *aystar, Ai_PathFinderInfo *PathFinderInfo // The h-value, simple calculation static int32 AyStar_AiPathFinder_CalculateH(AyStar *aystar, AyStarNode *current, OpenListNode *parent) { - const Ai_PathFinderInfo* PathFinderInfo = (Ai_PathFinderInfo*)aystar->user_target; + const Ai_PathFinderInfo *PathFinderInfo = (Ai_PathFinderInfo*)aystar->user_target; int r, r2; if (PathFinderInfo->end_direction != AI_PATHFINDER_NO_DIRECTION) { diff --git a/src/ai/trolly/trolly.cpp b/src/ai/trolly/trolly.cpp index 4a9c51c3f..6b874ec0d 100644 --- a/src/ai/trolly/trolly.cpp +++ b/src/ai/trolly/trolly.cpp @@ -214,8 +214,8 @@ static void AiNew_State_ActionDone(Company *c) static bool AiNew_Check_City_or_Industry(Company *c, int ic, byte type) { if (type == AI_CITY) { - const Town* t = GetTown(ic); - const Station* st; + const Town *t = GetTown(ic); + const Station *st; uint count = 0; int j = 0; @@ -274,8 +274,8 @@ static bool AiNew_Check_City_or_Industry(Company *c, int ic, byte type) return true; } if (type == AI_INDUSTRY) { - const Industry* i = GetIndustry(ic); - const Station* st; + const Industry *i = GetIndustry(ic); + const Station *st; int count = 0; int j = 0; @@ -434,8 +434,8 @@ static void AiNew_State_LocateRoute(Company *c) */ if (_companies_ainew[c->index].from_type == AI_CITY && _companies_ainew[c->index].tbt == AI_BUS) { - const Town* town_from = GetTown(_companies_ainew[c->index].from_ic); - const Town* town_temp = GetTown(_companies_ainew[c->index].temp); + const Town *town_from = GetTown(_companies_ainew[c->index].from_ic); + const Town *town_temp = GetTown(_companies_ainew[c->index].temp); uint distance = DistanceManhattan(town_from->xy, town_temp->xy); int max_cargo; @@ -461,8 +461,8 @@ static void AiNew_State_LocateRoute(Company *c) return; } } else if (_companies_ainew[c->index].tbt == AI_TRUCK) { - const Industry* ind_from = GetIndustry(_companies_ainew[c->index].from_ic); - const Industry* ind_temp = GetIndustry(_companies_ainew[c->index].temp); + const Industry *ind_from = GetIndustry(_companies_ainew[c->index].from_ic); + const Industry *ind_temp = GetIndustry(_companies_ainew[c->index].temp); bool found = false; int max_cargo = 0; uint i; @@ -729,7 +729,7 @@ static void AiNew_State_FindPath(Company *c) if (_companies_ainew[c->index].temp == -1) { // Init path_info if (_companies_ainew[c->index].from_tile == AI_STATION_RANGE) { - const Industry* i = GetIndustry(_companies_ainew[c->index].from_ic); + const Industry *i = GetIndustry(_companies_ainew[c->index].from_ic); // For truck routes we take a range around the industry _companies_ainew[c->index].path_info.start_tile_tl = i->xy - TileDiffXY(1, 1); @@ -742,7 +742,7 @@ static void AiNew_State_FindPath(Company *c) } if (_companies_ainew[c->index].to_tile == AI_STATION_RANGE) { - const Industry* i = GetIndustry(_companies_ainew[c->index].to_ic); + const Industry *i = GetIndustry(_companies_ainew[c->index].to_ic); _companies_ainew[c->index].path_info.end_tile_tl = i->xy - TileDiffXY(1, 1); _companies_ainew[c->index].path_info.end_tile_br = i->xy + TileDiffXY(i->width + 1, i->height + 1); @@ -1299,7 +1299,7 @@ static void AiNew_State_CheckAllVehicles(Company *c) // Using the technique simular to the original AI // Keeps things logical // It really should be in the same order as the AI_STATE's are! -static AiNew_StateFunction* const _ainew_state[] = { +static AiNew_StateFunction * const _ainew_state[] = { NULL, AiNew_State_FirstTime, AiNew_State_Nothing, |