From 3d88c74389ec978bb198415816364898963bb979 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 15 Dec 2011 21:56:00 +0000 Subject: (svn r23526) -Codechange: unify cargos vs cargoes --- src/town_cmd.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/town_cmd.cpp') diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 407a837d1..51d99b558 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -52,7 +52,7 @@ #include "table/town_land.h" TownID _new_town_id; -uint32 _town_cargos_accepted; ///< Bitmap of all cargos accepted by houses. +uint32 _town_cargoes_accepted; ///< Bitmap of all cargoes accepted by houses. /* Initialize the town-pool */ TownPool _town_pool("Town"); @@ -690,12 +690,12 @@ void UpdateTownCargoTotal(Town *t) } /** - * Update accepted town cargos around a specific tile. + * Update accepted town cargoes around a specific tile. * @param t The town to update. * @param start Update the values around this tile. * @param update_total Set to true if the total cargo acceptance should be updated. */ -static void UpdateTownCargos(Town *t, TileIndex start, bool update_total = true) +static void UpdateTownCargoes(Town *t, TileIndex start, bool update_total = true) { CargoArray accepted, produced; uint32 dummy; @@ -711,7 +711,7 @@ static void UpdateTownCargos(Town *t, TileIndex start, bool update_total = true) AddProducedCargo_Town(tile, produced); } - /* Create bitmap of produced and accepted cargos. */ + /* Create bitmap of produced and accepted cargoes. */ uint32 acc = 0; for (uint cid = 0; cid < NUM_CARGO; cid++) { if (accepted[cid] >= 8) SetBit(acc, cid); @@ -725,7 +725,7 @@ static void UpdateTownCargos(Town *t, TileIndex start, bool update_total = true) /** Update cargo acceptance for the complete town. * @param t The town to update. */ -void UpdateTownCargos(Town *t) +void UpdateTownCargoes(Town *t) { t->cargo_produced = 0; @@ -735,7 +735,7 @@ void UpdateTownCargos(Town *t) /* Update acceptance for each grid square. */ TILE_AREA_LOOP(tile, area) { if (TileX(tile) % AcceptanceMatrix::GRID == 0 && TileY(tile) % AcceptanceMatrix::GRID == 0) { - UpdateTownCargos(t, tile, false); + UpdateTownCargoes(t, tile, false); } } @@ -743,14 +743,14 @@ void UpdateTownCargos(Town *t) UpdateTownCargoTotal(t); } -/** Updates the bitmap of all cargos accepted by houses. */ +/** Updates the bitmap of all cargoes accepted by houses. */ void UpdateTownCargoBitmap() { Town *town; - _town_cargos_accepted = 0; + _town_cargoes_accepted = 0; FOR_ALL_TOWNS(town) { - _town_cargos_accepted |= town->cargo_accepted_total; + _town_cargoes_accepted |= town->cargo_accepted_total; } } @@ -2301,7 +2301,7 @@ static bool BuildTownHouse(Town *t, TileIndex tile) } MakeTownHouse(tile, t, construction_counter, construction_stage, house, random_bits); - UpdateTownCargos(t, tile); + UpdateTownCargoes(t, tile); return true; } @@ -2385,7 +2385,7 @@ void ClearTownHouse(Town *t, TileIndex tile) if (eflags & BUILDING_HAS_4_TILES) DoClearTownHouseHelper(tile + TileDiffXY(1, 1), t, ++house); /* Update cargo acceptance. */ - UpdateTownCargos(t, tile); + UpdateTownCargoes(t, tile); } /** @@ -3152,7 +3152,7 @@ void TownsMonthlyLoop() UpdateTownRating(t); UpdateTownGrowRate(t); UpdateTownUnwanted(t); - UpdateTownCargos(t); + UpdateTownCargoes(t); } UpdateTownCargoBitmap(); -- cgit v1.2.3-54-g00ecf