1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00

Move painting for ExplosionCloud entity

This commit is contained in:
ζeh Matt
2021-11-27 15:39:48 +02:00
parent 0e1dbf7cf1
commit 3db8ef1a75
3 changed files with 4 additions and 10 deletions

View File

@@ -284,8 +284,10 @@ void ExplosionCloud::Serialise(DataSerialiser& stream)
stream << frame;
}
void ExplosionCloud::Paint() const
void ExplosionCloud::Paint(paint_session* session, int32_t imageDirection) const
{
uint32_t imageId = 22878 + (frame / 256);
PaintAddImageAsParent(session, imageId, { 0, 0, z }, { 1, 1, 0 });
}
/**

View File

@@ -62,7 +62,7 @@ struct ExplosionCloud : EntityBase
static void Create(const CoordsXYZ& cloudPos);
void Update();
void Serialise(DataSerialiser& stream);
void Paint() const;
void Paint(paint_session* session, int32_t imageDirection) const;
};
struct SteamParticle : EntityBase

View File

@@ -65,11 +65,3 @@ template<> void PaintEntity(paint_session* session, const VehicleCrashParticle*
imageId = imageId | (particle->colour[0] << 19) | (particle->colour[1] << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS;
PaintAddImageAsParent(session, imageId, { 0, 0, particle->z }, { 1, 1, 0 });
}
template<> void PaintEntity(paint_session* session, const ExplosionCloud* particle, int32_t imageDirection)
{
if (particle == nullptr)
return;
uint32_t imageId = 22878 + (particle->frame / 256);
PaintAddImageAsParent(session, imageId, { 0, 0, particle->z }, { 1, 1, 0 });
}