summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
Diffstat (limited to 'demo')
-rw-r--r--demo/GNUmakefile22
-rw-r--r--demo/source/initgfx.c3
-rw-r--r--demo/source/loop.c10
-rw-r--r--demo/source/main.c2
4 files changed, 19 insertions, 18 deletions
diff --git a/demo/GNUmakefile b/demo/GNUmakefile
index a40d516..27be37f 100644
--- a/demo/GNUmakefile
+++ b/demo/GNUmakefile
@@ -12,16 +12,18 @@ OBJCOPY := arm-none-eabi-objcopy
# TOOL FLAGS
-CFLAGS := \
- -I../agbx/include \
- -Iinclude \
- -O3 \
- -Wall \
- -Wextra \
- -Wpedantic \
- -fshort-enums \
- -mcpu=arm7tdmi \
- -nostdlib \
+CFLAGS := \
+ -I../agbx/include \
+ -Iinclude \
+ -O3 \
+ -Wall \
+ -Wextra \
+ -Wpedantic \
+ -Wno-gnu-binary-literal \
+ -Wno-gnu-empty-initializer \
+ -fshort-enums \
+ -mcpu=arm7tdmi \
+ -nostdlib \
-std=c2x
LDFLAGS := \
diff --git a/demo/source/initgfx.c b/demo/source/initgfx.c
index 31f256f..342bf20 100644
--- a/demo/source/initgfx.c
+++ b/demo/source/initgfx.c
@@ -12,6 +12,5 @@ void axd_initgfx(void) {
ax_set10(0x500'000Cu,0b111110000000000u);
ax_set10(0x500'000Eu,0b111110000011111u);
ax_set10(0x400'0000u,0x404u);
- ax_clrscrn4(0x600'0000u,0x0u);
- ax_clrscrn4(0x600'A000u,0x0u);
+ ax_clrscrn1(0x600'A000u,0x0u);
}
diff --git a/demo/source/loop.c b/demo/source/loop.c
index e57cafb..c5f88c6 100644
--- a/demo/source/loop.c
+++ b/demo/source/loop.c
@@ -6,7 +6,7 @@
bool axd_loop(axd_dat * const _dat) {
bool err = false;
_dat->prevcol = 0x0u;
- ax_plot4(_dat->vaddr,_dat->pos.x,_dat->pos.y,0x1u);
+ ax_plot1(_dat->vaddr,ax_coord3(_dat->pos.x,_dat->pos.y),0x1u);
for (;;) {
_dat->prevpos = _dat->pos;
axd_upd const upd = axd_chkkeys(_dat);
@@ -17,12 +17,12 @@ bool axd_loop(axd_dat * const _dat) {
ax_vsync();
if (upd.drw) {
_dat->prevcol = _dat->col;
- if (upd.mv) {ax_plot4(_dat->vaddr,_dat->pos.x,_dat->pos.y,_dat->col);}
+ if (upd.mv) {ax_plot1(_dat->vaddr,ax_coord3(_dat->pos.x,_dat->pos.y),_dat->col);}
}
if (upd.mv) {
- ax_plot4(_dat->vaddr,_dat->prevpos.x,_dat->prevpos.y,_dat->prevcol);
- _dat->prevcol = ax_rd4(_dat->vaddr,_dat->pos.x,_dat->pos.y);
- ax_plot4(_dat->vaddr,_dat->pos.x,_dat->pos.y,0x1u);
+ ax_plot1(_dat->vaddr,ax_coord3(_dat->prevpos.x,_dat->prevpos.y),_dat->prevcol);
+ _dat->prevcol = ax_rd1(_dat->vaddr,ax_coord3(_dat->pos.x,_dat->pos.y));
+ ax_plot1(_dat->vaddr,ax_coord3(_dat->pos.x,_dat->pos.y),0x1u);
}
}
return err;
diff --git a/demo/source/main.c b/demo/source/main.c
index ce0a234..ca31e5c 100644
--- a/demo/source/main.c
+++ b/demo/source/main.c
@@ -10,7 +10,7 @@ ax_err ax_main(void) {
bool const err = axd_loop(&dat);
if (err) {
for (ax_i01 px = 0x0u;px != 0x9600u;++px) {
- ax_setpx1(dat.vaddr,px,dat.col);
+ ax_plot1(dat.vaddr,px,dat.col);
axd_chgcol(&dat,0x1u);
}
return ax_err_max;