From cd040ddd7cfa2b68ee27639698e644c92f8fd5de Mon Sep 17 00:00:00 2001 From: Michiel Van Der Kolk Date: Thu, 3 Mar 2005 19:54:47 +0000 Subject: 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 --- apps/plugins/rockboy/main.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'apps/plugins/rockboy/main.c') diff --git a/apps/plugins/rockboy/main.c b/apps/plugins/rockboy/main.c index ea5d628f04..77e9bc9ea0 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 -- cgit v1.2.3