From 9220271630dbdf28ef9080e95babf97559b6df76 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 10 Apr 2024 00:03:16 -0500 Subject: [PATCH] [nostalgia/core] Update pack transforms to use ModelTypeId_v --- .../modules/core/src/keel/keelmodule.cpp | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/nostalgia/modules/core/src/keel/keelmodule.cpp b/src/nostalgia/modules/core/src/keel/keelmodule.cpp index 7488528b..cc59d504 100644 --- a/src/nostalgia/modules/core/src/keel/keelmodule.cpp +++ b/src/nostalgia/modules/core/src/keel/keelmodule.cpp @@ -14,7 +14,7 @@ namespace nostalgia::core { -class KeelModule: public keel::Module { +static class: public keel::Module { private: NostalgiaPaletteToPaletteV1Converter m_nostalgiaPaletteToPaletteV1Converter; PaletteV1ToPaletteV2Converter m_paletteV1ToPaletteV2Converter; @@ -62,11 +62,11 @@ class KeelModule: public keel::Module { oxRequire(hdr, keel::readAssetHeader(buff)); auto const typeId = ox::buildTypeId( hdr.clawHdr.typeName, hdr.clawHdr.typeVersion, hdr.clawHdr.typeParams); - if (typeId == ox::buildTypeId() || - typeId == ox::buildTypeId() || - typeId == ox::buildTypeId() || - typeId == ox::buildTypeId()) { - oxReturnError(keel::convertBuffToBuff( + if (typeId == ox::ModelTypeId_v || + typeId == ox::ModelTypeId_v || + typeId == ox::ModelTypeId_v || + typeId == ox::ModelTypeId_v) { + oxReturnError(keel::convertBuffToBuff( ctx, buff, ox::ClawFormat::Metal).moveTo(buff)); } return {}; @@ -75,19 +75,18 @@ class KeelModule: public keel::Module { oxRequire(hdr, keel::readAssetHeader(buff)); auto const typeId = ox::buildTypeId( hdr.clawHdr.typeName, hdr.clawHdr.typeVersion, hdr.clawHdr.typeParams); - if (typeId == ox::buildTypeId() || - typeId == ox::buildTypeId()) { - oxReturnError(keel::convertBuffToBuff( + if (typeId == ox::ModelTypeId_v || + typeId == ox::ModelTypeId_v) { + oxReturnError(keel::convertBuffToBuff( ctx, buff, ox::ClawFormat::Metal).moveTo(buff)); } return {}; }, }; } -}; +} mod; -static const KeelModule mod; -const keel::Module *keelModule() noexcept { +keel::Module const*keelModule() noexcept { return &mod; }