summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy/main.c
diff options
context:
space:
mode:
authorMichiel Van Der Kolk <not.valid@email.address>2005-03-03 19:54:47 +0000
committerMichiel Van Der Kolk <not.valid@email.address>2005-03-03 19:54:47 +0000
commitcd040ddd7cfa2b68ee27639698e644c92f8fd5de (patch)
treeed40d36a5d354b564e3789d10eb0f0eec25e16eb /apps/plugins/rockboy/main.c
parent3921e1aa6979163c2a07122dff49f6afef977a94 (diff)
downloadrockbox-cd040ddd7cfa2b68ee27639698e644c92f8fd5de.zip
rockbox-cd040ddd7cfa2b68ee27639698e644c92f8fd5de.tar.gz
rockbox-cd040ddd7cfa2b68ee27639698e644c92f8fd5de.tar.bz2
rockbox-cd040ddd7cfa2b68ee27639698e644c92f8fd5de.tar.xz
First stages of rockboy menu - press A/B mode to enter, contributed by pabs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6120 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/rockboy/main.c')
-rw-r--r--apps/plugins/rockboy/main.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/apps/plugins/rockboy/main.c b/apps/plugins/rockboy/main.c
index ea5d628..77e9bc9 100644
--- a/apps/plugins/rockboy/main.c
+++ b/apps/plugins/rockboy/main.c
@@ -45,16 +45,24 @@ void doevents()
+/* convenience macro for printing loading state */
+#define PUTS(str) do { \
+ rb->lcd_putsxy(1, y, str); \
+ rb->lcd_getstringsize(str, &w, &h); \
+ y += h + 1; \
+} while (0)
+
int gnuboy_main(char *rom)
{
- int i;
+ int i, w, h, y;
+ y = 1;
// Avoid initializing video if we don't have to
// If we have special perms, drop them ASAP!
- rb->splash(HZ*1, true, "Init exports");
+ PUTS("Init exports");
init_exports();
- rb->splash(HZ*1, true, "Loading default config");
+ PUTS("Loading default config");
for (i = 0; defaultconfig[i]; i++)
rc_command(defaultconfig[i]);
@@ -65,19 +73,20 @@ int gnuboy_main(char *rom)
// rc_command(cmd);
// FIXME - make interface modules responsible for atexit()
- rb->splash(HZ*1, true, "Init video");
+ PUTS("Init video");
vid_init();
- rb->splash(HZ*1, true, "Init sound (nosound)");
+ PUTS("Init sound (nosound)");
pcm_init();
- rb->splash(HZ*1, true, "Loading rom");
+ PUTS("Loading rom");
loader_init(rom);
if(shut)
return PLUGIN_ERROR;
- rb->splash(HZ*1, true, "Emu reset");
+ PUTS("Emu reset");
emu_reset();
- rb->splash(HZ*1, true, "Emu run");
+ PUTS("Emu run");
emu_run();
// never reached
return PLUGIN_OK;
}
+#undef PUTS