From b387f55ff76efe40529ecc60559a1d45139bf46b Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 14 Feb 2026 12:34:12 +0100 Subject: [PATCH] Codechange: use designated initialisers for _tile_type_tunnelbridge_procs --- src/train_cmd.cpp | 2 +- src/tunnelbridge_cmd.cpp | 48 +++++++++++++++++++++------------------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index f56a81688d..0c00f1cc74 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1618,7 +1618,7 @@ static void UpdateStatusAfterSwap(Train *v) if (v->track != TRACK_BIT_WORMHOLE) { VehicleEnterTile(v, v->tile, v->x_pos, v->y_pos); } else { - /* VehicleEnter_TunnelBridge() sets TRACK_BIT_WORMHOLE when the vehicle + /* VehicleEnterTile_TunnelBridge() sets TRACK_BIT_WORMHOLE when the vehicle * is on the last bit of the bridge head (frame == TILE_SIZE - 1). * If we were swapped with such a vehicle, we have set TRACK_BIT_WORMHOLE, * when we shouldn't have. Check if this is the case. */ diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index c7eef51c9c..5101c8c295 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -1031,12 +1031,7 @@ static CommandCost DoClearBridge(TileIndex tile, DoCommandFlags flags) return CommandCost(EXPENSES_CONSTRUCTION, len * base_cost); } -/** - * Remove a tunnel or a bridge from the game. - * @param tile Tile containing one of the endpoints. - * @param flags Command flags. - * @return Succeeded or failed command. - */ +/** @copydoc ClearTileProc */ static CommandCost ClearTile_TunnelBridge(TileIndex tile, DoCommandFlags flags) { if (IsTunnel(tile)) { @@ -1277,11 +1272,12 @@ static void DrawBridgeRoadBits(TileIndex head_tile, int x, int y, int z, int off } /** + * @copydoc DrawTileProc + * * Draws a tunnel of bridge tile. * For tunnels, this is rather simple, as you only need to draw the entrance. * Bridges are a bit more complex. base_offset is where the sprite selection comes into play * and it works a bit like a bitmask.

For bridge heads: - * @param ti TileInfo of the structure to draw *