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 | 98f66552beadfa14cf28cd126fc462a5abe3087b (patch) | |
tree | 7818a2f346fc9a85d84a2a844989ea1a90136b90 /src/newgrf_house.cpp | |
parent | 9e385d2427fd017e90182aa152e488ce026ace19 (diff) | |
download | openttd-98f66552beadfa14cf28cd126fc462a5abe3087b.tar.xz |
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r-- | src/newgrf_house.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index a0d57f6eb..e23c0b180 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -211,7 +211,7 @@ static uint32 HouseGetVariable(const ResolverObject *object, byte variable, byte case 0x40: return (IsTileType(tile, MP_HOUSE) ? GetHouseBuildingStage(tile) : 0) | OriginalTileRandomiser(TileX(tile), TileY(tile)) << 2; /* Building age. */ - case 0x41: return clamp(_cur_year - GetHouseConstructionYear(tile), 0, 0xFF); + case 0x41: return Clamp(_cur_year - GetHouseConstructionYear(tile), 0, 0xFF); /* Town zone */ case 0x42: return GetTownRadiusGroup(town, tile); @@ -369,7 +369,7 @@ void DrawNewHouseTile(TileInfo *ti, HouseID house_id) } else { /* Limit the building stage to the number of stages supplied. */ byte stage = GetHouseBuildingStage(ti->tile); - stage = clamp(stage - 4 + group->g.layout.num_sprites, 0, group->g.layout.num_sprites - 1); + stage = Clamp(stage - 4 + group->g.layout.num_sprites, 0, group->g.layout.num_sprites - 1); DrawTileLayout(ti, group, stage, house_id); } } @@ -382,7 +382,7 @@ void AnimateNewHouseTile(TileIndex tile) if (HASBIT(hs->callback_mask, CBM_HOUSE_ANIMATION_SPEED)) { uint16 callback_res = GetHouseCallback(CBID_HOUSE_ANIMATION_SPEED, 0, 0, GetHouseType(tile), GetTownByTile(tile), tile); - if (callback_res != CALLBACK_FAILED) animation_speed = clamp(callback_res & 0xFF, 2, 16); + if (callback_res != CALLBACK_FAILED) animation_speed = Clamp(callback_res & 0xFF, 2, 16); } /* An animation speed of 2 means the animation frame changes 4 ticks, and |