summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2007-11-19 18:38:10 +0000
committerskidd13 <skidd13@openttd.org>2007-11-19 18:38:10 +0000
commit8be526e4990ef8c7a742e6f3f67a42d0036750eb (patch)
tree7818a2f346fc9a85d84a2a844989ea1a90136b90 /src/station_cmd.cpp
parent006acff1834d37ba4b1553ba324c255a6cc2382e (diff)
downloadopenttd-8be526e4990ef8c7a742e6f3f67a42d0036750eb.tar.xz
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index d7efb8e3c..515534728 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -671,7 +671,7 @@ static void UpdateStationSignCoord(Station *st)
if (r->IsEmpty()) return; /* no tiles belong to this station */
/* clamp sign coord to be inside the station rect */
- st->xy = TileXY(clampu(TileX(st->xy), r->left, r->right), clampu(TileY(st->xy), r->top, r->bottom));
+ st->xy = TileXY(ClampU(TileX(st->xy), r->left, r->right), ClampU(TileY(st->xy), r->top, r->bottom));
UpdateStationVirtCoordDirty(st);
}
@@ -2487,7 +2487,7 @@ static void UpdateStationRating(Station *st)
int or_ = ge->rating; // old rating
/* only modify rating in steps of -2, -1, 0, 1 or 2 */
- ge->rating = rating = or_ + clamp(clamp(rating, 0, 255) - or_, -2, 2);
+ ge->rating = rating = or_ + Clamp(Clamp(rating, 0, 255) - or_, -2, 2);
/* if rating is <= 64 and more than 200 items waiting,
* remove some random amount of goods from the station */
@@ -2577,7 +2577,7 @@ void ModifyStationRatingAround(TileIndex tile, PlayerID owner, int amount, uint
GoodsEntry* ge = &st->goods[i];
if (ge->acceptance_pickup != 0) {
- ge->rating = clamp(ge->rating + amount, 0, 255);
+ ge->rating = Clamp(ge->rating + amount, 0, 255);
}
}
}