[nostalgia] Fill out basic Scene system functionality
This commit is contained in:
@@ -15,11 +15,12 @@ namespace nostalgia::core {
|
||||
|
||||
CoreModule CoreModule::mod;
|
||||
|
||||
ox::Vector<foundation::BaseConverter*> CoreModule::converters() const noexcept {
|
||||
ox::Vector<const foundation::BaseConverter*> CoreModule::converters() const noexcept {
|
||||
return {
|
||||
&nostalgiaPaletteToPaletteConverter,
|
||||
&nostalgiaGraphicToTileSheetConverter,
|
||||
&tileSheetToCompactTileSheetConverter,
|
||||
&tileSheetV2ToTileSheetConverter,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -28,9 +29,10 @@ ox::Vector<foundation::PackTransform> CoreModule::packTransforms() const noexcep
|
||||
// convert tilesheets to CompactTileSheets
|
||||
[](foundation::Context *ctx, ox::Buffer *buff) -> ox::Error {
|
||||
oxRequire(hdr, ox::readClawHeader(*buff));
|
||||
const auto typeId = ox::buildTypeId(hdr.typeName, hdr.typeVersion);
|
||||
if (typeId == ox::buildTypeId<TileSheet>() ||
|
||||
typeId == ox::buildTypeId<NostalgiaGraphic>()) {
|
||||
const auto typeId = ox::buildTypeId(hdr.typeName, hdr.typeVersion, hdr.typeParams);
|
||||
if (typeId == ox::buildTypeId<TileSheetV1>() ||
|
||||
typeId == ox::buildTypeId<TileSheetV2>() ||
|
||||
typeId == ox::buildTypeId<TileSheet>()) {
|
||||
oxReturnError(foundation::convertBuffToBuff<core::CompactTileSheet>(ctx, *buff, ox::ClawFormat::Metal).moveTo(buff));
|
||||
}
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user