// SPDX-License-Identifier: MIT // Window edges out of range: X1 > X2, X2 > 240, Y1 > Y2 (GBATEK §LCD I/O Window Feature: // "interpreted as X2=240", "Y2=160"). #include "scene.h" int main(void) { DISPCNT = 0x0080; palette_fill(0, 256, 8); for (int t = 0; t < 32; t++) tile4(t * 32, t); map_text(16, 1, 32, 2); map_text(17, 1, 32, 3); BGCNT(0) = 16 << 8; BGCNT(1) = 17 << 8 | 1; WIN0H = 200 << 8 | 50; WIN0V = 20 << 8 | 60; // X1 > X2 WIN1H = 10 << 8 | 250; WIN1V = 120 << 8 | 70; // X2 > 240, Y1 > Y2 WININ = 0x01 | 0x02 << 8; WINOUT = 0; PAL16[0] = rgb(0, 0, 20); DISPCNT = 0x0300 | 0x6000; forever(); }