[nostalgia/core] Move most TileSheet member functions out of class
All checks were successful
Build / build (push) Successful in 2m4s

This commit is contained in:
2023-12-27 23:10:38 -06:00
parent bf12b15fe6
commit 4b9758f478
15 changed files with 339 additions and 462 deletions

View File

@@ -42,7 +42,7 @@ struct TileDoc {
if (subsheetId > -1) {
return subsheetId;
}
return ts.getIdFor(subsheetPath);
return getIdFor(ts, subsheetPath);
}
[[nodiscard]]
@@ -50,7 +50,7 @@ struct TileDoc {
core::TileSheet const&ts) const noexcept {
// prefer the already present path
if (!subsheetPath.len()) {
return ts.getNameFor(subsheetId);
return core::getNameFor(ts, subsheetId);
}
return ox::StringView(subsheetPath);
}

View File

@@ -54,7 +54,7 @@ ox::Error SceneDocToSceneStaticConverter::convert(
auto dstTile = dstLayer.tile(tileIdx);
dstTile.tileType = srcTile.type;
oxRequire(path, srcTile.getSubsheetPath(*ts));
oxRequire(mapIdx, ts->getTileOffset(path));
oxRequire(mapIdx, getTileOffset(*ts, path));
dstTile.tileMapIdx = static_cast<uint16_t>(mapIdx);
setLayerAttachments(layerIdx, srcTile, dstTile);
++tileIdx;