Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make engine movable #352

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions olcPixelGameEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,8 @@ 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);
Expand Down Expand Up @@ -963,6 +964,9 @@ namespace olc
public:
PixelGameEngine();
virtual ~PixelGameEngine();
PixelGameEngine(PixelGameEngine&&) = default;
PixelGameEngine& operator=(PixelGameEngine&&) = default;

public:
olc::rcode Construct(int32_t screen_w, int32_t screen_h, int32_t pixel_w, int32_t pixel_h,
bool full_screen = false, bool vsync = false, bool cohesion = false);
Expand Down Expand Up @@ -4360,7 +4364,7 @@ namespace olc
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}

void SetDecalMode(const olc::DecalMode& mode)
void SetDecalMode(const olc::DecalMode& mode) override
{
if (mode != nDecalMode)
{
Expand Down