[nostalgia/tools/pack] Add conversion from TileSheet to CompactTileSheet

This commit is contained in:
Gary Talent 2022-02-17 21:31:25 -06:00
parent b87c2f0c50
commit 00852fad5a

View File

@ -5,6 +5,9 @@
#include <ox/claw/read.hpp>
#include <ox/fs/fs.hpp>
#include <nostalgia/core/gfx.hpp>
#include <nostalgia/core/typeconv.hpp>
#include "pack.hpp"
namespace nostalgia {
@ -32,6 +35,9 @@ static ox::Error doTransformations(ox::FileSystem *dest, const ox::String &fileP
if (filePath.endsWith(".ng") || filePath.endsWith(".npal")) {
// load file
oxRequireM(buff, dest->read(filePath.c_str()));
if (filePath.endsWith(".ng")) {
oxReturnError(core::convert<core::CompactTileSheet>(&buff));
}
// do transformations
oxReturnError(pathToInode(buff).moveTo(&buff));
oxReturnError(toMetalClaw(buff).moveTo(&buff));