Changed up how resources import/export files. Added Model codecs.

This commit is contained in:
2024-02-20 22:47:52 -08:00
parent 54012df3a1
commit 93f881cf03
20 changed files with 998 additions and 882 deletions

View File

@@ -7,6 +7,10 @@
namespace ehs
{
class Img;
class ImgCodec;
typedef bool (*EncodeImgCb)(const ImgCodec* const, Serializer<UInt_64>&, const Img*);
typedef bool (*DecodeImgCb)(const ImgCodec* const, Serializer<UInt_64>&, Img*);
class ImgCodec
{
@@ -15,15 +19,13 @@ namespace ehs
UInt_64 hashExt;
Str_8 ext;
Endianness endianness;
bool (*encodeCb)(const ImgCodec* const, Serializer<UInt_64>&, const Img*);
bool (*decodeCb)(const ImgCodec* const, Serializer<UInt_64>&, Img*);
EncodeImgCb encoder;
DecodeImgCb decoder;
public:
ImgCodec();
ImgCodec(Str_8 id, Str_8 ext, const Endianness end,
bool (*encodeCb)(const ImgCodec* const, Serializer<UInt_64>&, const Img*),
bool (*decodeCb)(const ImgCodec* const, Serializer<UInt_64>&, Img*));
ImgCodec(Str_8 id, Str_8 ext, Endianness end, EncodeImgCb encoder, DecodeImgCb decoder);
ImgCodec(ImgCodec&& codec) noexcept;