summaryrefslogtreecommitdiff
path: root/src/newgrf_house.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2018-03-11 13:19:41 +0000
committerfrosch <frosch@openttd.org>2018-03-11 13:19:41 +0000
commitd9d669dcf855e444a77141b4b96e5df1f13c7203 (patch)
treea90dc37970fd26211382b50c25b5680be5963955 /src/newgrf_house.h
parent7c406f0d9dc365960f07e20e690cc0bdf8682fd6 (diff)
downloadopenttd-d9d669dcf855e444a77141b4b96e5df1f13c7203.tar.xz
(svn r27984) -Codechange: Make ScopeResolver constructors/destructors inlineable. Speedup sprite resolving by about 8 percent.
Diffstat (limited to 'src/newgrf_house.h')
-rw-r--r--src/newgrf_house.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/newgrf_house.h b/src/newgrf_house.h
index efc0c6cbb..0ac868d1e 100644
--- a/src/newgrf_house.h
+++ b/src/newgrf_house.h
@@ -27,8 +27,22 @@ struct HouseScopeResolver : public ScopeResolver {
uint16 initial_random_bits; ///< Random bits during construction checks.
uint32 watched_cargo_triggers; ///< Cargo types that triggered the watched cargo callback.
+ /**
+ * Constructor of a house scope resolver.
+ * @param ro Surrounding resolver.
+ * @param house_id House type being queried.
+ * @param tile %Tile containing the house.
+ * @param town %Town containing the house.
+ * @param not_yet_constructed House is still under construction.
+ * @param initial_random_bits Random bits during construction checks.
+ * @param watched_cargo_triggers Cargo types that triggered the watched cargo callback.
+ */
HouseScopeResolver(ResolverObject &ro, HouseID house_id, TileIndex tile, Town *town,
- bool not_yet_constructed, uint8 initial_random_bits, uint32 watched_cargo_triggers);
+ bool not_yet_constructed, uint8 initial_random_bits, uint32 watched_cargo_triggers)
+ : ScopeResolver(ro), house_id(house_id), tile(tile), town(town), not_yet_constructed(not_yet_constructed),
+ initial_random_bits(initial_random_bits), watched_cargo_triggers(watched_cargo_triggers)
+ {
+ }
/* virtual */ uint32 GetRandomBits() const;
/* virtual */ uint32 GetVariable(byte variable, uint32 parameter, bool *available) const;