[nostalgia/core] Update pack transforms to use ModelTypeId_v
This commit is contained in:
parent
7941a514ba
commit
9220271630
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
namespace nostalgia::core {
|
namespace nostalgia::core {
|
||||||
|
|
||||||
class KeelModule: public keel::Module {
|
static class: public keel::Module {
|
||||||
private:
|
private:
|
||||||
NostalgiaPaletteToPaletteV1Converter m_nostalgiaPaletteToPaletteV1Converter;
|
NostalgiaPaletteToPaletteV1Converter m_nostalgiaPaletteToPaletteV1Converter;
|
||||||
PaletteV1ToPaletteV2Converter m_paletteV1ToPaletteV2Converter;
|
PaletteV1ToPaletteV2Converter m_paletteV1ToPaletteV2Converter;
|
||||||
@ -62,11 +62,11 @@ class KeelModule: public keel::Module {
|
|||||||
oxRequire(hdr, keel::readAssetHeader(buff));
|
oxRequire(hdr, keel::readAssetHeader(buff));
|
||||||
auto const typeId = ox::buildTypeId(
|
auto const typeId = ox::buildTypeId(
|
||||||
hdr.clawHdr.typeName, hdr.clawHdr.typeVersion, hdr.clawHdr.typeParams);
|
hdr.clawHdr.typeName, hdr.clawHdr.typeVersion, hdr.clawHdr.typeParams);
|
||||||
if (typeId == ox::buildTypeId<TileSheetV1>() ||
|
if (typeId == ox::ModelTypeId_v<TileSheetV1> ||
|
||||||
typeId == ox::buildTypeId<TileSheetV2>() ||
|
typeId == ox::ModelTypeId_v<TileSheetV2> ||
|
||||||
typeId == ox::buildTypeId<TileSheetV3>() ||
|
typeId == ox::ModelTypeId_v<TileSheetV3> ||
|
||||||
typeId == ox::buildTypeId<TileSheetV4>()) {
|
typeId == ox::ModelTypeId_v<TileSheetV4>) {
|
||||||
oxReturnError(keel::convertBuffToBuff<core::CompactTileSheet>(
|
oxReturnError(keel::convertBuffToBuff<CompactTileSheet>(
|
||||||
ctx, buff, ox::ClawFormat::Metal).moveTo(buff));
|
ctx, buff, ox::ClawFormat::Metal).moveTo(buff));
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
@ -75,19 +75,18 @@ class KeelModule: public keel::Module {
|
|||||||
oxRequire(hdr, keel::readAssetHeader(buff));
|
oxRequire(hdr, keel::readAssetHeader(buff));
|
||||||
auto const typeId = ox::buildTypeId(
|
auto const typeId = ox::buildTypeId(
|
||||||
hdr.clawHdr.typeName, hdr.clawHdr.typeVersion, hdr.clawHdr.typeParams);
|
hdr.clawHdr.typeName, hdr.clawHdr.typeVersion, hdr.clawHdr.typeParams);
|
||||||
if (typeId == ox::buildTypeId<NostalgiaPalette>() ||
|
if (typeId == ox::ModelTypeId_v<NostalgiaPalette> ||
|
||||||
typeId == ox::buildTypeId<PaletteV1>()) {
|
typeId == ox::ModelTypeId_v<PaletteV1>) {
|
||||||
oxReturnError(keel::convertBuffToBuff<core::Palette>(
|
oxReturnError(keel::convertBuffToBuff<Palette>(
|
||||||
ctx, buff, ox::ClawFormat::Metal).moveTo(buff));
|
ctx, buff, ox::ClawFormat::Metal).moveTo(buff));
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
} mod;
|
||||||
|
|
||||||
static const KeelModule mod;
|
keel::Module const*keelModule() noexcept {
|
||||||
const keel::Module *keelModule() noexcept {
|
|
||||||
return &mod;
|
return &mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user