[nostalgia/core/opengl] Implement flip X and flip Y for BG tiles
This commit is contained in:
@@ -82,7 +82,8 @@ static ox::Error runTest(turbine::Context &tctx) {
|
||||
|
||||
[[maybe_unused]]
|
||||
static ox::Error runTileSheetSetTest(turbine::Context &tctx) {
|
||||
// this should make the screen display 'ABCDB'
|
||||
// this should make the screen display 'ABCDB', with the A being upside down
|
||||
// and the first B being backwards
|
||||
constexpr ox::FileAddress PaletteAddr = ox::StringLiteral("/Palettes/Charset.npal");
|
||||
oxRequireM(cctx, core::init(tctx));
|
||||
turbine::setApplicationData(tctx, cctx.get());
|
||||
@@ -103,9 +104,9 @@ static ox::Error runTileSheetSetTest(turbine::Context &tctx) {
|
||||
oxReturnError(core::loadBgPalette(*cctx, 0, ox::StringLiteral("/Palettes/Chester.npal")));
|
||||
oxReturnError(core::loadSpritePalette(*cctx, PaletteAddr));
|
||||
core::setBgStatus(*cctx, 0, true);
|
||||
core::setBgTile(*cctx, 0, 10, 9, 1, bgPalBank);
|
||||
core::setBgTile(*cctx, 0, 11, 9, 2, bgPalBank);
|
||||
core::setBgTile(*cctx, 0, 13, 9, 4, bgPalBank);
|
||||
core::setBgTile(*cctx, 0, 10, 9, { .tileIdx = 1, .palBank = bgPalBank, .flipX = 0, .flipY = 1 });
|
||||
core::setBgTile(*cctx, 0, 11, 9, { .tileIdx = 2, .palBank = bgPalBank, .flipX = 1, .flipY = 0 });
|
||||
core::setBgTile(*cctx, 0, 13, 9, { .tileIdx = 4, .palBank = bgPalBank, .flipX = 0, .flipY = 0 });
|
||||
core::setSprite(*cctx, 16, {
|
||||
.enabled = true,
|
||||
.x = 12 * 8,
|
||||
|
||||
Reference in New Issue
Block a user