summaryrefslogtreecommitdiff
path: root/src/town_map.h
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-06-10 00:42:19 +0000
committerbelugas <belugas@openttd.org>2008-06-10 00:42:19 +0000
commit54e7a3b196c4fe22b8618f4c823d7c93881d0c2a (patch)
tree2aa176c21624c2cec8b6ebb39a5d319d5b3b1f98 /src/town_map.h
parentbf8afb4c38ae68ce903a8183b336476210b9a33e (diff)
downloadopenttd-54e7a3b196c4fe22b8618f4c823d7c93881d0c2a.tar.xz
(svn r13437) -Feature[newGRF]: Add long format introduction and maximum construction year for house.
Diffstat (limited to 'src/town_map.h')
-rw-r--r--src/town_map.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/town_map.h b/src/town_map.h
index f8cc4c071..3b6263c6a 100644
--- a/src/town_map.h
+++ b/src/town_map.h
@@ -265,7 +265,7 @@ static inline void IncHouseConstructionTick(TileIndex t)
}
/**
- * Set the year that this house was constructed (between 1920 and 2175).
+ * Set the year that this house was constructed.
* @param t the tile of this house
* @param year the year to set
* @pre IsTileType(t, MP_HOUSE) && IsHouseCompleted(t)
@@ -273,11 +273,11 @@ static inline void IncHouseConstructionTick(TileIndex t)
static inline void SetHouseConstructionYear(TileIndex t, Year year)
{
assert(IsTileType(t, MP_HOUSE) && IsHouseCompleted(t));
- _m[t].m5 = Clamp(year - ORIGINAL_BASE_YEAR, 0, 0xFF);
+ _m[t].m5 = Clamp(year - GetHouseSpecs(GetHouseType(t))->min_year, 0, 0xFF);
}
/**
- * Get the year that this house was constructed (between 1920 and 2175).
+ * Get the year that this house was constructed.
* @param t the tile of this house
* @pre IsTileType(t, MP_HOUSE)
* @return year
@@ -285,7 +285,7 @@ static inline void SetHouseConstructionYear(TileIndex t, Year year)
static inline Year GetHouseConstructionYear(TileIndex t)
{
assert(IsTileType(t, MP_HOUSE));
- return IsHouseCompleted(t) ? _m[t].m5 + ORIGINAL_BASE_YEAR : 0;
+ return IsHouseCompleted(t) ? _m[t].m5 + GetHouseSpecs(GetHouseType(t))->min_year : 0;
}
/**