1 /***************************************************************************** 2 * Copyright (c) 2014-2021 OpenRCT2 developers 3 * 4 * For a complete list of all authors, please refer to contributors.md 5 * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 6 * 7 * OpenRCT2 is licensed under the GNU General Public License version 3. 8 *****************************************************************************/ 9 10 #pragma once 11 12 #include "../audio/AudioMixer.h" 13 #include "../common.h" 14 15 #include <array> 16 #include <vector> 17 18 #ifdef __TESTPAINT__ 19 # pragma pack(push, 1) 20 #endif // __TESTPAINT__ 21 /** 22 * Ride type vehicle structure. 23 * size: 0x65 24 */ 25 struct rct_ride_entry_vehicle 26 { 27 uint16_t rotation_frame_mask; 28 uint8_t num_vertical_frames; // Appears to be unused, except as a temporary variable in RCT2 (not needed for OpenRCT2) 29 uint8_t num_horizontal_frames; // Appears to be unused, except as a temporary variable in RCT2 (not needed for OpenRCT2) 30 uint32_t spacing; 31 uint16_t car_mass; 32 int8_t tab_height; 33 uint8_t num_seats; 34 uint32_t sprite_flags; 35 uint8_t sprite_width; 36 uint8_t sprite_height_negative; 37 uint8_t sprite_height_positive; 38 uint8_t animation; 39 uint32_t flags; 40 uint16_t base_num_frames; // The number of sprites for a flat non-banked track piece. 41 uint32_t base_image_id; // Following image_id's populated during loading 42 uint32_t restraint_image_id; 43 uint32_t gentle_slope_image_id; 44 uint32_t steep_slope_image_id; 45 uint32_t vertical_slope_image_id; 46 uint32_t diagonal_slope_image_id; 47 uint32_t banked_image_id; 48 uint32_t inline_twist_image_id; 49 uint32_t flat_to_gentle_bank_image_id; 50 uint32_t diagonal_to_gentle_slope_bank_image_id; 51 uint32_t gentle_slope_to_bank_image_id; 52 uint32_t gentle_slope_bank_turn_image_id; 53 uint32_t flat_bank_to_gentle_slope_image_id; 54 union 55 { 56 uint32_t curved_lift_hill_image_id; 57 uint32_t corkscrew_image_id; 58 }; 59 uint32_t no_vehicle_images; 60 uint8_t no_seating_rows; 61 uint8_t spinning_inertia; 62 uint8_t spinning_friction; 63 OpenRCT2::Audio::SoundId friction_sound_id; 64 uint8_t log_flume_reverser_vehicle_type; 65 uint8_t sound_range; 66 uint8_t double_sound_frequency; // (Doubles the velocity when working out the sound frequency {used on go karts}) 67 uint8_t powered_acceleration; 68 uint8_t powered_max_speed; 69 uint8_t car_visual; 70 uint8_t effect_visual; 71 uint8_t draw_order; 72 uint8_t num_vertical_frames_override; // A custom number that can be used rather than letting RCT2 determine it. 73 // Needs the VEHICLE_ENTRY_FLAG_OVERRIDE_NUM_VERTICAL_FRAMES flag to be set. 74 uint8_t peep_loading_waypoint_segments; 75 uint8_t pad_62[6] = {}; 76 std::vector<std::array<CoordsXY, 3>> peep_loading_waypoints = {}; 77 std::vector<int8_t> peep_loading_positions = {}; 78 }; 79 #ifdef __TESTPAINT__ 80 # pragma pack(pop) 81 #endif // __TESTPAINT__ 82 #ifdef PLATFORM_32BIT 83 static_assert(sizeof(rct_ride_entry_vehicle) % 4 == 0, "Invalid struct size"); 84 #else 85 static_assert(sizeof(rct_ride_entry_vehicle) % 8 == 0, "Invalid struct size"); 86 #endif 87