Merge branch 'master' into jgrpp
# Conflicts: # .github/workflows/ci-build.yml # .github/workflows/codeql.yml # .github/workflows/release-linux.yml # .github/workflows/release-macos.yml # .github/workflows/release-windows.yml # src/map.cpp # src/music/midifile.hpp # src/order_cmd.cpp # src/order_gui.cpp # src/pathfinder/yapf/yapf_rail.cpp # src/pbs.cpp # src/saveload/afterload.cpp # src/saveload/saveload.h # src/saveload/vehicle_sl.cpp # src/script/api/script_text.cpp # src/ship_cmd.cpp # src/train_cmd.cpp # src/vehicle.cpp # src/vehicle_base.h # src/vehicle_func.h # src/vehicle_gui.cpp # src/vehicle_gui_base.h # src/viewport.cpp # src/waypoint_cmd.cpp
This commit is contained in:
@@ -647,10 +647,10 @@ static void AdvanceSingleHouseConstruction(TileIndex tile)
|
||||
static void AdvanceHouseConstruction(TileIndex tile)
|
||||
{
|
||||
uint flags = HouseSpec::Get(GetHouseType(tile))->building_flags;
|
||||
if (flags & BUILDING_HAS_1_TILE) AdvanceSingleHouseConstruction(TILE_ADDXY(tile, 0, 0));
|
||||
if (flags & BUILDING_2_TILES_Y) AdvanceSingleHouseConstruction(TILE_ADDXY(tile, 0, 1));
|
||||
if (flags & BUILDING_2_TILES_X) AdvanceSingleHouseConstruction(TILE_ADDXY(tile, 1, 0));
|
||||
if (flags & BUILDING_HAS_4_TILES) AdvanceSingleHouseConstruction(TILE_ADDXY(tile, 1, 1));
|
||||
if (flags & BUILDING_HAS_1_TILE) AdvanceSingleHouseConstruction(TileAddXY(tile, 0, 0));
|
||||
if (flags & BUILDING_2_TILES_Y) AdvanceSingleHouseConstruction(TileAddXY(tile, 0, 1));
|
||||
if (flags & BUILDING_2_TILES_X) AdvanceSingleHouseConstruction(TileAddXY(tile, 1, 0));
|
||||
if (flags & BUILDING_HAS_4_TILES) AdvanceSingleHouseConstruction(TileAddXY(tile, 1, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -821,11 +821,11 @@ static void TileLoop_Town(TileIndex tile)
|
||||
int y = Clamp(grid_pos.y, 0, 1);
|
||||
|
||||
if (hs->building_flags & TILE_SIZE_2x2) {
|
||||
tile = TILE_ADDXY(tile, x, y);
|
||||
tile = TileAddXY(tile, x, y);
|
||||
} else if (hs->building_flags & TILE_SIZE_1x2) {
|
||||
tile = TILE_ADDXY(tile, 0, y);
|
||||
tile = TileAddXY(tile, 0, y);
|
||||
} else if (hs->building_flags & TILE_SIZE_2x1) {
|
||||
tile = TILE_ADDXY(tile, x, 0);
|
||||
tile = TileAddXY(tile, x, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1119,7 +1119,7 @@ static bool IsNeighborRoadTile(TileIndex tile, const DiagDirection dir, uint dis
|
||||
|
||||
/* Test for roadbit parallel to dir and facing towards the middle axis */
|
||||
if (IsValidTile(tile + cur) &&
|
||||
GetTownRoadBits(TILE_ADD(tile, cur)) & DiagDirToRoadBits((pos & 2) ? dir : ReverseDiagDir(dir))) return true;
|
||||
GetTownRoadBits(TileAdd(tile, cur)) & DiagDirToRoadBits((pos & 2) ? dir : ReverseDiagDir(dir))) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2074,7 +2074,7 @@ static bool GrowTown(Town *t)
|
||||
cur_company.Restore();
|
||||
return success;
|
||||
}
|
||||
tile = TILE_ADD(tile, ToTileIndexDiff(*ptr));
|
||||
tile = TileAdd(tile, ToTileIndexDiff(*ptr));
|
||||
}
|
||||
|
||||
/* No road available, try to build a random road block by
|
||||
@@ -2091,7 +2091,7 @@ static bool GrowTown(Town *t)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
tile = TILE_ADD(tile, ToTileIndexDiff(*ptr));
|
||||
tile = TileAdd(tile, ToTileIndexDiff(*ptr));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user