summaryrefslogtreecommitdiff
path: root/demo/source/start.c
diff options
context:
space:
mode:
Diffstat (limited to 'demo/source/start.c')
-rw-r--r--demo/source/start.c65
1 files changed, 54 insertions, 11 deletions
diff --git a/demo/source/start.c b/demo/source/start.c
index 15da8f6..15ecec6 100644
--- a/demo/source/start.c
+++ b/demo/source/start.c
@@ -1,4 +1,4 @@
-#include <agbx-demo.h>
+#include <ax-demo.h>
#include <ax/key.h>
#include <ax/gfx.h>
@@ -7,13 +7,13 @@ 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,0x04u, 0x04u,0x04u,0x07u,0x08u,0x09u,0x04u,0x04u, 0x04u, 0x04u,0x0Du,0x0Eu,0x0Fu,0x10u,0x05u,0x04u, 0x04u, 0x07u,0x08u,0x09u,0x0Au,0x0Bu,0x0Cu,0x04u, 0x04u, 0x0Eu,0x0Fu,0x04u,0x04u,0x04u,0x07u,0x08u, 0x04u,0x00u,
- 0x00u,0x04u, 0x04u,0x06u,0x07u,0x08u,0x09u,0x0Au,0x04u, 0x04u, 0x0Cu,0x0Du,0x0Eu,0x0Fu,0x10u,0x05u,0x06u, 0x04u, 0x07u,0x08u,0x09u,0x0Au,0x0Bu,0x0Cu,0x0Du, 0x04u, 0x0Eu,0x0Fu,0x10u,0x04u,0x06u,0x07u,0x08u, 0x04u,0x00u,
- 0x00u,0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x0Cu,0x0Du,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x07u,0x08u,0x04u,0x04u,0x04u,0x0Cu,0x0Du, 0x04u, 0x04u,0x0Fu,0x10u,0x05u,0x06u,0x07u,0x04u, 0x04u,0x00u,
- 0x00u,0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x0Cu,0x0Du,0x04u,0x0Fu,0x10u,0x05u,0x06u, 0x04u, 0x07u,0x08u,0x09u,0x0Au,0x0Bu,0x0Cu,0x04u, 0x04u, 0x04u,0x04u,0x10u,0x05u,0x06u,0x04u,0x04u, 0x04u,0x00u,
- 0x00u,0x04u, 0x05u,0x06u,0x07u,0x08u,0x09u,0x0Au,0x0Bu, 0x04u, 0x0Cu,0x0Du,0x04u,0x04u,0x04u,0x05u,0x06u, 0x04u, 0x07u,0x08u,0x04u,0x04u,0x04u,0x0Cu,0x0Du, 0x04u, 0x04u,0x0Fu,0x10u,0x05u,0x06u,0x07u,0x04u, 0x04u,0x00u,
- 0x00u,0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x0Cu,0x0Du,0x0Eu,0x0Fu,0x10u,0x05u,0x06u, 0x04u, 0x07u,0x08u,0x09u,0x0Au,0x0Bu,0x0Cu,0x0Du, 0x04u, 0x0Eu,0x0Fu,0x10u,0x04u,0x06u,0x07u,0x08u, 0x04u,0x00u,
- 0x00u,0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x04u,0x0Du,0x0Eu,0x0Fu,0x10u,0x05u,0x04u, 0x04u, 0x07u,0x08u,0x09u,0x0Au,0x0Bu,0x0Cu,0x04u, 0x04u, 0x0Eu,0x0Fu,0x04u,0x04u,0x04u,0x07u,0x08u, 0x04u,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,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,
@@ -39,16 +39,59 @@ ax_err ax_start(void) {
axd_dat dat;
axd_initdat(&dat);
axd_initgfx();
+ ax_vsync();
+ 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_key startkey;
for (;;) {
ax_keymap const keymap = ax_getkeymap();
- if (ax_chkkey(keymap,ax_key_a)) {
+ startkey = ax_key_a;
+ if (ax_chkkey(keymap,startkey)) {
+ break;
+ }
+ startkey = ax_key_b;
+ if (ax_chkkey(keymap,startkey)) {
+ break;
+ }
+ startkey = ax_key_l;
+ if (ax_chkkey(keymap,startkey)) {
+ break;
+ }
+ startkey = ax_key_pade;
+ if (ax_chkkey(keymap,startkey)) {
+ break;
+ }
+ startkey = ax_key_padn;
+ if (ax_chkkey(keymap,startkey)) {
+ break;
+ }
+ startkey = ax_key_pads;
+ if (ax_chkkey(keymap,startkey)) {
+ break;
+ }
+ startkey = ax_key_padw;
+ if (ax_chkkey(keymap,startkey)) {
+ break;
+ }
+ startkey = ax_key_r;
+ if (ax_chkkey(keymap,startkey)) {
+ break;
+ }
+ startkey = ax_key_sel;
+ if (ax_chkkey(keymap,startkey)) {
+ break;
+ }
+ startkey = ax_key_start;
+ if (ax_chkkey(keymap,startkey)) {
break;
}
}
- for (;;) { /* Wait for the key to become released. */
+ ax_vsync();
+ ax_clrscrn1(dat.vaddr,0x0u);
+ for (;;) { /* Wait for the key to be released. */
ax_keymap const keymap = ax_getkeymap();
- if (!ax_chkkey(keymap,ax_key_a)) {
+ if (!ax_chkkey(keymap,startkey)) {
break;
}
}