Skip to content

Commit

Permalink
Use kDefaultGeneralSupportHeight throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
Gymnasiast committed May 15, 2024
1 parent 2f68c7e commit 288575c
Show file tree
Hide file tree
Showing 57 changed files with 2,630 additions and 2,560 deletions.
1 change: 1 addition & 0 deletions src/openrct2/libopenrct2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@
<ClInclude Include="paint\tile_element\Paint.TileElement.h" />
<ClInclude Include="paint\tile_element\Segment.h" />
<ClInclude Include="paint\track\Segment.h" />
<ClInclude Include="paint\track\Support.h" />
<ClInclude Include="paint\VirtualFloor.h" />
<ClInclude Include="ParkImporter.h" />
<ClInclude Include="park\Legacy.h" />
Expand Down
14 changes: 14 additions & 0 deletions src/openrct2/paint/track/Support.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*****************************************************************************
* Copyright (c) 2014-2024 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 "../support/MetalSupports.h"

constexpr int8_t kDefaultGeneralSupportHeight = 32;
21 changes: 11 additions & 10 deletions src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "../../paint/tile_element/Paint.TileElement.h"
#include "../../paint/tile_element/Segment.h"
#include "../../paint/track/Segment.h"
#include "../../paint/track/Support.h"
#include "../../sprites.h"
#include "../../world/Map.h"
#include "../RideData.h"
Expand Down Expand Up @@ -189,7 +190,7 @@ static void AirPoweredVerticalRCTrackFlat(
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
PaintUtilSetGeneralSupportHeight(session, height + 32);
PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight);
}

static void AirPoweredVerticalRCTrackStation(
Expand Down Expand Up @@ -218,7 +219,7 @@ static void AirPoweredVerticalRCTrackStation(
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
PaintUtilSetGeneralSupportHeight(session, height + 32);
PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight);
}

static void AirPoweredVerticalRCTrackRightQuarterTurn5(
Expand Down Expand Up @@ -315,7 +316,7 @@ static void AirPoweredVerticalRCTrackRightQuarterTurn5(
break;
}

PaintUtilSetGeneralSupportHeight(session, height + 32);
PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight);
}

static void AirPoweredVerticalRCTrackLeftQuarterTurn5(
Expand Down Expand Up @@ -353,7 +354,7 @@ static void AirPoweredVerticalRCTrackFlatToLeftBank(
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
PaintUtilSetGeneralSupportHeight(session, height + 32);
PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight);
}

/** rct2: 0x008AFB84 */
Expand Down Expand Up @@ -383,7 +384,7 @@ static void AirPoweredVerticalRCTrackFlatToRightBank(
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
PaintUtilSetGeneralSupportHeight(session, height + 32);
PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight);
}

static void AirPoweredVerticalRCTrackLeftBankToFlat(
Expand Down Expand Up @@ -507,7 +508,7 @@ static void AirPoweredVerticalRCTrackBankedRightQuarterTurn5(
break;
}

PaintUtilSetGeneralSupportHeight(session, height + 32);
PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight);
}

static void AirPoweredVerticalRCTrackBankedLeftQuarterTurn5(
Expand Down Expand Up @@ -546,7 +547,7 @@ static void AirPoweredVerticalRCTrackLeftBank(
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
PaintUtilSetGeneralSupportHeight(session, height + 32);
PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight);
}

static void AirPoweredVerticalRCTrackRightBank(
Expand Down Expand Up @@ -576,7 +577,7 @@ static void AirPoweredVerticalRCTrackBrakes(
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
PaintUtilSetGeneralSupportHeight(session, height + 32);
PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight);
}

static void AirPoweredVerticalRCTrackVerticalSlopeUp(
Expand Down Expand Up @@ -987,7 +988,7 @@ static void AirPoweredVerticalRCTrackBooster(
WoodenASupportsPaintSetupRotated(
session, kSupportType, WoodenSupportSubType::NeSw, direction, height, session.SupportColours);
PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
PaintUtilSetGeneralSupportHeight(session, height + 32);
PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight);
}

static void AirPoweredVerticalRCTrackOnridePhoto(
Expand All @@ -1011,7 +1012,7 @@ static void AirPoweredVerticalRCTrackOnridePhoto(
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
PaintUtilSetGeneralSupportHeight(session, height + 32);
PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight);
}

TRACK_PAINT_FUNCTION GetTrackPaintFunctionAirPoweredVerticalRC(int32_t trackType)
Expand Down

0 comments on commit 288575c

Please sign in to comment.