From 7a93e1b35697afd95a7efa764ec577a82a06e563 Mon Sep 17 00:00:00 2001 From: frozensnowy Date: Sun, 1 Feb 2026 22:08:53 +0100 Subject: [PATCH] Refactor: Extract PaintBanner to Paint.Banner.h Part of #25803 --- src/openrct2/libopenrct2.vcxproj | 1 + .../paint/tile_element/Paint.Banner.cpp | 2 +- .../paint/tile_element/Paint.Banner.h | 21 +++++++++++++++++++ .../paint/tile_element/Paint.TileElement.cpp | 1 + .../paint/tile_element/Paint.TileElement.h | 2 -- 5 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 src/openrct2/paint/tile_element/Paint.Banner.h diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index 7fe581db85..a768014a2c 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -394,6 +394,7 @@ + diff --git a/src/openrct2/paint/tile_element/Paint.Banner.cpp b/src/openrct2/paint/tile_element/Paint.Banner.cpp index d5ab51e25b..a97e57e163 100644 --- a/src/openrct2/paint/tile_element/Paint.Banner.cpp +++ b/src/openrct2/paint/tile_element/Paint.Banner.cpp @@ -25,7 +25,7 @@ #include "../../world/Scenery.h" #include "../../world/TileInspector.h" #include "../../world/tile_element/BannerElement.h" -#include "Paint.TileElement.h" +#include "Paint.Banner.h" using namespace OpenRCT2; using namespace OpenRCT2::Drawing; diff --git a/src/openrct2/paint/tile_element/Paint.Banner.h b/src/openrct2/paint/tile_element/Paint.Banner.h new file mode 100644 index 0000000000..f1cbd03be1 --- /dev/null +++ b/src/openrct2/paint/tile_element/Paint.Banner.h @@ -0,0 +1,21 @@ +/***************************************************************************** + * Copyright (c) 2014-2026 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#pragma once + +#include + +struct PaintSession; + +namespace OpenRCT2 +{ + struct BannerElement; +} + +void PaintBanner(PaintSession& session, uint8_t direction, int32_t height, const OpenRCT2::BannerElement& bannerElement); diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.cpp b/src/openrct2/paint/tile_element/Paint.TileElement.cpp index 0faa969944..263f65bf54 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.cpp +++ b/src/openrct2/paint/tile_element/Paint.TileElement.cpp @@ -30,6 +30,7 @@ #include "../Paint.SessionFlags.h" #include "../Paint.h" #include "../VirtualFloor.h" +#include "Paint.Banner.h" #include "Paint.Entrance.h" #include "Paint.LargeScenery.h" #include "Paint.Path.h" diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.h b/src/openrct2/paint/tile_element/Paint.TileElement.h index a6175f78c3..5542852719 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.h +++ b/src/openrct2/paint/tile_element/Paint.TileElement.h @@ -13,7 +13,6 @@ namespace OpenRCT2 { - struct BannerElement; struct PathElement; struct SurfaceElement; } // namespace OpenRCT2 @@ -47,6 +46,5 @@ uint16_t PaintUtilRotateSegments(uint16_t segments, uint8_t rotation); void TileElementPaintSetup(PaintSession& session, const CoordsXY& mapCoords, bool isTrackPiecePreview = false); -void PaintBanner(PaintSession& session, uint8_t direction, int32_t height, const OpenRCT2::BannerElement& bannerElement); void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, const OpenRCT2::SurfaceElement& tileElement); bool PaintShouldShowHeightMarkers(const PaintSession& session, uint32_t viewportFlag);