diff options
author | skidd13 <skidd13@openttd.org> | 2007-11-19 18:38:10 +0000 |
---|---|---|
committer | skidd13 <skidd13@openttd.org> | 2007-11-19 18:38:10 +0000 |
commit | 8be526e4990ef8c7a742e6f3f67a42d0036750eb (patch) | |
tree | 7818a2f346fc9a85d84a2a844989ea1a90136b90 /src/newgrf_engine.cpp | |
parent | 006acff1834d37ba4b1553ba324c255a6cc2382e (diff) | |
download | openttd-8be526e4990ef8c7a742e6f3f67a42d0036750eb.tar.xz |
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
Diffstat (limited to 'src/newgrf_engine.cpp')
-rw-r--r-- | src/newgrf_engine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 4adf8d82d..08b39da3e 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -496,7 +496,7 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by case 0x43: return _current_player | (LiveryHelper(object->u.vehicle.self_type, NULL) << 24); // Owner information case 0x46: return 0; // Motion counter case 0x48: return GetEngine(object->u.vehicle.self_type)->flags; // Vehicle Type Info - case 0xC4: return clamp(_cur_year, ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR) - ORIGINAL_BASE_YEAR; // Build year + case 0xC4: return Clamp(_cur_year, ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR) - ORIGINAL_BASE_YEAR; // Build year case 0xDA: return INVALID_VEHICLE; // Next vehicle case 0x7F: return GetGRFParameter(object->u.vehicle.self_type, parameter); // Read GRF parameter } @@ -711,7 +711,7 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by case 0x41: return GB(v->age, 8, 8); case 0x42: return v->max_age; case 0x43: return GB(v->max_age, 8, 8); - case 0x44: return clamp(v->build_year, ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR) - ORIGINAL_BASE_YEAR; + case 0x44: return Clamp(v->build_year, ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR) - ORIGINAL_BASE_YEAR; case 0x45: return v->unitnumber; case 0x46: return v->engine_type; case 0x47: return GB(v->engine_type, 8, 8); |