[nostalgia/core] Add setBgBpp function
This commit is contained in:
parent
050339ba09
commit
c5f76ff558
@ -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];
|
||||||
|
@ -628,10 +628,12 @@ bool bgStatus(Context &ctx, uint_t bg) noexcept {
|
|||||||
return ctx.backgrounds[bg].enabled;
|
return ctx.backgrounds[bg].enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setBgStatus(Context &ctx, uint_t bg, bool status) noexcept {
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user