DEBUG: Add bridge pillar index to debug landinfo print
This commit is contained in:
@@ -103,6 +103,7 @@ BridgePiecePillarFlags GetBridgeTilePillarFlags(TileIndex tile, TileIndex northe
|
||||
struct BridgePieceDebugInfo {
|
||||
BridgePieces piece;
|
||||
BridgePiecePillarFlags pillar_flags;
|
||||
uint pillar_index;
|
||||
};
|
||||
BridgePieceDebugInfo GetBridgePieceDebugInfo(TileIndex tile);
|
||||
|
||||
|
@@ -139,7 +139,7 @@ public:
|
||||
}
|
||||
if (IsBridgeAbove(tile)) {
|
||||
BridgePieceDebugInfo info = GetBridgePieceDebugInfo(tile);
|
||||
DEBUG(misc, LANDINFOD_LEVEL, "bridge above: piece: %u, pillars: %X", info.piece, info.pillar_flags);
|
||||
DEBUG(misc, LANDINFOD_LEVEL, "bridge above: piece: %u, pillars: %X, pillar index: %u", info.piece, info.pillar_flags, info.pillar_index);
|
||||
}
|
||||
DEBUG(misc, LANDINFOD_LEVEL, "type = %#x", _m[tile].type);
|
||||
DEBUG(misc, LANDINFOD_LEVEL, "height = %#x", _m[tile].height);
|
||||
|
@@ -2078,7 +2078,9 @@ BridgePieceDebugInfo GetBridgePieceDebugInfo(TileIndex tile)
|
||||
GetTunnelBridgeLength(tile, rampsouth) + 1
|
||||
);
|
||||
BridgePiecePillarFlags pillar_flags = GetBridgeTilePillarFlags(tile, rampnorth, rampsouth, GetBridgeType(rampnorth), GetTunnelBridgeTransportType(rampnorth));
|
||||
return { piece, pillar_flags };
|
||||
const Axis axis = TileX(rampnorth) == TileX(rampsouth) ? AXIS_Y : AXIS_X;
|
||||
uint pillar_index = piece * 2 + (axis == AXIS_Y ? 1 : 0);
|
||||
return { piece, pillar_flags, pillar_index };
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user