From 89090790c2405a738f5977310549cf94df9c06cb Mon Sep 17 00:00:00 2001 From: tron Date: Fri, 17 Mar 2006 10:10:31 +0000 Subject: (svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}() --- station_cmd.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'station_cmd.c') diff --git a/station_cmd.c b/station_cmd.c index edb05f6d3..4eaeb3003 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -1256,12 +1256,10 @@ int32 DoConvertStationRail(TileIndex tile, uint totype, bool exec) // tile is not a railroad station? if (_m[tile].m5 >= 8) return CMD_ERROR; - // tile is already of requested type? - if (GB(_m[tile].m3, 0, 4) == totype) return CMD_ERROR; + if (GetRailType(tile) == totype) return CMD_ERROR; if (exec) { - // change type. - SB(_m[tile].m3, 0, 4, totype); + SetRailType(tile, totype); MarkTileDirtyByTile(tile); } @@ -1949,7 +1947,7 @@ static void DrawTile_Station(TileInfo *ti) uint32 image; const DrawTileSeqStruct *dtss; const DrawTileSprites *t = NULL; - RailType railtype = GB(_m[ti->tile].m3, 0, 4); + RailType railtype = GetRailType(ti->tile); const RailtypeInfo *rti = GetRailTypeInfo(railtype); SpriteID offset; uint32 relocation = 0; -- cgit v1.2.3-54-g00ecf