2016-04-13 06:07:23 +00:00
|
|
|
#ifndef __URDE_CALLFORMATANIMSOURCE_HPP__
|
|
|
|
#define __URDE_CALLFORMATANIMSOURCE_HPP__
|
2016-04-11 23:35:37 +00:00
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "zeus/CVector3f.hpp"
|
|
|
|
#include "CAnimSource.hpp"
|
2016-04-12 06:15:32 +00:00
|
|
|
#include "CFactoryMgr.hpp"
|
2016-04-11 23:35:37 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class IObjectStore;
|
2016-04-12 06:15:32 +00:00
|
|
|
class CAnimSourceReaderBase;
|
2016-04-11 23:35:37 +00:00
|
|
|
|
|
|
|
enum class EAnimFormat
|
|
|
|
{
|
|
|
|
Uncompressed,
|
|
|
|
Unknown,
|
2016-08-26 22:23:59 +00:00
|
|
|
BitstreamCompressed,
|
|
|
|
BitstreamCompressed24
|
2016-04-11 23:35:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CAnimFormatUnion
|
|
|
|
{
|
2016-04-12 08:17:14 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
EAnimFormat x0_format;
|
|
|
|
intptr_t _align = 0;
|
|
|
|
};
|
2016-04-11 23:35:37 +00:00
|
|
|
u8 x4_storage[sizeof(CAnimSource)];
|
|
|
|
static void SubConstruct(u8* storage, EAnimFormat fmt,
|
|
|
|
CInputStream& in, IObjectStore& store);
|
|
|
|
public:
|
|
|
|
CAnimFormatUnion(CInputStream& in, IObjectStore& store);
|
2016-04-12 06:15:32 +00:00
|
|
|
~CAnimFormatUnion();
|
2016-04-11 23:35:37 +00:00
|
|
|
operator CAnimSource&() {return *reinterpret_cast<CAnimSource*>(x4_storage);}
|
|
|
|
};
|
|
|
|
|
|
|
|
class CAllFormatsAnimSource : public CAnimFormatUnion
|
|
|
|
{
|
|
|
|
zeus::CVector3f x68_;
|
|
|
|
SObjectTag x74_tag;
|
|
|
|
public:
|
|
|
|
CAllFormatsAnimSource(CInputStream& in, IObjectStore& store, const SObjectTag& tag);
|
2016-04-12 06:15:32 +00:00
|
|
|
static std::shared_ptr<CAnimSourceReaderBase> GetNewReader(const TLockedToken<CAllFormatsAnimSource>& tok,
|
|
|
|
const CCharAnimTime& startTime);
|
2016-04-11 23:35:37 +00:00
|
|
|
};
|
|
|
|
|
2016-04-12 06:15:32 +00:00
|
|
|
CFactoryFnReturn AnimSourceFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& params);
|
|
|
|
|
2016-04-11 23:35:37 +00:00
|
|
|
}
|
|
|
|
|
2016-04-13 06:07:23 +00:00
|
|
|
#endif // __URDE_CALLFORMATANIMSOURCE_HPP__
|