Merge pull request #25258 from Gymnasiast/backport/spacek-data-tables

Rename sound_vector_factor to dopplerShift
This commit is contained in:
Michael Steenbeek authored and GitHub committed 2025-09-25 10:49:11 +02:00
commit 66ecedb201
7 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -216,7 +216,7 @@ namespace OpenRCT2::Audio
frequency >>= 14; // /16384
frequency += 11025;
frequency += 16 * vehicle.sound_vector_factor;
frequency += 16 * vehicle.dopplerShift;
param.frequency = static_cast<uint16_t>(frequency);
param.id = vehicle.Id.ToUnderlying();
param.volume = 0;
+1 -1
View File
@@ -436,7 +436,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
COMPARE_FIELD(Vehicle, sound1_volume);
COMPARE_FIELD(Vehicle, sound2_id);
COMPARE_FIELD(Vehicle, sound2_volume);
COMPARE_FIELD(Vehicle, sound_vector_factor);
COMPARE_FIELD(Vehicle, dopplerShift);
COMPARE_FIELD(Vehicle, cable_lift_target);
COMPARE_FIELD(Vehicle, speed);
COMPARE_FIELD(Vehicle, powered_acceleration);
+1 -1
View File
@@ -2256,7 +2256,7 @@ namespace OpenRCT2
cs.readWrite(entity.sound1_volume);
cs.readWrite(entity.sound2_id);
cs.readWrite(entity.sound2_volume);
cs.readWrite(entity.sound_vector_factor);
cs.readWrite(entity.dopplerShift);
cs.readWrite(entity.time_waiting);
cs.readWrite(entity.speed);
cs.readWrite(entity.powered_acceleration);
+1 -1
View File
@@ -2824,7 +2824,7 @@ namespace OpenRCT2::RCT1
dst->SwingSpeed = src->SwingSpeed;
dst->restraints_position = src->RestraintsPosition;
dst->spin_sprite = src->SpinSprite;
dst->sound_vector_factor = src->SoundVectorFactor;
dst->dopplerShift = src->SoundVectorFactor;
dst->spin_speed = src->SpinSpeed;
dst->sound2_flags = src->Sound2Flags;
dst->sound1_id = OpenRCT2::Audio::SoundId::Null;
+1 -1
View File
@@ -2034,7 +2034,7 @@ namespace OpenRCT2::RCT2
dst->sound1_volume = src->Sound1Volume;
dst->sound2_id = static_cast<OpenRCT2::Audio::SoundId>(src->Sound2Id);
dst->sound2_volume = src->Sound2Volume;
dst->sound_vector_factor = src->SoundVectorFactor;
dst->dopplerShift = src->SoundVectorFactor;
dst->time_waiting = src->TimeWaiting;
dst->speed = src->Speed;
dst->powered_acceleration = src->PoweredAcceleration;
+2 -2
View File
@@ -4966,7 +4966,7 @@ void Vehicle::UpdateSound()
int32_t soundVector = ((velocity >> 14) * soundDirection) >> 14;
soundVector = std::clamp(soundVector, -127, 127);
sound_vector_factor = soundVector & 0xFF;
dopplerShift = soundVector & 0xFF;
}
/**
@@ -9030,7 +9030,7 @@ void Vehicle::Serialise(DataSerialiser& stream)
stream << sound1_volume;
stream << sound2_id;
stream << sound2_volume;
stream << sound_vector_factor;
stream << dopplerShift;
stream << var_C0;
stream << speed;
stream << powered_acceleration;
+1 -1
View File
@@ -180,7 +180,7 @@ struct Vehicle : EntityBase
uint8_t sound1_volume;
OpenRCT2::Audio::SoundId sound2_id;
uint8_t sound2_volume;
int8_t sound_vector_factor;
int8_t dopplerShift;
union
{
uint16_t var_C0;