tower rides and slide

This commit is contained in:
spacek531 2021-08-30 23:32:57 -07:00
parent 5d2c9d8be4
commit c8bed6fa87
6 changed files with 58 additions and 15 deletions

View File

@ -119,6 +119,20 @@ const uint32_t floorSpritesCork[] = {
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[] = {
SPR_FENCE_ROPE_NE,
SPR_FENCE_ROPE_SE,
@ -126,6 +140,14 @@ const uint32_t fenceSpritesRope[] = {
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[] = {
SPR_FENCE_METAL_B_NE,
SPR_FENCE_METAL_B_SE,

View File

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

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]);
uint32_t imageId = SPR_FLOOR_METAL_B | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height });
StationObject* stationObject = nullptr;
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)
{
@ -106,7 +110,7 @@ static void paint_observation_tower_base(
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 });
imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];

View File

@ -12,6 +12,7 @@
#include "../../paint/Supports.h"
#include "../Track.h"
#include "../TrackPaint.h"
#include "../../object/StationObject.h"
enum
{
@ -201,8 +202,16 @@ static void paint_spiral_slide(
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC]);
// Base
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 });
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 = ((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)
{

View File

@ -24,9 +24,6 @@ enum
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
@ -96,19 +93,23 @@ static void paint_launched_freefall_base(
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC]);
uint32_t imageId = SPR_FLOOR_METAL | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height });
StationObject* stationObject = nullptr;
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)
{
track_paint_util_paint_fences(
session, edges, session->MapPosition, trackElement, ride, session->TrackColours[SCHEME_TRACK], height,
launched_freefall_fence_sprites, session->CurrentRotation);
fenceSpritesMetal, session->CurrentRotation);
}
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 });
height += 32;

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]);
uint32_t imageId = SPR_FLOOR_METAL_B | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height });
StationObject* stationObject = nullptr;
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)
{
@ -118,7 +122,7 @@ static void paint_roto_drop_base(
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];
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 });