[nostalgia/core/gba] Remove now unnecessary casts
This commit is contained in:
parent
25504d87af
commit
5fe91ae577
@ -172,12 +172,12 @@ ox::Error loadBgTileSheet(Context *ctx,
|
||||
target.pal.palette = &MEM_BG_PALETTE[section];
|
||||
target.bgCtl = &bgCtl(section);
|
||||
target.tileMap = &ox::bit_cast<uint16_t*>(MEM_BG_TILES)[section * 512];
|
||||
oxReturnError(ox::readMC(ox::bit_cast<char*>(ts), tsStat.size, &target));
|
||||
oxReturnError(ox::readMC(ts, tsStat.size, &target));
|
||||
// load external palette if available
|
||||
if (paletteAddr) {
|
||||
oxRequire(palStat, ctx->rom->stat(paletteAddr));
|
||||
oxRequire(pal, ctx->rom->directAccess(paletteAddr));
|
||||
oxReturnError(ox::readMC(ox::bit_cast<char*>(pal), palStat.size, &target.pal));
|
||||
oxReturnError(ox::readMC(pal, palStat.size, &target.pal));
|
||||
}
|
||||
return OxError(0);
|
||||
}
|
||||
@ -193,12 +193,12 @@ ox::Error loadSpriteTileSheet(Context *ctx,
|
||||
// Is this needed? Should this be written to an equivalent sprite value?
|
||||
// target.bgCtl = &bgCtl(section);
|
||||
target.tileMap = &ox::bit_cast<uint16_t*>(MEM_SPRITE_TILES)[section * 512];
|
||||
oxReturnError(ox::readMC(ox::bit_cast<char*>(ts), tsStat.size, &target));
|
||||
oxReturnError(ox::readMC(ts, tsStat.size, &target));
|
||||
// load external palette if available
|
||||
if (paletteAddr) {
|
||||
oxRequire(palStat, ctx->rom->stat(paletteAddr));
|
||||
oxRequire(pal, ctx->rom->directAccess(paletteAddr));
|
||||
oxReturnError(ox::readMC(ox::bit_cast<char*>(pal), palStat.size, &target.pal));
|
||||
oxReturnError(ox::readMC(pal, palStat.size, &target.pal));
|
||||
}
|
||||
return OxError(0);
|
||||
}
|
||||
@ -208,7 +208,7 @@ ox::Error loadBgPalette(Context *ctx, int section, const ox::FileAddress &palett
|
||||
target.palette = &MEM_BG_PALETTE[section];
|
||||
oxRequire(palStat, ctx->rom->stat(paletteAddr));
|
||||
oxRequire(pal, ctx->rom->directAccess(paletteAddr));
|
||||
oxReturnError(ox::readMC(ox::bit_cast<char*>(pal), palStat.size, &target));
|
||||
oxReturnError(ox::readMC(pal, palStat.size, &target));
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ ox::Error loadSpritePalette(Context *ctx, int section, const ox::FileAddress &pa
|
||||
target.palette = &MEM_SPRITE_PALETTE[section];
|
||||
oxRequire(palStat, ctx->rom->stat(paletteAddr));
|
||||
oxRequire(pal, ctx->rom->directAccess(paletteAddr));
|
||||
oxReturnError(ox::readMC(ox::bit_cast<char*>(pal), palStat.size, &target));
|
||||
oxReturnError(ox::readMC(pal, palStat.size, &target));
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user