[nostalgia/core] Make FileAddress args const ref

This commit is contained in:
2021-05-03 14:32:02 -04:00
parent 937bf3ad91
commit 504d248ce3
3 changed files with 20 additions and 23 deletions
+5 -8
View File
@@ -29,20 +29,17 @@ ox::Error initConsole(Context *ctx) noexcept {
ox::Error loadSpriteTileSheet(Context*,
int,
ox::FileAddress,
ox::FileAddress) noexcept {
const ox::FileAddress&,
const ox::FileAddress&) noexcept {
return OxError(0);
}
ox::Error loadBgTileSheet(Context *ctx,
int section,
ox::FileAddress tilesheetPath,
ox::FileAddress palettePath) noexcept {
const ox::FileAddress &tilesheetPath,
const ox::FileAddress &palettePath) noexcept {
oxRequire(tilesheet, readObj<NostalgiaGraphic>(ctx, tilesheetPath));
if (!palettePath) {
palettePath = tilesheet.defaultPalette;
}
oxRequire(palette, readObj<NostalgiaPalette>(ctx, palettePath));
oxRequire(palette, readObj<NostalgiaPalette>(ctx, palettePath ? palettePath : tilesheet.defaultPalette));
const unsigned bytesPerTile = tilesheet.bpp == 8 ? 64 : 32;
const auto tiles = tilesheet.pixels.size() / bytesPerTile;
constexpr int width = 8;