2
0
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:
Jack Andersen
2016-04-11 13:35:37 -10:00
parent b10bd229e6
commit faacffba77
21 changed files with 613 additions and 16 deletions

View 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) {}
}