diff options
author | smatz <smatz@openttd.org> | 2009-05-16 23:34:14 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-16 23:34:14 +0000 |
commit | 6221d74644922ea4bbba3ed9cd8bbec42398f77b (patch) | |
tree | 0069bbd6bb7525754c5d9353132f5dc64a0996cc /src/town_cmd.cpp | |
parent | 814f153b5a98e0030cbd221e6a89e083ce62bb1d (diff) | |
download | openttd-6221d74644922ea4bbba3ed9cd8bbec42398f77b.tar.xz |
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r-- | src/town_cmd.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 3e8d1bdfa..e36fd2905 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -693,7 +693,7 @@ void OnTick_Town() if (++_cur_town_ctr > GetMaxTownIndex()) _cur_town_ctr = 0; - if (IsValidTownID(i)) TownTickHandler(GetTown(i)); + if (IsValidTownID(i)) TownTickHandler(Town::Get(i)); } } @@ -2288,7 +2288,7 @@ CommandCost CmdRenameTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 } if (flags & DC_EXEC) { - Town *t = GetTown(p1); + Town *t = Town::Get(p1); free(t->name); t->name = reset ? NULL : strdup(text); @@ -2512,7 +2512,7 @@ uint GetMaskOfTownActions(int *nump, CompanyID cid, const Town *t) if (cid != COMPANY_SPECTATOR && !(_settings_game.economy.bribe && t->unwanted[cid])) { /* Things worth more than this are not shown */ - Money avail = GetCompany(cid)->money + _price.station_value * 200; + Money avail = Company::Get(cid)->money + _price.station_value * 200; Money ref = _price.build_industry >> 8; /* Check the action bits for validity and @@ -2555,7 +2555,7 @@ CommandCost CmdDoTownAction(TileIndex tile, DoCommandFlag flags, uint32 p1, uint { if (!IsValidTownID(p1) || p2 >= lengthof(_town_action_proc)) return CMD_ERROR; - Town *t = GetTown(p1); + Town *t = Town::Get(p1); if (!HasBit(GetMaskOfTownActions(NULL, _current_company, t), p2)) return CMD_ERROR; @@ -2727,7 +2727,7 @@ Town *ClosestTownFromTile(TileIndex tile, uint threshold) return NULL; } - Town *town = GetTown(tid); + Town *town = Town::Get(tid); assert(town->IsValid()); if (DistanceManhattan(tile, town->xy) >= threshold) town = NULL; |