diff options
Diffstat (limited to 'demo/source')
-rw-r--r-- | demo/source/chkkeys.c | 23 | ||||
-rw-r--r-- | demo/source/loop.c | 3 | ||||
-rw-r--r-- | demo/source/start.c | 60 |
3 files changed, 50 insertions, 36 deletions
diff --git a/demo/source/chkkeys.c b/demo/source/chkkeys.c index 262d542..2de80bd 100644 --- a/demo/source/chkkeys.c +++ b/demo/source/chkkeys.c @@ -4,16 +4,14 @@ #include <ax/gfx.h> #define axd_chk(_key) \ - curkey = _key; \ - if (ax_chkkey(keymap,_key)) - -#define axd_wait() \ - while (ax_chkkey(ax_getkeymap(),curkey)) {} + if ((upd.keydwn = ax_chkkey(keymap,(upd.key = _key)))) axd_upd axd_chkkeys(axd_dat * _dat) { axd_upd upd = {}; ax_keymap const keymap = ax_getkeymap(); - ax_key curkey; + if (ax_chkkey(keymap,ax_key_a)) { + upd.drw = true; + } axd_chk(ax_key_sel) { upd.done = true; upd.err = true; @@ -25,40 +23,39 @@ axd_upd axd_chkkeys(axd_dat * _dat) { } axd_chk(ax_key_l) { axd_chgcol(_dat,0x0u); - axd_wait() + return upd; } axd_chk(ax_key_r) { axd_chgcol(_dat,0x1u); - axd_wait() + return upd; } axd_chk(ax_key_pade) { if (_dat->pos.x != 0xEEu) { upd.mv = true; ++_dat->pos.x; - axd_wait() + return upd; } } axd_chk(ax_key_padn) { if (_dat->pos.y != 0x1u) { upd.mv = true; --_dat->pos.y; - axd_wait() + return upd; } } axd_chk(ax_key_pads) { if (_dat->pos.y != 0x9Eu) { upd.mv = true; ++_dat->pos.y; - axd_wait() + return upd; } } axd_chk(ax_key_padw) { if (_dat->pos.x != 0x1u) { upd.mv = true; --_dat->pos.x; - axd_wait() + return upd; } } - axd_chk(ax_key_a) {upd.drw = true;} return upd; } diff --git a/demo/source/loop.c b/demo/source/loop.c index 469f62e..e2e608c 100644 --- a/demo/source/loop.c +++ b/demo/source/loop.c @@ -25,6 +25,9 @@ bool axd_loop(axd_dat * const _dat) { _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); } + if (upd.keydwn) { + while (ax_chkkey(ax_getkeymap(),upd.key)) {} + } } return err; } diff --git a/demo/source/start.c b/demo/source/start.c index 15ecec6..f7c2d0d 100644 --- a/demo/source/start.c +++ b/demo/source/start.c @@ -4,37 +4,50 @@ #include <ax/gfx.h> static ax_i8 const axd_logo[] = { - 0x00u,0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,0x00u, - 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u, + 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, - 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x07u,0x08u,0x09u,0x04u,0x04u, 0x04u, 0x0Cu,0x0Du,0x04u,0x04u,0x04u,0x05u,0x06u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u, - 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x06u,0x07u,0x08u,0x09u,0x0Au,0x04u, 0x04u, 0x0Cu,0x0Du,0x0Eu,0x04u,0x10u,0x05u,0x06u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u, - 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x04u,0x0Du,0x0Eu,0x0Fu,0x10u,0x05u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u, - 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x04u,0x04u,0x0Eu,0x0Fu,0x10u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u, - 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x05u,0x06u,0x07u,0x08u,0x09u,0x0Au,0x0Bu, 0x04u, 0x04u,0x0Du,0x0Eu,0x0Fu,0x10u,0x05u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u, - 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x0Cu,0x0Du,0x0Eu,0x04u,0x10u,0x05u,0x06u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u, - 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x0Cu,0x0Du,0x04u,0x04u,0x04u,0x05u,0x06u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u, + 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, + 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x00u, 0x04u,0x04u,0x04u,0x00u,0x04u,0x04u,0x04u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, + 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, + 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, + 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x00u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, + 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x04u,0x04u,0x04u,0x00u,0x04u,0x04u,0x04u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, + 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, - 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u, - 0x04u,0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,0x04u, + 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, + 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, - 0x04u,0x00u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x00u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x00u,0x04u, - 0x04u,0x00u, 0x04u,0x03u,0x03u,0x03u,0x03u,0x02u,0x02u, 0x00u, 0x04u,0x02u,0x02u,0x02u,0x02u,0x02u,0x02u, 0x00u, 0x04u,0x03u,0x04u,0x00u,0x04u,0x03u,0x02u, 0x00u, 0x04u,0x04u,0x03u,0x03u,0x03u,0x02u,0x02u, 0x00u,0x04u, - 0x04u,0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x02u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x02u,0x02u,0x04u,0x02u,0x03u,0x02u, 0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u,0x04u, - 0x04u,0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x02u,0x02u,0x02u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x02u,0x00u,0x02u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u,0x04u, - 0x04u,0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x02u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x02u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u,0x04u, - 0x04u,0x00u, 0x04u,0x03u,0x03u,0x03u,0x03u,0x02u,0x02u, 0x00u, 0x04u,0x03u,0x03u,0x03u,0x03u,0x03u,0x02u, 0x00u, 0x04u,0x02u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x02u,0x03u,0x03u,0x03u,0x02u,0x02u, 0x00u,0x04u, - 0x04u,0x00u, 0x04u,0x02u,0x02u,0x02u,0x02u,0x02u,0x00u, 0x00u, 0x04u,0x02u,0x02u,0x02u,0x02u,0x02u,0x02u, 0x00u, 0x04u,0x02u,0x00u,0x00u,0x00u,0x02u,0x02u, 0x00u, 0x00u,0x02u,0x02u,0x02u,0x02u,0x02u,0x00u, 0x00u,0x04u, + 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x04u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x04u, + 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, + 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, + 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x04u,0x04u,0x04u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, + 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x00u,0x00u,0x04u,0x00u,0x04u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, + 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, + 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x04u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x04u, - 0x04u,0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,0x04u, - 0x04u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x04u, + 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, }; -constexpr ax_i8 axd_logow = (0x7u * 0x4u) + (0x2u * 0x2u) + (0x1u * 0x3u); -constexpr ax_i8 axd_logoh = (0x7u * 0x2u) + (0x2u * 0x2u) + (0x2u); +constexpr ax_i8 axd_logow = (0x7u * 0x4u) + (0x1u * 0x5u); +constexpr ax_i8 axd_logoh = (0x7u * 0x2u) + (0x2u) + (0x1u * 0x2u); static_assert(sizeof (axd_logo) == axd_logow * axd_logoh); +static ax_i8 const axd_startmsg[] = { + 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, + 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x00u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x00u,0x00u,0x04u,0x04u, + 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x00u,0x04u,0x04u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x00u,0x04u,0x04u, + 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, + 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x04u,0x04u,0x04u,0x04u, + 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x04u,0x04u,0x04u, + 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, +}; + +constexpr ax_i8 axd_startmsgw = (0x7u * 0x10u) + (0x1u * 0xFu); +constexpr ax_i8 axd_startmsgh = (0x7u * 0x1u); + +static_assert(sizeof (axd_startmsg) == axd_startmsgw * axd_startmsgh); + ax_err ax_start(void) { axd_dat dat; axd_initdat(&dat); @@ -43,6 +56,7 @@ ax_err ax_start(void) { ax_blnk(); ax_clrscrn1(dat.vaddr,0x0u); ax_plottex1(dat.vaddr,ax_scrnw3,axd_logo,ax_coord(ax_scrnw3,ax_scrnw3 / 0x2u - axd_logow / 0x2u,ax_scrnh3 / 0x2u - axd_logoh / 0x2u),axd_logow,axd_logoh); + ax_plottex1(dat.vaddr,ax_scrnw3,axd_startmsg,ax_coord(ax_scrnw3,ax_scrnw3 / 0x2u - axd_startmsgw / 0x2u,ax_scrnh3 - 0x7u - axd_startmsgh),axd_startmsgw,axd_startmsgh); ax_key startkey; for (;;) { ax_keymap const keymap = ax_getkeymap(); @@ -88,7 +102,7 @@ ax_err ax_start(void) { } } ax_vsync(); - ax_clrscrn1(dat.vaddr,0x0u); + ax_rec1(dat.vaddr,ax_scrnw3,ax_coord(ax_scrnw3,ax_scrnw3 / 0x2u - axd_startmsgw / 0x2u,ax_scrnh3 - 0x7u - axd_startmsgh),axd_startmsgw,axd_startmsgh,0x0u); for (;;) { /* Wait for the key to be released. */ ax_keymap const keymap = ax_getkeymap(); if (!ax_chkkey(keymap,startkey)) { |