diff --git a/src/openrct2/drawing/LightFX.cpp b/src/openrct2/drawing/LightFX.cpp index 608946cdd1..390ffbc342 100644 --- a/src/openrct2/drawing/LightFX.cpp +++ b/src/openrct2/drawing/LightFX.cpp @@ -18,6 +18,7 @@ #include "../interface/Window_internal.h" #include "../paint/Paint.h" #include "../ride/Ride.h" +#include "../ride/RideData.h" #include "../ride/Vehicle.h" #include "../util/Util.h" #include "../world/Climate.h" @@ -697,106 +698,98 @@ uint32_t lightfx_get_light_polution() return _lightPolution_front; } -void lightfx_add_lights_magic_vehicle(const Vehicle* vehicle) +static constexpr const int16_t offsetLookup[] = { + 10, 10, 9, 8, 7, 6, 4, 2, 0, -2, -4, -6, -7, -8, -9, -10, -10, -10, -9, -8, -7, -6, -4, -2, 0, 2, 4, 6, 7, 8, 9, 10, +}; +void LightFxAddLightsMagicVehicle_ObservationTower(const Vehicle* vehicle) { - static constexpr const int16_t offsetLookup[] = { - 10, 10, 9, 8, 7, 6, 4, 2, 0, -2, -4, -6, -7, -8, -9, -10, -10, -10, -9, -8, -7, -6, -4, -2, 0, 2, 4, 6, 7, 8, 9, 10, - }; + LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y + 16, vehicle->z }, LightType::Spot3); + LightfxAdd3DLight(*vehicle, 1, { vehicle->x + 16, vehicle->y, vehicle->z }, LightType::Spot3); + LightfxAdd3DLight(*vehicle, 2, { vehicle->x - 16, vehicle->y, vehicle->z }, LightType::Spot3); + LightfxAdd3DLight(*vehicle, 3, { vehicle->x, vehicle->y - 16, vehicle->z }, LightType::Spot3); +} +void LightFxAddLightsMagicVehicle_MineTrainCoaster(const Vehicle* vehicle) +{ + if (vehicle == vehicle->TrainHead()) + { + int16_t place_x = vehicle->x - offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; + int16_t place_y = vehicle->y - offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; + LightfxAdd3DLight(*vehicle, 0, { place_x, place_y, vehicle->z }, LightType::Spot3); + } +} + +void LightFxAddLightsMagicVehicle_ChairLift(const Vehicle* vehicle) +{ + LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z - 16 }, LightType::Lantern2); +} +void LightFxAddLightsMagicVehicle_BoatHire(const Vehicle* vehicle) +{ + Vehicle* vehicle_draw = vehicle->TrainHead(); + auto* nextVeh = GetEntity(vehicle_draw->next_vehicle_on_train); + if (nextVeh != nullptr) + { + vehicle_draw = nextVeh; + } + int16_t place_x = vehicle_draw->x; + int16_t place_y = vehicle_draw->y; + place_x -= offsetLookup[(vehicle_draw->sprite_direction + 0) % 32]; + place_y -= offsetLookup[(vehicle_draw->sprite_direction + 8) % 32]; + LightfxAdd3DLight(*vehicle, 0, { place_x, place_y, vehicle_draw->z }, LightType::Spot2); + place_x -= offsetLookup[(vehicle_draw->sprite_direction + 0) % 32]; + place_y -= offsetLookup[(vehicle_draw->sprite_direction + 8) % 32]; + LightfxAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle_draw->z }, LightType::Spot2); +} +void LightFxAddLightsMagicVehicle_Monorail(const Vehicle* vehicle) +{ + LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z + 12 }, LightType::Spot2); + int16_t place_x = vehicle->x; + int16_t place_y = vehicle->y; + if (vehicle == vehicle->TrainHead()) + { + place_x -= offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; + place_y -= offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; + LightfxAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); + place_x -= offsetLookup[(vehicle->sprite_direction + 0) % 32] * 3; + place_y -= offsetLookup[(vehicle->sprite_direction + 8) % 32] * 3; + LightfxAdd3DLight(*vehicle, 2, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); + } + if (vehicle == vehicle->TrainTail()) + { + place_x += offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; + place_y += offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; + LightfxAdd3DLight(*vehicle, 3, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); + place_x += offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; + place_y += offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; + LightfxAdd3DLight(*vehicle, 4, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); + } +} +void LightFxAddLightsMagicVehicle_MiniatureRailway(const Vehicle* vehicle) +{ + if (vehicle == vehicle->TrainHead()) + { + int16_t place_x = vehicle->x - offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; + int16_t place_y = vehicle->y - offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; + LightfxAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); + place_x -= offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; + place_y -= offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; + LightfxAdd3DLight(*vehicle, 2, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); + } + else + { + LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z + 10 }, LightType::Lantern3); + } +} + +void LightfxAddLightsMagicVehicle(const Vehicle* vehicle) +{ auto ride = vehicle->GetRide(); if (ride == nullptr) return; - switch (ride->type) - { - case RIDE_TYPE_OBSERVATION_TOWER: - LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y + 16, vehicle->z }, LightType::Spot3); - LightfxAdd3DLight(*vehicle, 1, { vehicle->x + 16, vehicle->y, vehicle->z }, LightType::Spot3); - LightfxAdd3DLight(*vehicle, 2, { vehicle->x - 16, vehicle->y, vehicle->z }, LightType::Spot3); - LightfxAdd3DLight(*vehicle, 3, { vehicle->x, vehicle->y - 16, vehicle->z }, LightType::Spot3); - break; - case RIDE_TYPE_MINE_TRAIN_COASTER: - case RIDE_TYPE_GHOST_TRAIN: - if (vehicle == vehicle->TrainHead()) - { - int16_t place_x = vehicle->x - offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; - int16_t place_y = vehicle->y - offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 0, { place_x, place_y, vehicle->z }, LightType::Spot3); - } - break; - case RIDE_TYPE_CHAIRLIFT: - LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z - 16 }, LightType::Lantern2); - break; - case RIDE_TYPE_BOAT_HIRE: - case RIDE_TYPE_CAR_RIDE: - case RIDE_TYPE_MONSTER_TRUCKS: - case RIDE_TYPE_GO_KARTS: - case RIDE_TYPE_DODGEMS: - case RIDE_TYPE_MINI_HELICOPTERS: - case RIDE_TYPE_MONORAIL_CYCLES: - case RIDE_TYPE_SUBMARINE_RIDE: - case RIDE_TYPE_SPLASH_BOATS: - case RIDE_TYPE_WATER_COASTER: - { - Vehicle* vehicle_draw = vehicle->TrainHead(); - auto* nextVeh = GetEntity(vehicle_draw->next_vehicle_on_train); - if (nextVeh != nullptr) - { - vehicle_draw = nextVeh; - } - int16_t place_x = vehicle_draw->x; - int16_t place_y = vehicle_draw->y; - place_x -= offsetLookup[(vehicle_draw->sprite_direction + 0) % 32]; - place_y -= offsetLookup[(vehicle_draw->sprite_direction + 8) % 32]; - LightfxAdd3DLight(*vehicle, 0, { place_x, place_y, vehicle_draw->z }, LightType::Spot2); - place_x -= offsetLookup[(vehicle_draw->sprite_direction + 0) % 32]; - place_y -= offsetLookup[(vehicle_draw->sprite_direction + 8) % 32]; - LightfxAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle_draw->z }, LightType::Spot2); - break; - } - case RIDE_TYPE_MONORAIL: - { - LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z + 12 }, LightType::Spot2); - int16_t place_x = vehicle->x; - int16_t place_y = vehicle->y; - if (vehicle == vehicle->TrainHead()) - { - place_x -= offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; - place_y -= offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); - place_x -= offsetLookup[(vehicle->sprite_direction + 0) % 32] * 3; - place_y -= offsetLookup[(vehicle->sprite_direction + 8) % 32] * 3; - LightfxAdd3DLight(*vehicle, 2, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); - } - if (vehicle == vehicle->TrainTail()) - { - place_x += offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; - place_y += offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 3, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); - place_x += offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; - place_y += offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 4, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); - } - break; - } - case RIDE_TYPE_MINIATURE_RAILWAY: - if (vehicle == vehicle->TrainHead()) - { - int16_t place_x = vehicle->x - offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; - int16_t place_y = vehicle->y - offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); - place_x -= offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; - place_y -= offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 2, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); - } - else - { - LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z + 10 }, LightType::Lantern3); - } - break; - default: - break; - }; + const auto& rtd = GetRideTypeDescriptor(ride->type); + if (rtd.LightFXAddLightsMagicVehicle != nullptr) + rtd.LightFXAddLightsMagicVehicle(vehicle); } void LightFxAddKioskLights(const CoordsXY& mapPosition, const int32_t height, const uint8_t zOffset) diff --git a/src/openrct2/drawing/LightFX.h b/src/openrct2/drawing/LightFX.h index 5c213760cc..aa1c292479 100644 --- a/src/openrct2/drawing/LightFX.h +++ b/src/openrct2/drawing/LightFX.h @@ -63,7 +63,13 @@ void LightfxAdd3DLight(const EntityBase& entity, const uint8_t id, const CoordsX void lightfx_add_3d_light_magic_from_drawing_tile( const CoordsXY& mapPosition, int16_t offsetX, int16_t offsetY, int16_t offsetZ, LightType lightType); -void lightfx_add_lights_magic_vehicle(const Vehicle* vehicle); +void LightfxAddLightsMagicVehicle(const Vehicle* vehicle); +void LightFxAddLightsMagicVehicle_ObservationTower(const Vehicle* vehicle); +void LightFxAddLightsMagicVehicle_MineTrainCoaster(const Vehicle* vehicle); +void LightFxAddLightsMagicVehicle_ChairLift(const Vehicle* vehicle); +void LightFxAddLightsMagicVehicle_BoatHire(const Vehicle* vehicle); +void LightFxAddLightsMagicVehicle_Monorail(const Vehicle* vehicle); +void LightFxAddLightsMagicVehicle_MiniatureRailway(const Vehicle* vehicle); void LightFxAddKioskLights(const CoordsXY& mapPosition, const int32_t height, const uint8_t zOffset); void LightFxAddShopLights(const CoordsXY& mapPosition, const uint8_t direction, const int32_t height, const uint8_t zOffset); diff --git a/src/openrct2/paint/Paint.Entity.cpp b/src/openrct2/paint/Paint.Entity.cpp index b6d5f23916..955ccd0fab 100644 --- a/src/openrct2/paint/Paint.Entity.cpp +++ b/src/openrct2/paint/Paint.Entity.cpp @@ -119,7 +119,7 @@ void EntityPaintSetup(paint_session& session, const CoordsXY& pos) spr->As()->Paint(session, image_direction); if (lightfx_for_vehicles_is_available()) { - lightfx_add_lights_magic_vehicle(spr->As()); + LightfxAddLightsMagicVehicle(spr->As()); } break; case EntityType::Guest: diff --git a/src/openrct2/ride/RideData.h b/src/openrct2/ride/RideData.h index af8db7801e..9085274e38 100644 --- a/src/openrct2/ride/RideData.h +++ b/src/openrct2/ride/RideData.h @@ -156,6 +156,8 @@ using RideTrackGroup = OpenRCT2::BitSet; using RideMusicUpdateFunction = void (*)(Ride*); using PeepUpdateRideLeaveEntranceFunc = void (*)(Guest*, Ride*, CoordsXYZD&); using StartRideMusicFunction = void (*)(const OpenRCT2::RideAudio::ViewportRideMusicInstance&); +using LightFXAddLightsMagicVehicleFunction = void (*)(const Vehicle* vehicle); + struct RideTypeDescriptor { uint8_t AlternateType; @@ -203,6 +205,8 @@ struct RideTypeDescriptor // json name lookup std::string_view Name; + + LightFXAddLightsMagicVehicleFunction LightFXAddLightsMagicVehicle = nullptr; StartRideMusicFunction StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel; TrackDesignCreateMode DesignCreateMode = TrackDesignCreateMode::Default; @@ -403,6 +407,7 @@ constexpr const RideTypeDescriptor DummyRTD = SET_FIELD(ColourPreview, { static_cast(SPR_NONE), static_cast(SPR_NONE) }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "invalid"), + SET_FIELD(LightFXAddLightsMagicVehicle, nullptr), SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::DefaultStartRideMusicChannel), SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default), SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate), diff --git a/src/openrct2/ride/coaster/meta/HybridCoaster.h b/src/openrct2/ride/coaster/meta/HybridCoaster.h index 87b3d177a9..e37f6b73ec 100644 --- a/src/openrct2/ride/coaster/meta/HybridCoaster.h +++ b/src/openrct2/ride/coaster/meta/HybridCoaster.h @@ -51,6 +51,5 @@ constexpr const RideTypeDescriptor HybridCoasterRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_HYBRID_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_HYBRID_COASTER_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "hybrid_rc"), - SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::DefaultStartRideMusicChannel), }; // clang-format on diff --git a/src/openrct2/ride/coaster/meta/MineTrainCoaster.h b/src/openrct2/ride/coaster/meta/MineTrainCoaster.h index b4ac0c2b94..f4c951de28 100644 --- a/src/openrct2/ride/coaster/meta/MineTrainCoaster.h +++ b/src/openrct2/ride/coaster/meta/MineTrainCoaster.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -52,5 +53,6 @@ constexpr const RideTypeDescriptor MineTrainCoasterRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_MINE_TRAIN_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_MINE_TRAIN_COASTER_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "mine_train_rc"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_MineTrainCoaster), }; // clang-format on diff --git a/src/openrct2/ride/coaster/meta/WaterCoaster.h b/src/openrct2/ride/coaster/meta/WaterCoaster.h index ee6415a29e..f7794b4271 100644 --- a/src/openrct2/ride/coaster/meta/WaterCoaster.h +++ b/src/openrct2/ride/coaster/meta/WaterCoaster.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -53,5 +54,6 @@ constexpr const RideTypeDescriptor WaterCoasterRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_WATER_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_WATER_COASTER_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "water_coaster"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_BoatHire), }; // clang-format on diff --git a/src/openrct2/ride/gentle/meta/CarRide.h b/src/openrct2/ride/gentle/meta/CarRide.h index 48429e59a5..84333d8f5e 100644 --- a/src/openrct2/ride/gentle/meta/CarRide.h +++ b/src/openrct2/ride/gentle/meta/CarRide.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -57,5 +58,6 @@ constexpr const RideTypeDescriptor CarRideRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_CAR_RIDE_TRACK, SPR_RIDE_DESIGN_PREVIEW_CAR_RIDE_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "car_ride"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_BoatHire), }; // clang-format on diff --git a/src/openrct2/ride/gentle/meta/Circus.h b/src/openrct2/ride/gentle/meta/Circus.h index 63d26e440b..ad4e491487 100644 --- a/src/openrct2/ride/gentle/meta/Circus.h +++ b/src/openrct2/ride/gentle/meta/Circus.h @@ -50,6 +50,7 @@ constexpr const RideTypeDescriptor CircusRTD = SET_FIELD(ColourPreview, { 0, 0 }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "circus"), + SET_FIELD(LightFXAddLightsMagicVehicle, nullptr), SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::CircusStartRideMusicChannel), SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default), SET_FIELD(MusicUpdateFunction, CircusMusicUpdate), diff --git a/src/openrct2/ride/gentle/meta/Dodgems.h b/src/openrct2/ride/gentle/meta/Dodgems.h index 71b0e9a718..0120108d02 100644 --- a/src/openrct2/ride/gentle/meta/Dodgems.h +++ b/src/openrct2/ride/gentle/meta/Dodgems.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -54,5 +55,6 @@ constexpr const RideTypeDescriptor DodgemsRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_DODGEMS_TRACK, SPR_RIDE_DESIGN_PREVIEW_DODGEMS_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "dodgems"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_BoatHire), }; // clang-format on diff --git a/src/openrct2/ride/gentle/meta/GhostTrain.h b/src/openrct2/ride/gentle/meta/GhostTrain.h index 0314b9fd24..934843d0ec 100644 --- a/src/openrct2/ride/gentle/meta/GhostTrain.h +++ b/src/openrct2/ride/gentle/meta/GhostTrain.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -58,5 +59,6 @@ constexpr const RideTypeDescriptor GhostTrainRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_GHOST_TRAIN_TRACK, SPR_RIDE_DESIGN_PREVIEW_GHOST_TRAIN_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "ghost_train"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_MineTrainCoaster), }; // clang-format on diff --git a/src/openrct2/ride/gentle/meta/Maze.h b/src/openrct2/ride/gentle/meta/Maze.h index cace50e220..0addb195a0 100644 --- a/src/openrct2/ride/gentle/meta/Maze.h +++ b/src/openrct2/ride/gentle/meta/Maze.h @@ -52,6 +52,7 @@ constexpr const RideTypeDescriptor MazeRTD = SET_FIELD(ColourPreview, { 0, 0 }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "maze"), + SET_FIELD(LightFXAddLightsMagicVehicle, nullptr), SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::DefaultStartRideMusicChannel), SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Maze), SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate), diff --git a/src/openrct2/ride/gentle/meta/MiniHelicopters.h b/src/openrct2/ride/gentle/meta/MiniHelicopters.h index 4051be751b..c022b6cd06 100644 --- a/src/openrct2/ride/gentle/meta/MiniHelicopters.h +++ b/src/openrct2/ride/gentle/meta/MiniHelicopters.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -58,5 +59,6 @@ constexpr const RideTypeDescriptor MiniHelicoptersRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_MINI_HELICOPTERS_TRACK, SPR_RIDE_DESIGN_PREVIEW_MINI_HELICOPTERS_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "mini_helicopters"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_BoatHire), }; // clang-format on diff --git a/src/openrct2/ride/gentle/meta/MonorailCycles.h b/src/openrct2/ride/gentle/meta/MonorailCycles.h index 42120b0668..9ea6ea2d74 100644 --- a/src/openrct2/ride/gentle/meta/MonorailCycles.h +++ b/src/openrct2/ride/gentle/meta/MonorailCycles.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -54,5 +55,6 @@ constexpr const RideTypeDescriptor MonorailCyclesRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_MONORAIL_CYCLES_TRACK, SPR_RIDE_DESIGN_PREVIEW_MONORAIL_CYCLES_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "monorail_cycles"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_BoatHire), }; // clang-format on diff --git a/src/openrct2/ride/gentle/meta/MonsterTrucks.h b/src/openrct2/ride/gentle/meta/MonsterTrucks.h index 2e8f87742c..c93a92591a 100644 --- a/src/openrct2/ride/gentle/meta/MonsterTrucks.h +++ b/src/openrct2/ride/gentle/meta/MonsterTrucks.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../RideData.h" #include "../../ShopItem.h" #include "../../Track.h" @@ -56,5 +57,6 @@ constexpr const RideTypeDescriptor MonsterTrucksRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_CAR_RIDE_TRACK, SPR_RIDE_DESIGN_PREVIEW_CAR_RIDE_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "monster_trucks"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_BoatHire), }; // clang-format on diff --git a/src/openrct2/ride/gentle/meta/ObservationTower.h b/src/openrct2/ride/gentle/meta/ObservationTower.h index e0cface485..f1567cbb64 100644 --- a/src/openrct2/ride/gentle/meta/ObservationTower.h +++ b/src/openrct2/ride/gentle/meta/ObservationTower.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -53,5 +54,6 @@ constexpr const RideTypeDescriptor ObservationTowerRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_OBSERVATION_TOWER_TRACK, SPR_RIDE_DESIGN_PREVIEW_OBSERVATION_TOWER_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "observation_tower"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_ObservationTower), }; // clang-format on diff --git a/src/openrct2/ride/gentle/meta/SpiralSlide.h b/src/openrct2/ride/gentle/meta/SpiralSlide.h index 462323ba42..28bb9513aa 100644 --- a/src/openrct2/ride/gentle/meta/SpiralSlide.h +++ b/src/openrct2/ride/gentle/meta/SpiralSlide.h @@ -53,6 +53,7 @@ constexpr const RideTypeDescriptor SpiralSlideRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_SPIRAL_SLIDE_TRACK, 0 }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "spiral_slide"), + SET_FIELD(LightFXAddLightsMagicVehicle, nullptr), SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::DefaultStartRideMusicChannel), SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default), SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate), diff --git a/src/openrct2/ride/shops/meta/CashMachine.h b/src/openrct2/ride/shops/meta/CashMachine.h index bca2ecc019..baa42c9c72 100644 --- a/src/openrct2/ride/shops/meta/CashMachine.h +++ b/src/openrct2/ride/shops/meta/CashMachine.h @@ -47,6 +47,7 @@ constexpr const RideTypeDescriptor CashMachineRTD = SET_FIELD(ColourPreview, { 0, 0 }), SET_FIELD(ColourKey, RideColourKey::CashMachine), SET_FIELD(Name, "cash_machine"), + SET_FIELD(LightFXAddLightsMagicVehicle, nullptr), SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::DefaultStartRideMusicChannel), SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default), SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate), diff --git a/src/openrct2/ride/shops/meta/DrinkStall.h b/src/openrct2/ride/shops/meta/DrinkStall.h index 70d062da44..53d80209e0 100644 --- a/src/openrct2/ride/shops/meta/DrinkStall.h +++ b/src/openrct2/ride/shops/meta/DrinkStall.h @@ -48,6 +48,7 @@ constexpr const RideTypeDescriptor DrinkStallRTD = SET_FIELD(ColourPreview, { 0, 0 }), SET_FIELD(ColourKey, RideColourKey::Drink), SET_FIELD(Name, "drink_stall"), + SET_FIELD(LightFXAddLightsMagicVehicle, nullptr), SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::DefaultStartRideMusicChannel), SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default), SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate), diff --git a/src/openrct2/ride/shops/meta/FirstAid.h b/src/openrct2/ride/shops/meta/FirstAid.h index 52f2f3efaa..403af018b6 100644 --- a/src/openrct2/ride/shops/meta/FirstAid.h +++ b/src/openrct2/ride/shops/meta/FirstAid.h @@ -48,6 +48,7 @@ constexpr const RideTypeDescriptor FirstAidRTD = SET_FIELD(ColourPreview, { 0, 0 }), SET_FIELD(ColourKey, RideColourKey::FirstAid), SET_FIELD(Name, "first_aid"), + SET_FIELD(LightFXAddLightsMagicVehicle, nullptr), SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::DefaultStartRideMusicChannel), SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default), SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate), diff --git a/src/openrct2/ride/shops/meta/FoodStall.h b/src/openrct2/ride/shops/meta/FoodStall.h index cc8ee3b067..781abd8638 100644 --- a/src/openrct2/ride/shops/meta/FoodStall.h +++ b/src/openrct2/ride/shops/meta/FoodStall.h @@ -48,6 +48,7 @@ constexpr const RideTypeDescriptor FoodStallRTD = SET_FIELD(ColourPreview, { 0, 0 }), SET_FIELD(ColourKey, RideColourKey::Food), SET_FIELD(Name, "food_stall"), + SET_FIELD(LightFXAddLightsMagicVehicle, nullptr), SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::DefaultStartRideMusicChannel), SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default), SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate), diff --git a/src/openrct2/ride/shops/meta/InformationKiosk.h b/src/openrct2/ride/shops/meta/InformationKiosk.h index 693455ace1..535e2cf065 100644 --- a/src/openrct2/ride/shops/meta/InformationKiosk.h +++ b/src/openrct2/ride/shops/meta/InformationKiosk.h @@ -48,6 +48,7 @@ constexpr const RideTypeDescriptor InformationKioskRTD = SET_FIELD(ColourPreview, { 0, 0 }), SET_FIELD(ColourKey, RideColourKey::InfoKiosk), SET_FIELD(Name, "information_kiosk"), + SET_FIELD(LightFXAddLightsMagicVehicle, nullptr), SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::DefaultStartRideMusicChannel), SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default), SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate), diff --git a/src/openrct2/ride/shops/meta/Shop.h b/src/openrct2/ride/shops/meta/Shop.h index c709e59cda..87d9ca3060 100644 --- a/src/openrct2/ride/shops/meta/Shop.h +++ b/src/openrct2/ride/shops/meta/Shop.h @@ -48,6 +48,7 @@ constexpr const RideTypeDescriptor ShopRTD = SET_FIELD(ColourPreview, { 0, 0 }), SET_FIELD(ColourKey, RideColourKey::Shop), SET_FIELD(Name, "shop"), + SET_FIELD(LightFXAddLightsMagicVehicle, nullptr), SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::DefaultStartRideMusicChannel), SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default), SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate), diff --git a/src/openrct2/ride/shops/meta/Toilets.h b/src/openrct2/ride/shops/meta/Toilets.h index 6399e3f9fd..87da2af4b2 100644 --- a/src/openrct2/ride/shops/meta/Toilets.h +++ b/src/openrct2/ride/shops/meta/Toilets.h @@ -48,6 +48,7 @@ constexpr const RideTypeDescriptor ToiletsRTD = SET_FIELD(ColourPreview, { 0, 0 }), SET_FIELD(ColourKey, RideColourKey::Toilets), SET_FIELD(Name, "toilets"), + SET_FIELD(LightFXAddLightsMagicVehicle, nullptr), SET_FIELD(StartRideMusic, OpenRCT2::RideAudio::DefaultStartRideMusicChannel), SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default), SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate), diff --git a/src/openrct2/ride/thrill/meta/GoKarts.h b/src/openrct2/ride/thrill/meta/GoKarts.h index 5fceda3c08..fe2a0279d7 100644 --- a/src/openrct2/ride/thrill/meta/GoKarts.h +++ b/src/openrct2/ride/thrill/meta/GoKarts.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -54,5 +55,6 @@ constexpr const RideTypeDescriptor GoKartsRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_GO_KARTS_TRACK, SPR_RIDE_DESIGN_PREVIEW_GO_KARTS_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "go_karts"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_BoatHire), }; // clang-format on diff --git a/src/openrct2/ride/transport/meta/Chairlift.h b/src/openrct2/ride/transport/meta/Chairlift.h index 134beaa93a..88c2ea7294 100644 --- a/src/openrct2/ride/transport/meta/Chairlift.h +++ b/src/openrct2/ride/transport/meta/Chairlift.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -55,5 +56,6 @@ constexpr const RideTypeDescriptor ChairliftRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_CHAIRLIFT_TRACK, SPR_RIDE_DESIGN_PREVIEW_CHAIRLIFT_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "chairlift"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_ChairLift), }; // clang-format on diff --git a/src/openrct2/ride/transport/meta/MiniatureRailway.h b/src/openrct2/ride/transport/meta/MiniatureRailway.h index ce0e078bf9..e64d384da6 100644 --- a/src/openrct2/ride/transport/meta/MiniatureRailway.h +++ b/src/openrct2/ride/transport/meta/MiniatureRailway.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -55,5 +56,6 @@ constexpr const RideTypeDescriptor MiniatureRailwayRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_MINIATURE_RAILWAY_TRACK, SPR_RIDE_DESIGN_PREVIEW_MINIATURE_RAILWAY_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "miniature_railway"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_MiniatureRailway), }; // clang-format on diff --git a/src/openrct2/ride/transport/meta/Monorail.h b/src/openrct2/ride/transport/meta/Monorail.h index b2d6309b87..d85ab9ae6b 100644 --- a/src/openrct2/ride/transport/meta/Monorail.h +++ b/src/openrct2/ride/transport/meta/Monorail.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -58,5 +59,6 @@ constexpr const RideTypeDescriptor MonorailRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_MONORAIL_TRACK, SPR_RIDE_DESIGN_PREVIEW_MONORAIL_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "monorail"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_Monorail), }; // clang-format on diff --git a/src/openrct2/ride/water/meta/BoatHire.h b/src/openrct2/ride/water/meta/BoatHire.h index 2aac20dedc..919262d144 100644 --- a/src/openrct2/ride/water/meta/BoatHire.h +++ b/src/openrct2/ride/water/meta/BoatHire.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -54,5 +55,6 @@ constexpr const RideTypeDescriptor BoatHireRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_BOAT_HIRE_TRACK, SPR_RIDE_DESIGN_PREVIEW_BOAT_HIRE_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "boat_hire"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_BoatHire), }; // clang-format on diff --git a/src/openrct2/ride/water/meta/SplashBoats.h b/src/openrct2/ride/water/meta/SplashBoats.h index 2750d75541..479fc49963 100644 --- a/src/openrct2/ride/water/meta/SplashBoats.h +++ b/src/openrct2/ride/water/meta/SplashBoats.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -55,5 +56,6 @@ constexpr const RideTypeDescriptor SplashBoatsRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_SPLASH_BOATS_TRACK, SPR_RIDE_DESIGN_PREVIEW_SPLASH_BOATS_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "splash_boats"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_BoatHire), }; // clang-format on diff --git a/src/openrct2/ride/water/meta/SubmarineRide.h b/src/openrct2/ride/water/meta/SubmarineRide.h index 16be1443c0..a80f36d971 100644 --- a/src/openrct2/ride/water/meta/SubmarineRide.h +++ b/src/openrct2/ride/water/meta/SubmarineRide.h @@ -9,6 +9,7 @@ #pragma once +#include "../../../drawing/LightFX.h" #include "../../../sprites.h" #include "../../RideData.h" #include "../../ShopItem.h" @@ -53,5 +54,6 @@ constexpr const RideTypeDescriptor SubmarineRideRTD = SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_SUBMARINE_RIDE_TRACK, SPR_RIDE_DESIGN_PREVIEW_SUBMARINE_RIDE_SUPPORTS }), SET_FIELD(ColourKey, RideColourKey::Ride), SET_FIELD(Name, "submarine_ride"), + SET_FIELD(LightFXAddLightsMagicVehicle, LightFxAddLightsMagicVehicle_BoatHire), }; // clang-format on