From ae4a1f3675bab50b93e443dcca07fd297fcdc58d Mon Sep 17 00:00:00 2001 From: tron Date: Wed, 5 Oct 2005 07:20:26 +0000 Subject: (svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB --- station_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'station_cmd.c') 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; -- cgit v1.2.3-54-g00ecf