mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Make crashed_vehicle_particle_create use CoordsXYZ
This commit is contained in:
@@ -3574,7 +3574,7 @@ void Vehicle::UpdateCollisionSetup()
|
||||
|
||||
for (int32_t i = 0; i < 10; i++)
|
||||
{
|
||||
crashed_vehicle_particle_create(train->colours, train->x, train->y, train->z);
|
||||
crashed_vehicle_particle_create(train->colours, { train->x, train->y, train->z });
|
||||
}
|
||||
|
||||
train->flags |= SPRITE_FLAGS_IS_CRASHED_VEHICLE_SPRITE;
|
||||
@@ -5300,7 +5300,7 @@ void Vehicle::CrashOnLand()
|
||||
uint8_t numParticles = std::min(sprite_width, static_cast<uint8_t>(7));
|
||||
|
||||
while (numParticles-- != 0)
|
||||
crashed_vehicle_particle_create(colours, x, y, z);
|
||||
crashed_vehicle_particle_create(colours, { x, y, z });
|
||||
|
||||
flags |= SPRITE_FLAGS_IS_CRASHED_VEHICLE_SPRITE;
|
||||
animation_frame = 0;
|
||||
@@ -5364,7 +5364,7 @@ void Vehicle::CrashOnWater()
|
||||
crash_splash_create(x - 4, y + 8, z);
|
||||
|
||||
for (int32_t i = 0; i < 10; ++i)
|
||||
crashed_vehicle_particle_create(colours, x - 4, y + 8, z);
|
||||
crashed_vehicle_particle_create(colours, { x - 4, y + 8, z });
|
||||
|
||||
flags |= SPRITE_FLAGS_IS_CRASHED_VEHICLE_SPRITE;
|
||||
animation_frame = 0;
|
||||
|
||||
@@ -27,7 +27,7 @@ template<> bool SpriteBase::Is<CrashSplashParticle>() const
|
||||
*
|
||||
* rct2: 0x006735A1
|
||||
*/
|
||||
void crashed_vehicle_particle_create(rct_vehicle_colour colours, int32_t x, int32_t y, int32_t z)
|
||||
void crashed_vehicle_particle_create(rct_vehicle_colour colours, const CoordsXYZ& vehiclePos)
|
||||
{
|
||||
VehicleCrashParticle* sprite = &create_sprite(SPRITE_IDENTIFIER_MISC)->crashed_vehicle_particle;
|
||||
if (sprite != nullptr)
|
||||
@@ -38,7 +38,7 @@ void crashed_vehicle_particle_create(rct_vehicle_colour colours, int32_t x, int3
|
||||
sprite->sprite_height_negative = 8;
|
||||
sprite->sprite_height_positive = 8;
|
||||
sprite->sprite_identifier = SPRITE_IDENTIFIER_MISC;
|
||||
sprite->MoveTo({ x, y, z });
|
||||
sprite->MoveTo(vehiclePos);
|
||||
sprite->type = SPRITE_MISC_CRASHED_VEHICLE_PARTICLE;
|
||||
|
||||
sprite->frame = (scenario_rand() & 0xFF) * 12;
|
||||
|
||||
@@ -249,7 +249,7 @@ uint32_t duck_get_frame_image(const Duck* duck, int32_t direction);
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Crash particles
|
||||
///////////////////////////////////////////////////////////////
|
||||
void crashed_vehicle_particle_create(rct_vehicle_colour colours, int32_t x, int32_t y, int32_t z);
|
||||
void crashed_vehicle_particle_create(rct_vehicle_colour colours, const CoordsXYZ& vehiclePos);
|
||||
void crashed_vehicle_particle_update(VehicleCrashParticle* particle);
|
||||
void crash_splash_create(int32_t x, int32_t y, int32_t z);
|
||||
void crash_splash_update(CrashSplashParticle* splash);
|
||||
|
||||
Reference in New Issue
Block a user