Merge pull request #15317 from spacek531/more-no-platform

even fewer platforms
This commit is contained in:
Michael Steenbeek 2021-09-05 13:40:46 +02:00 committed by GitHub
commit e62fabf607
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 244 additions and 153 deletions

View File

@ -119,6 +119,20 @@ const uint32_t floorSpritesCork[] = {
SPR_FLOOR_CORK SPR_FLOOR_CORK
}; };
const uint32_t floorSpritesMetal[] = {
SPR_FLOOR_METAL,
SPR_FLOOR_METAL,
SPR_FLOOR_METAL,
SPR_FLOOR_METAL
};
const uint32_t floorSpritesMetalB[] = {
SPR_FLOOR_METAL_B,
SPR_FLOOR_METAL_B,
SPR_FLOOR_METAL_B,
SPR_FLOOR_METAL_B
};
const uint32_t fenceSpritesRope[] = { const uint32_t fenceSpritesRope[] = {
SPR_FENCE_ROPE_NE, SPR_FENCE_ROPE_NE,
SPR_FENCE_ROPE_SE, SPR_FENCE_ROPE_SE,
@ -126,6 +140,14 @@ const uint32_t fenceSpritesRope[] = {
SPR_FENCE_ROPE_NW SPR_FENCE_ROPE_NW
}; };
const uint32_t fenceSpritesMetal[] = {
SPR_FENCE_METAL_NE,
SPR_FENCE_METAL_SE,
SPR_FENCE_METAL_SW,
SPR_FENCE_METAL_NW
};
const uint32_t fenceSpritesMetalB[] = { const uint32_t fenceSpritesMetalB[] = {
SPR_FENCE_METAL_B_NE, SPR_FENCE_METAL_B_NE,
SPR_FENCE_METAL_B_SE, SPR_FENCE_METAL_B_SE,

View File

@ -240,8 +240,11 @@ enum
}; };
extern const uint32_t floorSpritesCork[]; extern const uint32_t floorSpritesCork[];
extern const uint32_t floorSpritesMetal[];
extern const uint32_t floorSpritesMetalB[];
extern const uint32_t fenceSpritesRope[]; extern const uint32_t fenceSpritesRope[];
extern const uint32_t fenceSpritesMetal[];
extern const uint32_t fenceSpritesMetalB[]; extern const uint32_t fenceSpritesMetalB[];
extern const uint32_t trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles[4][3]; extern const uint32_t trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles[4][3];

View File

@ -8,6 +8,7 @@
*****************************************************************************/ *****************************************************************************/
#include "../../interface/Viewport.h" #include "../../interface/Viewport.h"
#include "../../object/StationObject.h"
#include "../../paint/Paint.h" #include "../../paint/Paint.h"
#include "../../paint/Supports.h" #include "../../paint/Supports.h"
#include "../../util/Util.h" #include "../../util/Util.h"
@ -47,45 +48,52 @@ static void paint_dodgems(
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]); wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]);
uint32_t imageId = SPR_DODGEMS_FLOOR | session->TrackColours[SCHEME_SUPPORTS]; StationObject* stationObject = nullptr;
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 1, 1, height });
if (ride != nullptr) if (ride != nullptr)
{ stationObject = ride_get_station_object(ride);
track_paint_util_paint_fences(
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_SUPPORTS], height,
dodgems_fence_sprites, session->CurrentRotation);
}
switch (direction) if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
{ {
case 2: uint32_t imageId = SPR_DODGEMS_FLOOR | session->TrackColours[SCHEME_SUPPORTS];
trackSequence = 15 - trackSequence; PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 1, 1, height });
[[fallthrough]];
case 0:
if ((trackSequence / 4) & 1)
{
paint_dodgems_roof(session, height + 30, 0);
}
else
{
paint_dodgems_roof(session, height + 30, 2);
}
break;
case 3: if (ride != nullptr)
trackSequence = 15 - trackSequence; {
[[fallthrough]]; track_paint_util_paint_fences(
case 1: session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_SUPPORTS], height,
if ((trackSequence / 4) & 1) dodgems_fence_sprites, session->CurrentRotation);
{ }
paint_dodgems_roof(session, height + 30, 1);
} switch (direction)
else {
{ case 2:
paint_dodgems_roof(session, height + 30, 3); trackSequence = 15 - trackSequence;
} [[fallthrough]];
break; case 0:
if ((trackSequence / 4) & 1)
{
paint_dodgems_roof(session, height + 30, 0);
}
else
{
paint_dodgems_roof(session, height + 30, 2);
}
break;
case 3:
trackSequence = 15 - trackSequence;
[[fallthrough]];
case 1:
if ((trackSequence / 4) & 1)
{
paint_dodgems_roof(session, height + 30, 1);
}
else
{
paint_dodgems_roof(session, height + 30, 3);
}
break;
}
} }
paint_util_set_segment_support_height(session, SEGMENTS_ALL, height + 36, 0x20); paint_util_set_segment_support_height(session, SEGMENTS_ALL, height + 36, 0x20);

View File

@ -8,6 +8,7 @@
*****************************************************************************/ *****************************************************************************/
#include "../../interface/Viewport.h" #include "../../interface/Viewport.h"
#include "../../object/StationObject.h"
#include "../../paint/Paint.h" #include "../../paint/Paint.h"
#include "../../paint/Supports.h" #include "../../paint/Supports.h"
#include "../Track.h" #include "../Track.h"
@ -42,8 +43,15 @@ static void paint_flying_saucers(
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]); wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]);
uint32_t imageId = SPR_FLYING_SAUCERS_FLOOR | session->TrackColours[SCHEME_TRACK]; StationObject* stationObject = nullptr;
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 1, 1, height }); if (ride != nullptr)
stationObject = ride_get_station_object(ride);
if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
{
uint32_t imageId = SPR_FLYING_SAUCERS_FLOOR | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 1, 1, height });
}
if (ride != nullptr) if (ride != nullptr)
{ {

View File

@ -94,8 +94,12 @@ static void paint_observation_tower_base(
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]); wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
uint32_t imageId = SPR_FLOOR_METAL_B | session->TrackColours[SCHEME_SUPPORTS]; StationObject* stationObject = nullptr;
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height }); if (ride != nullptr)
stationObject = ride_get_station_object(ride);
track_paint_util_paint_floor(
session, edges, session->TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetalB, stationObject);
if (ride != nullptr) if (ride != nullptr)
{ {
@ -106,7 +110,7 @@ static void paint_observation_tower_base(
if (trackSequence == 0) if (trackSequence == 0)
{ {
imageId = SPR_OBSERVATION_TOWER_SEGMENT_BASE | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_OBSERVATION_TOWER_SEGMENT_BASE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 }); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 });
imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK]; imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];

View File

