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.tar.gz
rockbox-cd040ddd7cfa2b68ee27639698e644c92f8fd5de.zip
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 ea5d628f04..77e9bc9ea0 100644
--- a/apps/plugins/rockboy/main.c
+++ b/apps/plugins/rockboy/main.c
@@ -45,16 +45,24 @@ void doevents()
45 45
46 46
47 47
48/* convenience macro for printing loading state */
49#define PUTS(str) do { \
50 rb->lcd_putsxy(1, y, str); \
51 rb->lcd_getstringsize(str, &w, &h); \
52 y += h + 1; \
53} while (0)
54
48int gnuboy_main(char *rom) 55int gnuboy_main(char *rom)
49{ 56{
50 int i; 57 int i, w, h, y;
51 58
59 y = 1;
52 // Avoid initializing video if we don't have to 60 // Avoid initializing video if we don't have to
53 // If we have special perms, drop them ASAP! 61 // If we have special perms, drop them ASAP!
54 rb->splash(HZ*1, true, "Init exports"); 62 PUTS("Init exports");
55 init_exports(); 63 init_exports();
56 64
57 rb->splash(HZ*1, true, "Loading default config"); 65 PUTS("Loading default config");
58 for (i = 0; defaultconfig[i]; i++) 66 for (i = 0; defaultconfig[i]; i++)
59 rc_command(defaultconfig[i]); 67 rc_command(defaultconfig[i]);
60 68
@@ -65,19 +73,20 @@ int gnuboy_main(char *rom)
65// rc_command(cmd); 73// rc_command(cmd);
66 74
67 // FIXME - make interface modules responsible for atexit() 75 // FIXME - make interface modules responsible for atexit()
68 rb->splash(HZ*1, true, "Init video"); 76 PUTS("Init video");
69 vid_init(); 77 vid_init();
70 rb->splash(HZ*1, true, "Init sound (nosound)"); 78 PUTS("Init sound (nosound)");
71 pcm_init(); 79 pcm_init();
72 rb->splash(HZ*1, true, "Loading rom"); 80 PUTS("Loading rom");
73 loader_init(rom); 81 loader_init(rom);
74 if(shut) 82 if(shut)
75 return PLUGIN_ERROR; 83 return PLUGIN_ERROR;
76 rb->splash(HZ*1, true, "Emu reset"); 84 PUTS("Emu reset");
77 emu_reset(); 85 emu_reset();
78 rb->splash(HZ*1, true, "Emu run"); 86 PUTS("Emu run");
79 emu_run(); 87 emu_run();
80 88
81 // never reached 89 // never reached
82 return PLUGIN_OK; 90 return PLUGIN_OK;
83} 91}
92#undef PUTS