[nostalgia/core] Add setBgBpp function

This commit is contained in:
Gary Talent 2023-12-23 21:33:52 -06:00
parent 050339ba09
commit c5f76ff558
2 changed files with 8 additions and 1 deletions

View File

@ -311,6 +311,11 @@ void setBgStatus(Context&, unsigned bg, bool status) noexcept {
REG_DISPCTL = REG_DISPCTL | ((REG_DISPCTL & ~mask) | mask); REG_DISPCTL = REG_DISPCTL | ((REG_DISPCTL & ~mask) | mask);
} }
void setBgBpp(Context&, unsigned bgIdx, unsigned bpp) noexcept {
auto &bgCtl = regBgCtl(bgIdx);
teagba::bgSetBpp(bgCtl, bpp);
}
void setBgCbb(Context &ctx, unsigned bgIdx, unsigned cbb) noexcept { void setBgCbb(Context &ctx, unsigned bgIdx, unsigned cbb) noexcept {
auto &bgCtl = regBgCtl(bgIdx); auto &bgCtl = regBgCtl(bgIdx);
const auto &cbbData = ctx.cbbData[cbb]; const auto &cbbData = ctx.cbbData[cbb];

View File

@ -632,6 +632,8 @@ void setBgStatus(Context &ctx, uint_t bg, bool status) noexcept {
ctx.backgrounds[bg].enabled = status; ctx.backgrounds[bg].enabled = status;
} }
void setBgBpp(Context&, unsigned, unsigned) noexcept {}
void setBgCbb(Context &ctx, uint_t bgIdx, uint_t cbbIdx) noexcept { void setBgCbb(Context &ctx, uint_t bgIdx, uint_t cbbIdx) noexcept {
auto &bg = ctx.backgrounds[bgIdx]; auto &bg = ctx.backgrounds[bgIdx];
bg.cbbIdx = cbbIdx; bg.cbbIdx = cbbIdx;