diff --git a/src/bridge_map.h b/src/bridge_map.h index 5ced7b5d2f..452e439329 100644 --- a/src/bridge_map.h +++ b/src/bridge_map.h @@ -135,6 +135,7 @@ inline void MakeBridgeRamp(Tile t, Owner o, BridgeType bridgetype, DiagDirection t.m4() = 0; t.m5() = 1 << 7 | tt << 2 | d; SB(t.m6(), 2, 4, bridgetype); + SB(t.m6(), 6, 2, 0); t.m7() = 0; t.m8() = 0; } diff --git a/src/clear_map.h b/src/clear_map.h index a1a58612ce..6f24800f99 100644 --- a/src/clear_map.h +++ b/src/clear_map.h @@ -274,7 +274,7 @@ inline void MakeField(Tile t, uint field_type, IndustryID industry) t.m3() = field_type; t.m4() = 0 << 5 | 0 << 2; SetClearGroundDensity(t, CLEAR_FIELDS, 3); - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = 0; t.m8() = 0; } diff --git a/src/industry_map.h b/src/industry_map.h index 92957fa9f2..64ba712bf5 100644 --- a/src/industry_map.h +++ b/src/industry_map.h @@ -285,6 +285,7 @@ inline void MakeIndustry(Tile t, IndustryID index, IndustryGfx gfx, uint8_t rand SetIndustryGfx(t, gfx); // m5, part of m6 SetIndustryRandomTriggers(t, {}); // rest of m6 SetWaterClass(t, wc); + SB(t.m6(), 6, 2, 0); t.m7() = 0; } diff --git a/src/object_map.h b/src/object_map.h index a5280c4f8c..23b623b6fc 100644 --- a/src/object_map.h +++ b/src/object_map.h @@ -80,7 +80,7 @@ inline void MakeObject(Tile t, Owner o, ObjectID index, WaterClass wc, uint8_t r t.m3() = random; t.m4() = 0; t.m5() = index.base() >> 16; - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = 0; } diff --git a/src/rail_map.h b/src/rail_map.h index 5b06a2cb57..4f1db937f4 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -524,7 +524,7 @@ inline void MakeRailNormal(Tile t, Owner o, TrackBits b, RailType r) t.m3() = 0; t.m4() = 0; t.m5() = RAIL_TILE_NORMAL << 6 | b; - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = 0; t.m8() = r; } @@ -557,7 +557,7 @@ inline void MakeRailDepot(Tile tile, Owner owner, DepotID depot_id, DiagDirectio tile.m3() = 0; tile.m4() = 0; tile.m5() = RAIL_TILE_DEPOT << 6 | dir; - SB(tile.m6(), 2, 4, 0); + SB(tile.m6(), 2, 6, 0); tile.m7() = 0; tile.m8() = rail_type; } diff --git a/src/road_map.h b/src/road_map.h index f8436d4258..bc617197b2 100644 --- a/src/road_map.h +++ b/src/road_map.h @@ -619,7 +619,7 @@ inline void MakeRoadNormal(Tile t, RoadBits bits, RoadType road_rt, RoadType tra t.m2() = town.base(); t.m3() = (tram_rt != INVALID_ROADTYPE ? bits : 0); t.m5() = (road_rt != INVALID_ROADTYPE ? bits : 0) | ROAD_TILE_NORMAL << 6; - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = 0; SetRoadTypes(t, road_rt, tram_rt); SetRoadOwner(t, RTT_TRAM, tram); @@ -645,7 +645,7 @@ inline void MakeRoadCrossing(Tile t, Owner road, Owner tram, Owner rail, Axis ro t.m3() = 0; t.m4() = INVALID_ROADTYPE; t.m5() = ROAD_TILE_CROSSING << 6 | roaddir; - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = road.base(); t.m8() = INVALID_ROADTYPE << 6 | rat; SetRoadTypes(t, road_rt, tram_rt); @@ -679,7 +679,7 @@ inline void MakeRoadDepot(Tile tile, Owner owner, DepotID depot_id, DiagDirectio tile.m3() = 0; tile.m4() = INVALID_ROADTYPE; tile.m5() = ROAD_TILE_DEPOT << 6 | dir; - SB(tile.m6(), 2, 4, 0); + SB(tile.m6(), 2, 6, 0); tile.m7() = owner.base(); tile.m8() = INVALID_ROADTYPE << 6; SetRoadType(tile, GetRoadTramType(rt), rt); diff --git a/src/station_map.h b/src/station_map.h index fcb458dbec..d90cc8dda5 100644 --- a/src/station_map.h +++ b/src/station_map.h @@ -726,6 +726,7 @@ inline void MakeStation(Tile t, Owner o, StationID sid, StationType st, uint8_t t.m5() = section; SB(t.m6(), 2, 1, 0); SB(t.m6(), 3, 4, to_underlying(st)); + SB(t.m6(), 7, 1, 0); t.m7() = 0; t.m8() = 0; } diff --git a/src/tree_map.h b/src/tree_map.h index 9fa0969ed1..cd031eac61 100644 --- a/src/tree_map.h +++ b/src/tree_map.h @@ -250,7 +250,7 @@ inline void MakeTree(Tile t, TreeType type, uint count, TreeGrowthStage growth, t.m3() = type; t.m4() = 0 << 5 | 0 << 2; t.m5() = count << 6 | static_cast(growth); - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = 0; } diff --git a/src/tunnel_map.h b/src/tunnel_map.h index 61965c067c..86f3027cbc 100644 --- a/src/tunnel_map.h +++ b/src/tunnel_map.h @@ -55,7 +55,7 @@ inline void MakeRoadTunnel(Tile t, Owner o, DiagDirection d, RoadType road_rt, R t.m3() = 0; t.m4() = 0; t.m5() = TRANSPORT_ROAD << 2 | d; - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = 0; t.m8() = 0; SetRoadOwner(t, RTT_ROAD, o); @@ -78,7 +78,7 @@ inline void MakeRailTunnel(Tile t, Owner o, DiagDirection d, RailType r) t.m3() = 0; t.m4() = 0; t.m5() = TRANSPORT_RAIL << 2 | d; - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = 0; t.m8() = 0; SetRailType(t, r); diff --git a/src/water_map.h b/src/water_map.h index 2c424d44b1..81e3e70914 100644 --- a/src/water_map.h +++ b/src/water_map.h @@ -391,7 +391,7 @@ inline void MakeShore(Tile t) t.m4() = 0; t.m5() = 0; SetWaterTileType(t, WATER_TILE_COAST); - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = 0; } @@ -413,7 +413,7 @@ inline void MakeWater(Tile t, Owner o, WaterClass wc, uint8_t random_bits) t.m4() = random_bits; t.m5() = 0; SetWaterTileType(t, WATER_TILE_CLEAR); - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = 0; } @@ -468,7 +468,7 @@ inline void MakeShipDepot(Tile t, Owner o, DepotID did, DepotPart part, Axis a, t.m4() = 0; t.m5() = part << WBL_DEPOT_PART | a << WBL_DEPOT_AXIS; SetWaterTileType(t, WATER_TILE_DEPOT); - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = 0; } @@ -492,7 +492,7 @@ inline void MakeLockTile(Tile t, Owner o, LockPart part, DiagDirection dir, Wate t.m4() = 0; t.m5() = part << WBL_LOCK_PART_BEGIN | dir << WBL_LOCK_ORIENT_BEGIN; SetWaterTileType(t, WATER_TILE_LOCK); - SB(t.m6(), 2, 4, 0); + SB(t.m6(), 2, 6, 0); t.m7() = 0; }