Skip to content

Commit

Permalink
Fix Renderable move constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
OneLoneCoder committed Jul 22, 2024
1 parent cd106ea commit 3eee998
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions olcPixelGameEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -888,13 +888,15 @@ namespace olc
{
public:
Renderable() = default;
Renderable(Renderable&& r) : pSprite(std::move(r.pSprite)), pDecal(std::move(r.pDecal)) {}
Renderable(Renderable&& r) = default;
Renderable& operator=(Renderable&& r) = default;
Renderable(const Renderable&) = delete;
olc::rcode Load(const std::string& sFile, ResourcePack* pack = nullptr, bool filter = false, bool clamp = true);
void Create(uint32_t width, uint32_t height, bool filter = false, bool clamp = true);
olc::Decal* Decal() const;
olc::Sprite* Sprite() const;


private:
std::unique_ptr<olc::Sprite> pSprite = nullptr;
std::unique_ptr<olc::Decal> pDecal = nullptr;
Expand Down Expand Up @@ -4023,7 +4025,7 @@ namespace olc
if(!bClipAndScale)
vInvScreenSize = 1.0f / olc::vf2d(viewSize);
else
vInvScreenSize = 1.0f / olc::vf2d(vViewSize);
vInvScreenSize = 1.0f / olc::vf2d(vScreenSize);
}

void PixelGameEngine::adv_FlushLayer(const size_t nLayerID)
Expand Down

0 comments on commit 3eee998

Please sign in to comment.