summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-05 07:20:26 +0000
committertron <tron@openttd.org>2005-10-05 07:20:26 +0000
commitae4a1f3675bab50b93e443dcca07fd297fcdc58d (patch)
tree8281c38dbbb38386dacf57d352e00b62be0edc77 /station_cmd.c
parent102cf2615f8ffb4e260680a5f2b3b7d9f2a7a130 (diff)
downloadopenttd-ae4a1f3675bab50b93e443dcca07fd297fcdc58d.tar.xz
(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 6275e0fb7..c012f550c 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -1430,11 +1430,11 @@ int32 DoConvertStationRail(TileIndex tile, uint totype, bool exec)
if (_m[tile].m5 >= 8) return CMD_ERROR;
// tile is already of requested type?
- if ((_m[tile].m3 & 0xFU) == totype) return CMD_ERROR;
+ if (GB(_m[tile].m3, 0, 4) == totype) return CMD_ERROR;
if (exec) {
// change type.
- _m[tile].m3 = (_m[tile].m3 & 0xF0) + totype;
+ SB(_m[tile].m3, 0, 4, totype);
MarkTileDirtyByTile(tile);
}
@@ -2131,7 +2131,7 @@ static void DrawTile_Station(TileInfo *ti)
uint32 image;
const DrawTileSeqStruct *dtss;
const DrawTileSprites *t = NULL;
- byte railtype = _m[ti->tile].m3 & 0xF;
+ byte railtype = GB(_m[ti->tile].m3, 0, 4);
const RailtypeInfo *rti = GetRailTypeInfo(railtype);
SpriteID offset;
uint32 relocation = 0;