mirror of https://github.com/OpenRCT2/OpenRCT2.git
Make crash_splash_create use CoordsXYZ
This commit is contained in:
parent
030686dc6b
commit
15bad3898d
|
@ -5357,11 +5357,11 @@ void Vehicle::CrashOnWater()
|
||||||
sub_state = 2;
|
sub_state = 2;
|
||||||
audio_play_sound_at_location(SoundId::Water1, { x, y, z });
|
audio_play_sound_at_location(SoundId::Water1, { x, y, z });
|
||||||
|
|
||||||
crash_splash_create(x, y, z);
|
crash_splash_create({ x, y, z });
|
||||||
crash_splash_create(x - 8, y - 9, z);
|
crash_splash_create({ x - 8, y - 9, z });
|
||||||
crash_splash_create(x + 11, y - 9, z);
|
crash_splash_create({ x + 11, y - 9, z });
|
||||||
crash_splash_create(x + 11, y + 8, z);
|
crash_splash_create({ x + 11, y + 8, z });
|
||||||
crash_splash_create(x - 4, y + 8, z);
|
crash_splash_create({ x - 4, y + 8, z });
|
||||||
|
|
||||||
for (int32_t i = 0; i < 10; ++i)
|
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 });
|
||||||
|
|
|
@ -96,7 +96,7 @@ void crashed_vehicle_particle_update(VehicleCrashParticle* particle)
|
||||||
{
|
{
|
||||||
// Splash
|
// Splash
|
||||||
audio_play_sound_at_location(SoundId::Water2, { particle->x, particle->y, waterZ });
|
audio_play_sound_at_location(SoundId::Water2, { particle->x, particle->y, waterZ });
|
||||||
crash_splash_create(particle->x, particle->y, waterZ);
|
crash_splash_create({ particle->x, particle->y, waterZ });
|
||||||
sprite_remove(particle);
|
sprite_remove(particle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ void crashed_vehicle_particle_update(VehicleCrashParticle* particle)
|
||||||
*
|
*
|
||||||
* rct2: 0x00673699
|
* rct2: 0x00673699
|
||||||
*/
|
*/
|
||||||
void crash_splash_create(int32_t x, int32_t y, int32_t z)
|
void crash_splash_create(const CoordsXYZ& splashPos)
|
||||||
{
|
{
|
||||||
SpriteGeneric* sprite = &create_sprite(SPRITE_IDENTIFIER_MISC)->generic;
|
SpriteGeneric* sprite = &create_sprite(SPRITE_IDENTIFIER_MISC)->generic;
|
||||||
if (sprite != nullptr)
|
if (sprite != nullptr)
|
||||||
|
@ -130,7 +130,7 @@ void crash_splash_create(int32_t x, int32_t y, int32_t z)
|
||||||
sprite->sprite_height_negative = 51;
|
sprite->sprite_height_negative = 51;
|
||||||
sprite->sprite_height_positive = 16;
|
sprite->sprite_height_positive = 16;
|
||||||
sprite->sprite_identifier = SPRITE_IDENTIFIER_MISC;
|
sprite->sprite_identifier = SPRITE_IDENTIFIER_MISC;
|
||||||
sprite->MoveTo({ x, y, z + 3 });
|
sprite->MoveTo(splashPos + CoordsXYZ{ 0, 0, 3 });
|
||||||
sprite->type = SPRITE_MISC_CRASH_SPLASH;
|
sprite->type = SPRITE_MISC_CRASH_SPLASH;
|
||||||
sprite->frame = 0;
|
sprite->frame = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,7 +251,7 @@ uint32_t duck_get_frame_image(const Duck* duck, int32_t direction);
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
void crashed_vehicle_particle_create(rct_vehicle_colour colours, const CoordsXYZ& vehiclePos);
|
void crashed_vehicle_particle_create(rct_vehicle_colour colours, const CoordsXYZ& vehiclePos);
|
||||||
void crashed_vehicle_particle_update(VehicleCrashParticle* particle);
|
void crashed_vehicle_particle_update(VehicleCrashParticle* particle);
|
||||||
void crash_splash_create(int32_t x, int32_t y, int32_t z);
|
void crash_splash_create(const CoordsXYZ& splashPos);
|
||||||
void crash_splash_update(CrashSplashParticle* splash);
|
void crash_splash_update(CrashSplashParticle* splash);
|
||||||
|
|
||||||
rct_sprite_checksum sprite_checksum();
|
rct_sprite_checksum sprite_checksum();
|
||||||
|
|
Loading…
Reference in New Issue