Merge pull request #17900 from spacek531/wooden-classic-coaster

Wooden classic coaster
This commit is contained in:
Michael Steenbeek authored and GitHub committed 2022-08-27 00:14:01 +02:00
commit ac62e45498
20 files changed
+4208 -1888

No files matched your search

+2
View File
@@ -97,6 +97,7 @@ STR_0092 :LIM Launched Roller Coaster
STR_0093 :Hybrid Coaster
STR_0094 :Single Rail Roller Coaster
STR_0095 :Alpine Coaster
STR_0096 :Classic Wooden Roller Coaster
STR_0512 :A compact roller coaster with a spiral lift hill and smooth, twisting drops.
STR_0513 :A looping roller coaster where the riders ride in a standing position
STR_0514 :Trains suspended beneath the roller coaster track swing out to the side around corners
@@ -179,6 +180,7 @@ STR_0602 :Roller coaster trains are accelerated out of the station by linear
STR_0603 :A wooden style roller coaster with a steel track, allowing for steep drops and inversions
STR_0604 :Riders ride single file on a narrow monorail track, as they race through tight inversions and direction changes
STR_0605 :Riders toboggan down a meandering steel track, braking to control their speed
STR_0606 :An older-style wooden roller coaster with a fast and rough ride, with plenty of air-time, some lateral G’s, and designed to feel ‘out-of-control’
STR_0767 :Guest {INT32}
STR_0768 :Handyman {INT32}
STR_0769 :Mechanic {INT32}
+1
View File
@@ -6,6 +6,7 @@
- Feature: [#16662] Show a warning message when g2.dat is mismatched.
- Feature: [#17107] Ride operating settings can be set via text input.
- Feature: [#17638] Added Zero G rolls, medium loops and large corkscrews to the Hybrid and Single-Rail coasters.
- Feature: [#17900] Add “Classic Wooden Coaster” with shallow banked turns.
- Feature: [objects#198] Add additional pirate roofs.
- Improved: [#15358] Park and scenario names can now contain up to 128 characters.
- Improved: [#16840] Add support for rectangular heightmaps.
+10
View File
@@ -15911,5 +15911,15 @@
},
{
"path": "empty.png"
},
{
"path": "track/wooden/classic_wooden_preview_track.png",
"x_offset": 1,
"y_offset": 1
},
{
"path": "track/wooden/classic_wooden_preview_supports.png",
"x_offset": 2,
"y_offset": 1
}
]
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+1
View File
@@ -64,6 +64,7 @@ static constexpr const ride_type_t RideTypeViewOrder[] = {
RIDE_TYPE_SIDE_FRICTION_ROLLER_COASTER,
RIDE_TYPE_VIRGINIA_REEL,
RIDE_TYPE_REVERSER_ROLLER_COASTER,
RIDE_TYPE_CLASSIC_WOODEN_ROLLER_COASTER,
RIDE_TYPE_WOODEN_ROLLER_COASTER,
RIDE_TYPE_WOODEN_WILD_MOUSE,
RIDE_TYPE_STEEL_WILD_MOUSE,
+3
View File
@@ -355,6 +355,7 @@
<ClInclude Include="ride\coaster\meta\AlpineCoaster.h" />
<ClInclude Include="ride\coaster\meta\BobsleighCoaster.h" />
<ClInclude Include="ride\coaster\meta\ClassicMiniRollerCoaster.h" />
<ClInclude Include="ride\coaster\meta\ClassicWoodenRollerCoaster.h" />
<ClInclude Include="ride\coaster\meta\CompactInvertedCoaster.h" />
<ClInclude Include="ride\coaster\meta\CorkscrewRollerCoaster.h" />
<ClInclude Include="ride\coaster\meta\FlyingRollerCoaster.h" />
@@ -391,6 +392,7 @@
<ClInclude Include="ride\coaster\meta\WaterCoaster.h" />
<ClInclude Include="ride\coaster\meta\WoodenRollerCoaster.h" />
<ClInclude Include="ride\coaster\meta\WoodenWildMouse.h" />
<ClInclude Include="ride\coaster\WoodenRollerCoaster.h" />
<ClInclude Include="ride\gentle\Maze.h" />
<ClInclude Include="ride\gentle\meta\CarRide.h" />
<ClInclude Include="ride\gentle\meta\Circus.h" />
@@ -843,6 +845,7 @@
<ClCompile Include="ride\coaster\AirPoweredVerticalCoaster.cpp" />
<ClCompile Include="ride\coaster\AlpineCoaster.cpp" />
<ClCompile Include="ride\coaster\BobsleighCoaster.cpp" />
<ClCompile Include="ride\coaster\ClassicWoodenRollerCoaster.cpp" />
<ClCompile Include="ride\coaster\CompactInvertedCoaster.cpp" />
<ClCompile Include="ride\coaster\CorkscrewRollerCoaster.cpp" />
<ClCompile Include="ride\coaster\FlyingRollerCoaster.cpp" />
+2
View File
@@ -112,6 +112,7 @@ enum : uint16_t
STR_RIDE_NAME_HYBRID_COASTER = 93,
STR_RIDE_NAME_SINGLE_RAIL_ROLLER_COASTER = 94,
STR_RIDE_NAME_ALPINE_COASTER = 95,
STR_RIDE_NAME_CLASSIC_WOODEN_ROLLER_COASTER = 96,
STR_RIDE_DESCRIPTION_SPIRAL_ROLLER_COASTER = 512,
STR_RIDE_DESCRIPTION_STAND_UP_ROLLER_COASTER = 513,
@@ -204,6 +205,7 @@ enum : uint16_t
STR_RIDE_DESCRIPTION_HYBRID_COASTER = 603,
STR_RIDE_DESCRIPTION_SINGLE_RAIL_ROLLER_COASTER = 604,
STR_RIDE_DESCRIPTION_ALPINE_COASTER = 605,
STR_RIDE_DESCRIPTION_CLASSIC_WOODEN_ROLLER_COASTER = 606,
STR_GUEST_X = 767,
STR_HANDYMAN_X = 768,
+1 -1
View File
@@ -42,7 +42,7 @@
// This string specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "8"
#define NETWORK_STREAM_VERSION "9"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
static Peep* _pickup_peep = nullptr;
+2 -2
View File
@@ -8,10 +8,10 @@ struct ObjectRepositoryItem;
namespace OpenRCT2
{
// Current version that is saved.
constexpr uint32_t PARK_FILE_CURRENT_VERSION = 13;
constexpr uint32_t PARK_FILE_CURRENT_VERSION = 14;
// The minimum version that is forwards compatible with the current version.
constexpr uint32_t PARK_FILE_MIN_VERSION = 12;
constexpr uint32_t PARK_FILE_MIN_VERSION = 14;
// The minimum version that is backwards compatible with the current version.
// If this is increased beyond 0, uncomment the checks in ParkFile.cpp and Context.cpp!
+1 -1
View File
@@ -172,7 +172,7 @@ namespace RCT1
static uint8_t map[] =
{
RIDE_TYPE_WOODEN_ROLLER_COASTER, // RCT1_RIDE_TYPE_WOODEN_ROLLER_COASTER
RIDE_TYPE_CLASSIC_WOODEN_ROLLER_COASTER,// RCT1_RIDE_TYPE_WOODEN_ROLLER_COASTER
RIDE_TYPE_STAND_UP_ROLLER_COASTER, // RCT1_RIDE_TYPE_STAND_UP_STEEL_ROLLER_COASTER
RIDE_TYPE_SUSPENDED_SWINGING_COASTER, // RCT1_RIDE_TYPE_SUSPENDED_ROLLER_COASTER
RIDE_TYPE_INVERTED_ROLLER_COASTER, // RCT1_RIDE_TYPE_INVERTED_ROLLER_COASTER
+1
View File
@@ -598,6 +598,7 @@ enum
RIDE_TYPE_HYBRID_COASTER,
RIDE_TYPE_SINGLE_RAIL_ROLLER_COASTER,
RIDE_TYPE_ALPINE_COASTER,
RIDE_TYPE_CLASSIC_WOODEN_ROLLER_COASTER,
RIDE_TYPE_COUNT
};
+2
View File
@@ -33,6 +33,7 @@
#include "coaster/meta/AlpineCoaster.h"
#include "coaster/meta/BobsleighCoaster.h"
#include "coaster/meta/ClassicMiniRollerCoaster.h"
#include "coaster/meta/ClassicWoodenRollerCoaster.h"
#include "coaster/meta/CompactInvertedCoaster.h"
#include "coaster/meta/CorkscrewRollerCoaster.h"
#include "coaster/meta/FlyingRollerCoaster.h"
@@ -334,6 +335,7 @@ constexpr const RideTypeDescriptor RideTypeDescriptors[RIDE_TYPE_COUNT] = {
/* RIDE_TYPE_HYBRID_COASTER */ HybridCoasterRTD,
/* RIDE_TYPE_SINGLE_RAIL_ROLLER_COASTER */ SingleRailRollerCoasterRTD,
/* RIDE_TYPE_ALPINE_COASTER */ AlpineCoasterRTD,
/* RIDE_TYPE_CLASSIC_WOODEN_ROLLER_COASTER */ ClassicWoodenRollerCoasterRTD,
};
bool RideTypeDescriptor::HasFlag(uint64_t flag) const
+1
View File
@@ -483,3 +483,4 @@ namespace AlpineRC
{
TRACK_PAINT_FUNCTION GetTrackPaintFunction(int32_t trackType);
}
TRACK_PAINT_FUNCTION get_track_paint_function_classic_wooden_rc(int32_t trackType);
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,74 @@
/*****************************************************************************
* Copyright (c) 2014-2022 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 "../../paint/Paint.h"
#include "../../world/Location.hpp"
#include "../TrackPaint.h"
#include <cstdint>
struct sprite_bb_2
{
uint32_t sprite_id_a;
uint32_t sprite_id_b;
CoordsXYZ offset;
CoordsXYZ bb_offset;
CoordsXYZ bb_size;
};
template<bool isClassic> uint32_t wooden_rc_get_track_colour(const paint_session& session)
{
if (isClassic)
return session.TrackColours[SCHEME_TRACK];
else
return (session.TrackColours[SCHEME_TRACK] & ~0xF80000) | session.TrackColours[SCHEME_SUPPORTS];
}
uint32_t wooden_rc_get_rails_colour(paint_session& session);
template<bool isClassic>
paint_struct* wooden_rc_track_paint(
paint_session& session, uint32_t imageIdTrack, uint32_t imageIdRails, uint8_t direction, int8_t x_offset, int8_t y_offset,
int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset,
int16_t bound_box_offset_x, int16_t bound_box_offset_y, int16_t bound_box_offset_z)
{
uint32_t imageId = imageIdTrack | wooden_rc_get_track_colour<isClassic>(session);
uint32_t railsImageId = imageIdRails | wooden_rc_get_rails_colour(session);
PaintAddImageAsParentRotated(
session, direction, imageId, { x_offset, y_offset, z_offset },
{ bound_box_length_x, bound_box_length_y, bound_box_length_z },
{ bound_box_offset_x, bound_box_offset_y, bound_box_offset_z });
return PaintAddImageAsChildRotated(
session, direction, railsImageId, { x_offset, y_offset, z_offset },
{ bound_box_length_x, bound_box_length_y, bound_box_length_z },
{ bound_box_offset_x, bound_box_offset_y, bound_box_offset_z });
}
template<bool isClassic> void wooden_rc_track_paint_bb(paint_session& session, const sprite_bb_2* bb, int16_t height)
{
if (bb->sprite_id_a == 0)
return;
uint32_t imageId = bb->sprite_id_a | wooden_rc_get_track_colour<isClassic>(session);
PaintAddImageAsParent(
session, imageId, { bb->offset.x, bb->offset.y, height + bb->offset.z }, bb->bb_size,
{ bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z });
if (bb->sprite_id_b != 0)
{
uint32_t railsImageId = bb->sprite_id_b | wooden_rc_get_rails_colour(session);
PaintAddImageAsChild(
session, railsImageId, { bb->offset.x, bb->offset.y, height + bb->offset.z }, bb->bb_size,
{ bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z });
}
}
TRACK_PAINT_FUNCTION get_track_paint_function_classic_wooden_rc_fallback(int32_t trackType);
@@ -0,0 +1,57 @@
/*****************************************************************************
* Copyright (c) 2014-2022 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 "../../../sprites.h"
#include "../../RideData.h"
#include "../../ShopItem.h"
#include "../../Track.h"
// clang-format off
constexpr const RideTypeDescriptor ClassicWoodenRollerCoasterRTD =
{
SET_FIELD(AlternateType, RIDE_TYPE_NULL),
SET_FIELD(Category, RIDE_CATEGORY_ROLLERCOASTER),
SET_FIELD(EnabledTrackPieces, {TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_WATER_SPLASH, TRACK_BLOCK_BRAKES}),
SET_FIELD(ExtraTrackPieces, {}),
SET_FIELD(CoveredTrackPieces, 0),
SET_FIELD(StartTrackPiece, TrackElemType::EndStation),
SET_FIELD(TrackPaintFunction, get_track_paint_function_classic_wooden_rc),
SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION |
RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_HAS_LARGE_CURVES |
RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS),
SET_FIELD(RideModes, EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned)),
SET_FIELD(DefaultMode, RideMode::ContinuousCircuit),
SET_FIELD(OperatingSettings, { 0, 0, 0, 0, 68, 0 }),
SET_FIELD(Naming, { STR_RIDE_NAME_CLASSIC_WOODEN_ROLLER_COASTER, STR_RIDE_DESCRIPTION_CLASSIC_WOODEN_ROLLER_COASTER }),
SET_FIELD(NameConvention, { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }),
SET_FIELD(EnumName, nameof(RIDE_TYPE_CLASSIC_WOODEN_ROLLER_COASTER)),
SET_FIELD(AvailableBreakdowns, (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE)),
SET_FIELD(Heights, { 41, 24, 8, 11, }),
SET_FIELD(MaxMass, 19),
SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftWood, 5, 7 }),
SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_wooden_roller_coaster),
SET_FIELD(RatingsMultipliers, { 52, 33, 8 }),
SET_FIELD(UpkeepCosts, { 40, 20, 80, 10, 3, 10 }),
SET_FIELD(BuildCosts, {37.50_GBP, 3.50_GBP, 50, }),
SET_FIELD(DefaultPrices, { 20, 20 }),
SET_FIELD(DefaultMusic, MUSIC_OBJECT_WILD_WEST),
SET_FIELD(PhotoItem, ShopItem::Photo3),
SET_FIELD(BonusValue, 105),
SET_FIELD(ColourPresets, TRACK_COLOUR_PRESETS(
{ COLOUR_SATURATED_BROWN, COLOUR_SATURATED_BROWN, COLOUR_SATURATED_BROWN},
{ COLOUR_WHITE, COLOUR_LIGHT_BROWN, COLOUR_WHITE },
{ COLOUR_LIGHT_BROWN, COLOUR_BLACK, COLOUR_LIGHT_BROWN },
)),
SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_CLASSIC_WOODEN_ROLLER_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_CLASSIC_WOODEN_ROLLER_COASTER_SUPPORTS }),
SET_FIELD(ColourKey, RideColourKey::Ride),
SET_FIELD(Name, "classic_wooden_rc"),
};
// clang-format on
@@ -1,5 +1,5 @@
/*****************************************************************************
* Copyright (c) 2014-2020 OpenRCT2 developers
* Copyright (c) 2014-2022 OpenRCT2 developers
*
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
+4 -1
View File
@@ -1166,7 +1166,10 @@ enum
SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_NW_SE,
SPR_G2_EMPTY,
SPR_G2_END = SPR_G2_EMPTY + 1,
SPR_RIDE_DESIGN_PREVIEW_CLASSIC_WOODEN_ROLLER_COASTER_TRACK,
SPR_RIDE_DESIGN_PREVIEW_CLASSIC_WOODEN_ROLLER_COASTER_SUPPORTS,
SPR_G2_END = SPR_RIDE_DESIGN_PREVIEW_CLASSIC_WOODEN_ROLLER_COASTER_SUPPORTS + 1,
SPR_CSG_BEGIN = SPR_G2_END,
SPR_CSG_END = SPR_CSG_BEGIN + RCT1::Limits::Num_LL_CSG_Entries,