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; }