diff options
author | rubidium <rubidium@openttd.org> | 2014-09-21 11:23:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-21 11:23:33 +0000 |
commit | 982f5a6aa2f600106f9bd292ebefcef52e6e65e6 (patch) | |
tree | 781d2ce0c99ac2261c600ef0a0b427a86ce3ffbc | |
parent | 18b98afabdc04874942b451b281ad28be967d1ae (diff) | |
download | openttd-982f5a6aa2f600106f9bd292ebefcef52e6e65e6.tar.xz |
(svn r26878) -Change: move m6 to TileExtended to keep Tile 8 bytes and thus better alignable
-rw-r--r-- | src/bridge_map.h | 4 | ||||
-rw-r--r-- | src/clear_map.h | 6 | ||||
-rw-r--r-- | src/industry_map.h | 8 | ||||
-rw-r--r-- | src/map_type.h | 1 | ||||
-rw-r--r-- | src/object_map.h | 2 | ||||
-rw-r--r-- | src/rail_map.h | 4 | ||||
-rw-r--r-- | src/road_map.h | 10 | ||||
-rw-r--r-- | src/saveload/afterload.cpp | 50 | ||||
-rw-r--r-- | src/saveload/map_sl.cpp | 12 | ||||
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 8 | ||||
-rw-r--r-- | src/saveload/station_sl.cpp | 2 | ||||
-rw-r--r-- | src/station_map.h | 10 | ||||
-rw-r--r-- | src/town_map.h | 10 | ||||
-rw-r--r-- | src/tree_map.h | 2 | ||||
-rw-r--r-- | src/tunnel_map.h | 4 | ||||
-rw-r--r-- | src/void_map.h | 2 | ||||
-rw-r--r-- | src/water_map.h | 8 |
17 files changed, 72 insertions, 71 deletions
diff --git a/src/bridge_map.h b/src/bridge_map.h index 6ff78a7ec..be10ab8c7 100644 --- a/src/bridge_map.h +++ b/src/bridge_map.h @@ -68,7 +68,7 @@ static inline bool IsBridgeAbove(TileIndex t) static inline BridgeType GetBridgeType(TileIndex t) { assert(IsBridgeTile(t)); - return GB(_m[t].m6, 2, 4); + return GB(_me[t].m6, 2, 4); } /** @@ -146,7 +146,7 @@ static inline void MakeBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, D _m[t].m3 = rt; _m[t].m4 = 0; _m[t].m5 = 1 << 7 | tt << 2 | d; - SB(_m[t].m6, 2, 4, bridgetype); + SB(_me[t].m6, 2, 4, bridgetype); _me[t].m7 = 0; } diff --git a/src/clear_map.h b/src/clear_map.h index db638ca6c..bd48c079a 100644 --- a/src/clear_map.h +++ b/src/clear_map.h @@ -228,7 +228,7 @@ static inline uint GetFence(TileIndex t, DiagDirection side) case DIAGDIR_SE: return GB(_m[t].m4, 2, 3); case DIAGDIR_SW: return GB(_m[t].m4, 5, 3); case DIAGDIR_NE: return GB(_m[t].m3, 5, 3); - case DIAGDIR_NW: return GB(_m[t].m6, 2, 3); + case DIAGDIR_NW: return GB(_me[t].m6, 2, 3); } } @@ -247,7 +247,7 @@ static inline void SetFence(TileIndex t, DiagDirection side, uint h) case DIAGDIR_SE: SB(_m[t].m4, 2, 3, h); break; case DIAGDIR_SW: SB(_m[t].m4, 5, 3, h); break; case DIAGDIR_NE: SB(_m[t].m3, 5, 3, h); break; - case DIAGDIR_NW: SB(_m[t].m6, 2, 3, h); break; + case DIAGDIR_NW: SB(_me[t].m6, 2, 3, h); break; } } @@ -287,7 +287,7 @@ static inline void MakeField(TileIndex t, uint field_type, IndustryID industry) _m[t].m3 = field_type; _m[t].m4 = 0 << 5 | 0 << 2; SetClearGroundDensity(t, CLEAR_FIELDS, 3); - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; } diff --git a/src/industry_map.h b/src/industry_map.h index 7d927a13c..9d2e3de21 100644 --- a/src/industry_map.h +++ b/src/industry_map.h @@ -127,7 +127,7 @@ static inline void SetIndustryConstructionStage(TileIndex tile, byte value) static inline IndustryGfx GetCleanIndustryGfx(TileIndex t) { assert(IsTileType(t, MP_INDUSTRY)); - return _m[t].m5 | (GB(_m[t].m6, 2, 1) << 8); + return _m[t].m5 | (GB(_me[t].m6, 2, 1) << 8); } /** @@ -152,7 +152,7 @@ static inline void SetIndustryGfx(TileIndex t, IndustryGfx gfx) { assert(IsTileType(t, MP_INDUSTRY)); _m[t].m5 = GB(gfx, 0, 8); - SB(_m[t].m6, 2, 1, GB(gfx, 8, 1)); + SB(_me[t].m6, 2, 1, GB(gfx, 8, 1)); } /** @@ -252,7 +252,7 @@ static inline void SetIndustryRandomBits(TileIndex tile, byte bits) static inline byte GetIndustryTriggers(TileIndex tile) { assert(IsTileType(tile, MP_INDUSTRY)); - return GB(_m[tile].m6, 3, 3); + return GB(_me[tile].m6, 3, 3); } @@ -266,7 +266,7 @@ static inline byte GetIndustryTriggers(TileIndex tile) static inline void SetIndustryTriggers(TileIndex tile, byte triggers) { assert(IsTileType(tile, MP_INDUSTRY)); - SB(_m[tile].m6, 3, 3, triggers); + SB(_me[tile].m6, 3, 3, triggers); } /** diff --git a/src/map_type.h b/src/map_type.h index 9e0dec5aa..327f6d28f 100644 --- a/src/map_type.h +++ b/src/map_type.h @@ -32,6 +32,7 @@ struct Tile { * Look at docs/landscape.html for the exact meaning of the members. */ struct TileExtended { + byte m6; ///< General purpose byte m7; ///< Primarily used for newgrf support }; diff --git a/src/object_map.h b/src/object_map.h index 85faf4444..1aaf98434 100644 --- a/src/object_map.h +++ b/src/object_map.h @@ -82,7 +82,7 @@ static inline void MakeObject(TileIndex t, Owner o, ObjectID index, WaterClass w _m[t].m3 = random; _m[t].m4 = 0; _m[t].m5 = index >> 16; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; } diff --git a/src/rail_map.h b/src/rail_map.h index c8033a311..2431a7920 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -525,7 +525,7 @@ static inline void MakeRailNormal(TileIndex t, Owner o, TrackBits b, RailType r) _m[t].m3 = r; _m[t].m4 = 0; _m[t].m5 = RAIL_TILE_NORMAL << 6 | b; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; } @@ -538,7 +538,7 @@ static inline void MakeRailDepot(TileIndex t, Owner o, DepotID did, DiagDirectio _m[t].m3 = r; _m[t].m4 = 0; _m[t].m5 = RAIL_TILE_DEPOT << 6 | d; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; } diff --git a/src/road_map.h b/src/road_map.h index 6fe1a02b1..693730294 100644 --- a/src/road_map.h +++ b/src/road_map.h @@ -461,7 +461,7 @@ enum Roadside { */ static inline Roadside GetRoadside(TileIndex tile) { - return (Roadside)GB(_m[tile].m6, 3, 3); + return (Roadside)GB(_me[tile].m6, 3, 3); } /** @@ -471,7 +471,7 @@ static inline Roadside GetRoadside(TileIndex tile) */ static inline void SetRoadside(TileIndex tile, Roadside s) { - SB(_m[tile].m6, 3, 3, s); + SB(_me[tile].m6, 3, 3, s); } /** @@ -558,7 +558,7 @@ static inline void MakeRoadNormal(TileIndex t, RoadBits bits, RoadTypes rot, Tow _m[t].m3 = (HasBit(rot, ROADTYPE_TRAM) ? bits : 0); _m[t].m4 = 0; _m[t].m5 = (HasBit(rot, ROADTYPE_ROAD) ? bits : 0) | ROAD_TILE_NORMAL << 6; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = rot << 6; SetRoadOwner(t, ROADTYPE_TRAM, tram); } @@ -582,7 +582,7 @@ static inline void MakeRoadCrossing(TileIndex t, Owner road, Owner tram, Owner r _m[t].m3 = rat; _m[t].m4 = 0; _m[t].m5 = ROAD_TILE_CROSSING << 6 | roaddir; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = rot << 6 | road; SetRoadOwner(t, ROADTYPE_TRAM, tram); } @@ -603,7 +603,7 @@ static inline void MakeRoadDepot(TileIndex t, Owner owner, DepotID did, DiagDire _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = ROAD_TILE_DEPOT << 6 | dir; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = RoadTypeToRoadTypes(rt) << 6 | owner; SetRoadOwner(t, ROADTYPE_TRAM, owner); } diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index d2b8b6d5d..514f29465 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -574,11 +574,11 @@ bool AfterLoadGame() /* In old savegame versions, the heightlevel was coded in bits 0..3 of the type field */ for (TileIndex t = 0; t < map_size; t++) { _m[t].height = GB(_m[t].type, 0, 4); - SB(_m[t].type, 0, 2, GB(_m[t].m6, 0, 2)); - SB(_m[t].m6, 0, 2, 0); + SB(_m[t].type, 0, 2, GB(_me[t].m6, 0, 2)); + SB(_me[t].m6, 0, 2, 0); if (MayHaveBridgeAbove(t)) { - SB(_m[t].type, 2, 2, GB(_m[t].m6, 6, 2)); - SB(_m[t].m6, 6, 2, 0); + SB(_m[t].type, 2, 2, GB(_me[t].m6, 6, 2)); + SB(_me[t].m6, 6, 2, 0); } else { SB(_m[t].type, 2, 2, 0); } @@ -810,7 +810,7 @@ bool AfterLoadGame() break; case MP_STATION: { - if (HasBit(_m[t].m6, 3)) SetBit(_m[t].m6, 2); + if (HasBit(_me[t].m6, 3)) SetBit(_me[t].m6, 2); StationGfx gfx = GetStationGfx(t); StationType st; if ( IsInsideMM(gfx, 0, 8)) { // Rail station @@ -848,7 +848,7 @@ bool AfterLoadGame() ResetSignalHandlers(); return false; } - SB(_m[t].m6, 3, 3, st); + SB(_me[t].m6, 3, 3, st); break; } } @@ -1022,7 +1022,7 @@ bool AfterLoadGame() case ROAD_TILE_NORMAL: SB(_m[t].m4, 0, 4, GB(_m[t].m5, 0, 4)); SB(_m[t].m4, 4, 4, 0); - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); break; case ROAD_TILE_CROSSING: SB(_m[t].m4, 5, 2, GB(_m[t].m5, 2, 2)); @@ -1061,19 +1061,19 @@ bool AfterLoadGame() switch (GetRoadTileType(t)) { default: SlErrorCorrupt("Invalid road tile type"); case ROAD_TILE_NORMAL: - SB(_me[t].m7, 0, 4, GB(_m[t].m3, 0, 4)); // road works - SB(_m[t].m6, 3, 3, GB(_m[t].m3, 4, 3)); // ground - SB(_m[t].m3, 0, 4, GB(_m[t].m4, 4, 4)); // tram bits - SB(_m[t].m3, 4, 4, GB(_m[t].m5, 0, 4)); // tram owner - SB(_m[t].m5, 0, 4, GB(_m[t].m4, 0, 4)); // road bits + SB(_me[t].m7, 0, 4, GB(_m[t].m3, 0, 4)); // road works + SB(_me[t].m6, 3, 3, GB(_m[t].m3, 4, 3)); // ground + SB(_m[t].m3, 0, 4, GB(_m[t].m4, 4, 4)); // tram bits + SB(_m[t].m3, 4, 4, GB(_m[t].m5, 0, 4)); // tram owner + SB(_m[t].m5, 0, 4, GB(_m[t].m4, 0, 4)); // road bits break; case ROAD_TILE_CROSSING: - SB(_me[t].m7, 0, 5, GB(_m[t].m4, 0, 5)); // road owner - SB(_m[t].m6, 3, 3, GB(_m[t].m3, 4, 3)); // ground - SB(_m[t].m3, 4, 4, GB(_m[t].m5, 0, 4)); // tram owner - SB(_m[t].m5, 0, 1, GB(_m[t].m4, 6, 1)); // road axis - SB(_m[t].m5, 5, 1, GB(_m[t].m4, 5, 1)); // crossing state + SB(_me[t].m7, 0, 5, GB(_m[t].m4, 0, 5)); // road owner + SB(_me[t].m6, 3, 3, GB(_m[t].m3, 4, 3)); // ground + SB(_m[t].m3, 4, 4, GB(_m[t].m5, 0, 4)); // tram owner + SB(_m[t].m5, 0, 1, GB(_m[t].m4, 6, 1)); // road axis + SB(_m[t].m5, 5, 1, GB(_m[t].m4, 5, 1)); // crossing state break; case ROAD_TILE_DEPOT: @@ -1090,7 +1090,7 @@ bool AfterLoadGame() if (!IsRoadStop(t)) break; if (fix_roadtypes) SetRoadTypes(t, (RoadTypes)GB(_m[t].m3, 0, 3)); - SB(_me[t].m7, 0, 5, HasBit(_m[t].m6, 2) ? OWNER_TOWN : GetTileOwner(t)); + SB(_me[t].m7, 0, 5, HasBit(_me[t].m6, 2) ? OWNER_TOWN : GetTileOwner(t)); SB(_m[t].m3, 4, 4, _m[t].m1); _m[t].m4 = 0; break; @@ -1104,7 +1104,7 @@ bool AfterLoadGame() SB(_me[t].m7, 0, 5, o); // road owner SB(_m[t].m3, 4, 4, o == OWNER_NONE ? OWNER_TOWN : o); // tram owner } - SB(_m[t].m6, 2, 4, GB(_m[t].m2, 4, 4)); // bridge type + SB(_me[t].m6, 2, 4, GB(_m[t].m2, 4, 4)); // bridge type SB(_me[t].m7, 5, 1, GB(_m[t].m4, 7, 1)); // snow/desert _m[t].m2 = 0; @@ -1838,7 +1838,7 @@ bool AfterLoadGame() /* Increase HouseAnimationFrame from 5 to 7 bits */ for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_HOUSE) && GetHouseType(t) >= NEW_HOUSE_OFFSET) { - SB(_m[t].m6, 2, 6, GB(_m[t].m6, 3, 5)); + SB(_me[t].m6, 2, 6, GB(_me[t].m6, 3, 5)); SB(_m[t].m3, 5, 1, 0); } } @@ -1995,7 +1995,7 @@ bool AfterLoadGame() /* Reordering/generalisation of the object bits. */ ObjectType type = _m[t].m5; - SB(_m[t].m6, 2, 4, type == OBJECT_HQ ? GB(_m[t].m3, 2, 3) : 0); + SB(_me[t].m6, 2, 4, type == OBJECT_HQ ? GB(_m[t].m3, 2, 3) : 0); _m[t].m3 = type == OBJECT_HQ ? GB(_m[t].m3, 1, 1) | GB(_m[t].m3, 0, 1) << 4 : 0; /* Make sure those bits are clear as well! */ @@ -2016,8 +2016,8 @@ bool AfterLoadGame() uint offset = _m[t].m3; /* Also move the animation state. */ - _m[t].m3 = GB(_m[t].m6, 2, 4); - SB(_m[t].m6, 2, 4, 0); + _m[t].m3 = GB(_me[t].m6, 2, 4); + SB(_me[t].m6, 2, 4, 0); if (offset == 0) { /* No offset, so make the object. */ @@ -2404,9 +2404,9 @@ bool AfterLoadGame() case MP_HOUSE: if (GetHouseType(t) >= NEW_HOUSE_OFFSET) { uint per_proc = _me[t].m7; - _me[t].m7 = GB(_m[t].m6, 2, 6) | (GB(_m[t].m3, 5, 1) << 6); + _me[t].m7 = GB(_me[t].m6, 2, 6) | (GB(_m[t].m3, 5, 1) << 6); SB(_m[t].m3, 5, 1, 0); - SB(_m[t].m6, 2, 6, min(per_proc, 63)); + SB(_me[t].m6, 2, 6, min(per_proc, 63)); } break; diff --git a/src/saveload/map_sl.cpp b/src/saveload/map_sl.cpp index 1b3977720..86a185ca4 100644 --- a/src/saveload/map_sl.cpp +++ b/src/saveload/map_sl.cpp @@ -223,16 +223,16 @@ static void Load_MAP6() /* 1024, otherwise we overflow on 64x64 maps! */ SlArray(buf, 1024, SLE_UINT8); for (uint j = 0; j != 1024; j++) { - _m[i++].m6 = GB(buf[j], 0, 2); - _m[i++].m6 = GB(buf[j], 2, 2); - _m[i++].m6 = GB(buf[j], 4, 2); - _m[i++].m6 = GB(buf[j], 6, 2); + _me[i++].m6 = GB(buf[j], 0, 2); + _me[i++].m6 = GB(buf[j], 2, 2); + _me[i++].m6 = GB(buf[j], 4, 2); + _me[i++].m6 = GB(buf[j], 6, 2); } } } else { for (TileIndex i = 0; i != size;) { SlArray(buf, MAP_SL_BUF_SIZE, SLE_UINT8); - for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) _m[i++].m6 = buf[j]; + for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) _me[i++].m6 = buf[j]; } } } @@ -244,7 +244,7 @@ static void Save_MAP6() SlSetLength(size); for (TileIndex i = 0; i != size;) { - for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) buf[j] = _m[i++].m6; + for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) buf[j] = _me[i++].m6; SlArray(buf, MAP_SL_BUF_SIZE, SLE_UINT8); } } diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index 7a2ce4c30..4afbe6033 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -1495,10 +1495,10 @@ static bool LoadOldMapPart1(LoadgameState *ls, int num) } for (uint i = 0; i < OLD_MAP_SIZE / 4; i++) { byte b = ReadByte(ls); - _m[i * 4 + 0].m6 = GB(b, 0, 2); - _m[i * 4 + 1].m6 = GB(b, 2, 2); - _m[i * 4 + 2].m6 = GB(b, 4, 2); - _m[i * 4 + 3].m6 = GB(b, 6, 2); + _me[i * 4 + 0].m6 = GB(b, 0, 2); + _me[i * 4 + 1].m6 = GB(b, 2, 2); + _me[i * 4 + 2].m6 = GB(b, 4, 2); + _me[i * 4 + 3].m6 = GB(b, 6, 2); } } diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp index 17fcc58bd..3db5e1f5f 100644 --- a/src/saveload/station_sl.cpp +++ b/src/saveload/station_sl.cpp @@ -95,7 +95,7 @@ void MoveBuoysToWaypoints() TILE_AREA_LOOP(t, train_st) { if (!IsTileType(t, MP_STATION) || GetStationIndex(t) != index) continue; - SB(_m[t].m6, 3, 3, STATION_WAYPOINT); + SB(_me[t].m6, 3, 3, STATION_WAYPOINT); wp->rect.BeforeAddTile(t, StationRect::ADD_FORCE); } diff --git a/src/station_map.h b/src/station_map.h index 67f41f1d7..7ca9bd720 100644 --- a/src/station_map.h +++ b/src/station_map.h @@ -45,7 +45,7 @@ static const int GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET = 4; ///< The offset for the static inline StationType GetStationType(TileIndex t) { assert(IsTileType(t, MP_STATION)); - return (StationType)GB(_m[t].m6, 3, 3); + return (StationType)GB(_me[t].m6, 3, 3); } /** @@ -394,7 +394,7 @@ static inline bool IsCompatibleTrainStationTile(TileIndex test_tile, TileIndex s static inline bool HasStationReservation(TileIndex t) { assert(HasStationRail(t)); - return HasBit(_m[t].m6, 2); + return HasBit(_me[t].m6, 2); } /** @@ -406,7 +406,7 @@ static inline bool HasStationReservation(TileIndex t) static inline void SetRailStationReservation(TileIndex t, bool b) { assert(HasStationRail(t)); - SB(_m[t].m6, 2, 1, b ? 1 : 0); + SB(_me[t].m6, 2, 1, b ? 1 : 0); } /** @@ -539,8 +539,8 @@ static inline void MakeStation(TileIndex t, Owner o, StationID sid, StationType _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = section; - SB(_m[t].m6, 2, 1, 0); - SB(_m[t].m6, 3, 3, st); + SB(_me[t].m6, 2, 1, 0); + SB(_me[t].m6, 3, 3, st); _me[t].m7 = 0; } diff --git a/src/town_map.h b/src/town_map.h index 41505871d..016ff9a6d 100644 --- a/src/town_map.h +++ b/src/town_map.h @@ -126,7 +126,7 @@ static inline void HaltLift(TileIndex t) */ static inline byte GetLiftPosition(TileIndex t) { - return GB(_m[t].m6, 2, 6); + return GB(_me[t].m6, 2, 6); } /** @@ -136,7 +136,7 @@ static inline byte GetLiftPosition(TileIndex t) */ static inline void SetLiftPosition(TileIndex t, byte pos) { - SB(_m[t].m6, 2, 6, pos); + SB(_me[t].m6, 2, 6, pos); } /** @@ -315,7 +315,7 @@ static inline byte GetHouseTriggers(TileIndex t) static inline byte GetHouseProcessingTime(TileIndex t) { assert(IsTileType(t, MP_HOUSE)); - return GB(_m[t].m6, 2, 6); + return GB(_me[t].m6, 2, 6); } /** @@ -327,7 +327,7 @@ static inline byte GetHouseProcessingTime(TileIndex t) static inline void SetHouseProcessingTime(TileIndex t, byte time) { assert(IsTileType(t, MP_HOUSE)); - SB(_m[t].m6, 2, 6, time); + SB(_me[t].m6, 2, 6, time); } /** @@ -338,7 +338,7 @@ static inline void SetHouseProcessingTime(TileIndex t, byte time) static inline void DecHouseProcessingTime(TileIndex t) { assert(IsTileType(t, MP_HOUSE)); - _m[t].m6 -= 1 << 2; + _me[t].m6 -= 1 << 2; } /** diff --git a/src/tree_map.h b/src/tree_map.h index 105eb8dca..e614099fc 100644 --- a/src/tree_map.h +++ b/src/tree_map.h @@ -279,7 +279,7 @@ static inline void MakeTree(TileIndex t, TreeType type, uint count, uint growth, _m[t].m3 = type; _m[t].m4 = 0 << 5 | 0 << 2; _m[t].m5 = count << 6 | growth; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; } diff --git a/src/tunnel_map.h b/src/tunnel_map.h index c4f68f729..e200a1275 100644 --- a/src/tunnel_map.h +++ b/src/tunnel_map.h @@ -56,7 +56,7 @@ static inline void MakeRoadTunnel(TileIndex t, Owner o, DiagDirection d, RoadTyp _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = TRANSPORT_ROAD << 2 | d; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; SetRoadOwner(t, ROADTYPE_ROAD, o); if (o != OWNER_TOWN) SetRoadOwner(t, ROADTYPE_TRAM, o); @@ -78,7 +78,7 @@ static inline void MakeRailTunnel(TileIndex t, Owner o, DiagDirection d, RailTyp _m[t].m3 = r; _m[t].m4 = 0; _m[t].m5 = TRANSPORT_RAIL << 2 | d; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; } diff --git a/src/void_map.h b/src/void_map.h index 53ca068b2..5ccc4e9d7 100644 --- a/src/void_map.h +++ b/src/void_map.h @@ -27,7 +27,7 @@ static inline void MakeVoid(TileIndex t) _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = 0; - _m[t].m6 = 0; + _me[t].m6 = 0; _me[t].m7 = 0; } diff --git a/src/water_map.h b/src/water_map.h index cfec9cc38..ab249a827 100644 --- a/src/water_map.h +++ b/src/water_map.h @@ -360,7 +360,7 @@ static inline void MakeShore(TileIndex t) _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = WBL_TYPE_NORMAL << WBL_TYPE_BEGIN | 1 << WBL_COAST_FLAG; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; } @@ -380,7 +380,7 @@ static inline void MakeWater(TileIndex t, Owner o, WaterClass wc, uint8 random_b _m[t].m3 = 0; _m[t].m4 = random_bits; _m[t].m5 = WBL_TYPE_NORMAL << WBL_TYPE_BEGIN; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; } @@ -433,7 +433,7 @@ static inline void MakeShipDepot(TileIndex t, Owner o, DepotID did, DepotPart pa _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = WBL_TYPE_DEPOT << WBL_TYPE_BEGIN | part << WBL_DEPOT_PART | a << WBL_DEPOT_AXIS; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; } @@ -455,7 +455,7 @@ static inline void MakeLockTile(TileIndex t, Owner o, LockPart part, DiagDirecti _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = WBL_TYPE_LOCK << WBL_TYPE_BEGIN | part << WBL_LOCK_PART_BEGIN | dir << WBL_LOCK_ORIENT_BEGIN; - SB(_m[t].m6, 2, 4, 0); + SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; } |