MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / pf_rtm_load

Function pf_rtm_load

engine/PoseidonFormats/PoseidonFormats.cpp:713–723  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711struct PFRtm { Poseidon::Asset::Formats::RTMAnimation anim; };
712
713PF_API PF_HANDLE pf_rtm_load(const char* path) {
714 ClearError();
715 if (!path) { SetError("NULL path"); return nullptr; }
716 auto rtm = new PFRtm();
717 if (!Poseidon::Asset::Formats::readRTMFromFile(path, rtm->anim)) {
718 delete rtm;
719 SetError(std::string("Failed to load RTM: ") + path);
720 return nullptr;
721 }
722 return rtm;
723}
724
725PF_API PF_HANDLE pf_rtm_load_from_memory(const uint8_t* data, int size) {
726 ClearError();

Callers 1

Calls 3

ClearErrorFunction · 0.85
readRTMFromFileFunction · 0.85
SetErrorFunction · 0.70

Tested by

no test coverage detected