@ -8,6 +8,7 @@
*****************************************************************************/ *****************************************************************************/
#include "../../interface/Viewport.h" #include "../../interface/Viewport.h"
#include "../../object/StationObject.h"
#include "../../paint/Paint.h" #include "../../paint/Paint.h"
#include "../../paint/Supports.h" #include "../../paint/Supports.h"
#include "../Track.h" #include "../Track.h"
@ -201,8 +202,16 @@ static void paint_spiral_slide(
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]); wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]);
// Base // Base
uint32_t imageId = ((direction & 1) ? SPIRAL_SLIDE_BASE_B : SPIRAL_SLIDE_BASE_A) | session->TrackColours[SCHEME_SUPPORTS]; StationObject* stationObject = nullptr;
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height }); if (ride != nullptr)
stationObject = ride_get_station_object(ride);
if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
{
uint32_t imageId = ((direction & 1) ? SPIRAL_SLIDE_BASE_B : SPIRAL_SLIDE_BASE_A)
| session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height });
}
if (ride != nullptr) if (ride != nullptr)
{ {

View File

@ -24,9 +24,6 @@ enum
SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT_TOP = 14566, SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT_TOP = 14566,
}; };
static constexpr const uint32_t launched_freefall_fence_sprites[] = { SPR_FENCE_METAL_NE, SPR_FENCE_METAL_SE,
SPR_FENCE_METAL_SW, SPR_FENCE_METAL_NW };
/** /**
* *
* rct2: 0x006D5FAB * rct2: 0x006D5FAB
@ -96,19 +93,23 @@ static void paint_launched_freefall_base(
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]); wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
uint32_t imageId = SPR_FLOOR_METAL | session->TrackColours[SCHEME_SUPPORTS]; StationObject* stationObject = nullptr;
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height }); if (ride != nullptr)
stationObject = ride_get_station_object(ride);
track_paint_util_paint_floor(
session, edges, session->TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetal, stationObject);
if (ride != nullptr) if (ride != nullptr)
{ {
track_paint_util_paint_fences( track_paint_util_paint_fences(
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_TRACK], height, session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_TRACK], height,
launched_freefall_fence_sprites, session->CurrentRotation); fenceSpritesMetal, session->CurrentRotation);
} }
if (trackSequence == 0) if (trackSequence == 0)
{ {
imageId = SPR_LAUNCHED_FREEFALL_TOWER_BASE | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_LAUNCHED_FREEFALL_TOWER_BASE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 }); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 });
height += 32; height += 32;

View File

@ -8,6 +8,7 @@
*****************************************************************************/ *****************************************************************************/
#include "../../interface/Viewport.h" #include "../../interface/Viewport.h"
#include "../../object/StationObject.h"
#include "../../paint/Paint.h" #include "../../paint/Paint.h"
#include "../../paint/Supports.h" #include "../../paint/Supports.h"
#include "../../world/Entity.h" #include "../../world/Entity.h"
@ -237,9 +238,15 @@ static void paint_magic_carpet(
metal_a_supports_paint_setup( metal_a_supports_paint_setup(
session, METAL_SUPPORTS_TUBES, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]); session, METAL_SUPPORTS_TUBES, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
} }
StationObject* stationObject = nullptr;
if (ride != nullptr)
stationObject = ride_get_station_object(ride);
uint32_t imageId = SPR_STATION_BASE_D | session->TrackColours[SCHEME_SUPPORTS]; if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); {
uint32_t imageId = SPR_STATION_BASE_D | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
}
break; break;
} }

View File

@ -106,8 +106,12 @@ static void paint_roto_drop_base(
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]); wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
uint32_t imageId = SPR_FLOOR_METAL_B | session->TrackColours[SCHEME_SUPPORTS]; StationObject* stationObject = nullptr;
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height }); if (ride != nullptr)
stationObject = ride_get_station_object(ride);
track_paint_util_paint_floor(
session, edges, session->TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetalB, stationObject);
if (ride != nullptr) if (ride != nullptr)
{ {
@ -118,7 +122,7 @@ static void paint_roto_drop_base(
if (trackSequence == 0) if (trackSequence == 0)
{ {
imageId = (direction & 1 ? SPR_ROTO_DROP_TOWER_BASE_90_DEG : SPR_ROTO_DROP_TOWER_BASE) uint32_t imageId = (direction & 1 ? SPR_ROTO_DROP_TOWER_BASE_90_DEG : SPR_ROTO_DROP_TOWER_BASE)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 }); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 });

View File

@ -8,6 +8,7 @@
*****************************************************************************/ *****************************************************************************/
#include "../../interface/Viewport.h" #include "../../interface/Viewport.h"
#include "../../object/StationObject.h"
#include "../../paint/Paint.h" #include "../../paint/Paint.h"
#include "../../paint/Supports.h" #include "../../paint/Supports.h"
#include "../../world/Entity.h" #include "../../world/Entity.h"
@ -129,6 +130,10 @@ static void paint_swinging_inverter_ship(
uint8_t relativeTrackSequence = track_map_1x4[direction][trackSequence]; uint8_t relativeTrackSequence = track_map_1x4[direction][trackSequence];
uint32_t imageId; uint32_t imageId;
StationObject* stationObject = nullptr;
if (ride != nullptr)
stationObject = ride_get_station_object(ride);
if (relativeTrackSequence != 1 && relativeTrackSequence != 3) if (relativeTrackSequence != 1 && relativeTrackSequence != 3)
{ {
if (direction & 1) if (direction & 1)
@ -142,27 +147,30 @@ static void paint_swinging_inverter_ship(
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
} }
imageId = SPR_STATION_BASE_D | session->TrackColours[SCHEME_SUPPORTS]; if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
switch (direction)
{ {
case 0: imageId = SPR_STATION_BASE_D | session->TrackColours[SCHEME_SUPPORTS];
imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_TRACK]; PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
PaintAddImageAsParent(session, imageId, { 0, 24, height + 9 }, { 32, 8, 1 });
break; switch (direction)
case 1: {
imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_TRACK]; case 0:
PaintAddImageAsParent(session, imageId, { 24, 0, height + 9 }, { 8, 32, 1 }); imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_TRACK];
break; PaintAddImageAsParent(session, imageId, { 0, 24, height + 9 }, { 32, 8, 1 });
case 2: break;
imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_TRACK]; case 1:
PaintAddImageAsChild(session, imageId, 0, 0, 32, 8, 1, height + 9, -2, 0, height); imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_TRACK];
break; PaintAddImageAsParent(session, imageId, { 24, 0, height + 9 }, { 8, 32, 1 });
case 3: break;
imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_TRACK]; case 2:
PaintAddImageAsChild(session, imageId, 0, 0, 8, 32, 1, height + 9, 0, -2, height); imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_TRACK];
break; PaintAddImageAsChild(session, imageId, 0, 0, 32, 8, 1, height + 9, -2, 0, height);
break;
case 3:
imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, 0, 0, 8, 32, 1, height + 9, 0, -2, height);
break;
}
} }
} }

