MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / Renderable

Class Renderable

olcPixelGameEngine.h:1183–1199  ·  view source on GitHub ↗

O------------------------------------------------------------------------------O | olc::Renderable - Convenience class to keep a sprite and decal together | O------------------------------------------------------------------------------O

Source from the content-addressed store, hash-verified

1181 // | olc::Renderable - Convenience class to keep a sprite and decal together |
1182 // O------------------------------------------------------------------------------O
1183 class Renderable
1184 {
1185 public:
1186 Renderable() = default;
1187 Renderable(Renderable&& r) = default;
1188 Renderable& operator=(Renderable&& r) = default;
1189 Renderable(const Renderable&) = delete;
1190 olc::rcode Load(const std::string& sFile, ResourcePack* pack = nullptr, bool filter = false, bool clamp = true);
1191 void Create(uint32_t width, uint32_t height, bool filter = false, bool clamp = true);
1192 olc::Decal* Decal() const;
1193 olc::Sprite* Sprite() const;
1194
1195
1196 private:
1197 std::unique_ptr<olc::Sprite> pSprite = nullptr;
1198 std::unique_ptr<olc::Decal> pDecal = nullptr;
1199 };
1200
1201
1202 // O------------------------------------------------------------------------------O

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected