| 711 | struct PFRtm { Poseidon::Asset::Formats::RTMAnimation anim; }; |
| 712 | |
| 713 | PF_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 | |
| 725 | PF_API PF_HANDLE pf_rtm_load_from_memory(const uint8_t* data, int size) { |
| 726 | ClearError(); |
no test coverage detected