[nostalgia] Fill out basic Scene system functionality

This commit is contained in:
2023-02-07 23:17:58 -06:00
parent eb55144211
commit 8077aaf0ae
34 changed files with 1111 additions and 631 deletions
+6 -4
View File
@@ -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 {};