View File

@ -8,6 +8,7 @@
*****************************************************************************/ *****************************************************************************/
#include "../../interface/Viewport.h" #include "../../interface/Viewport.h"
#include "../../object/StationObject.h"
#include "../../paint/Paint.h" #include "../../paint/Paint.h"
#include "../../paint/Supports.h" #include "../../paint/Supports.h"
#include "../../world/Entity.h" #include "../../world/Entity.h"
@ -184,6 +185,10 @@ static void paint_swinging_ship(
uint32_t imageId; uint32_t imageId;
bool hasFence; bool hasFence;
StationObject* stationObject = nullptr;
if (ride != nullptr)
stationObject = ride_get_station_object(ride);
if (relativeTrackSequence == 1 || relativeTrackSequence == 4) if (relativeTrackSequence == 1 || relativeTrackSequence == 4)
{ {
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]); wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
@ -193,111 +198,123 @@ static void paint_swinging_ship(
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session->TrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
imageId = SPR_STATION_BASE_A_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); {
imageId = SPR_STATION_BASE_A_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
}
} }
else else
{ {
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
imageId = SPR_STATION_BASE_A_SW_NE | session->TrackColours[SCHEME_SUPPORTS]; if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); {
imageId = SPR_STATION_BASE_A_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
}
} }
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0); paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
if (direction & 1) if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
{ {
if (relativeTrackSequence != 1 && relativeTrackSequence != 4) if (direction & 1)
{ {
hasFence = track_paint_util_has_fence(EDGE_NE, session->MapPosition, trackElement, ride, session->CurrentRotation); if (relativeTrackSequence != 1 && relativeTrackSequence != 4)
if (relativeTrackSequence == 2)
{ {
imageId = (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_NW_SE : SPR_STATION_PLATFORM_BEGIN_NW_SE) hasFence = track_paint_util_has_fence(
| session->TrackColours[SCHEME_TRACK]; EDGE_NE, session->MapPosition, trackElement, ride, session->CurrentRotation);
} if (relativeTrackSequence == 2)
else
{
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE)
| session->TrackColours[SCHEME_TRACK];
}
PaintAddImageAsChild(session, imageId, 0, 0, 8, 32, 1, height + 9, 0, -2, height + 9);
imageId = (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_NW_SE : SPR_STATION_PLATFORM_NW_SE)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 24, 0, height + 9 }, { 8, 32, 1 });
hasFence = track_paint_util_has_fence(EDGE_SW, session->MapPosition, trackElement, ride, session->CurrentRotation);
if (relativeTrackSequence == 3)
{
if (hasFence)
{ {
imageId = SPR_STATION_BEGIN_ANGLE_FENCE_NW_SE | session->TrackColours[SCHEME_TRACK]; imageId = (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_NW_SE : SPR_STATION_PLATFORM_BEGIN_NW_SE)
| session->TrackColours[SCHEME_TRACK];
}
else
{
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE)
| session->TrackColours[SCHEME_TRACK];
}
PaintAddImageAsChild(session, imageId, 0, 0, 8, 32, 1, height + 9, 0, -2, height + 9);
imageId = (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_NW_SE : SPR_STATION_PLATFORM_NW_SE)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 24, 0, height + 9 }, { 8, 32, 1 });
hasFence = track_paint_util_has_fence(
EDGE_SW, session->MapPosition, trackElement, ride, session->CurrentRotation);
if (relativeTrackSequence == 3)
{
if (hasFence)
{
imageId = SPR_STATION_BEGIN_ANGLE_FENCE_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 32, 7 });
}
else
{
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 23, 31, height + 11 }, { 8, 1, 7 });
}
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 8, 1, 7 });
}
else if (hasFence)
{
imageId = SPR_STATION_FENCE_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 32, 7 }); PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 32, 7 });
} }
else
{
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 23, 31, height + 11 }, { 8, 1, 7 });
}
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 8, 1, 7 });
}
else if (hasFence)
{
imageId = SPR_STATION_FENCE_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 32, 7 });
} }
} }
} else
else
{
if (relativeTrackSequence != 1 && relativeTrackSequence != 4)
{ {
hasFence = track_paint_util_has_fence(EDGE_NW, session->MapPosition, trackElement, ride, session->CurrentRotation); if (relativeTrackSequence != 1 && relativeTrackSequence != 4)
if (relativeTrackSequence == 2)
{ {
imageId = (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_SW_NE : SPR_STATION_PLATFORM_BEGIN_SW_NE) hasFence = track_paint_util_has_fence(
| session->TrackColours[SCHEME_TRACK]; EDGE_NW, session->MapPosition, trackElement, ride, session->CurrentRotation);
} if (relativeTrackSequence == 2)
else
{
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE)
| session->TrackColours[SCHEME_TRACK];
}
PaintAddImageAsChild(session, imageId, 0, 0, 32, 8, 1, height + 9, -2, 0, height + 9);
imageId = (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_SW_NE : SPR_STATION_PLATFORM_SW_NE)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 0, 24, height + 9 }, { 32, 8, 1 });
hasFence = track_paint_util_has_fence(EDGE_SE, session->MapPosition, trackElement, ride, session->CurrentRotation);
if (relativeTrackSequence == 3)
{
if (hasFence)
{ {
imageId = SPR_STATION_BEGIN_ANGLE_FENCE_SW_NE | session->TrackColours[SCHEME_TRACK]; imageId = (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_SW_NE : SPR_STATION_PLATFORM_BEGIN_SW_NE)
| session->TrackColours[SCHEME_TRACK];
}
else
{
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE)
| session->TrackColours[SCHEME_TRACK];
}
PaintAddImageAsChild(session, imageId, 0, 0, 32, 8, 1, height + 9, -2, 0, height + 9);
imageId = (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_SW_NE : SPR_STATION_PLATFORM_SW_NE)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 0, 24, height + 9 }, { 32, 8, 1 });
hasFence = track_paint_util_has_fence(
EDGE_SE, session->MapPosition, trackElement, ride, session->CurrentRotation);
if (relativeTrackSequence == 3)
{
if (hasFence)
{
imageId = SPR_STATION_BEGIN_ANGLE_FENCE_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 32, 1, 7 });
}
else
{
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 31, 23, height + 11 }, { 1, 8, 7 });
}
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 8, 7 });
}
else if (hasFence)
{
imageId = SPR_STATION_FENCE_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 32, 1, 7 }); PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 32, 1, 7 });
} }
else
{
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 31, 23, height + 11 }, { 1, 8, 7 });
}
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 8, 7 });
}
else if (hasFence)
{
imageId = SPR_STATION_FENCE_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 32, 1, 7 });
} }
} }
} }
switch (relativeTrackSequence) switch (relativeTrackSequence)
{ {
case 1: case 1: