summaryrefslogtreecommitdiff
path: root/oldloader.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-22 14:37:52 +0000
committertron <tron@openttd.org>2005-02-22 14:37:52 +0000
commitaa55bc1559a4261380055cd21f94817f7defaf18 (patch)
treef874f19eedb6c83d9a602ddfe03180354b039d64 /oldloader.c
parent5b261af6591368f9b7d620d04c99e5ee06c80c1b (diff)
downloadopenttd-aa55bc1559a4261380055cd21f94817f7defaf18.tar.xz
(svn r1900) Simplify a piece of code in the oldloader
Diffstat (limited to 'oldloader.c')
-rw-r--r--oldloader.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/oldloader.c b/oldloader.c
index 2461f214b..c3b5f01b8 100644
--- a/oldloader.c
+++ b/oldloader.c
@@ -367,14 +367,8 @@ static void FixOldStations(void)
FOR_ALL_STATIONS(st) {
/* Check if we need to swap width and height for the station */
- if (st->train_tile) {
- if (_map5[st->train_tile] & 1) {
- int w = st->trainst_w;
- int h = st->trainst_h;
- intswap(w, h);
- st->trainst_w = w;
- st->trainst_h = h;
- }
+ if (st->train_tile != 0 && _map5[st->train_tile] & 1) {
+ swap_byte(&st->trainst_w, &st->trainst_h);
}
/* Check if there is a bus or truck station, and convert to new format */