mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 23:04:36 +01:00
dodgems and flying saucers
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../../interface/Viewport.h"
|
||||
#include "../../object/StationObject.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.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]);
|
||||
|
||||
uint32_t imageId = SPR_DODGEMS_FLOOR | session->TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 1, 1, height });
|
||||
|
||||
StationObject* stationObject = nullptr;
|
||||
if (ride != nullptr)
|
||||
{
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_SUPPORTS], height,
|
||||
dodgems_fence_sprites, session->CurrentRotation);
|
||||
}
|
||||
stationObject = ride_get_station_object(ride);
|
||||
|
||||
switch (direction)
|
||||
if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS))
|
||||
{
|
||||
case 2:
|
||||
trackSequence = 15 - trackSequence;
|
||||
[[fallthrough]];
|
||||
case 0:
|
||||
if ((trackSequence / 4) & 1)
|
||||
{
|
||||
paint_dodgems_roof(session, height + 30, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
paint_dodgems_roof(session, height + 30, 2);
|
||||
}
|
||||
break;
|
||||
uint32_t imageId = SPR_DODGEMS_FLOOR | session->TrackColours[SCHEME_SUPPORTS];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 1, 1, height });
|
||||
|
||||
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;
|
||||
if (ride != nullptr)
|
||||
{
|
||||
track_paint_util_paint_fences(
|
||||
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_SUPPORTS], height,
|
||||
dodgems_fence_sprites, session->CurrentRotation);
|
||||
}
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case 2:
|
||||
trackSequence = 15 - trackSequence;
|
||||
[[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:
|
||||
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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../../interface/Viewport.h"
|
||||
#include "../../object/StationObject.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.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]);
|
||||
|
||||
uint32_t imageId = SPR_FLYING_SAUCERS_FLOOR | session->TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 1, 1, height });
|
||||
StationObject* stationObject = nullptr;
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user