summaryrefslogtreecommitdiff
path: root/src/town.h
diff options
context:
space:
mode:
authorPeterN <peter@fuzzle.org>2018-05-21 22:08:39 +0100
committerGitHub <noreply@github.com>2018-05-21 22:08:39 +0100
commit4cebebcf683b079ff010e70b0a0a78c12734933e (patch)
tree4f140272bd8c1efba4916a642b85a22f153cb7b4 /src/town.h
parent42b43c998314a3fcd89aa59ad7834104dd80b053 (diff)
downloadopenttd-4cebebcf683b079ff010e70b0a0a78c12734933e.tar.xz
Change: Add CargoTypes type for cargo masks. (#6790)
Diffstat (limited to 'src/town.h')
-rw-r--r--src/town.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/town.h b/src/town.h
index 75deb7cca..19a4118ba 100644
--- a/src/town.h
+++ b/src/town.h
@@ -26,7 +26,7 @@ struct BuildingCounts {
T class_count[HOUSE_CLASS_MAX];
};
-typedef TileMatrix<uint32, 4> AcceptanceMatrix;
+typedef TileMatrix<CargoTypes, 4> AcceptanceMatrix;
static const uint CUSTOM_TOWN_NUMBER_DIFFICULTY = 4; ///< value for custom town number in difficulty settings
static const uint CUSTOM_TOWN_MAX_NUMBER = 5000; ///< this is the maximum number of towns a user can specify in customisation
@@ -85,9 +85,9 @@ struct Town : TownPool::PoolItem<&_town_pool> {
inline byte GetPercentTransported(CargoID cid) const { return this->supplied[cid].old_act * 256 / (this->supplied[cid].old_max + 1); }
/* Cargo production and acceptance stats. */
- uint32 cargo_produced; ///< Bitmap of all cargoes produced by houses in this town.
+ CargoTypes cargo_produced; ///< Bitmap of all cargoes produced by houses in this town.
AcceptanceMatrix cargo_accepted; ///< Bitmap of cargoes accepted by houses for each 4*4 map square of the town.
- uint32 cargo_accepted_total; ///< NOSAVE: Bitmap of all cargoes accepted by houses in this town.
+ CargoTypes cargo_accepted_total; ///< NOSAVE: Bitmap of all cargoes accepted by houses in this town.
uint16 time_until_rebuild; ///< time until we rebuild a house
@@ -293,6 +293,6 @@ static inline uint16 TownTicksToGameTicks(uint16 ticks) {
}
-extern uint32 _town_cargoes_accepted;
+extern CargoTypes _town_cargoes_accepted;
#endif /* TOWN_H */