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

Method Load

olcPixelGameEngine.h:2238–2251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 2

OnUserCreateMethod · 0.80
OnUserCreateMethod · 0.80

Calls 1

LoadFromFileMethod · 0.45

Tested by 2

OnUserCreateMethod · 0.64
OnUserCreateMethod · 0.64