mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:07:42 +00:00
Various ANIM reader imps
This commit is contained in:
32
Runtime/Character/CAllFormatsAnimSource.cpp
Normal file
32
Runtime/Character/CAllFormatsAnimSource.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "CAllFormatsAnimSource.hpp"
|
||||
#include "logvisor/logvisor.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
static logvisor::Module Log("urde::CAllFormatsAnimSource");
|
||||
|
||||
void CAnimFormatUnion::SubConstruct(u8* storage, EAnimFormat fmt,
|
||||
CInputStream& in, IObjectStore& store)
|
||||
{
|
||||
switch (fmt)
|
||||
{
|
||||
case EAnimFormat::Uncompressed:
|
||||
new (storage) CAnimSource(in, store);
|
||||
break;
|
||||
default:
|
||||
Log.report(logvisor::Fatal, "unable to read ANIM format %d", int(fmt));
|
||||
}
|
||||
}
|
||||
|
||||
CAnimFormatUnion::CAnimFormatUnion(CInputStream& in, IObjectStore& store)
|
||||
{
|
||||
x0_format = EAnimFormat(in.readUint32Big());
|
||||
SubConstruct(x4_storage, x0_format, in, store);
|
||||
}
|
||||
|
||||
CAllFormatsAnimSource::CAllFormatsAnimSource(CInputStream& in,
|
||||
IObjectStore& store,
|
||||
const SObjectTag& tag)
|
||||
: CAnimFormatUnion(in, store), x74_tag(tag) {}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user