| 2236 | } |
| 2237 | |
| 2238 | olc::rcode Renderable::Load(const std::string& sFile, ResourcePack* pack, bool filter, bool clamp) |
| 2239 | { |
| 2240 | pSprite = std::make_unique<olc::Sprite>(); |
| 2241 | if (pSprite->LoadFromFile(sFile, pack) == olc::rcode::OK) |
| 2242 | { |
| 2243 | pDecal = std::make_unique<olc::Decal>(pSprite.get(), filter, clamp); |
| 2244 | return olc::rcode::OK; |
| 2245 | } |
| 2246 | else |
| 2247 | { |
| 2248 | pSprite = nullptr; |
| 2249 | return olc::rcode::NO_FILE; |
| 2250 | } |
| 2251 | } |
| 2252 | |
| 2253 | olc::Decal* Renderable::Decal() const |
| 2254 | { |