summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-06-03 03:06:16 +0000
committerbelugas <belugas@openttd.org>2008-06-03 03:06:16 +0000
commit4b4e73c1dd6c77a5876f826a45af1263b1b3eb96 (patch)
treee38c9f3a4aaf40616ccf40c61f828bbcbc9f6e38 /src/newgrf.cpp
parentb0ada3fbbf25693675a18e3360657816ed5cf2ca (diff)
downloadopenttd-4b4e73c1dd6c77a5876f826a45af1263b1b3eb96.tar.xz
(svn r13368) -Codechange: give house's min/max_date a better name, as it is really year, not date
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index c74ef7a24..a3de39f51 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -1404,7 +1404,7 @@ static bool TownHouseChangeInfo(uint hid, int numinfo, int prop, byte **bufp, in
* date before 1930, as this breaks the build date stuff.
* @see FinaliseHouseArray() for more details.
*/
- if (housespec->min_date < 1930) housespec->min_date = 1930;
+ if (housespec->min_year < 1930) housespec->min_year = 1930;
_loaded_newgrf_features.has_newhouses = true;
} break;
@@ -1415,8 +1415,8 @@ static bool TownHouseChangeInfo(uint hid, int numinfo, int prop, byte **bufp, in
case 0x0A: { // Availability years
uint16 years = grf_load_word(&buf);
- housespec->min_date = GB(years, 0, 8) > 150 ? MAX_YEAR : ORIGINAL_BASE_YEAR + GB(years, 0, 8);
- housespec->max_date = GB(years, 8, 8) > 150 ? MAX_YEAR : ORIGINAL_BASE_YEAR + GB(years, 8, 8);
+ housespec->min_year = GB(years, 0, 8) > 150 ? MAX_YEAR : ORIGINAL_BASE_YEAR + GB(years, 0, 8);
+ housespec->max_year = GB(years, 8, 8) > 150 ? MAX_YEAR : ORIGINAL_BASE_YEAR + GB(years, 8, 8);
} break;
case 0x0B: // Population
@@ -5585,7 +5585,7 @@ static void FinaliseHouseArray()
* On the other hand, why 1930? Just 'fix' the houses with the lowest
* minimum introduction date to 0.
*/
- Year min_date = MAX_YEAR;
+ Year min_year = MAX_YEAR;
for (GRFFile *file = _first_grffile; file != NULL; file = file->next) {
if (file->housespec == NULL) continue;
@@ -5594,16 +5594,16 @@ static void FinaliseHouseArray()
HouseSpec *hs = file->housespec[i];
if (hs != NULL) {
_house_mngr.SetEntitySpec(hs);
- if (hs->min_date < min_date) min_date = hs->min_date;
+ if (hs->min_year < min_year) min_year = hs->min_year;
}
}
}
- if (min_date != 0) {
+ if (min_year != 0) {
for (int i = 0; i < HOUSE_MAX; i++) {
HouseSpec *hs = GetHouseSpecs(i);
- if (hs->enabled && hs->min_date == min_date) hs->min_date = 0;
+ if (hs->enabled && hs->min_year == min_year) hs->min_year = 0;
}
}
}