summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
Diffstat (limited to 'demo')
-rw-r--r--demo/demo.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/demo/demo.c b/demo/demo.c
index d82e333..94578f6 100644
--- a/demo/demo.c
+++ b/demo/demo.c
@@ -6,6 +6,12 @@ agbx_err agbx_main(void) {
agbx_set10(0x500'0002u,0x19u);
agbx_set10(0x500'0004u,0xFFFFu);
agbx_set10(0x400'0000u,0x404u);
+ agbx_i10 const cols[] = {
+ 0b11111u,
+ 0b1111100000u,
+ 0b111110000000000u,
+ };
+ agbx_i8 col = 0x0u;
struct {
agbx_i8 x;
agbx_i8 y;
@@ -26,6 +32,13 @@ agbx_err agbx_main(void) {
while (agbx_chkkey(agbx_getkeymap(),agbx_key_l)) {}
continue;
}
+ if (agbx_chkkey(keymap,agbx_key_r)) {
+ if (col == 0x2u) {col = 0x0u;}
+ else {++col;}
+ agbx_set10(0x500'0002u,cols[col]);
+ while (agbx_chkkey(agbx_getkeymap(),agbx_key_r)) {}
+ continue;
+ }
typeof (pos) const prevpos = pos;
agbx_key key = agbx_key_pade;
if (agbx_chkkey(keymap,key)) {