mirror of https://github.com/OpenRCT2/OpenRCT2.git
Create RideConstruction.h
This commit is contained in:
parent
517fbe2d8d
commit
ef6f2cceee
|
@ -21,6 +21,7 @@
|
|||
#include <openrct2/entity/EntityRegistry.h>
|
||||
#include <openrct2/interface/Viewport.h>
|
||||
#include <openrct2/rct2/T6Exporter.h>
|
||||
#include <openrct2/ride/RideConstruction.h>
|
||||
#include <openrct2/ride/Vehicle.h>
|
||||
#include <openrct2/ui/WindowManager.h>
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <openrct2/entity/Staff.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/ride/Ride.h>
|
||||
#include <openrct2/ride/RideConstruction.h>
|
||||
#include <openrct2/ride/RideData.h>
|
||||
#include <openrct2/ride/Track.h>
|
||||
#include <openrct2/ride/Vehicle.h>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/object/ObjectManager.h>
|
||||
#include <openrct2/platform/Platform2.h>
|
||||
#include <openrct2/ride/RideConstruction.h>
|
||||
#include <openrct2/ride/RideData.h>
|
||||
#include <openrct2/ride/TrackDesign.h>
|
||||
#include <openrct2/ride/TrackDesignRepository.h>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <openrct2/audio/audio.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/ride/RideConstruction.h>
|
||||
#include <openrct2/ride/RideData.h>
|
||||
#include <openrct2/ride/Track.h>
|
||||
#include <openrct2/sprites.h>
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include <openrct2/object/StationObject.h>
|
||||
#include <openrct2/rct1/RCT1.h>
|
||||
#include <openrct2/rct2/T6Exporter.h>
|
||||
#include <openrct2/ride/RideConstruction.h>
|
||||
#include <openrct2/ride/RideData.h>
|
||||
#include <openrct2/ride/ShopItem.h>
|
||||
#include <openrct2/ride/Station.h>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <openrct2/paint/tile_element/Paint.TileElement.h>
|
||||
#include <openrct2/platform/platform.h>
|
||||
#include <openrct2/ride/Ride.h>
|
||||
#include <openrct2/ride/RideConstruction.h>
|
||||
#include <openrct2/ride/RideData.h>
|
||||
#include <openrct2/ride/Track.h>
|
||||
#include <openrct2/ride/TrackData.h>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <openrct2/actions/TrackDesignAction.h>
|
||||
#include <openrct2/audio/audio.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/ride/RideConstruction.h>
|
||||
#include <openrct2/ride/RideData.h>
|
||||
#include <openrct2/ride/Track.h>
|
||||
#include <openrct2/ride/TrackData.h>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/drawing/IDrawingEngine.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/ride/RideConstruction.h>
|
||||
#include <openrct2/ride/RideData.h>
|
||||
#include <openrct2/ride/TrackDesign.h>
|
||||
#include <openrct2/ride/TrackDesignRepository.h>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "../interface/Window.h"
|
||||
#include "../localisation/StringIds.h"
|
||||
#include "../management/Finance.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "../world/ConstructionClearance.h"
|
||||
#include "../world/Footpath.h"
|
||||
#include "../world/Location.hpp"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "../interface/Window.h"
|
||||
#include "../localisation/StringIds.h"
|
||||
#include "../management/Finance.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "../world/ConstructionClearance.h"
|
||||
#include "../world/Footpath.h"
|
||||
#include "../world/Location.hpp"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "../localisation/Localisation.h"
|
||||
#include "../localisation/StringIds.h"
|
||||
#include "../management/Finance.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "../ride/RideData.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Park.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "../localisation/Localisation.h"
|
||||
#include "../localisation/StringIds.h"
|
||||
#include "../management/Finance.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "../ride/RideData.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Park.h"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "../management/Finance.h"
|
||||
#include "../object/ObjectLimits.h"
|
||||
#include "../ride/Ride.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "../world/Banner.h"
|
||||
#include "../world/ConstructionClearance.h"
|
||||
#include "../world/MapAnimation.h"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "../localisation/StringIds.h"
|
||||
#include "../management/Finance.h"
|
||||
#include "../ride/Ride.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "../world/Park.h"
|
||||
|
||||
RideSetColourSchemeAction::RideSetColourSchemeAction(
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "../object/ObjectManager.h"
|
||||
#include "../object/ObjectRepository.h"
|
||||
#include "../rct12/RCT12.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "../ride/TrackDesign.h"
|
||||
#include "RideCreateAction.h"
|
||||
#include "RideDemolishAction.h"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "../OpenRCT2.h"
|
||||
#include "../audio/audio.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "WaterSetHeightAction.h"
|
||||
|
||||
WaterLowerAction::WaterLowerAction(MapRange range)
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "../OpenRCT2.h"
|
||||
#include "../audio/audio.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "WaterSetHeightAction.h"
|
||||
|
||||
WaterRaiseAction::WaterRaiseAction(MapRange range)
|
||||
|
|
|
@ -392,6 +392,7 @@
|
|||
<ClInclude Include="ride\Ride.h" />
|
||||
<ClInclude Include="ride\RideAudio.h" />
|
||||
<ClInclude Include="ride\RideColour.h" />
|
||||
<ClInclude Include="ride\RideConstruction.h" />
|
||||
<ClInclude Include="ride\RideData.h" />
|
||||
<ClInclude Include="ride\RideEntry.h" />
|
||||
<ClInclude Include="ride\RideRatings.h" />
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
#include "../world/TileElementsView.h"
|
||||
#include "CableLift.h"
|
||||
#include "RideAudio.h"
|
||||
#include "RideConstruction.h"
|
||||
#include "RideData.h"
|
||||
#include "RideEntry.h"
|
||||
#include "ShopItem.h"
|
||||
|
|
|
@ -797,19 +797,6 @@ enum
|
|||
RIDE_CRASH_TYPE_FATALITIES = 8
|
||||
};
|
||||
|
||||
enum class RideConstructionState : uint8_t
|
||||
{
|
||||
State0,
|
||||
Front,
|
||||
Back,
|
||||
Selected,
|
||||
Place,
|
||||
EntranceExit,
|
||||
MazeBuild,
|
||||
MazeMove,
|
||||
MazeFill
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
RIDE_SET_VEHICLES_COMMAND_TYPE_NUM_TRAINS,
|
||||
|
@ -986,45 +973,6 @@ extern money16 gTotalRideValueForMoney;
|
|||
|
||||
extern const rct_string_id ColourSchemeNames[4];
|
||||
|
||||
extern money32 _currentTrackPrice;
|
||||
|
||||
extern uint16_t _numCurrentPossibleRideConfigurations;
|
||||
extern uint16_t _numCurrentPossibleSpecialTrackPieces;
|
||||
|
||||
extern uint32_t _currentTrackCurve;
|
||||
extern RideConstructionState _rideConstructionState;
|
||||
extern ride_id_t _currentRideIndex;
|
||||
|
||||
extern CoordsXYZ _currentTrackBegin;
|
||||
|
||||
extern uint8_t _currentTrackPieceDirection;
|
||||
extern track_type_t _currentTrackPieceType;
|
||||
extern uint8_t _currentTrackSelectionFlags;
|
||||
extern uint32_t _rideConstructionNextArrowPulse;
|
||||
extern uint8_t _currentTrackSlopeEnd;
|
||||
extern uint8_t _currentTrackBankEnd;
|
||||
extern uint8_t _currentTrackLiftHill;
|
||||
extern uint8_t _currentTrackAlternative;
|
||||
extern track_type_t _selectedTrackType;
|
||||
|
||||
extern uint8_t _previousTrackBankEnd;
|
||||
extern uint8_t _previousTrackSlopeEnd;
|
||||
|
||||
extern CoordsXYZ _previousTrackPiece;
|
||||
|
||||
extern uint8_t _currentBrakeSpeed2;
|
||||
extern uint8_t _currentSeatRotationAngle;
|
||||
|
||||
extern CoordsXYZD _unkF440C5;
|
||||
|
||||
extern uint8_t gRideEntranceExitPlaceType;
|
||||
extern ride_id_t gRideEntranceExitPlaceRideIndex;
|
||||
extern StationIndex gRideEntranceExitPlaceStationIndex;
|
||||
extern RideConstructionState gRideEntranceExitPlacePreviousRideConstructionState;
|
||||
extern uint8_t gRideEntranceExitPlaceDirection;
|
||||
|
||||
extern bool gGotoStartPlacementMode;
|
||||
|
||||
extern ObjectEntryIndex gLastEntranceStyle;
|
||||
|
||||
int32_t ride_get_count();
|
||||
|
@ -1037,7 +985,6 @@ bool ride_try_get_origin_element(const Ride* ride, CoordsXYE* output);
|
|||
int32_t ride_find_track_gap(const Ride* ride, CoordsXYE* input, CoordsXYE* output);
|
||||
void ride_construct_new(RideSelection listItem);
|
||||
void ride_construct(Ride* ride);
|
||||
bool ride_modify(CoordsXYE* input);
|
||||
void ride_clear_blocked_tiles(Ride* ride);
|
||||
Staff* ride_get_mechanic(Ride* ride);
|
||||
Staff* ride_get_assigned_mechanic(Ride* ride);
|
||||
|
@ -1049,9 +996,6 @@ void ride_measurements_update();
|
|||
void ride_breakdown_add_news_item(Ride* ride);
|
||||
Staff* ride_find_closest_mechanic(Ride* ride, int32_t forInspection);
|
||||
int32_t ride_initialise_construction_window(Ride* ride);
|
||||
void ride_construction_invalidate_current_track();
|
||||
std::optional<CoordsXYZ> GetTrackElementOriginAndApplyChanges(
|
||||
const CoordsXYZD& location, track_type_t type, uint16_t extra_params, TileElement** output_element, uint16_t flags);
|
||||
void ride_set_map_tooltip(TileElement* tileElement);
|
||||
void ride_prepare_breakdown(Ride* ride, int32_t breakdownReason);
|
||||
TileElement* ride_get_station_start_track_element(const Ride* ride, StationIndex stationIndex);
|
||||
|
@ -1063,15 +1007,8 @@ int32_t ride_get_random_colour_preset_index(uint8_t ride_type);
|
|||
money32 ride_get_common_price(Ride* forRide);
|
||||
|
||||
void ride_clear_for_construction(Ride* ride);
|
||||
void ride_entrance_exit_place_provisional_ghost();
|
||||
void ride_entrance_exit_remove_ghost();
|
||||
void ride_restore_provisional_track_piece();
|
||||
void ride_remove_provisional_track_piece();
|
||||
void invalidate_test_results(Ride* ride);
|
||||
|
||||
void ride_select_next_section();
|
||||
void ride_select_previous_section();
|
||||
|
||||
void increment_turn_count_1_element(Ride* ride, uint8_t type);
|
||||
void increment_turn_count_2_elements(Ride* ride, uint8_t type);
|
||||
void increment_turn_count_3_elements(Ride* ride, uint8_t type);
|
||||
|
@ -1085,8 +1022,6 @@ uint8_t ride_get_helix_sections(Ride* ride);
|
|||
|
||||
bool ride_has_any_track_elements(const Ride* ride);
|
||||
|
||||
void ride_construction_set_default_next_piece();
|
||||
|
||||
bool track_block_get_next(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32_t* direction);
|
||||
bool track_block_get_next_from_zero(
|
||||
const CoordsXYZ& startPos, Ride* ride, uint8_t direction_start, CoordsXYE* output, int32_t* z, int32_t* direction,
|
||||
|
@ -1099,13 +1034,8 @@ bool track_block_get_previous_from_zero(
|
|||
void ride_get_start_of_track(CoordsXYE* output);
|
||||
|
||||
void window_ride_construction_update_active_elements();
|
||||
void ride_construction_remove_ghosts();
|
||||
money32 ride_entrance_exit_place_ghost(
|
||||
Ride* ride, const CoordsXY& entranceExitCoords, Direction direction, int32_t placeType, StationIndex stationNum);
|
||||
CoordsXYZD ride_get_entrance_or_exit_position_from_screen_position(const ScreenCoordsXY& screenCoords);
|
||||
|
||||
bool ride_select_backwards_from_front();
|
||||
bool ride_select_forwards_from_back();
|
||||
|
||||
bool ride_are_all_possible_entrances_and_exits_built(Ride* ride);
|
||||
void ride_fix_breakdown(Ride* ride, int32_t reliabilityIncreaseFactor);
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "RideConstruction.h"
|
||||
|
||||
#include "../Context.h"
|
||||
#include "../Input.h"
|
||||
#include "../actions/RideEntranceExitRemoveAction.h"
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
/*****************************************************************************
|
||||
* Copyright (c) 2014-2021 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 "../common.h"
|
||||
#include "../world/Location.hpp"
|
||||
#include "Station.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
|
||||
using track_type_t = uint16_t;
|
||||
enum class ride_id_t : uint16_t;
|
||||
|
||||
struct TileElement;
|
||||
struct CoordsXYE;
|
||||
|
||||
enum class RideConstructionState : uint8_t
|
||||
{
|
||||
State0,
|
||||
Front,
|
||||
Back,
|
||||
Selected,
|
||||
Place,
|
||||
EntranceExit,
|
||||
MazeBuild,
|
||||
MazeMove,
|
||||
MazeFill
|
||||
};
|
||||
|
||||
extern bool gGotoStartPlacementMode;
|
||||
|
||||
extern money32 _currentTrackPrice;
|
||||
|
||||
extern uint16_t _numCurrentPossibleRideConfigurations;
|
||||
extern uint16_t _numCurrentPossibleSpecialTrackPieces;
|
||||
|
||||
extern uint32_t _currentTrackCurve;
|
||||
extern RideConstructionState _rideConstructionState;
|
||||
extern ride_id_t _currentRideIndex;
|
||||
|
||||
extern CoordsXYZ _currentTrackBegin;
|
||||
|
||||
extern uint8_t _currentTrackPieceDirection;
|
||||
extern track_type_t _currentTrackPieceType;
|
||||
extern uint8_t _currentTrackSelectionFlags;
|
||||
extern uint32_t _rideConstructionNextArrowPulse;
|
||||
extern uint8_t _currentTrackSlopeEnd;
|
||||
extern uint8_t _currentTrackBankEnd;
|
||||
extern uint8_t _currentTrackLiftHill;
|
||||
extern uint8_t _currentTrackAlternative;
|
||||
extern track_type_t _selectedTrackType;
|
||||
|
||||
extern uint8_t _previousTrackBankEnd;
|
||||
extern uint8_t _previousTrackSlopeEnd;
|
||||
|
||||
extern CoordsXYZ _previousTrackPiece;
|
||||
|
||||
extern uint8_t _currentBrakeSpeed2;
|
||||
extern uint8_t _currentSeatRotationAngle;
|
||||
|
||||
extern CoordsXYZD _unkF440C5;
|
||||
|
||||
extern uint8_t gRideEntranceExitPlaceType;
|
||||
extern ride_id_t gRideEntranceExitPlaceRideIndex;
|
||||
extern StationIndex gRideEntranceExitPlaceStationIndex;
|
||||
extern RideConstructionState gRideEntranceExitPlacePreviousRideConstructionState;
|
||||
extern uint8_t gRideEntranceExitPlaceDirection;
|
||||
|
||||
std::optional<CoordsXYZ> GetTrackElementOriginAndApplyChanges(
|
||||
const CoordsXYZD& location, track_type_t type, uint16_t extra_params, TileElement** output_element, uint16_t flags);
|
||||
|
||||
void ride_entrance_exit_place_provisional_ghost();
|
||||
void ride_entrance_exit_remove_ghost();
|
||||
void ride_restore_provisional_track_piece();
|
||||
void ride_remove_provisional_track_piece();
|
||||
|
||||
void ride_construction_remove_ghosts();
|
||||
|
||||
void ride_construction_invalidate_current_track();
|
||||
|
||||
void ride_construction_set_default_next_piece();
|
||||
|
||||
void ride_select_next_section();
|
||||
void ride_select_previous_section();
|
||||
|
||||
bool ride_modify(CoordsXYE* input);
|
||||
|
||||
CoordsXYZD ride_get_entrance_or_exit_position_from_screen_position(const ScreenCoordsXY& screenCoords);
|
||||
|
||||
bool ride_select_backwards_from_front();
|
||||
bool ride_select_forwards_from_back();
|
|
@ -47,6 +47,7 @@
|
|||
#include "../object/ObjectRepository.h"
|
||||
#include "../rct1/RCT1.h"
|
||||
#include "../rct1/Tables.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "../util/SawyerCoding.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Footpath.h"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "../interface/Viewport.h"
|
||||
#include "../network/network.h"
|
||||
#include "../paint/VirtualFloor.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "../ride/RideData.h"
|
||||
#include "../ride/Track.h"
|
||||
#include "../ride/TrackData.h"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "../object/FootpathObject.h"
|
||||
#include "../object/FootpathSurfaceObject.h"
|
||||
#include "../object/ObjectManager.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "../ride/Station.h"
|
||||
#include "../ride/Track.h"
|
||||
#include "Footpath.h"
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "../network/network.h"
|
||||
#include "../object/ObjectManager.h"
|
||||
#include "../object/TerrainSurfaceObject.h"
|
||||
#include "../ride/RideConstruction.h"
|
||||
#include "../ride/RideData.h"
|
||||
#include "../ride/Track.h"
|
||||
#include "../ride/TrackData.h"
|
||||
|
|
Loading…
Reference in New Issue