static inline RoadTypeIdentifier GetRoadTypeRoad(TileIndex t) { return RoadTypeIdentifier(ROADTYPE_ROAD, (RoadSubType)GB(_m[t].m4, 0, 4)); } static inline RoadTypeIdentifier GetRoadTypeTram(TileIndex t) { return RoadTypeIdentifier(ROADTYPE_TRAM, (RoadSubType)GB(_m[t].m4, 4, 4)); } /**********************/ struct RoadTypeIdentifiers { RoadTypeIdentifier road_identifier = RoadTypeIdentifier(INVALID_ROADTYPE, INVALID_ROADSUBTYPE); RoadTypeIdentifier tram_identifier = RoadTypeIdentifier(INVALID_ROADTYPE, INVALID_ROADSUBTYPE); RoadTypeIdentifiers(TileIndex t) { if (GetRoadBits(t, ROADTYPE_ROAD) != ROAD_NONE) { road_identifier = GetRoadTypeRoad(t); } if (GetRoadBits(t, ROADTYPE_TRAM) != ROAD_NONE) { road_identifier = GetRoadTypeTram(t); } } };