MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / load

Method load

Source/Node/EffekNode.cpp:409–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409EffekEff* EffekManager::load(String filename) {
410 auto filenameStr = SharedContent.getFullPath(filename);
411 auto it = _effects.find(filenameStr);
412 if (it != _effects.end()) {
413 return it->second;
414 }
415 if (!SharedContent.exist(filenameStr)) {
416 Warn("failed to find Effekseer file \"{}\"", filename.toString());
417 return nullptr;
418 }
419 char16_t path16[MAX_PATH];
420 Effekseer::ConvertUtf8ToUtf16(path16, MAX_PATH, filenameStr.c_str());
421 auto eff = Effekseer::Effect::Create(instance->efkManager, path16);
422 auto effekEff = EffekEff::create();
423 effekEff->effect = eff;
424 _effects[filenameStr] = effekEff;
425 return effekEff;
426}
427
428bool EffekManager::unload() {
429 if (_effects.empty()) {

Callers

nothing calls this directly

Calls 10

ConvertUtf8ToUtf16Function · 0.85
CreateFunction · 0.85
getFullPathMethod · 0.80
findMethod · 0.65
existMethod · 0.65
toStringMethod · 0.65
WarnFunction · 0.50
createFunction · 0.50
endMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected