summaryrefslogtreecommitdiff
path: root/demo/source/loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'demo/source/loop.c')
-rw-r--r--demo/source/loop.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/demo/source/loop.c b/demo/source/loop.c
index c5f88c6..65779fa 100644
--- a/demo/source/loop.c
+++ b/demo/source/loop.c
@@ -6,7 +6,8 @@
bool axd_loop(axd_dat * const _dat) {
bool err = false;
_dat->prevcol = 0x0u;
- ax_plot1(_dat->vaddr,ax_coord3(_dat->pos.x,_dat->pos.y),0x1u);
+ axd_setcolbdr(_dat->vaddr,_dat->col);
+ ax_plot1(_dat->vaddr,ax_coord(ax_scrnw3,_dat->pos.x,_dat->pos.y),0x4u);
for (;;) {
_dat->prevpos = _dat->pos;
axd_upd const upd = axd_chkkeys(_dat);
@@ -17,12 +18,12 @@ bool axd_loop(axd_dat * const _dat) {
ax_vsync();
if (upd.drw) {
_dat->prevcol = _dat->col;
- if (upd.mv) {ax_plot1(_dat->vaddr,ax_coord3(_dat->pos.x,_dat->pos.y),_dat->col);}
+ if (upd.mv) {ax_plot1(_dat->vaddr,ax_coord(ax_scrnw3,_dat->pos.x,_dat->pos.y),_dat->col);}
}
if (upd.mv) {
- 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);
+ ax_plot1(_dat->vaddr,ax_coord(ax_scrnw3,_dat->prevpos.x,_dat->prevpos.y),_dat->prevcol);
+ _dat->prevcol = ax_rd1(_dat->vaddr,ax_coord(ax_scrnw3,_dat->pos.x,_dat->pos.y));
+ ax_plot1(_dat->vaddr,ax_coord(ax_scrnw3,_dat->pos.x,_dat->pos.y),0x4u);
}
}
return err;