mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
rename pitch direction vector and move roll component array
This commit is contained in:
@@ -393,12 +393,6 @@ static constexpr CoordsXY kSurroundingTiles[] = {
|
||||
{ 0, +kCoordsXYStep },
|
||||
};
|
||||
|
||||
/** rct2: 0x009A39C4 */
|
||||
static constexpr int32_t kUnk9A39C4[] = {
|
||||
2147483647, 2096579710, 1946281152, 2096579710, 1946281152, 1380375879, 555809667, -372906620, -1231746017, -1859775391,
|
||||
1380375879, 555809667, -372906620, -1231746017, -1859775391, 0, 2096579710, 1946281152, 2096579710, 1946281152,
|
||||
};
|
||||
|
||||
static constexpr OpenRCT2::Audio::SoundId kDoorOpenSoundIds[] = {
|
||||
OpenRCT2::Audio::SoundId::null, // DoorSoundType::none
|
||||
OpenRCT2::Audio::SoundId::doorOpen, // DoorSoundType::door
|
||||
@@ -5036,7 +5030,7 @@ OpenRCT2::Audio::SoundId Vehicle::ProduceScreamSound(const int32_t totalNumPeeps
|
||||
GForces Vehicle::GetGForces() const
|
||||
{
|
||||
int32_t gForceVert = ((static_cast<int64_t>(0x280000)) * Geometry::getPitchVector32(pitch).x) >> 32;
|
||||
gForceVert = ((static_cast<int64_t>(gForceVert)) * kUnk9A39C4[EnumValue(roll)]) >> 32;
|
||||
gForceVert = ((static_cast<int64_t>(gForceVert)) * Geometry::kRollHorizontalComponent[EnumValue(roll)]) >> 32;
|
||||
|
||||
const auto& ted = GetTrackElementDescriptor(GetTrackType());
|
||||
const int32_t vertFactor = ted.verticalFactor(track_progress);
|
||||
|
||||
@@ -183,4 +183,11 @@ namespace OpenRCT2::RideVehicle::Geometry
|
||||
});
|
||||
static_assert(std::size(kPitchToDirectionVectorInt32) == EnumValue(VehiclePitch::pitchCount));
|
||||
|
||||
/** rct2: 0x009A39C4 */
|
||||
constexpr auto kRollHorizontalComponent = std::to_array<int32_t>({
|
||||
2147483647, 2096579710, 1946281152, 2096579710, 1946281152, 1380375879, 555809667,
|
||||
-372906620, -1231746017, -1859775391, 1380375879, 555809667, -372906620, -1231746017,
|
||||
-1859775391, 0, 2096579710, 1946281152, 2096579710, 1946281152,
|
||||
});
|
||||
static_assert(std::size(kRollHorizontalComponent) == EnumValue(VehicleRoll::rollCount));
|
||||
} // namespace OpenRCT2::RideVehicle::Geometry
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace OpenRCT2::RideVehicle::Geometry
|
||||
extern const std::array<Unk9A36C4Struct, 32> kFreeroamVehicleMovementData;
|
||||
extern const std::array<int32_t, EnumValue(VehiclePitch::pitchCount)> kAccelerationFromPitch;
|
||||
extern const std::array<CoordsXY, EnumValue(VehiclePitch::pitchCount)> kPitchToDirectionVectorInt32;
|
||||
extern const std::array<int32_t, EnumValue(VehicleRoll::rollCount)> kRollHorizontalComponent;
|
||||
|
||||
/** The distance between subposition points in a movement vector.
|
||||
* Squashes vector components to 0 or !0, so vector length is ignored.
|
||||
|
||||
Reference in New Issue
Block a user