diff --git a/src/openrct2/entity/Balloon.cpp b/src/openrct2/entity/Balloon.cpp index 856f592306..ad99993c00 100644 --- a/src/openrct2/entity/Balloon.cpp +++ b/src/openrct2/entity/Balloon.cpp @@ -13,6 +13,7 @@ #include "../audio/audio.h" #include "../core/DataSerialiser.h" #include "../network/network.h" +#include "../paint/Paint.h" #include "../scenario/Scenario.h" #include "../util/Util.h" #include "EntityRegistry.h" @@ -107,6 +108,14 @@ void Balloon::Serialise(DataSerialiser& stream) stream << colour; } -void Balloon::Paint() const +void Balloon::Paint(paint_session* session, int32_t imageDirection) const { + uint32_t imageId = 22651 + (frame & 7); + if (popped != 0) + { + imageId += 8; + } + + imageId = imageId | (colour << 19) | IMAGE_TYPE_REMAP; + PaintAddImageAsParent(session, imageId, { 0, 0, z }, { 1, 1, 0 }); } diff --git a/src/openrct2/entity/Balloon.h b/src/openrct2/entity/Balloon.h index 1470f52fda..3323ebaf11 100644 --- a/src/openrct2/entity/Balloon.h +++ b/src/openrct2/entity/Balloon.h @@ -13,6 +13,7 @@ class DataSerialiser; struct CoordsXYZ; +struct paint_session; struct Balloon : EntityBase { @@ -26,5 +27,5 @@ struct Balloon : EntityBase void Pop(); void Press(); void Serialise(DataSerialiser& stream); - void Paint() const; + void Paint(paint_session* session, int32_t imageDirection) const; }; diff --git a/src/openrct2/paint/sprite/Paint.Misc.cpp b/src/openrct2/paint/sprite/Paint.Misc.cpp index cbdc03b46b..d439c508b6 100644 --- a/src/openrct2/paint/sprite/Paint.Misc.cpp +++ b/src/openrct2/paint/sprite/Paint.Misc.cpp @@ -135,17 +135,3 @@ template<> void PaintEntity(paint_session* session, const JumpingFountain* jumpi PaintAddImageAsParentRotated(session, ebx, imageId, 0, 0, 32, 1, 3, height, bb[ebx & 1].x, bb[ebx & 1].y, height); } - -template<> void PaintEntity(paint_session* session, const Balloon* balloon, int32_t imageDirection) -{ - if (balloon == nullptr) - return; - uint32_t imageId = 22651 + (balloon->frame & 7); - if (balloon->popped != 0) - { - imageId += 8; - } - - imageId = imageId | (balloon->colour << 19) | IMAGE_TYPE_REMAP; - PaintAddImageAsParent(session, imageId, { 0, 0, balloon->z }, { 1, 1, 0 }); -}