1
0
Fork 0
forked from len0rd/rockbox

Get rid of the 'center' parameter for splashes. There were only 2 of almost 500 splashes which were not centered.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12807 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2007-03-16 21:56:08 +00:00
parent 2c643b9f3e
commit 4d6374c923
107 changed files with 529 additions and 553 deletions

View file

@ -131,7 +131,7 @@ static int get_action_worker(int context, int timeout,
{ {
last_button = BUTTON_NONE; last_button = BUTTON_NONE;
keys_locked = false; keys_locked = false;
gui_syncsplash(HZ/2, true, str(LANG_KEYLOCK_OFF_PLAYER)); gui_syncsplash(HZ/2, str(LANG_KEYLOCK_OFF_PLAYER));
return ACTION_REDRAW; return ACTION_REDRAW;
} }
else else
@ -140,7 +140,7 @@ static int get_action_worker(int context, int timeout,
#endif #endif
{ {
if ((button&BUTTON_REL)) if ((button&BUTTON_REL))
gui_syncsplash(HZ/2, true, str(LANG_KEYLOCK_ON_PLAYER)); gui_syncsplash(HZ/2, str(LANG_KEYLOCK_ON_PLAYER));
return ACTION_REDRAW; return ACTION_REDRAW;
} }
} }
@ -180,7 +180,7 @@ static int get_action_worker(int context, int timeout,
unlock_combo = button; unlock_combo = button;
keys_locked = true; keys_locked = true;
action_signalscreenchange(); action_signalscreenchange();
gui_syncsplash(HZ/2, true, str(LANG_KEYLOCK_ON_PLAYER)); gui_syncsplash(HZ/2, str(LANG_KEYLOCK_ON_PLAYER));
button_clear_queue(); button_clear_queue();
return ACTION_REDRAW; return ACTION_REDRAW;

View file

@ -97,11 +97,11 @@ bool alarm_screen(void)
rtc_init(); rtc_init();
rtc_set_alarm(h,m); rtc_set_alarm(h,m);
rtc_enable_alarm(true); rtc_enable_alarm(true);
gui_syncsplash(HZ*2, true, str(LANG_ALARM_MOD_TIME_TO_GO), gui_syncsplash(HZ*2, str(LANG_ALARM_MOD_TIME_TO_GO),
togo / 60, togo % 60); togo / 60, togo % 60);
done = true; done = true;
} else { } else {
gui_syncsplash(HZ, true, str(LANG_ALARM_MOD_ERROR)); gui_syncsplash(HZ, str(LANG_ALARM_MOD_ERROR));
update = true; update = true;
} }
break; break;
@ -144,7 +144,7 @@ bool alarm_screen(void)
case ACTION_STD_CANCEL: case ACTION_STD_CANCEL:
rtc_enable_alarm(false); rtc_enable_alarm(false);
gui_syncsplash(HZ*2, true, str(LANG_ALARM_MOD_DISABLE)); gui_syncsplash(HZ*2, str(LANG_ALARM_MOD_DISABLE));
done = true; done = true;
break; break;

View file

@ -226,7 +226,7 @@ static bool write_bookmark(bool create_bookmark_file)
} }
} }
gui_syncsplash(HZ, true, str(success ? LANG_BOOKMARK_CREATE_SUCCESS gui_syncsplash(HZ, str(success ? LANG_BOOKMARK_CREATE_SUCCESS
: LANG_BOOKMARK_CREATE_FAILURE)); : LANG_BOOKMARK_CREATE_FAILURE));
return true; return true;
@ -520,7 +520,7 @@ static char* select_bookmark(const char* bookmark_file_name)
/* if there were no bookmarks in the file, delete the file and exit. */ /* if there were no bookmarks in the file, delete the file and exit. */
if(bookmark_id <= 0) if(bookmark_id <= 0)
{ {
gui_syncsplash(HZ, true, str(LANG_BOOKMARK_LOAD_EMPTY)); gui_syncsplash(HZ, str(LANG_BOOKMARK_LOAD_EMPTY));
remove(bookmark_file_name); remove(bookmark_file_name);
action_signalscreenchange(); action_signalscreenchange();
return NULL; return NULL;

View file

@ -312,7 +312,7 @@ int codec_load_file(const char *plugin, struct codec_api *api)
if (fd < 0) { if (fd < 0) {
snprintf(msgbuf, sizeof(msgbuf)-1, "Couldn't load codec: %s", path); snprintf(msgbuf, sizeof(msgbuf)-1, "Couldn't load codec: %s", path);
logf("Codec load error:%d", fd); logf("Codec load error:%d", fd);
gui_syncsplash(HZ*2, true, msgbuf); gui_syncsplash(HZ*2, msgbuf);
return fd; return fd;
} }

View file

@ -90,12 +90,12 @@
#define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */
/* increase this every time the api struct changes */ /* increase this every time the api struct changes */
#define CODEC_API_VERSION 16 #define CODEC_API_VERSION 17
/* update this to latest version if a change to the api struct breaks /* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */ new function which are "waiting" at the end of the function table) */
#define CODEC_MIN_API_VERSION 16 #define CODEC_MIN_API_VERSION 17
/* codec return codes */ /* codec return codes */
enum codec_status { enum codec_status {
@ -166,7 +166,7 @@ struct codec_api {
/* Configure different codec buffer parameters. */ /* Configure different codec buffer parameters. */
void (*configure)(int setting, intptr_t value); void (*configure)(int setting, intptr_t value);
void (*splash)(int ticks, bool center, const unsigned char *fmt, ...); void (*splash)(int ticks, const unsigned char *fmt, ...);
/* file */ /* file */
int (*PREFIX(open))(const char* pathname, int flags); int (*PREFIX(open))(const char* pathname, int flags);

View file

@ -288,7 +288,7 @@ int speex_seek_page_granule(spx_int64_t pos, spx_int64_t curpos,
LOGF("Seek failed:%d\n", offset); LOGF("Seek failed:%d\n", offset);
ci->splash(HZ*2, true, "Seek failed"); ci->splash(HZ*2, "Seek failed");
return -1; return -1;
} }

View file

@ -79,7 +79,7 @@ bool vorbis_set_codec_parameters(OggVorbis_File *vf)
vi = ov_info(vf, -1); vi = ov_info(vf, -1);
if (vi == NULL) { if (vi == NULL) {
//ci->splash(HZ*2, true, "Vorbis Error"); //ci->splash(HZ*2, "Vorbis Error");
return false; return false;
} }

View file

@ -2030,7 +2030,7 @@ static bool dbg_save_roms(void)
err = eeprom_24cxx_read(0, buf, sizeof buf); err = eeprom_24cxx_read(0, buf, sizeof buf);
if (err) if (err)
gui_syncsplash(HZ*3, true, "Eeprom read failure (%d)",err); gui_syncsplash(HZ*3, "Eeprom read failure (%d)",err);
else else
{ {
write(fd, buf, sizeof buf); write(fd, buf, sizeof buf);
@ -2123,7 +2123,7 @@ extern bool do_screendump_instead_of_usb;
static bool dbg_screendump(void) static bool dbg_screendump(void)
{ {
do_screendump_instead_of_usb = !do_screendump_instead_of_usb; do_screendump_instead_of_usb = !do_screendump_instead_of_usb;
gui_syncsplash(HZ, true, "Screendump %s", gui_syncsplash(HZ, "Screendump %s",
do_screendump_instead_of_usb?"enabled":"disabled"); do_screendump_instead_of_usb?"enabled":"disabled");
return false; return false;
} }
@ -2314,21 +2314,21 @@ static bool dbg_write_eeprom(void)
err = eeprom_24cxx_write(0, buf, sizeof buf); err = eeprom_24cxx_write(0, buf, sizeof buf);
if (err) if (err)
gui_syncsplash(HZ*3, true, "Eeprom write failure (%d)",err); gui_syncsplash(HZ*3, "Eeprom write failure (%d)",err);
else else
gui_syncsplash(HZ*3, true, "Eeprom written successfully"); gui_syncsplash(HZ*3, "Eeprom written successfully");
set_irq_level(old_irq_level); set_irq_level(old_irq_level);
} }
else else
{ {
gui_syncsplash(HZ*3, true, "File read error (%d)",rc); gui_syncsplash(HZ*3, "File read error (%d)",rc);
} }
close(fd); close(fd);
} }
else else
{ {
gui_syncsplash(HZ*3, true, "Failed to open 'internal_eeprom.bin'"); gui_syncsplash(HZ*3, "Failed to open 'internal_eeprom.bin'");
} }
return false; return false;

View file

@ -360,14 +360,14 @@ int ft_enter(struct tree_context* c)
switch ( file->attr & TREE_ATTR_MASK ) { switch ( file->attr & TREE_ATTR_MASK ) {
case TREE_ATTR_M3U: case TREE_ATTR_M3U:
if (global_settings.party_mode) { if (global_settings.party_mode) {
gui_syncsplash(HZ, true, str(LANG_PARTY_MODE)); gui_syncsplash(HZ, str(LANG_PARTY_MODE));
break; break;
} }
if (bookmark_autoload(buf)) if (bookmark_autoload(buf))
break; break;
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
/* about to create a new current playlist... /* about to create a new current playlist...
allow user to cancel the operation */ allow user to cancel the operation */
@ -395,7 +395,7 @@ int ft_enter(struct tree_context* c)
if (bookmark_autoload(c->currdir)) if (bookmark_autoload(c->currdir))
break; break;
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
/* about to create a new current playlist... /* about to create a new current playlist...
allow user to cancel the operation */ allow user to cancel the operation */
@ -414,7 +414,7 @@ int ft_enter(struct tree_context* c)
{ {
playlist_insert_track(NULL, buf, playlist_insert_track(NULL, buf,
PLAYLIST_INSERT_LAST, true, true); PLAYLIST_INSERT_LAST, true, true);
gui_syncsplash(HZ, true, str(LANG_QUEUE_LAST)); gui_syncsplash(HZ, str(LANG_QUEUE_LAST));
} }
else if (playlist_create(c->currdir, NULL) != -1) else if (playlist_create(c->currdir, NULL) != -1)
{ {
@ -439,7 +439,7 @@ int ft_enter(struct tree_context* c)
/* fmr preset file */ /* fmr preset file */
case TREE_ATTR_FMR: case TREE_ATTR_FMR:
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
/* Preset inside the default folder. */ /* Preset inside the default folder. */
if(!strncasecmp(FMPRESET_PATH, buf, strlen(FMPRESET_PATH))) if(!strncasecmp(FMPRESET_PATH, buf, strlen(FMPRESET_PATH)))
@ -466,7 +466,7 @@ int ft_enter(struct tree_context* c)
/* wps config file */ /* wps config file */
case TREE_ATTR_WPS: case TREE_ATTR_WPS:
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1
unload_wps_backdrop(); unload_wps_backdrop();
#endif #endif
@ -478,7 +478,7 @@ int ft_enter(struct tree_context* c)
#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1)
/* remote-wps config file */ /* remote-wps config file */
case TREE_ATTR_RWPS: case TREE_ATTR_RWPS:
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
wps_data_load(gui_wps[1].data, buf, true); wps_data_load(gui_wps[1].data, buf, true);
set_file(buf, (char *)global_settings.rwps_file, set_file(buf, (char *)global_settings.rwps_file,
MAX_FILENAME); MAX_FILENAME);
@ -486,39 +486,39 @@ int ft_enter(struct tree_context* c)
#endif #endif
case TREE_ATTR_CFG: case TREE_ATTR_CFG:
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
if (!settings_load_config(buf,true)) if (!settings_load_config(buf,true))
break; break;
gui_syncsplash(HZ, true, str(LANG_SETTINGS_LOADED)); gui_syncsplash(HZ, str(LANG_SETTINGS_LOADED));
break; break;
case TREE_ATTR_BMARK: case TREE_ATTR_BMARK:
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
bookmark_load(buf, false); bookmark_load(buf, false);
reload_dir = true; reload_dir = true;
break; break;
case TREE_ATTR_LNG: case TREE_ATTR_LNG:
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
if(!lang_load(buf)) { if(!lang_load(buf)) {
set_file(buf, (char *)global_settings.lang_file, set_file(buf, (char *)global_settings.lang_file,
MAX_FILENAME); MAX_FILENAME);
talk_init(); /* use voice of same language */ talk_init(); /* use voice of same language */
gui_syncsplash(HZ, true, str(LANG_LANGUAGE_LOADED)); gui_syncsplash(HZ, str(LANG_LANGUAGE_LOADED));
} }
break; break;
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
case TREE_ATTR_FONT: case TREE_ATTR_FONT:
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
font_load(buf); font_load(buf);
set_file(buf, (char *)global_settings.font_file, MAX_FILENAME); set_file(buf, (char *)global_settings.font_file, MAX_FILENAME);
break; break;
case TREE_ATTR_KBD: case TREE_ATTR_KBD:
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
if (!load_kbd(buf)) if (!load_kbd(buf))
gui_syncsplash(HZ, true, str(LANG_KEYBOARD_LOADED)); gui_syncsplash(HZ, str(LANG_KEYBOARD_LOADED));
set_file(buf, (char *)global_settings.kbd_file, MAX_FILENAME); set_file(buf, (char *)global_settings.kbd_file, MAX_FILENAME);
break; break;
#endif #endif
@ -526,7 +526,7 @@ int ft_enter(struct tree_context* c)
#ifndef SIMULATOR #ifndef SIMULATOR
/* firmware file */ /* firmware file */
case TREE_ATTR_MOD: case TREE_ATTR_MOD:
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
rolo_load(buf); rolo_load(buf);
break; break;
#endif #endif
@ -534,11 +534,11 @@ int ft_enter(struct tree_context* c)
/* plugin file */ /* plugin file */
case TREE_ATTR_ROCK: case TREE_ATTR_ROCK:
if (global_settings.party_mode) { if (global_settings.party_mode) {
gui_syncsplash(HZ, true, str(LANG_PARTY_MODE)); gui_syncsplash(HZ, str(LANG_PARTY_MODE));
break; break;
} }
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
if (plugin_load(buf,NULL) == PLUGIN_USB_CONNECTED) if (plugin_load(buf,NULL) == PLUGIN_USB_CONNECTED)
{ {
@ -560,7 +560,7 @@ int ft_enter(struct tree_context* c)
char* plugin; char* plugin;
if (global_settings.party_mode) { if (global_settings.party_mode) {
gui_syncsplash(HZ, true, str(LANG_PARTY_MODE)); gui_syncsplash(HZ, str(LANG_PARTY_MODE));
break; break;
} }

View file

@ -340,14 +340,14 @@ static void scan_plugins(void)
/* exttypes[] full, bail out */ /* exttypes[] full, bail out */
if (cnt_exttypes >= MAX_EXTTYPES) if (cnt_exttypes >= MAX_EXTTYPES)
{ {
gui_syncsplash(HZ, true, str(LANG_FILETYPES_EXTENSION_FULL)); gui_syncsplash(HZ, str(LANG_FILETYPES_EXTENSION_FULL));
break; break;
} }
/* filetypes[] full, bail out */ /* filetypes[] full, bail out */
if (cnt_filetypes >= MAX_FILETYPES) if (cnt_filetypes >= MAX_FILETYPES)
{ {
gui_syncsplash(HZ, true, str(LANG_FILETYPES_FULL)); gui_syncsplash(HZ, str(LANG_FILETYPES_FULL));
break; break;
} }
@ -380,7 +380,7 @@ static void scan_plugins(void)
/* filter out to long filenames */ /* filter out to long filenames */
if (strlen((char *)entry->d_name) > MAX_PLUGIN_LENGTH + 5) if (strlen((char *)entry->d_name) > MAX_PLUGIN_LENGTH + 5)
{ {
gui_syncsplash(HZ, true, str(LANG_FILETYPES_PLUGIN_NAME_LONG)); gui_syncsplash(HZ, str(LANG_FILETYPES_PLUGIN_NAME_LONG));
continue; continue;
} }
@ -561,13 +561,13 @@ static bool read_config(const char* file)
{ {
if (cnt_exttypes >= MAX_EXTTYPES) if (cnt_exttypes >= MAX_EXTTYPES)
{ {
gui_syncsplash(HZ, true, str(LANG_FILETYPES_EXTENSION_FULL)); gui_syncsplash(HZ, str(LANG_FILETYPES_EXTENSION_FULL));
break; break;
} }
if (cnt_filetypes >= MAX_FILETYPES) if (cnt_filetypes >= MAX_FILETYPES)
{ {
gui_syncsplash(HZ, true, str(LANG_FILETYPES_FULL)); gui_syncsplash(HZ, str(LANG_FILETYPES_FULL));
break; break;
} }
@ -636,7 +636,7 @@ static bool read_config(const char* file)
{ {
if (strlen(str[plugin]) > MAX_PLUGIN_LENGTH) if (strlen(str[plugin]) > MAX_PLUGIN_LENGTH)
{ {
gui_syncsplash(HZ, true, str(LANG_FILETYPES_PLUGIN_NAME_LONG)); gui_syncsplash(HZ, str(LANG_FILETYPES_PLUGIN_NAME_LONG));
str[plugin] = NULL; str[plugin] = NULL;
continue; continue;
} }
@ -736,7 +736,7 @@ static char* string2icon(const char* str)
(unsigned long) string_buffer - (unsigned long) string_buffer -
(unsigned long) next_free_string) < ICON_LENGTH) (unsigned long) next_free_string) < ICON_LENGTH)
{ {
gui_syncsplash(HZ, true, str(LANG_FILETYPES_STRING_BUFFER_EMPTY)); gui_syncsplash(HZ, str(LANG_FILETYPES_STRING_BUFFER_EMPTY));
return NULL; return NULL;
} }
@ -792,7 +792,7 @@ static char* get_string(const char* str)
} }
else else
{ {
gui_syncsplash(HZ, true, str(LANG_FILETYPES_STRING_BUFFER_EMPTY)); gui_syncsplash(HZ, str(LANG_FILETYPES_STRING_BUFFER_EMPTY));
return NULL; return NULL;
} }
} }

View file

@ -392,7 +392,7 @@ bool set_color(struct screen *display, char *title, unsigned *color,
if (banned_color != (unsigned)-1 && if (banned_color != (unsigned)-1 &&
banned_color == rgb.color) banned_color == rgb.color)
{ {
gui_syncsplash(HZ*2, true, str(LANG_COLOR_UNACCEPTABLE)); gui_syncsplash(HZ*2, str(LANG_COLOR_UNACCEPTABLE));
break; break;
} }
*color = rgb.color; *color = rgb.color;

View file

@ -2336,8 +2336,8 @@ bool update_onvol_change(struct gui_wps * gwps)
gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC);
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS
gui_splash(gwps->display,0, false, "Vol: %d dB ", gui_splash(gwps->display, 0, "Vol: %3d dB",
sound_val2phys(SOUND_VOLUME, global_settings.volume)); sound_val2phys(SOUND_VOLUME, global_settings.volume));
return true; return true;
#endif #endif
return false; return false;
@ -2494,10 +2494,10 @@ bool gui_wps_display(void)
{ {
global_status.resume_index = -1; global_status.resume_index = -1;
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS
gui_syncsplash(HZ, true, str(LANG_END_PLAYLIST_PLAYER)); gui_syncsplash(HZ, str(LANG_END_PLAYLIST_PLAYER));
#else #else
gui_syncstatusbar_draw(&statusbars, true); gui_syncstatusbar_draw(&statusbars, true);
gui_syncsplash(HZ, true, str(LANG_END_PLAYLIST_RECORDER)); gui_syncsplash(HZ, str(LANG_END_PLAYLIST_RECORDER));
#endif #endif
return true; return true;
} }
@ -2651,6 +2651,6 @@ void display_keylock_text(bool locked)
else else
s = str(LANG_KEYLOCK_OFF_RECORDER); s = str(LANG_KEYLOCK_OFF_RECORDER);
#endif #endif
gui_syncsplash(HZ, true, s); gui_syncsplash(HZ, s);
} }

View file

@ -39,8 +39,7 @@
#endif #endif
static void splash(struct screen * screen, bool center, static void splash(struct screen * screen, const char *fmt, va_list ap)
const char *fmt, va_list ap)
{ {
char splash_buf[MAXBUFFER]; char splash_buf[MAXBUFFER];
short widths[MAXLINES]; short widths[MAXLINES];
@ -127,43 +126,33 @@ static void splash(struct screen * screen, bool center,
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
/* If we center the display, then just clear the box we need and put /* If we center the display, then just clear the box we need and put
a nice little frame and put the text in there! */ a nice little frame and put the text in there! */
if (center) y = (screen->height - y) / 2; /* height => y start position */
x = (screen->width - maxw) / 2 - 2;
#if LCD_DEPTH > 1
if (screen->depth > 1)
{ {
y = (screen->height - y) / 2; /* height => y start position */ prevfg = screen->get_foreground();
x = (screen->width - maxw) / 2 - 2; screen->set_drawmode(DRMODE_FG);
screen->set_foreground(
#if LCD_DEPTH > 1 SCREEN_COLOR_TO_NATIVE(screen, LCD_LIGHTGRAY));
if (screen->depth > 1)
{
prevfg = screen->get_foreground();
screen->set_drawmode(DRMODE_FG);
screen->set_foreground(
SCREEN_COLOR_TO_NATIVE(screen, LCD_LIGHTGRAY));
}
else
#endif
screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
screen->fillrect(x, y-2, maxw+4, screen->height-y*2+4);
#if LCD_DEPTH > 1
if (screen->depth > 1)
screen->set_foreground(
SCREEN_COLOR_TO_NATIVE(screen, LCD_BLACK));
else
#endif
screen->set_drawmode(DRMODE_SOLID);
screen->drawrect(x, y-2, maxw+4, screen->height-y*2+4);
} }
else else
{ #endif
y = 0; screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
x = 0;
screen->clear_display(); screen->fillrect(x, y-2, maxw+4, screen->height-y*2+4);
}
#if LCD_DEPTH > 1
if (screen->depth > 1)
screen->set_foreground(SCREEN_COLOR_TO_NATIVE(screen, LCD_BLACK));
else
#endif
screen->set_drawmode(DRMODE_SOLID);
screen->drawrect(x, y-2, maxw+4, screen->height-y*2+4);
#else /* HAVE_LCD_CHARCELLS */ #else /* HAVE_LCD_CHARCELLS */
y = 0; /* vertical center on 2 lines would be silly */ y = 0; /* vertical centering on 2 lines would be silly */
x = 0; x = 0;
screen->clear_display(); screen->clear_display();
#endif #endif
@ -172,8 +161,7 @@ static void splash(struct screen * screen, bool center,
for (i = 0; i <= line; i++) for (i = 0; i <= line; i++)
{ {
if (center) x = MAX((screen->width - widths[i]) / 2, 0);
x = MAX((screen->width - widths[i]) / 2, 0);
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
screen->putsxy(x, y, lines[i]); screen->putsxy(x, y, lines[i]);
@ -184,7 +172,7 @@ static void splash(struct screen * screen, bool center,
} }
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1) #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
if (center && screen->depth > 1) if (screen->depth > 1)
{ {
screen->set_foreground(prevfg); screen->set_foreground(prevfg);
screen->set_drawmode(DRMODE_SOLID); screen->set_drawmode(DRMODE_SOLID);
@ -195,25 +183,25 @@ static void splash(struct screen * screen, bool center,
#endif #endif
} }
void gui_splash(struct screen * screen, int ticks, void gui_splash(struct screen * screen, int ticks,
bool center, const unsigned char *fmt, ...) const unsigned char *fmt, ...)
{ {
va_list ap; va_list ap;
va_start( ap, fmt ); va_start( ap, fmt );
splash(screen, center, fmt, ap); splash(screen, fmt, ap);
va_end( ap ); va_end( ap );
if(ticks) if(ticks)
sleep(ticks); sleep(ticks);
} }
void gui_syncsplash(int ticks, bool center, const unsigned char *fmt, ...) void gui_syncsplash(int ticks, const unsigned char *fmt, ...)
{ {
va_list ap; va_list ap;
int i; int i;
va_start( ap, fmt ); va_start( ap, fmt );
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
splash(&(screens[i]), center, fmt, ap); splash(&(screens[i]), fmt, ap);
va_end( ap ); va_end( ap );
if(ticks) if(ticks)

View file

@ -22,24 +22,19 @@
#include "screen_access.h" #include "screen_access.h"
/* /*
* Puts a splash message on the given screen for a given period * Puts a splash message centered on the given screen for a given period
* - screen : the screen to put the splash on * - screen : the screen to put the splash on
* - ticks : how long the splash is displayed (in rb ticks) * - ticks : how long the splash is displayed (in rb ticks)
* - center : FALSE means left-justified, TRUE means
* horizontal and vertical center
* - fmt : what to say *printf style * - fmt : what to say *printf style
*/ */
extern void gui_splash(struct screen * screen, int ticks, extern void gui_splash(struct screen * screen, int ticks,
bool center, const char *fmt, ...); const char *fmt, ...);
/* /*
* Puts a splash message on all the screens for a given period * Puts a splash message centered on all the screens for a given period
* - ticks : how long the splash is displayed (in rb ticks) * - ticks : how long the splash is displayed (in rb ticks)
* - center : FALSE means left-justified, TRUE means
* horizontal and vertical center
* - fmt : what to say *printf style * - fmt : what to say *printf style
*/ */
extern void gui_syncsplash(int ticks, bool center, extern void gui_syncsplash(int ticks, const unsigned char *fmt, ...);
const unsigned char *fmt, ...);
#endif /* _GUI_ICON_H_ */ #endif /* _GUI_ICON_H_ */

View file

@ -146,7 +146,7 @@ static int init_dircache(bool preinit)
{ {
/* This will be in default language, settings are not /* This will be in default language, settings are not
applied yet. Not really any easy way to fix that. */ applied yet. Not really any easy way to fix that. */
gui_syncsplash(0, true, str(LANG_DIRCACHE_BUILDING)); gui_syncsplash(0, str(LANG_DIRCACHE_BUILDING));
clear = true; clear = true;
} }
@ -164,14 +164,14 @@ static int init_dircache(bool preinit)
{ {
if (global_status.dircache_size <= 0) if (global_status.dircache_size <= 0)
{ {
gui_syncsplash(0, true, str(LANG_DIRCACHE_BUILDING)); gui_syncsplash(0, str(LANG_DIRCACHE_BUILDING));
clear = true; clear = true;
} }
result = dircache_build(global_status.dircache_size); result = dircache_build(global_status.dircache_size);
} }
if (result < 0) if (result < 0)
gui_syncsplash(0, true, "Failed! Result: %d", result); gui_syncsplash(0, "Failed! Result: %d", result);
} }
if (clear) if (clear)
@ -206,7 +206,7 @@ static void init_tagcache(void)
if (ret > 0) if (ret > 0)
{ {
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
gui_syncsplash(0, true, "%s [%d/%d]", gui_syncsplash(0, "%s [%d/%d]",
str(LANG_TAGCACHE_INIT), ret, str(LANG_TAGCACHE_INIT), ret,
tagcache_get_max_commit_step()); tagcache_get_max_commit_step());
#else #else
@ -458,7 +458,7 @@ static void init(void)
if (button_hold()) if (button_hold())
#endif #endif
{ {
gui_syncsplash(HZ*2, true, str(LANG_RESET_DONE_CLEAR)); gui_syncsplash(HZ*2, str(LANG_RESET_DONE_CLEAR));
settings_reset(); settings_reset();
} }
else else

View file

@ -589,12 +589,12 @@ static bool eq_save_preset(void)
if (!kbd_input(filename, sizeof filename)) { if (!kbd_input(filename, sizeof filename)) {
fd = creat(filename); fd = creat(filename);
if (fd < 0) if (fd < 0)
gui_syncsplash(HZ, true, str(LANG_FAILED)); gui_syncsplash(HZ, str(LANG_FAILED));
else else
break; break;
} }
else { else {
gui_syncsplash(HZ, true, str(LANG_MENU_SETTING_CANCEL)); gui_syncsplash(HZ, str(LANG_MENU_SETTING_CANCEL));
return false; return false;
} }
} }
@ -613,7 +613,7 @@ static bool eq_save_preset(void)
close(fd); close(fd);
gui_syncsplash(HZ, true, str(LANG_SETTINGS_SAVED)); gui_syncsplash(HZ, str(LANG_SETTINGS_SAVED));
return true; return true;
} }

View file

@ -320,7 +320,7 @@ static bool show_info(void)
#ifndef SIMULATOR #ifndef SIMULATOR
case ACTION_STD_OK: case ACTION_STD_OK:
gui_syncsplash(0, true, str(LANG_DIRCACHE_BUILDING)); gui_syncsplash(0, str(LANG_DIRCACHE_BUILDING));
fat_recalc_free(IF_MV(0)); fat_recalc_free(IF_MV(0));
#ifdef HAVE_MULTIVOLUME #ifdef HAVE_MULTIVOLUME
if (fat_ismounted(1)) if (fat_ismounted(1))

View file

@ -136,7 +136,7 @@ int audioscrobbler_callback(int action,const struct menu_item_ex *this_item)
{ {
case ACTION_EXIT_MENUITEM: /* on exit */ case ACTION_EXIT_MENUITEM: /* on exit */
if (!scrobbler_is_enabled() && global_settings.audioscrobbler) if (!scrobbler_is_enabled() && global_settings.audioscrobbler)
gui_syncsplash(HZ*2, true, str(LANG_PLEASE_REBOOT)); gui_syncsplash(HZ*2, str(LANG_PLEASE_REBOOT));
if(scrobbler_is_enabled() && !global_settings.audioscrobbler) if(scrobbler_is_enabled() && !global_settings.audioscrobbler)
scrobbler_shutdown(); scrobbler_shutdown();
@ -154,7 +154,7 @@ int cuesheet_callback(int action,const struct menu_item_ex *this_item)
{ {
case ACTION_EXIT_MENUITEM: /* on exit */ case ACTION_EXIT_MENUITEM: /* on exit */
if (!cuesheet_is_enabled() && global_settings.cuesheet) if (!cuesheet_is_enabled() && global_settings.cuesheet)
gui_syncsplash(HZ*2, true, str(LANG_PLEASE_REBOOT)); gui_syncsplash(HZ*2, str(LANG_PLEASE_REBOOT));
break; break;
} }
return action; return action;

View file

@ -638,7 +638,7 @@ bool rectrigger(void)
switch (button) { switch (button) {
case ACTION_STD_CANCEL: case ACTION_STD_CANCEL:
gui_syncsplash(50, true, str(LANG_MENU_SETTING_CANCEL)); gui_syncsplash(50, str(LANG_MENU_SETTING_CANCEL));
global_settings.rec_start_thres = old_start_thres; global_settings.rec_start_thres = old_start_thres;
global_settings.rec_start_duration = old_start_duration; global_settings.rec_start_duration = old_start_duration;
global_settings.rec_prerecord_time = old_prerecord_time; global_settings.rec_prerecord_time = old_prerecord_time;

View file

@ -49,13 +49,13 @@
static void tagcache_rebuild_with_splash(void) static void tagcache_rebuild_with_splash(void)
{ {
tagcache_rebuild(); tagcache_rebuild();
gui_syncsplash(HZ*2, true, str(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); gui_syncsplash(HZ*2, str(LANG_TAGCACHE_FORCE_UPDATE_SPLASH));
} }
static void tagcache_update_with_splash(void) static void tagcache_update_with_splash(void)
{ {
tagcache_update(); tagcache_update();
gui_syncsplash(HZ*2, true, str(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); gui_syncsplash(HZ*2, str(LANG_TAGCACHE_FORCE_UPDATE_SPLASH));
} }
#ifdef HAVE_TC_RAMCACHE #ifdef HAVE_TC_RAMCACHE
@ -163,7 +163,7 @@ static int dircache_callback(int action,const struct menu_item_ex *this_item)
{ {
case true: case true:
if (!dircache_is_enabled()) if (!dircache_is_enabled())
gui_syncsplash(HZ*2, true, str(LANG_PLEASE_REBOOT)); gui_syncsplash(HZ*2, str(LANG_PLEASE_REBOOT));
break; break;
case false: case false:
if (dircache_is_enabled()) if (dircache_is_enabled())

View file

@ -608,11 +608,11 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter)
x5_backlight_shutdown(); x5_backlight_shutdown();
#endif #endif
if (!battery_level_safe()) if (!battery_level_safe())
gui_syncsplash(3*HZ, true, "%s %s", gui_syncsplash(3*HZ, "%s %s",
str(LANG_WARNING_BATTERY_EMPTY), str(LANG_WARNING_BATTERY_EMPTY),
str(LANG_SHUTTINGDOWN)); str(LANG_SHUTTINGDOWN));
else if (battery_level_critical()) else if (battery_level_critical())
gui_syncsplash(3*HZ, true, "%s %s", gui_syncsplash(3*HZ, "%s %s",
str(LANG_WARNING_BATTERY_LOW), str(LANG_WARNING_BATTERY_LOW),
str(LANG_SHUTTINGDOWN)); str(LANG_SHUTTINGDOWN));
else { else {
@ -620,11 +620,11 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter)
if (!tagcache_prepare_shutdown()) if (!tagcache_prepare_shutdown())
{ {
cancel_shutdown(); cancel_shutdown();
gui_syncsplash(HZ, true, str(LANG_TAGCACHE_BUSY)); gui_syncsplash(HZ, str(LANG_TAGCACHE_BUSY));
return false; return false;
} }
#endif #endif
gui_syncsplash(0, true, str(LANG_SHUTTINGDOWN)); gui_syncsplash(0, str(LANG_SHUTTINGDOWN));
} }
if (global_settings.fade_on_stop if (global_settings.fade_on_stop

View file

@ -141,7 +141,7 @@ static bool list_viewers(void)
else else
{ {
/* FIX: translation! */ /* FIX: translation! */
gui_syncsplash(HZ*2, true, (unsigned char *)"No viewers found"); gui_syncsplash(HZ*2, (unsigned char *)"No viewers found");
} }
if (ret == PLUGIN_USB_CONNECTED) if (ret == PLUGIN_USB_CONNECTED)
@ -173,7 +173,7 @@ static bool add_to_playlist(int position, bool queue)
}; };
struct text_message message={lines, 2}; struct text_message message={lines, 2};
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
if (new_playlist) if (new_playlist)
playlist_create(NULL, NULL); playlist_create(NULL, NULL);
@ -454,7 +454,7 @@ static int remove_dir(char* dirname, int len)
#endif #endif
if(ACTION_STD_CANCEL == get_action(CONTEXT_STD,TIMEOUT_NOBLOCK)) if(ACTION_STD_CANCEL == get_action(CONTEXT_STD,TIMEOUT_NOBLOCK))
{ {
gui_syncsplash(HZ, true, str(LANG_MENU_SETTING_CANCEL)); gui_syncsplash(HZ, str(LANG_MENU_SETTING_CANCEL));
result = -1; result = -1;
break; break;
} }
@ -522,12 +522,12 @@ static bool set_backdrop(void)
{ {
/* load the image */ /* load the image */
if(load_main_backdrop(selected_file)) { if(load_main_backdrop(selected_file)) {
gui_syncsplash(HZ, true, str(LANG_BACKDROP_LOADED)); gui_syncsplash(HZ, str(LANG_BACKDROP_LOADED));
set_file(selected_file, (char *)global_settings.backdrop_file, MAX_FILENAME); set_file(selected_file, (char *)global_settings.backdrop_file, MAX_FILENAME);
show_main_backdrop(); show_main_backdrop();
return true; return true;
} else { } else {
gui_syncsplash(HZ, true, str(LANG_BACKDROP_FAILED)); gui_syncsplash(HZ, str(LANG_BACKDROP_FAILED));
return false; return false;
} }
} }
@ -575,7 +575,7 @@ static bool create_dir(void)
rc = mkdir(dirname); rc = mkdir(dirname);
if (rc < 0) { if (rc < 0) {
gui_syncsplash(HZ, true, (unsigned char *)"%s %s", gui_syncsplash(HZ, (unsigned char *)"%s %s",
str(LANG_CREATE_DIR), str(LANG_FAILED)); str(LANG_CREATE_DIR), str(LANG_FAILED));
} else { } else {
onplay_result = ONPLAY_RELOAD_DIR; onplay_result = ONPLAY_RELOAD_DIR;
@ -849,7 +849,7 @@ static bool clipboard_paste(void)
/* Force reload of the current directory */ /* Force reload of the current directory */
onplay_result = ONPLAY_RELOAD_DIR; onplay_result = ONPLAY_RELOAD_DIR;
} else { } else {
gui_syncsplash(HZ, true, (unsigned char *)"%s %s", gui_syncsplash(HZ, (unsigned char *)"%s %s",
str(LANG_PASTE), str(LANG_FAILED)); str(LANG_PASTE), str(LANG_FAILED));
} }

View file

@ -820,7 +820,7 @@ void audio_set_crossfade(int enable)
offset = CUR_TI->id3.offset; offset = CUR_TI->id3.offset;
/* Playback has to be stopped before changing the buffer size. */ /* Playback has to be stopped before changing the buffer size. */
gui_syncsplash(0, true, (char *)str(LANG_RESTARTING_PLAYBACK)); gui_syncsplash(0, (char *)str(LANG_RESTARTING_PLAYBACK));
audio_stop(); audio_stop();
} }
@ -2006,7 +2006,7 @@ static void codec_thread(void)
if (!ci.new_track) if (!ci.new_track)
{ {
logf("Codec failure"); logf("Codec failure");
gui_syncsplash(HZ*2, true, "Codec failure"); gui_syncsplash(HZ*2, "Codec failure");
} }
if (!codec_load_next_track()) if (!codec_load_next_track())
@ -2060,7 +2060,7 @@ static void codec_thread(void)
break; break;
logf("Encoder failure"); logf("Encoder failure");
gui_syncsplash(HZ*2, true, "Encoder failure"); gui_syncsplash(HZ*2, "Encoder failure");
if (ci.enc_codec_loaded < 0) if (ci.enc_codec_loaded < 0)
break; break;
@ -2742,7 +2742,7 @@ static bool audio_load_track(int offset, bool start_play, bool rebuffer)
* the codec file failed part way through, either way, skip the track */ * the codec file failed part way through, either way, skip the track */
snprintf(msgbuf, sizeof(msgbuf)-1, "No codec for: %s", trackname); snprintf(msgbuf, sizeof(msgbuf)-1, "No codec for: %s", trackname);
/* We should not use gui_syncplash from audio thread! */ /* We should not use gui_syncplash from audio thread! */
gui_syncsplash(HZ*2, true, msgbuf); gui_syncsplash(HZ*2, msgbuf);
/* Skip invalid entry from playlist. */ /* Skip invalid entry from playlist. */
playlist_skip_entry(NULL, last_peek_offset); playlist_skip_entry(NULL, last_peek_offset);
tracks[track_widx].taginfo_ready = false; tracks[track_widx].taginfo_ready = false;

View file

@ -288,7 +288,7 @@ static void create_control(struct playlist_info* playlist)
{ {
if (check_rockboxdir()) if (check_rockboxdir())
{ {
gui_syncsplash(HZ*2, true, (unsigned char *)"%s (%d)", gui_syncsplash(HZ*2, (unsigned char *)"%s (%d)",
str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR), str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR),
playlist->control_fd); playlist->control_fd);
} }
@ -484,7 +484,7 @@ static int add_indices_to_playlist(struct playlist_info* playlist,
lcd_setmargins(0, 0); lcd_setmargins(0, 0);
#endif #endif
gui_syncsplash(0, true, str(LANG_PLAYLIST_LOAD)); gui_syncsplash(0, str(LANG_PLAYLIST_LOAD));
if (!buffer) if (!buffer)
{ {
@ -1348,9 +1348,9 @@ static int get_filename(struct playlist_info* playlist, int index, int seek,
if (max < 0) if (max < 0)
{ {
if (control_file) if (control_file)
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
else else
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_ACCESS_ERROR));
return max; return max;
} }
@ -1440,7 +1440,7 @@ static int get_next_dir(char *dir, bool is_forward, bool recursion)
if (ft_load(tc, (dir[0]=='\0')?"/":dir) < 0) if (ft_load(tc, (dir[0]=='\0')?"/":dir) < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR));
exit = true; exit = true;
result = -1; result = -1;
break; break;
@ -1525,7 +1525,7 @@ static int check_subdir_for_music(char *dir, char *subdir)
if (ft_load(tc, dir) < 0) if (ft_load(tc, dir) < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR));
return -2; return -2;
} }
@ -1578,7 +1578,7 @@ static int check_subdir_for_music(char *dir, char *subdir)
/* we now need to reload our current directory */ /* we now need to reload our current directory */
if(ft_load(tc, dir) < 0) if(ft_load(tc, dir) < 0)
gui_syncsplash(HZ*2, true, gui_syncsplash(HZ*2,
str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR));
} }
@ -1663,7 +1663,7 @@ static void display_playlist_count(int count, const unsigned char *fmt)
lcd_setmargins(0, 0); lcd_setmargins(0, 0);
#endif #endif
gui_syncsplash(0, true, fmt, count, gui_syncsplash(0, fmt, count,
#if CONFIG_KEYPAD == PLAYER_PAD #if CONFIG_KEYPAD == PLAYER_PAD
str(LANG_STOP_ABORT) str(LANG_STOP_ABORT)
#else #else
@ -1677,7 +1677,7 @@ static void display_playlist_count(int count, const unsigned char *fmt)
*/ */
static void display_buffer_full(void) static void display_buffer_full(void)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_BUFFER_FULL)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_BUFFER_FULL));
} }
/* /*
@ -1756,7 +1756,7 @@ static int flush_cached_control(struct playlist_info* playlist)
else else
{ {
result = -1; result = -1;
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
} }
return result; return result;
@ -1943,11 +1943,11 @@ int playlist_resume(void)
empty_playlist(playlist, true); empty_playlist(playlist, true);
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
playlist->control_fd = open(playlist->control_filename, O_RDWR); playlist->control_fd = open(playlist->control_filename, O_RDWR);
if (playlist->control_fd < 0) if (playlist->control_fd < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1; return -1;
} }
playlist->control_created = true; playlist->control_created = true;
@ -1955,7 +1955,7 @@ int playlist_resume(void)
control_file_size = filesize(playlist->control_fd); control_file_size = filesize(playlist->control_fd);
if (control_file_size <= 0) if (control_file_size <= 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1; return -1;
} }
@ -1964,7 +1964,7 @@ int playlist_resume(void)
PLAYLIST_COMMAND_SIZE<buflen?PLAYLIST_COMMAND_SIZE:buflen); PLAYLIST_COMMAND_SIZE<buflen?PLAYLIST_COMMAND_SIZE:buflen);
if(nread <= 0) if(nread <= 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1; return -1;
} }
@ -1990,7 +1990,7 @@ int playlist_resume(void)
/* So a splash while we are loading. */ /* So a splash while we are loading. */
if (current_tick - last_tick > HZ/4) if (current_tick - last_tick > HZ/4)
{ {
gui_syncsplash(0, true, str(LANG_LOADING_PERCENT), gui_syncsplash(0, str(LANG_LOADING_PERCENT),
(total_read+count)*100/control_file_size, (total_read+count)*100/control_file_size,
#if CONFIG_KEYPAD == PLAYER_PAD #if CONFIG_KEYPAD == PLAYER_PAD
str(LANG_STOP_ABORT) str(LANG_STOP_ABORT)
@ -2264,7 +2264,7 @@ int playlist_resume(void)
if (result < 0) if (result < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_INVALID)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_INVALID));
return result; return result;
} }
@ -2273,7 +2273,7 @@ int playlist_resume(void)
if ((total_read + count) >= control_file_size) if ((total_read + count) >= control_file_size)
{ {
/* no newline at end of control file */ /* no newline at end of control file */
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_INVALID)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_INVALID));
return -1; return -1;
} }
@ -2367,7 +2367,7 @@ int playlist_shuffle(int random_seed, int start_index)
start_current = true; start_current = true;
} }
gui_syncsplash(0, true, str(LANG_PLAYLIST_SHUFFLE)); gui_syncsplash(0, str(LANG_PLAYLIST_SHUFFLE));
randomise_playlist(playlist, random_seed, start_current, true); randomise_playlist(playlist, random_seed, start_current, true);
@ -2859,7 +2859,7 @@ int playlist_insert_track(struct playlist_info* playlist, const char *filename,
if (check_control(playlist) < 0) if (check_control(playlist) < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1; return -1;
} }
@ -2890,7 +2890,7 @@ int playlist_insert_directory(struct playlist_info* playlist,
if (check_control(playlist) < 0) if (check_control(playlist) < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1; return -1;
} }
@ -2956,14 +2956,14 @@ int playlist_insert_playlist(struct playlist_info* playlist, char *filename,
if (check_control(playlist) < 0) if (check_control(playlist) < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1; return -1;
} }
fd = open(filename, O_RDONLY); fd = open(filename, O_RDONLY);
if (fd < 0) if (fd < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_ACCESS_ERROR));
return -1; return -1;
} }
@ -3076,7 +3076,7 @@ int playlist_delete(struct playlist_info* playlist, int index)
if (check_control(playlist) < 0) if (check_control(playlist) < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1; return -1;
} }
@ -3111,7 +3111,7 @@ int playlist_move(struct playlist_info* playlist, int index, int new_index)
if (check_control(playlist) < 0) if (check_control(playlist) < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR));
return -1; return -1;
} }
@ -3374,7 +3374,7 @@ int playlist_save(struct playlist_info* playlist, char *filename)
if (playlist->buffer_size < (int)(playlist->amount * sizeof(int))) if (playlist->buffer_size < (int)(playlist->amount * sizeof(int)))
{ {
/* not enough buffer space to store updated indices */ /* not enough buffer space to store updated indices */
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_ACCESS_ERROR));
return -1; return -1;
} }
@ -3390,7 +3390,7 @@ int playlist_save(struct playlist_info* playlist, char *filename)
fd = open(path, O_CREAT|O_WRONLY|O_TRUNC); fd = open(path, O_CREAT|O_WRONLY|O_TRUNC);
if (fd < 0) if (fd < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_ACCESS_ERROR));
return -1; return -1;
} }
@ -3431,7 +3431,7 @@ int playlist_save(struct playlist_info* playlist, char *filename)
if (fdprintf(fd, "%s\n", tmp_buf) < 0) if (fdprintf(fd, "%s\n", tmp_buf) < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_ACCESS_ERROR));
result = -1; result = -1;
break; break;
} }
@ -3518,7 +3518,7 @@ int playlist_directory_tracksearch(const char* dirname, bool recurse,
if (ft_load(tc, dirname) < 0) if (ft_load(tc, dirname) < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR));
*(tc->dirfilter) = old_dirfilter; *(tc->dirfilter) = old_dirfilter;
return -1; return -1;
} }

View file

@ -112,7 +112,7 @@ static int initialize_catalog(void)
if (!playlist_dir_exists) if (!playlist_dir_exists)
{ {
if (mkdir(playlist_dir) < 0) { if (mkdir(playlist_dir) < 0) {
gui_syncsplash(HZ*2, true, str(LANG_CATALOG_NO_DIRECTORY), gui_syncsplash(HZ*2, str(LANG_CATALOG_NO_DIRECTORY),
playlist_dir); playlist_dir);
return -1; return -1;
} }
@ -146,7 +146,7 @@ static int create_playlist_list(char** playlists, int num_items,
if (ft_load(tc, playlist_dir) < 0) if (ft_load(tc, playlist_dir) < 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_CATALOG_NO_DIRECTORY), gui_syncsplash(HZ*2, str(LANG_CATALOG_NO_DIRECTORY),
playlist_dir); playlist_dir);
goto exit; goto exit;
} }
@ -231,7 +231,7 @@ static int display_playlists(char* playlist, bool view)
if (num_playlists <= 0) if (num_playlists <= 0)
{ {
gui_syncsplash(HZ*2, true, str(LANG_CATALOG_NO_PLAYLISTS)); gui_syncsplash(HZ*2, str(LANG_CATALOG_NO_PLAYLISTS));
return -1; return -1;
} }
@ -319,7 +319,7 @@ static int display_playlists(char* playlist, bool view)
insert */ insert */
static void display_insert_count(int count) static void display_insert_count(int count)
{ {
gui_syncsplash(0, true, str(LANG_PLAYLIST_INSERT_COUNT), count, gui_syncsplash(0, str(LANG_PLAYLIST_INSERT_COUNT), count,
#if CONFIG_KEYPAD == PLAYER_PAD #if CONFIG_KEYPAD == PLAYER_PAD
str(LANG_STOP_ABORT) str(LANG_STOP_ABORT)
#else #else

View file

@ -636,9 +636,9 @@ bool playlist_viewer_ex(char* filename)
{ {
/* Play has stopped */ /* Play has stopped */
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS
gui_syncsplash(HZ, true, str(LANG_END_PLAYLIST_PLAYER)); gui_syncsplash(HZ, str(LANG_END_PLAYLIST_PLAYER));
#else #else
gui_syncsplash(HZ, true, str(LANG_END_PLAYLIST_RECORDER)); gui_syncsplash(HZ, str(LANG_END_PLAYLIST_RECORDER));
#endif #endif
goto exit; goto exit;
} }
@ -696,7 +696,7 @@ bool playlist_viewer_ex(char* filename)
ret = playlist_move(viewer.playlist, viewer.move_track, ret = playlist_move(viewer.playlist, viewer.move_track,
current_track->index); current_track->index);
if (ret < 0) if (ret < 0)
gui_syncsplash(HZ, true, str(LANG_MOVE_FAILED)); gui_syncsplash(HZ, str(LANG_MOVE_FAILED));
update_playlist(true); update_playlist(true);
viewer.move_track = -1; viewer.move_track = -1;
@ -819,7 +819,7 @@ bool search_playlist(void)
playlist_count = playlist_amount_ex(viewer.playlist); playlist_count = playlist_amount_ex(viewer.playlist);
for (i=0;(i<playlist_count)&&(found_indicies_count<MAX_PLAYLIST_ENTRIES);i++) for (i=0;(i<playlist_count)&&(found_indicies_count<MAX_PLAYLIST_ENTRIES);i++)
{ {
gui_syncsplash(0, true, str(LANG_PLAYLIST_SEARCH_MSG),found_indicies_count, gui_syncsplash(0, str(LANG_PLAYLIST_SEARCH_MSG),found_indicies_count,
#if CONFIG_KEYPAD == PLAYER_PAD #if CONFIG_KEYPAD == PLAYER_PAD
str(LANG_STOP_ABORT) str(LANG_STOP_ABORT)
#else #else

View file

@ -526,32 +526,32 @@ int plugin_load(const char* plugin, void* parameter)
plugin_loaded = false; plugin_loaded = false;
} }
gui_syncsplash(0, true, str(LANG_WAIT)); gui_syncsplash(0, str(LANG_WAIT));
strcpy(current_plugin,p); strcpy(current_plugin,p);
#ifdef SIMULATOR #ifdef SIMULATOR
hdr = sim_plugin_load((char *)plugin, &pd); hdr = sim_plugin_load((char *)plugin, &pd);
if (pd == NULL) { if (pd == NULL) {
gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_CANT_OPEN), plugin); gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin);
return -1; return -1;
} }
if (hdr == NULL if (hdr == NULL
|| hdr->magic != PLUGIN_MAGIC || hdr->magic != PLUGIN_MAGIC
|| hdr->target_id != TARGET_ID) { || hdr->target_id != TARGET_ID) {
sim_plugin_close(pd); sim_plugin_close(pd);
gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_WRONG_MODEL)); gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL));
return -1; return -1;
} }
if (hdr->api_version > PLUGIN_API_VERSION if (hdr->api_version > PLUGIN_API_VERSION
|| hdr->api_version < PLUGIN_MIN_API_VERSION) { || hdr->api_version < PLUGIN_MIN_API_VERSION) {
sim_plugin_close(pd); sim_plugin_close(pd);
gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_WRONG_VERSION)); gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION));
return -1; return -1;
} }
#else #else
fd = open(plugin, O_RDONLY); fd = open(plugin, O_RDONLY);
if (fd < 0) { if (fd < 0) {
gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_CANT_OPEN), plugin); gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin);
return fd; return fd;
} }
@ -559,7 +559,7 @@ int plugin_load(const char* plugin, void* parameter)
close(fd); close(fd);
if (readsize < 0) { if (readsize < 0) {
gui_syncsplash(HZ*2, true, str(LANG_READ_FAILED), plugin); gui_syncsplash(HZ*2, str(LANG_READ_FAILED), plugin);
return -1; return -1;
} }
hdr = (struct plugin_header *)pluginbuf; hdr = (struct plugin_header *)pluginbuf;
@ -569,12 +569,12 @@ int plugin_load(const char* plugin, void* parameter)
|| hdr->target_id != TARGET_ID || hdr->target_id != TARGET_ID
|| hdr->load_addr != pluginbuf || hdr->load_addr != pluginbuf
|| hdr->end_addr > pluginbuf + PLUGIN_BUFFER_SIZE) { || hdr->end_addr > pluginbuf + PLUGIN_BUFFER_SIZE) {
gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_WRONG_MODEL)); gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_MODEL));
return -1; return -1;
} }
if (hdr->api_version > PLUGIN_API_VERSION if (hdr->api_version > PLUGIN_API_VERSION
|| hdr->api_version < PLUGIN_MIN_API_VERSION) { || hdr->api_version < PLUGIN_MIN_API_VERSION) {
gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_WRONG_VERSION)); gui_syncsplash(HZ*2, str(LANG_PLUGIN_WRONG_VERSION));
return -1; return -1;
} }
plugin_size = hdr->end_addr - pluginbuf; plugin_size = hdr->end_addr - pluginbuf;
@ -659,7 +659,7 @@ int plugin_load(const char* plugin, void* parameter)
return PLUGIN_USB_CONNECTED; return PLUGIN_USB_CONNECTED;
default: default:
gui_syncsplash(HZ*2, true, str(LANG_PLUGIN_ERROR)); gui_syncsplash(HZ*2, str(LANG_PLUGIN_ERROR));
break; break;
} }
return PLUGIN_OK; return PLUGIN_OK;

View file

@ -205,7 +205,7 @@ struct plugin_api {
void (*backlight_on)(void); void (*backlight_on)(void);
void (*backlight_off)(void); void (*backlight_off)(void);
void (*backlight_set_timeout)(int index); void (*backlight_set_timeout)(int index);
void (*splash)(int ticks, bool center, const unsigned char *fmt, ...); void (*splash)(int ticks, const unsigned char *fmt, ...);
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
/* remote lcd */ /* remote lcd */

View file

@ -1151,7 +1151,7 @@ int main(void* parameter)
mbus_init(); /* init the M-Bus layer */ mbus_init(); /* init the M-Bus layer */
emu_init(); /* init emulator */ emu_init(); /* init emulator */
rb->splash(HZ/5, true, "Alpine CDC"); /* be quick on autostart */ rb->splash(HZ/5, "Alpine CDC"); /* be quick on autostart */
#ifdef DEBUG #ifdef DEBUG
print_scroll("Alpine M-Bus Test"); print_scroll("Alpine M-Bus Test");
@ -1164,7 +1164,7 @@ int main(void* parameter)
stacksize = (stacksize - 100) & ~3; stacksize = (stacksize - 100) & ~3;
if (stacksize < DEFAULT_STACK_SIZE) if (stacksize < DEFAULT_STACK_SIZE)
{ {
rb->splash(HZ*2, true, "Out of memory"); rb->splash(HZ*2, "Out of memory");
return -1; return -1;
} }

View file

@ -320,7 +320,7 @@ void thread(void)
if(exit) if(exit)
{ {
if(exit == 2) if(exit == 2)
rb->splash(HZ,true, rb->splash(HZ,
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
"Exiting battery_bench..."); "Exiting battery_bench...");
#else #else
@ -464,7 +464,7 @@ int main(void)
} }
else else
{ {
rb->splash(HZ / 2, true, "Cannot create file!"); rb->splash(HZ / 2, "Cannot create file!");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
} }
@ -482,7 +482,7 @@ int main(void)
IF_PRIO(, PRIORITY_BACKGROUND) IF_PRIO(, PRIORITY_BACKGROUND)
IF_COP(, CPU, false)) == NULL) IF_COP(, CPU, false)) == NULL)
{ {
rb->splash(HZ,true,"Cannot create thread!"); rb->splash(HZ, "Cannot create thread!");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }

View file

@ -712,7 +712,7 @@ static void blackjack_savegame(struct game_context* bj) {
static void blackjack_callback(void* param) { static void blackjack_callback(void* param) {
struct game_context* bj = (struct game_context*) param; struct game_context* bj = (struct game_context*) param;
if(bj->dirty) { if(bj->dirty) {
rb->splash(HZ, true, "Saving high scores..."); rb->splash(HZ, "Saving high scores...");
blackjack_savescores(bj); blackjack_savescores(bj);
} }
} }
@ -1124,9 +1124,9 @@ static unsigned int blackjack_menu(struct game_context* bj) {
case BJACK_RESUME:/* resume game */ case BJACK_RESUME:/* resume game */
if(!blackjack_loadgame(bj)) { if(!blackjack_loadgame(bj)) {
rb->splash(HZ*2, true, "Nothing to resume"); rb->splash(HZ*2, "Nothing to resume");
} else { } else {
rb->splash(HZ*2, true, "Loading..."); rb->splash(HZ*2, "Loading...");
breakout = true; breakout = true;
} }
break; break;
@ -1218,7 +1218,7 @@ static int blackjack(struct game_context* bj) {
!bj->asked_insurance) { !bj->asked_insurance) {
temp_var = insurance(bj); temp_var = insurance(bj);
if (bj->dealer_total == 21) { if (bj->dealer_total == 21) {
rb->splash(HZ, true, "Dealer has blackjack"); rb->splash(HZ, "Dealer has blackjack");
bj->player_money += temp_var; bj->player_money += temp_var;
bj->end_hand = true; bj->end_hand = true;
breakout = true; breakout = true;
@ -1226,7 +1226,7 @@ static int blackjack(struct game_context* bj) {
finish_game(bj); finish_game(bj);
} }
else { else {
rb->splash(HZ, true, "Dealer does not have blackjack"); rb->splash(HZ, "Dealer does not have blackjack");
bj->player_money -= temp_var; bj->player_money -= temp_var;
breakout = true; breakout = true;
redraw_board(bj); redraw_board(bj);
@ -1285,13 +1285,13 @@ static int blackjack(struct game_context* bj) {
} }
} }
else if((signed int)bj->current_bet * 2 > bj->player_money) { else if((signed int)bj->current_bet * 2 > bj->player_money) {
rb->splash(HZ, true, "Not enough money to double down."); rb->splash(HZ, "Not enough money to double down.");
redraw_board(bj); redraw_board(bj);
rb->lcd_update(); rb->lcd_update();
} }
break; break;
case BJACK_RESUME: /* save and end game */ case BJACK_RESUME: /* save and end game */
rb->splash(HZ, true, "Saving game..."); rb->splash(HZ, "Saving game...");
blackjack_savegame(bj); blackjack_savegame(bj);
/* fall through to BJACK_QUIT */ /* fall through to BJACK_QUIT */
@ -1412,14 +1412,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
while(!exit) { while(!exit) {
switch(blackjack(&bj)){ switch(blackjack(&bj)){
case BJ_LOSE: case BJ_LOSE:
rb->splash(HZ, true, "Not enough money to continue"); rb->splash(HZ, "Not enough money to continue");
/* fall through to BJ_END */ /* fall through to BJ_END */
case BJ_END: case BJ_END:
if(!bj.resume) { if(!bj.resume) {
if((position = blackjack_recordscore(&bj))) { if((position = blackjack_recordscore(&bj))) {
rb->snprintf(str, 19, "New high score #%d!", position); rb->snprintf(str, 19, "New high score #%d!", position);
rb->splash(HZ*2, true, str); rb->splash(HZ*2, str);
} }
} }
break; break;
@ -1430,7 +1430,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
case BJ_QUIT: case BJ_QUIT:
if(bj.dirty) { if(bj.dirty) {
rb->splash(HZ, true, "Saving high scores..."); rb->splash(HZ, "Saving high scores...");
blackjack_savescores(&bj); blackjack_savescores(&bj);
} }
exit = true; exit = true;

View file

@ -1804,7 +1804,7 @@ int game_loop(void)
if (score>highscore) { if (score>highscore) {
sleep(2); sleep(2);
highscore=score; highscore=score;
rb->splash(HZ*2,true,"New High Score"); rb->splash(HZ*2, "New High Score");
} }
else { else {
sleep(3); sleep(3);
@ -1960,7 +1960,7 @@ int game_loop(void)
} }
else { else {
#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64)
rb->splash(HZ*2,true,"Game Over"); rb->splash(HZ*2, "Game Over");
#else #else
rb->lcd_bitmap(brickmania_gameover,LCD_WIDTH/2-55,LCD_HEIGHT-87, rb->lcd_bitmap(brickmania_gameover,LCD_WIDTH/2-55,LCD_HEIGHT-87,
110,52); 110,52);
@ -1969,7 +1969,7 @@ int game_loop(void)
if (score>highscore) { if (score>highscore) {
sleep(2); sleep(2);
highscore=score; highscore=score;
rb->splash(HZ*2,true,"New High Score"); rb->splash(HZ*2, "New High Score");
} else { } else {
sleep(3); sleep(3);
} }

View file

@ -2164,7 +2164,7 @@ static int bubbles_checklevel(struct game_context* bb) {
} }
rb->snprintf(str, 12, "%d points", points); rb->snprintf(str, 12, "%d points", points);
rb->splash(HZ, true, str); rb->splash(HZ, str);
/* advance to the next level */ /* advance to the next level */
if(!bubbles_nextlevel(bb)) { if(!bubbles_nextlevel(bb)) {
@ -2174,7 +2174,7 @@ static int bubbles_checklevel(struct game_context* bb) {
bubbles_drawboard(bb); bubbles_drawboard(bb);
rb->lcd_update(); rb->lcd_update();
rb->snprintf(str, 12, "Level %d", bb->level); rb->snprintf(str, 12, "Level %d", bb->level);
rb->splash(HZ, true, str); rb->splash(HZ, str);
bubbles_drawboard(bb); bubbles_drawboard(bb);
rb->lcd_update(); rb->lcd_update();
@ -2334,7 +2334,7 @@ static inline void bubbles_setcolors(void) {
static void bubbles_callback(void* param) { static void bubbles_callback(void* param) {
struct game_context* bb = (struct game_context*) param; struct game_context* bb = (struct game_context*) param;
if(bb->dirty) { if(bb->dirty) {
rb->splash(HZ/2, true, "Saving high scores..."); rb->splash(HZ/2, "Saving high scores...");
bubbles_savescores(bb); bubbles_savescores(bb);
} }
} }
@ -2385,7 +2385,7 @@ static int bubbles_handlebuttons(struct game_context* bb, bool animblock,
case BUBBLES_START: /* pause the game */ case BUBBLES_START: /* pause the game */
start = *rb->current_tick; start = *rb->current_tick;
rb->splash(1, true, "Paused"); rb->splash(1, "Paused");
while(pluginlib_getaction(rb,TIMEOUT_BLOCK,plugin_contexts,2) while(pluginlib_getaction(rb,TIMEOUT_BLOCK,plugin_contexts,2)
!= (BUBBLES_START)); != (BUBBLES_START));
bb->startedshot += *rb->current_tick-start; bb->startedshot += *rb->current_tick-start;
@ -2395,7 +2395,7 @@ static int bubbles_handlebuttons(struct game_context* bb, bool animblock,
case BUBBLES_RESUME: /* save and end the game */ case BUBBLES_RESUME: /* save and end the game */
if(!animblock) { if(!animblock) {
rb->splash(HZ/2, true, "Saving game..."); rb->splash(HZ/2, "Saving game...");
bubbles_savegame(bb); bubbles_savegame(bb);
return BB_END; return BB_END;
} }
@ -2554,7 +2554,7 @@ static int bubbles(struct game_context* bb) {
case BUBBLES_RESUME: /* resume game */ case BUBBLES_RESUME: /* resume game */
if(!bubbles_loadgame(bb)) { if(!bubbles_loadgame(bb)) {
rb->splash(HZ*2, true, "Nothing to resume"); rb->splash(HZ*2, "Nothing to resume");
} else { } else {
startgame = true; startgame = true;
} }
@ -2652,7 +2652,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
xlcd_init(rb); xlcd_init(rb);
/* load files */ /* load files */
rb->splash(0, true, "Loading..."); rb->splash(0, "Loading...");
bubbles_loadscores(&bb); bubbles_loadscores(&bb);
rb->lcd_clear_display(); rb->lcd_clear_display();
@ -2666,7 +2666,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
switch(bubbles(&bb)){ switch(bubbles(&bb)){
char str[19]; char str[19];
case BB_WIN: case BB_WIN:
rb->splash(HZ*2, true, "You Win!"); rb->splash(HZ*2, "You Win!");
/* record high level */ /* record high level */
if( NUM_LEVELS-1 > bb.highlevel) { if( NUM_LEVELS-1 > bb.highlevel) {
bb.highlevel = NUM_LEVELS-1; bb.highlevel = NUM_LEVELS-1;
@ -2676,12 +2676,12 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
/* record high score */ /* record high score */
if((position = bubbles_recordscore(&bb))) { if((position = bubbles_recordscore(&bb))) {
rb->snprintf(str, 19, "New high score #%d!", position); rb->snprintf(str, 19, "New high score #%d!", position);
rb->splash(HZ*2, true, str); rb->splash(HZ*2, str);
} }
break; break;
case BB_LOSE: case BB_LOSE:
rb->splash(HZ*2, true, "Game Over"); rb->splash(HZ*2, "Game Over");
/* fall through to BB_END */ /* fall through to BB_END */
case BB_END: case BB_END:
@ -2695,7 +2695,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
/* record high score */ /* record high score */
if((position = bubbles_recordscore(&bb))) { if((position = bubbles_recordscore(&bb))) {
rb->snprintf(str, 19, "New high score #%d!", position); rb->snprintf(str, 19, "New high score #%d!", position);
rb->splash(HZ*2, true, str); rb->splash(HZ*2, str);
} }
} }
break; break;
@ -2706,7 +2706,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
case BB_QUIT: case BB_QUIT:
if(bb.dirty) { if(bb.dirty) {
rb->splash(HZ/2, true, "Saving high scores..."); rb->splash(HZ/2, "Saving high scores...");
bubbles_savescores(&bb); bubbles_savescores(&bb);
} }
exit = true; exit = true;

View file

@ -1017,7 +1017,7 @@ void printResult(void)
switch(calStatus){ switch(calStatus){
case cal_exit: case cal_exit:
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(HZ/3, true, "Bye now!"); rb->splash(HZ/3, "Bye now!");
break; break;
case cal_error: case cal_error:
clearbuf(); clearbuf();
@ -1447,7 +1447,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
lastbtn = btn; lastbtn = btn;
} /* while (calStatus != cal_exit ) */ } /* while (calStatus != cal_exit ) */
/* rb->splash(HZ*2, true, "Hello world!"); */ /* rb->splash(HZ*2, "Hello world!"); */
rb->button_clear_queue(); rb->button_clear_queue();
return PLUGIN_OK; return PLUGIN_OK;
} }

View file

@ -384,7 +384,7 @@ void cb_levelup ( void ) {
cb_setlevel ( 1 ); cb_setlevel ( 1 );
else else
cb_setlevel ( Level+1 ); cb_setlevel ( Level+1 );
rb->splash ( 50 , true , level_string[Level-1] ); rb->splash ( 50 , level_string[Level-1] );
}; };
/* ---- Save current position ---- */ /* ---- Save current position ---- */
@ -393,7 +393,7 @@ void cb_saveposition ( void ) {
short sq,i,c; short sq,i,c;
unsigned short temp; unsigned short temp;
rb->splash ( 0 , true , "Saving position" ); rb->splash ( 0 , "Saving position" );
fd = rb->open(SAVE_FILE, O_WRONLY|O_CREAT); fd = rb->open(SAVE_FILE, O_WRONLY|O_CREAT);
@ -448,7 +448,7 @@ void cb_restoreposition ( void ) {
unsigned short m; unsigned short m;
if ( (fd = rb->open(SAVE_FILE, O_RDONLY)) >= 0 ) { if ( (fd = rb->open(SAVE_FILE, O_RDONLY)) >= 0 ) {
rb->splash ( 0 , true , "Loading position" ); rb->splash ( 0 , "Loading position" );
rb->read(fd, &(computer), sizeof(computer)); rb->read(fd, &(computer), sizeof(computer));
rb->read(fd, &(opponent), sizeof(opponent)); rb->read(fd, &(opponent), sizeof(opponent));
rb->read(fd, &(Game50), sizeof(Game50)); rb->read(fd, &(Game50), sizeof(Game50));
@ -673,7 +673,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
while (!exit) { while (!exit) {
if ( mate ) { if ( mate ) {
rb->splash ( 500 , true , "Checkmate!" ); rb->splash ( 500 , "Checkmate!" );
rb->button_get(true); rb->button_get(true);
GNUChess_Initialize(); GNUChess_Initialize();
cb_drawboard(); cb_drawboard();
@ -682,11 +682,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
switch (command.type) { switch (command.type) {
case COMMAND_MOVE: case COMMAND_MOVE:
if ( ! VerifyMove ( command.mv_s , 0 , &command.mv ) ) { if ( ! VerifyMove ( command.mv_s , 0 , &command.mv ) ) {
rb->splash ( 50 , true , "Illegal move!" ); rb->splash ( 50 , "Illegal move!" );
cb_drawboard(); cb_drawboard();
} else { } else {
cb_drawboard(); cb_drawboard();
rb->splash ( 0 , true , "Thinking..." ); rb->splash ( 0 , "Thinking..." );
#ifdef HAVE_ADJUSTABLE_CPU_FREQ #ifdef HAVE_ADJUSTABLE_CPU_FREQ
rb->cpu_boost ( true ); rb->cpu_boost ( true );
#endif #endif
@ -709,7 +709,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
#endif #endif
case COMMAND_PLAY: case COMMAND_PLAY:
opponent = !opponent; computer = !computer; opponent = !opponent; computer = !computer;
rb->splash ( 0 , true , "Thinking..." ); rb->splash ( 0 , "Thinking..." );
#ifdef HAVE_ADJUSTABLE_CPU_FREQ #ifdef HAVE_ADJUSTABLE_CPU_FREQ
rb->cpu_boost ( true ); rb->cpu_boost ( true );
#endif #endif

View file

@ -196,7 +196,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->memset(&settings, 0, sizeof(settings)); rb->memset(&settings, 0, sizeof(settings));
/* now go ahead and have fun! */ /* now go ahead and have fun! */
rb->splash(HZ, true, "Chess Clock"); rb->splash(HZ, "Chess Clock");
rb->lcd_clear_display(); rb->lcd_clear_display();
i=0; i=0;

View file

@ -1295,7 +1295,7 @@ bool chip8_run(char* file)
chip8(); chip8();
if (!ok) { if (!ok) {
rb->splash(HZ, true, "Error"); rb->splash(HZ, "Error");
return false; return false;
} }
@ -1308,7 +1308,7 @@ bool chip8_run(char* file)
if (chip8_running == 3) { if (chip8_running == 3) {
/* unsupported instruction */ /* unsupported instruction */
rb->splash(HZ, true, "Error: Unsupported" rb->splash(HZ, "Error: Unsupported"
#ifndef CHIP8_SUPER #ifndef CHIP8_SUPER
" CHIP-8 instruction. (maybe S-CHIP)" " CHIP-8 instruction. (maybe S-CHIP)"
#else #else
@ -1332,7 +1332,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if (parameter == NULL) if (parameter == NULL)
{ {
rb->splash(HZ, true, "Play a .ch8 file!"); rb->splash(HZ, "Play a .ch8 file!");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
else else

View file

@ -484,17 +484,17 @@ static void chopKillPlayer(void)
#if LCD_DEPTH >= 2 #if LCD_DEPTH >= 2
rb->lcd_set_foreground(LCD_LIGHTGRAY); rb->lcd_set_foreground(LCD_LIGHTGRAY);
#endif #endif
rb->splash(HZ, true, "Game Over"); rb->splash(HZ, "Game Over");
if (score > highscore) { if (score > highscore) {
char scoretext[30]; char scoretext[30];
highscore = score; highscore = score;
rb->snprintf(scoretext, sizeof(scoretext), "New High Score: %d", rb->snprintf(scoretext, sizeof(scoretext), "New High Score: %d",
highscore); highscore);
rb->splash(HZ*2, true, scoretext); rb->splash(HZ*2, scoretext);
} }
rb->splash(HZ/4, true, "Press " ACTIONTEXT " to continue"); rb->splash(HZ/4, "Press " ACTIONTEXT " to continue");
rb->lcd_update(); rb->lcd_update();
rb->lcd_set_drawmode(DRMODE_SOLID); rb->lcd_set_drawmode(DRMODE_SOLID);
@ -668,7 +668,7 @@ static int chopMenu(int menunum)
menu_quit=true; menu_quit=true;
res = -1; res = -1;
} else if(menunum==0){ } else if(menunum==0){
rb->splash(HZ, true, "No game to resume"); rb->splash(HZ, "No game to resume");
} }
break; break;
case 2: case 2:

View file

@ -1418,10 +1418,10 @@ void confirm_reset(void)
if(result == 1) /* reset! */ if(result == 1) /* reset! */
{ {
reset_settings(); reset_settings();
rb->splash(HZ, true, "Settings reset!"); rb->splash(HZ, "Settings reset!");
} }
else else
rb->splash(HZ, true, "Settings NOT reset."); rb->splash(HZ, "Settings NOT reset.");
} }
/************************************ /************************************
@ -1449,7 +1449,7 @@ void general_settings(void)
case 1: case 1:
save_settings(false); save_settings(false);
rb->splash(HZ, true, "Settings saved"); rb->splash(HZ, "Settings saved");
break; break;
case 2: case 2:

View file

@ -580,7 +580,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if (gray_init(rb, gbuf, gbuf_size, true, LCD_WIDTH, LCD_HEIGHT, 3, 0, NULL) if (gray_init(rb, gbuf, gbuf_size, true, LCD_WIDTH, LCD_HEIGHT, 3, 0, NULL)
!= 3) != 3)
{ {
rb->splash(HZ, true, "Couldn't get grayscale buffer"); rb->splash(HZ, "Couldn't get grayscale buffer");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
/* init lcd_ function pointers */ /* init lcd_ function pointers */
@ -595,7 +595,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
#else /* LCD_CHARCELLS */ #else /* LCD_CHARCELLS */
if (!pgfx_init(rb, 4, 2)) if (!pgfx_init(rb, 4, 2))
{ {
rb->splash(HZ*2, true, "Old LCD :("); rb->splash(HZ*2, "Old LCD :(");
return PLUGIN_OK; return PLUGIN_OK;
} }
pgfx_display(3, 0); pgfx_display(3, 0);

View file

@ -172,7 +172,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if (fIndex < 0) if (fIndex < 0)
{ {
DEBUGF("Err: Failed to open index file.\n"); DEBUGF("Err: Failed to open index file.\n");
rb->splash(HZ*2, true, "Failed to open index."); rb->splash(HZ*2, "Failed to open index.");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
@ -212,7 +212,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if (low == -1 || rb->strcasecmp(searchword, word.word) != 0) if (low == -1 || rb->strcasecmp(searchword, word.word) != 0)
{ {
DEBUGF("Not found.\n"); DEBUGF("Not found.\n");
rb->splash(HZ*2, true, "Not found."); rb->splash(HZ*2, "Not found.");
rb->close(fIndex); rb->close(fIndex);
return PLUGIN_OK; return PLUGIN_OK;
} }
@ -224,7 +224,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if (fData < 0) if (fData < 0)
{ {
DEBUGF("Err: Failed to open description file.\n"); DEBUGF("Err: Failed to open description file.\n");
rb->splash(HZ*2, true, "Failed to open descriptions."); rb->splash(HZ*2, "Failed to open descriptions.");
rb->close(fIndex); rb->close(fIndex);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }

View file

@ -330,10 +330,10 @@ enum plugin_status tidy_do(enum tidy_system system)
rb->snprintf(text, 24, "Cleaned up %d items", removed); rb->snprintf(text, 24, "Cleaned up %d items", removed);
if (status == TIDY_RETURN_ABORT) if (status == TIDY_RETURN_ABORT)
{ {
rb->splash(HZ, true, "User aborted"); rb->splash(HZ, "User aborted");
rb->lcd_clear_display(); rb->lcd_clear_display();
} }
rb->splash(HZ*2, true, text); rb->splash(HZ*2, text);
} }
return status; return status;
} }

View file

@ -610,7 +610,7 @@ int doom_menu()
if( (status=Dbuild_base(names)) == 0 ) // Build up the base wad files (select last added file) if( (status=Dbuild_base(names)) == 0 ) // Build up the base wad files (select last added file)
{ {
rb->splash(HZ*2, true, "Missing Base WAD!"); rb->splash(HZ*2, "Missing Base WAD!");
return -2; return -2;
} }
@ -694,7 +694,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
printf ("M_LoadDefaults: Load system defaults.\n"); printf ("M_LoadDefaults: Load system defaults.\n");
M_LoadDefaults (); // load before initing other systems M_LoadDefaults (); // load before initing other systems
rb->splash(HZ*2, true, "Welcome to RockDoom"); rb->splash(HZ*2, "Welcome to RockDoom");
myargv =0; myargv =0;
myargc=0; myargc=0;

View file

@ -431,7 +431,7 @@ void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch,
|| y<0 || y<0
|| y+SHORT(patch->height) > ((flags & VPT_STRETCH) ? 200 : SCREENHEIGHT)) || y+SHORT(patch->height) > ((flags & VPT_STRETCH) ? 200 : SCREENHEIGHT))
{ {
rb->splash(HZ*2, true, "This wad does not follow standard doom graphics!"); rb->splash(HZ*2, "This wad does not follow standard doom graphics!");
// killough 1/19/98: improved error message: // killough 1/19/98: improved error message:
I_Error("V_DrawMemPatch: Patch (%d,%d)-(%d,%d) exceeds LFB Bad V_DrawMemPatch (flags=%u)", I_Error("V_DrawMemPatch: Patch (%d,%d)-(%d,%d) exceeds LFB Bad V_DrawMemPatch (flags=%u)",
x, y, x+SHORT(patch->width), y+SHORT(patch->height), flags); x, y, x+SHORT(patch->width), y+SHORT(patch->height), flags);

View file

@ -352,7 +352,7 @@ int main(void)
32, 1<<8, NULL) + 1; 32, 1<<8, NULL) + 1;
if(shades <= 1) if(shades <= 1)
{ {
rb->splash(HZ, true, "not enough memory"); rb->splash(HZ, "not enough memory");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
/* switch on grayscale overlay */ /* switch on grayscale overlay */

View file

@ -647,21 +647,21 @@ void DoUserDialog(char* filename)
/* this can only work if Rockbox runs in DRAM, not flash ROM */ /* this can only work if Rockbox runs in DRAM, not flash ROM */
if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */ if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */
{ /* we're running from flash */ { /* we're running from flash */
rb->splash(HZ*3, true, "Not from ROM"); rb->splash(HZ*3, "Not from ROM");
return; /* exit */ return; /* exit */
} }
/* test if the user is running the correct plugin for this box */ /* test if the user is running the correct plugin for this box */
if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR))) if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR)))
{ {
rb->splash(HZ*3, true, "Wrong plugin"); rb->splash(HZ*3, "Wrong plugin");
return; /* exit */ return; /* exit */
} }
/* refuse to work if the power may fail meanwhile */ /* refuse to work if the power may fail meanwhile */
if (!rb->battery_level_safe()) if (!rb->battery_level_safe())
{ {
rb->splash(HZ*3, true, "Battery too low!"); rb->splash(HZ*3, "Battery too low!");
return; /* exit */ return; /* exit */
} }
@ -669,7 +669,7 @@ void DoUserDialog(char* filename)
result = CheckBootROM(); result = CheckBootROM();
if (result == eUnknown) if (result == eUnknown)
{ /* no support for any other yet */ { /* no support for any other yet */
rb->splash(HZ*3, true, "Wrong boot ROM"); rb->splash(HZ*3, "Wrong boot ROM");
return; /* exit */ return; /* exit */
} }
is_romless = (result == eROMless); is_romless = (result == eROMless);
@ -690,7 +690,7 @@ void DoUserDialog(char* filename)
sector = rb->plugin_get_buffer(&memleft); sector = rb->plugin_get_buffer(&memleft);
if (memleft < SEC_SIZE) /* need buffer for a flash sector */ if (memleft < SEC_SIZE) /* need buffer for a flash sector */
{ {
rb->splash(HZ*3, true, "Out of memory"); rb->splash(HZ*3, "Out of memory");
return; /* exit */ return; /* exit */
} }
@ -700,7 +700,7 @@ void DoUserDialog(char* filename)
ShowFlashInfo(&FlashInfo); ShowFlashInfo(&FlashInfo);
if (FlashInfo.size == 0) /* no valid chip */ if (FlashInfo.size == 0) /* no valid chip */
{ {
rb->splash(HZ*3, true, "Sorry!"); rb->splash(HZ*3, "Sorry!");
return; /* exit */ return; /* exit */
} }
@ -884,21 +884,21 @@ void DoUserDialog(char* filename)
/* this can only work if Rockbox runs in DRAM, not flash ROM */ /* this can only work if Rockbox runs in DRAM, not flash ROM */
if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */ if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */
{ /* we're running from flash */ { /* we're running from flash */
rb->splash(HZ*3, true, "Not from ROM"); rb->splash(HZ*3, "Not from ROM");
return; /* exit */ return; /* exit */
} }
/* test if the user is running the correct plugin for this box */ /* test if the user is running the correct plugin for this box */
if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR))) if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(FB + VERSION_ADR)))
{ {
rb->splash(HZ*3, true, "Wrong version"); rb->splash(HZ*3, "Wrong version");
return; /* exit */ return; /* exit */
} }
/* refuse to work if the power may fail meanwhile */ /* refuse to work if the power may fail meanwhile */
if (!rb->battery_level_safe()) if (!rb->battery_level_safe())
{ {
rb->splash(HZ*3, true, "Batt. too low!"); rb->splash(HZ*3, "Batt. too low!");
return; /* exit */ return; /* exit */
} }
@ -906,7 +906,7 @@ void DoUserDialog(char* filename)
result = CheckBootROM(); result = CheckBootROM();
if (result == eUnknown) if (result == eUnknown)
{ /* no support for any other yet */ { /* no support for any other yet */
rb->splash(HZ*3, true, "Wrong boot ROM"); rb->splash(HZ*3, "Wrong boot ROM");
return; /* exit */ return; /* exit */
} }
is_romless = (result == eROMless); is_romless = (result == eROMless);
@ -927,7 +927,7 @@ void DoUserDialog(char* filename)
sector = rb->plugin_get_buffer(&memleft); sector = rb->plugin_get_buffer(&memleft);
if (memleft < SEC_SIZE) /* need buffer for a flash sector */ if (memleft < SEC_SIZE) /* need buffer for a flash sector */
{ {
rb->splash(HZ*3, true, "Out of memory"); rb->splash(HZ*3, "Out of memory");
return; /* exit */ return; /* exit */
} }

View file

@ -482,7 +482,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->lcd_set_backdrop(NULL); rb->lcd_set_backdrop(NULL);
#endif #endif
rb->splash(HZ, true, "FlipIt!"); rb->splash(HZ, "FlipIt!");
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
/* print instructions */ /* print instructions */

View file

@ -41,7 +41,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb = api; rb = api;
/* now go ahead and have fun! */ /* now go ahead and have fun! */
rb->splash(HZ*2, true, "Hello world!"); rb->splash(HZ*2, "Hello world!");
return PLUGIN_OK; return PLUGIN_OK;
} }

View file

@ -1660,12 +1660,12 @@ inline bool handle_buttons(void)
} }
#ifdef RC_QUIT #ifdef RC_QUIT
if (pressed & RC_QUIT) { if (pressed & RC_QUIT) {
rb->splash(HZ * 1, true, "Quit"); rb->splash(HZ * 1, "Quit");
return true; return true;
} }
#endif #endif
if (pressed & QUIT) { if (pressed & QUIT) {
rb->splash(HZ * 1, true, "Quit"); rb->splash(HZ * 1, "Quit");
return true; return true;
} }
} }
@ -1772,7 +1772,7 @@ enum plugin_status plugin_start(struct plugin_api* api, UNUSED void* parameter)
/* Game Over. */ /* Game Over. */
/* TODO: Play game over sound */ /* TODO: Play game over sound */
rb->splash(HZ * 2, true, "Game Over"); rb->splash(HZ * 2, "Game Over");
if (score > hiscore.score) { if (score > hiscore.score) {
/* Save new hiscore */ /* Save new hiscore */
hiscore.score = score; hiscore.score = score;

View file

@ -275,7 +275,7 @@ bool show_info(void)
ShowFlashInfo(&fi); ShowFlashInfo(&fi);
if (fi.size == 0) /* no valid chip */ if (fi.size == 0) /* no valid chip */
{ {
rb->splash(HZ*3, true, "Sorry!"); rb->splash(HZ*3, "Sorry!");
return false; /* exit */ return false; /* exit */
} }
@ -288,7 +288,7 @@ bool confirm(const char *msg)
bool ret; bool ret;
rb->snprintf(buf, sizeof buf, "%s ([PLAY] to CONFIRM)", msg); rb->snprintf(buf, sizeof buf, "%s ([PLAY] to CONFIRM)", msg);
rb->splash(0, true, buf); rb->splash(0, buf);
ret = (wait_for_button() == BUTTON_ON); ret = (wait_for_button() == BUTTON_ON);
show_info(); show_info();
@ -311,7 +311,7 @@ int load_firmware_file(const char *filename, uint32_t *checksum)
if (audiobuf_size < len) if (audiobuf_size < len)
{ {
rb->splash(HZ*3, true, "Aborting: Out of memory!"); rb->splash(HZ*3, "Aborting: Out of memory!");
rb->close(fd); rb->close(fd);
return -2; return -2;
} }
@ -324,7 +324,7 @@ int load_firmware_file(const char *filename, uint32_t *checksum)
rb->close(fd); rb->close(fd);
if (rc != len) if (rc != len)
{ {
rb->splash(HZ*3, true, "Aborting: Read failure"); rb->splash(HZ*3, "Aborting: Read failure");
return -3; return -3;
} }
@ -335,7 +335,7 @@ int load_firmware_file(const char *filename, uint32_t *checksum)
if (sum != *checksum) if (sum != *checksum)
{ {
rb->splash(HZ*3, true, "Aborting: Checksums mismatch!"); rb->splash(HZ*3, "Aborting: Checksums mismatch!");
return -4; return -4;
} }
@ -393,7 +393,7 @@ int flash_rockbox(const char *filename, int section)
p8 = (char *)BOOTLOADER_ENTRYPOINT; p8 = (char *)BOOTLOADER_ENTRYPOINT;
if (!detect_valid_bootloader(p8, 0)) if (!detect_valid_bootloader(p8, 0))
{ {
rb->splash(HZ*3, true, "Incompatible bootloader"); rb->splash(HZ*3, "Incompatible bootloader");
return -1; return -1;
} }
@ -423,7 +423,7 @@ int flash_rockbox(const char *filename, int section)
{ {
rb->snprintf(buf, sizeof(buf), "Incorrect relocation: 0x%08x/0x%08x", rb->snprintf(buf, sizeof(buf), "Incorrect relocation: 0x%08x/0x%08x",
*p32, pos+sizeof(struct flash_header)); *p32, pos+sizeof(struct flash_header));
rb->splash(HZ*10, true, buf); rb->splash(HZ*10, buf);
return -1; return -1;
} }
@ -489,7 +489,7 @@ int flash_rockbox(const char *filename, int section)
if (sum != checksum) if (sum != checksum)
{ {
rb->splash(HZ*3, true, "Verify failed!"); rb->splash(HZ*3, "Verify failed!");
/* Erase the magic sector so bootloader does not try to load /* Erase the magic sector so bootloader does not try to load
* rockbox from flash and crash. */ * rockbox from flash and crash. */
if (section == SECT_RAMIMAGE) if (section == SECT_RAMIMAGE)
@ -499,17 +499,17 @@ int flash_rockbox(const char *filename, int section)
return -5; return -5;
} }
rb->splash(HZ*2, true, "Success"); rb->splash(HZ*2, "Success");
return 0; return 0;
} }
void show_fatal_error(void) void show_fatal_error(void)
{ {
rb->splash(HZ*30, true, "Disable idle poweroff, connect AC power and DON'T TURN PLAYER OFF!!"); rb->splash(HZ*30, "Disable idle poweroff, connect AC power and DON'T TURN PLAYER OFF!!");
rb->splash(HZ*30, true, "Contact Rockbox developers as soon as possible!"); rb->splash(HZ*30, "Contact Rockbox developers as soon as possible!");
rb->splash(HZ*30, true, "Your device won't be bricked unless you turn off the power"); rb->splash(HZ*30, "Your device won't be bricked unless you turn off the power");
rb->splash(HZ*30, true, "Don't use the device before further instructions from Rockbox developers"); rb->splash(HZ*30, "Don't use the device before further instructions from Rockbox developers");
} }
int flash_bootloader(const char *filename) int flash_bootloader(const char *filename)
@ -533,14 +533,14 @@ int flash_bootloader(const char *filename)
if (len > 0xFFFF) if (len > 0xFFFF)
{ {
rb->splash(HZ*3, true, "Too big bootloader"); rb->splash(HZ*3, "Too big bootloader");
return -1; return -1;
} }
/* Verify the crc32 checksum also. */ /* Verify the crc32 checksum also. */
if (!detect_valid_bootloader(audiobuf, len)) if (!detect_valid_bootloader(audiobuf, len))
{ {
rb->splash(HZ*3, true, "Incompatible/Untested bootloader"); rb->splash(HZ*3, "Incompatible/Untested bootloader");
return -1; return -1;
} }
@ -579,7 +579,7 @@ int flash_bootloader(const char *filename)
if (sum != checksum) if (sum != checksum)
{ {
rb->splash(HZ*3, true, "Verify failed!"); rb->splash(HZ*3, "Verify failed!");
show_fatal_error(); show_fatal_error();
return -5; return -5;
} }
@ -589,13 +589,13 @@ int flash_bootloader(const char *filename)
{ {
if (p8[i] != audiobuf[i]) if (p8[i] != audiobuf[i])
{ {
rb->splash(HZ*3, true, "Bootvector corrupt!"); rb->splash(HZ*3, "Bootvector corrupt!");
show_fatal_error(); show_fatal_error();
return -6; return -6;
} }
} }
rb->splash(HZ*2, true, "Success"); rb->splash(HZ*2, "Success");
return 0; return 0;
} }
@ -653,7 +653,7 @@ int flash_original_fw(int len)
{ {
if (p8[i] != reset_vector[i]) if (p8[i] != reset_vector[i])
{ {
rb->splash(HZ*3, true, "Bootvector corrupt!"); rb->splash(HZ*3, "Bootvector corrupt!");
show_fatal_error(); show_fatal_error();
break; break;
} }
@ -665,14 +665,14 @@ int flash_original_fw(int len)
{ {
if (p8[i] != audiobuf[i]) if (p8[i] != audiobuf[i])
{ {
rb->splash(HZ*3, true, "Verify failed!"); rb->splash(HZ*3, "Verify failed!");
rb->snprintf(buf, sizeof buf, "at: 0x%08x", i); rb->snprintf(buf, sizeof buf, "at: 0x%08x", i);
rb->splash(HZ*10, true, buf); rb->splash(HZ*10, buf);
return -5; return -5;
} }
} }
rb->splash(HZ*2, true, "Success"); rb->splash(HZ*2, "Success");
return 0; return 0;
} }
@ -695,7 +695,7 @@ int load_original_bin(const char *filename)
rb->read(fd, magic, 8); rb->read(fd, magic, 8);
if (magic[1] != 0x00000008 || len <= 0 || len > audiobuf_size) if (magic[1] != 0x00000008 || len <= 0 || len > audiobuf_size)
{ {
rb->splash(HZ*2, true, "Not an original firmware file"); rb->splash(HZ*2, "Not an original firmware file");
rb->close(fd); rb->close(fd);
return -1; return -1;
} }
@ -705,7 +705,7 @@ int load_original_bin(const char *filename)
if (rc != len) if (rc != len)
{ {
rb->splash(HZ*2, true, "Read error"); rb->splash(HZ*2, "Read error");
return -2; return -2;
} }
@ -737,7 +737,7 @@ int load_romdump(const char *filename)
if (rc != len) if (rc != len)
{ {
rb->splash(HZ*2, true, "Read error"); rb->splash(HZ*2, "Read error");
return -2; return -2;
} }
@ -756,14 +756,14 @@ void DoUserDialog(char* filename)
/* this can only work if Rockbox runs in DRAM, not flash ROM */ /* this can only work if Rockbox runs in DRAM, not flash ROM */
if ((uint16_t*)rb >= FB && (uint16_t*)rb < FB + 4096*1024) /* 4 MB max */ if ((uint16_t*)rb >= FB && (uint16_t*)rb < FB + 4096*1024) /* 4 MB max */
{ /* we're running from flash */ { /* we're running from flash */
rb->splash(HZ*3, true, "Not from ROM"); rb->splash(HZ*3, "Not from ROM");
return; /* exit */ return; /* exit */
} }
/* refuse to work if the power may fail meanwhile */ /* refuse to work if the power may fail meanwhile */
if (!rb->battery_level_safe()) if (!rb->battery_level_safe())
{ {
rb->splash(HZ*3, true, "Battery too low!"); rb->splash(HZ*3, "Battery too low!");
return; /* exit */ return; /* exit */
} }
@ -773,7 +773,7 @@ void DoUserDialog(char* filename)
if (filename == NULL) if (filename == NULL)
{ {
rb->splash(HZ*3, true, "Please use this plugin with \"Open with...\""); rb->splash(HZ*3, "Please use this plugin with \"Open with...\"");
return ; return ;
} }
@ -790,7 +790,7 @@ void DoUserDialog(char* filename)
else if (rb->strcasestr(filename, "/internal_rom_000000-1FFFFF.bin")) else if (rb->strcasestr(filename, "/internal_rom_000000-1FFFFF.bin"))
load_romdump(filename); load_romdump(filename);
else else
rb->splash(HZ*3, true, "Unknown file type"); rb->splash(HZ*3, "Unknown file type");
} }

View file

@ -144,28 +144,28 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
stringbuffer = buf; stringbuffer = buf;
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(0, true, "Converting..."); rb->splash(0, "Converting...");
rc = read_buffer(0); rc = read_buffer(0);
if(rc == 0) { if(rc == 0) {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(0, true, "Writing..."); rb->splash(0, "Writing...");
rc = write_file(); rc = write_file();
if(rc < 0) { if(rc < 0) {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(HZ, true, "Can't write file: %d", rc); rb->splash(HZ, "Can't write file: %d", rc);
} else { } else {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(HZ, true, "Done"); rb->splash(HZ, "Done");
} }
} else { } else {
if(rc < 0) { if(rc < 0) {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(HZ, true, "Can't read file: %d", rc); rb->splash(HZ, "Can't read file: %d", rc);
} else { } else {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(HZ, true, "The file is too big"); rb->splash(HZ, "The file is too big");
} }
} }

View file

@ -1026,7 +1026,7 @@ static unsigned int jewels_nextlevel(struct game_context* bj) {
while(bj->score >= LEVEL_PTS) { while(bj->score >= LEVEL_PTS) {
bj->score -= LEVEL_PTS; bj->score -= LEVEL_PTS;
bj->level++; bj->level++;
rb->splash(HZ*2, true, "Level %d", bj->level); rb->splash(HZ*2, "Level %d", bj->level);
jewels_drawboard(bj); jewels_drawboard(bj);
} }
@ -1165,7 +1165,7 @@ static void jewels_savegame(struct game_context* bj) {
static void jewels_callback(void* param) { static void jewels_callback(void* param) {
struct game_context* bj = (struct game_context*) param; struct game_context* bj = (struct game_context*) param;
if(bj->dirty) { if(bj->dirty) {
rb->splash(HZ, true, "Saving high scores..."); rb->splash(HZ, "Saving high scores...");
jewels_savescores(bj); jewels_savescores(bj);
} }
} }
@ -1211,7 +1211,7 @@ static int jewels_main(struct game_context* bj) {
case MRES_RESUME: case MRES_RESUME:
if(!jewels_loadgame(bj)) { if(!jewels_loadgame(bj)) {
rb->splash(HZ*2, true, "Nothing to resume"); rb->splash(HZ*2, "Nothing to resume");
rb->lcd_clear_display(); rb->lcd_clear_display();
} else { } else {
startgame = true; startgame = true;
@ -1438,7 +1438,7 @@ static int jewels_main(struct game_context* bj) {
break; break;
case MRES_SAVE: case MRES_SAVE:
rb->splash(HZ, true, "Saving game..."); rb->splash(HZ, "Saving game...");
jewels_savegame(bj); jewels_savegame(bj);
return BJ_END; return BJ_END;
@ -1602,14 +1602,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
while(!exit) { while(!exit) {
switch(jewels_main(&bj)){ switch(jewels_main(&bj)){
case BJ_LOSE: case BJ_LOSE:
rb->splash(HZ*2, true, "No more moves!"); rb->splash(HZ*2, "No more moves!");
/* fall through to BJ_END */ /* fall through to BJ_END */
case BJ_END: case BJ_END:
if(!bj.resume) { if(!bj.resume) {
if((position = jewels_recordscore(&bj))) { if((position = jewels_recordscore(&bj))) {
rb->snprintf(str, 19, "New high score #%d!", position); rb->snprintf(str, 19, "New high score #%d!", position);
rb->splash(HZ*2, true, str); rb->splash(HZ*2, str);
} }
} }
break; break;
@ -1620,7 +1620,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
case BJ_QUIT: case BJ_QUIT:
if(bj.dirty) { if(bj.dirty) {
rb->splash(HZ, true, "Saving high scores..."); rb->splash(HZ, "Saving high scores...");
jewels_savescores(&bj); jewels_savescores(&bj);
} }
exit = true; exit = true;
@ -1630,11 +1630,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
if(!bj.resume) { if(!bj.resume) {
if((position = jewels_recordscore(&bj))) { if((position = jewels_recordscore(&bj))) {
rb->snprintf(str, 19, "New high score #%d!", position); rb->snprintf(str, 19, "New high score #%d!", position);
rb->splash(HZ*2, true, str); rb->splash(HZ*2, str);
} }
} }
if(bj.dirty) { if(bj.dirty) {
rb->splash(HZ, true, "Saving high scores..."); rb->splash(HZ, "Saving high scores...");
jewels_savescores(&bj); jewels_savescores(&bj);
} }
exit = true; exit = true;

View file

@ -2083,7 +2083,7 @@ int change_filename(int direct)
if(count == entries && file_pt[curfile] == '\0') if(count == entries && file_pt[curfile] == '\0')
{ {
rb->splash(HZ,true,"No supported files"); rb->splash(HZ, "No supported files");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
if(rb->strlen(tree->currdir) > 1) if(rb->strlen(tree->currdir) > 1)
@ -2557,7 +2557,7 @@ struct t_disp* get_image(struct jpeg* p_jpg, int ds)
#endif #endif
if (status) if (status)
{ {
rb->splash(HZ, true, "decode error %d", status); rb->splash(HZ, "decode error %d", status);
file_pt[curfile] = '\0'; file_pt[curfile] = '\0';
return NULL; return NULL;
} }
@ -2619,7 +2619,7 @@ int load_and_show(char* filename)
if (fd < 0) if (fd < 0)
{ {
rb->snprintf(print,sizeof(print),"err opening %s:%d",filename,fd); rb->snprintf(print,sizeof(print),"err opening %s:%d",filename,fd);
rb->splash(HZ, true, print); rb->splash(HZ, print);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
filesize = rb->filesize(fd); filesize = rb->filesize(fd);
@ -2696,7 +2696,7 @@ int load_and_show(char* filename)
else else
#endif #endif
{ {
rb->splash(HZ, true, "Out of Memory"); rb->splash(HZ, "Out of Memory");
rb->close(fd); rb->close(fd);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
@ -2743,7 +2743,7 @@ int load_and_show(char* filename)
if (status < 0 || (status & (DQT | SOF0)) != (DQT | SOF0)) if (status < 0 || (status & (DQT | SOF0)) != (DQT | SOF0))
{ /* bad format or minimum components not contained */ { /* bad format or minimum components not contained */
rb->splash(HZ, true, "unsupported %d", status); rb->splash(HZ, "unsupported %d", status);
file_pt[curfile] = '\0'; file_pt[curfile] = '\0';
return change_filename(direction); return change_filename(direction);
} }
@ -2762,7 +2762,7 @@ int load_and_show(char* filename)
ds_min = min_downscale(&jpg, buf_size); /* check memory constraint */ ds_min = min_downscale(&jpg, buf_size); /* check memory constraint */
if (ds_min == 0) if (ds_min == 0)
{ {
rb->splash(HZ, true, "too large"); rb->splash(HZ, "too large");
file_pt[curfile] = '\0'; file_pt[curfile] = '\0';
return change_filename(direction); return change_filename(direction);
} }
@ -2902,7 +2902,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
buf_size -= graysize; buf_size -= graysize;
if (grayscales < 33 || buf_size <= 0) if (grayscales < 33 || buf_size <= 0)
{ {
rb->splash(HZ, true, "gray buf error"); rb->splash(HZ, "gray buf error");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
#else #else

View file

@ -54,7 +54,7 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter,
fd = rb->open(filename, O_RDONLY); fd = rb->open(filename, O_RDONLY);
if (fd < 0) if (fd < 0)
{ {
rb->splash(2*HZ, true, "Can't open %s", filename); rb->splash(2*HZ, "Can't open %s", filename);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
readsize = rb->read(fd, &header, sizeof(header)); readsize = rb->read(fd, &header, sizeof(header));
@ -64,17 +64,17 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter,
if (readsize != sizeof(header)) if (readsize != sizeof(header))
{ {
rb->splash(2*HZ, true, "Reading %s overlay failed.", name); rb->splash(2*HZ, "Reading %s overlay failed.", name);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
if (header.magic != PLUGIN_MAGIC || header.target_id != TARGET_ID) if (header.magic != PLUGIN_MAGIC || header.target_id != TARGET_ID)
{ {
rb->splash(2*HZ, true, "%s overlay: Incompatible model.", name); rb->splash(2*HZ, "%s overlay: Incompatible model.", name);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
if (header.api_version != PLUGIN_API_VERSION) if (header.api_version != PLUGIN_API_VERSION)
{ {
rb->splash(2*HZ, true, "%s overlay: Incompatible version.", name); rb->splash(2*HZ, "%s overlay: Incompatible version.", name);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
@ -82,14 +82,14 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter,
if (header.load_addr < audiobuf || if (header.load_addr < audiobuf ||
header.end_addr > audiobuf + audiobuf_size) header.end_addr > audiobuf + audiobuf_size)
{ {
rb->splash(2*HZ, true, "%s overlay doesn't fit into memory.", name); rb->splash(2*HZ, "%s overlay doesn't fit into memory.", name);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
fd = rb->open(filename, O_RDONLY); fd = rb->open(filename, O_RDONLY);
if (fd < 0) if (fd < 0)
{ {
rb->splash(2*HZ, true, "Can't open %s", filename); rb->splash(2*HZ, "Can't open %s", filename);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
readsize = rb->read(fd, header.load_addr, header.end_addr - header.load_addr); readsize = rb->read(fd, header.load_addr, header.end_addr - header.load_addr);
@ -97,7 +97,7 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter,
if (readsize < 0) if (readsize < 0)
{ {
rb->splash(2*HZ, true, "Reading %s overlay failed.", name); rb->splash(2*HZ, "Reading %s overlay failed.", name);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
/* Zero out bss area */ /* Zero out bss area */

View file

@ -259,7 +259,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS
if (!pgfx_init(rb, 4, 2)) { if (!pgfx_init(rb, 4, 2)) {
rb->splash(HZ*2, true, "Old LCD :("); rb->splash(HZ*2, "Old LCD :(");
return PLUGIN_OK; return PLUGIN_OK;
} }
#endif #endif

View file

@ -705,7 +705,7 @@ static enum level_state level_loop(short level, short lives) {
*/ */
rb->lcd_remote_clear_display(); rb->lcd_remote_clear_display();
#endif #endif
rb->splash(MAZEZAM_LEVEL_LIVES_DELAY, true, MAZEZAM_LEVEL_LIVES_TEXT, level+1, lives); rb->splash(MAZEZAM_LEVEL_LIVES_DELAY, MAZEZAM_LEVEL_LIVES_TEXT, level+1, lives);
/* ensure keys pressed during the splash screen are ignored */ /* ensure keys pressed during the splash screen are ignored */
rb->button_clear_queue(); rb->button_clear_queue();
@ -844,7 +844,7 @@ static enum game_state game_loop(struct resume_data *r) {
*/ */
rb->lcd_remote_clear_display(); rb->lcd_remote_clear_display();
#endif #endif
rb->splash(MAZEZAM_GAMEOVER_DELAY, true, MAZEZAM_GAMEOVER_TEXT); rb->splash(MAZEZAM_GAMEOVER_DELAY, MAZEZAM_GAMEOVER_TEXT);
break; break;
case GAME_STATE_COMPLETED: case GAME_STATE_COMPLETED:

View file

@ -146,7 +146,7 @@ struct GPatch * gusload(char * filename)
{ {
char message[50]; char message[50];
rb->snprintf(message, 50, "Error opening %s", filename); rb->snprintf(message, 50, "Error opening %s", filename);
rb->splash(HZ*2, true, message); rb->splash(HZ*2, message);
return NULL; return NULL;
} }

View file

@ -92,7 +92,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
if(mf->tracks[a] == NULL) if(mf->tracks[a] == NULL)
{ {
printf("\nNULL TRACK !!!"); printf("\nNULL TRACK !!!");
rb->splash(HZ*2, true, "Null Track in loader."); rb->splash(HZ*2, "Null Track in loader.");
return -1; return -1;
} }
@ -115,8 +115,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
printf("\nPlease install the instruments."); printf("\nPlease install the instruments.");
printf("\nSee Rockbox page for more info."); printf("\nSee Rockbox page for more info.");
rb->splash(HZ*2, true, "No Instruments"); rb->splash(HZ*2, "No Instruments");
rb->splash(HZ*2, true, "No Instruments");
return -1; return -1;
} }
@ -151,7 +150,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
file = rb->open(drumConfig, O_RDONLY); file = rb->open(drumConfig, O_RDONLY);
if(file < 0) if(file < 0)
{ {
rb->splash(HZ*2, true, "Bad drum config.\nDid you install the patchset?"); rb->splash(HZ*2, "Bad drum config. Did you install the patchset?");
return -1; return -1;
} }

View file

@ -74,16 +74,16 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if(parameter == NULL) if(parameter == NULL)
{ {
rb->splash(HZ*2, true, " Play .MID file "); rb->splash(HZ*2, "Play .MID file");
return PLUGIN_OK; return PLUGIN_OK;
} }
rb->splash(HZ, true, parameter); rb->splash(HZ, parameter);
if(midimain(parameter) == -1) if(midimain(parameter) == -1)
{ {
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
rb->splash(HZ*3, true, "FINISHED PLAYING"); rb->splash(HZ*3, "FINISHED PLAYING");
/* Return PLUGIN_USB_CONNECTED to force a file-tree refresh */ /* Return PLUGIN_USB_CONNECTED to force a file-tree refresh */
return PLUGIN_USB_CONNECTED; return PLUGIN_USB_CONNECTED;
} }
@ -102,11 +102,11 @@ int midimain(void * filename)
printf("\nHello.\n"); printf("\nHello.\n");
rb->splash(HZ/5, true, "LOADING MIDI"); rb->splash(HZ/5, "LOADING MIDI");
struct MIDIfile * mf = loadFile(filename); struct MIDIfile * mf = loadFile(filename);
rb->splash(HZ/5, true, "LOADING PATCHES"); rb->splash(HZ/5, "LOADING PATCHES");
if (initSynth(mf, "/.rockbox/patchset/patchset.cfg", "/.rockbox/patchset/drums.cfg") == -1) if (initSynth(mf, "/.rockbox/patchset/patchset.cfg", "/.rockbox/patchset/drums.cfg") == -1)
{ {
return -1; return -1;
@ -153,7 +153,7 @@ int midimain(void * filename)
#endif #endif
rb->splash(HZ/5, true, " I hope this works... "); rb->splash(HZ/5, "I hope this works...");

View file

@ -650,7 +650,7 @@ enum minesweeper_status minesweeper( void )
if( no_mines ) if( no_mines )
break; break;
tiles_left = count_tiles_left(); tiles_left = count_tiles_left();
rb->splash( HZ*2, true, "You found %d mines out of %d", rb->splash( HZ*2, "You found %d mines out of %d",
tiles_left, mine_num ); tiles_left, mine_num );
break; break;
@ -681,13 +681,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
switch( minesweeper() ) switch( minesweeper() )
{ {
case MINESWEEPER_WIN: case MINESWEEPER_WIN:
rb->splash( HZ, true, "You Win!" ); rb->splash( HZ, "You Win!" );
rb->lcd_clear_display(); rb->lcd_clear_display();
mine_show(); mine_show();
break; break;
case MINESWEEPER_LOSE: case MINESWEEPER_LOSE:
rb->splash( HZ, true, "You Lose!" ); rb->splash( HZ, "You Lose!" );
rb->lcd_clear_display(); rb->lcd_clear_display();
mine_show(); mine_show();
break; break;

View file

@ -116,7 +116,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS
if (!pgfx_init(rb, 4, 2)) if (!pgfx_init(rb, 4, 2))
{ {
rb->splash(HZ*2, true, "Old LCD :("); rb->splash(HZ*2, "Old LCD :(");
return PLUGIN_OK; return PLUGIN_OK;
} }
pgfx_display(3, 0); pgfx_display(3, 0);

View file

@ -354,10 +354,10 @@ static void get_next_data( Stream* str )
} else if ((p[4] & 0xf0) == 0x20) { /* mpeg-1 */ } else if ((p[4] & 0xf0) == 0x20) { /* mpeg-1 */
p += 12; p += 12;
} else { } else {
rb->splash( 30, true, "Weird Pack header!" ); rb->splash( 30, "Weird Pack header!" );
p += 5; p += 5;
} }
/*rb->splash( 30, true, "Pack header" );*/ /*rb->splash( 30, "Pack header" );*/
} }
/* System header, parse and skip it */ /* System header, parse and skip it */
@ -370,14 +370,14 @@ static void get_next_data( Stream* str )
header_length += *(p++); header_length += *(p++);
p += header_length; p += header_length;
/*rb->splash( 30, true, "System header" );*/ /*rb->splash( 30, "System header" );*/
} }
/* Packet header, parse it */ /* Packet header, parse it */
if( rb->memcmp (p, packet_start_code_prefix, sizeof (packet_start_code_prefix)) != 0 ) if( rb->memcmp (p, packet_start_code_prefix, sizeof (packet_start_code_prefix)) != 0 )
{ {
/* Problem */ /* Problem */
//rb->splash( HZ*3, true, "missing packet start code prefix : %X%X at %X", *p, *(p+2), p-disk_buf ); //rb->splash( HZ*3, "missing packet start code prefix : %X%X at %X", *p, *(p+2), p-disk_buf );
str->curr_packet_end = str->curr_packet = NULL; str->curr_packet_end = str->curr_packet = NULL;
return; return;
//++p; //++p;
@ -389,7 +389,7 @@ static void get_next_data( Stream* str )
length = (*(p+4)) << 8; length = (*(p+4)) << 8;
length += *(p+5); length += *(p+5);
/*rb->splash( 100, true, "Stream : %X", stream );*/ /*rb->splash( 100, "Stream : %X", stream );*/
if (stream != str->id) if (stream != str->id)
{ {
/* End of stream ? */ /* End of stream ? */
@ -436,7 +436,7 @@ static void get_next_data( Stream* str )
length++; length++;
if (length > 23) if (length > 23)
{ {
rb->splash( 30, true, "Too much stuffing" ); rb->splash( 30, "Too much stuffing" );
break; break;
} }
} }
@ -551,7 +551,7 @@ static void mad_decode(void)
} }
len = audio_str.curr_packet_end - audio_str.curr_packet; len = audio_str.curr_packet_end - audio_str.curr_packet;
if (n + len > mpa_buffer_size) { if (n + len > mpa_buffer_size) {
rb->splash( 30, true, "Audio buffer overflow" ); rb->splash( 30, "Audio buffer overflow" );
audiostatus=STREAM_DONE; audiostatus=STREAM_DONE;
/* Wait to be killed */ /* Wait to be killed */
for (;;) { rb->sleep(HZ); } for (;;) { rb->sleep(HZ); }
@ -898,7 +898,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
eta = 0; eta = 0;
rb->splash(0,true,"Buffering..."); rb->splash(0, "Buffering...");
disk_buf_end = buffer + rb->read (in_file, buffer, buffer_size); disk_buf_end = buffer + rb->read (in_file, buffer, buffer_size);
disk_buf = buffer; disk_buf = buffer;
@ -913,7 +913,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
(uint8_t*)video_stack,VIDEO_STACKSIZE,"mpgvideo" IF_PRIO(,PRIORITY_PLAYBACK) (uint8_t*)video_stack,VIDEO_STACKSIZE,"mpgvideo" IF_PRIO(,PRIORITY_PLAYBACK)
IF_COP(, COP, true))) == NULL) IF_COP(, COP, true))) == NULL)
{ {
rb->splash(HZ,true,"Cannot create video thread!"); rb->splash(HZ, "Cannot create video thread!");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
@ -921,7 +921,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
(uint8_t*)audio_stack,AUDIO_STACKSIZE,"mpgaudio" IF_PRIO(,PRIORITY_PLAYBACK) (uint8_t*)audio_stack,AUDIO_STACKSIZE,"mpgaudio" IF_PRIO(,PRIORITY_PLAYBACK)
IF_COP(, CPU, false))) == NULL) IF_COP(, CPU, false))) == NULL)
{ {
rb->splash(HZ,true,"Cannot create audio thread!"); rb->splash(HZ, "Cannot create audio thread!");
rb->remove_thread(videothread_id); rb->remove_thread(videothread_id);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }

View file

@ -156,7 +156,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
hsmile=rb->lcd_get_locked_pattern(); hsmile=rb->lcd_get_locked_pattern();
rb->splash(HZ, true, "NIM V1.2"); rb->splash(HZ, "NIM V1.2");
rb->lcd_clear_display(); rb->lcd_clear_display();
/* Main loop */ /* Main loop */

View file

@ -412,13 +412,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
/* Save the user settings if they have changed */ /* Save the user settings if they have changed */
if (rb->memcmp(&settings,&old_settings,sizeof(settings))!=0) { if (rb->memcmp(&settings,&old_settings,sizeof(settings))!=0) {
rb->splash(0,true,"Saving settings..."); rb->splash(0, "Saving settings...");
configfile_save(SETTINGS_FILENAME, config, configfile_save(SETTINGS_FILENAME, config,
sizeof(config)/sizeof(*config), sizeof(config)/sizeof(*config),
SETTINGS_VERSION); SETTINGS_VERSION);
} }
} else { } else {
rb->splash(HZ*2,true,"No ROMs in /.rockbox/pacman/"); rb->splash(HZ*2, "No ROMs in /.rockbox/pacman/");
} }
#ifdef HAVE_ADJUSTABLE_CPU_FREQ #ifdef HAVE_ADJUSTABLE_CPU_FREQ

View file

@ -245,7 +245,7 @@ void bounce(struct pong *p, int pad, int info)
void score(struct pong *p, int pad) void score(struct pong *p, int pad)
{ {
rb->splash(HZ/4, true, "%s scores!", pad?"right":"left"); rb->splash(HZ/4, "%s scores!", pad?"right":"left");
rb->lcd_clear_display(); rb->lcd_clear_display();
p->score[pad]++; p->score[pad]++;
@ -424,7 +424,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
/* go go go */ /* go go go */
while(game > 0) { while(game > 0) {
if (game == 2) { /* Game Paused */ if (game == 2) { /* Game Paused */
rb->splash(0, true, "PAUSED"); rb->splash(0, "PAUSED");
while(game == 2) while(game == 2)
game = keys(&pong); /* short circuit */ game = keys(&pong); /* short circuit */
rb->lcd_clear_display(); rb->lcd_clear_display();

View file

@ -137,7 +137,7 @@ void generate(void)
rb->write(fd,&dirs_count,sizeof(int)); rb->write(fd,&dirs_count,sizeof(int));
if (fd < 0) if (fd < 0)
{ {
rb->splash(HZ, true, "Couldnt open %s", RFA_FILE); rb->splash(HZ, "Couldnt open %s", RFA_FILE);
return; return;
} }
#ifndef HAVE_LCD_CHARCELLS #ifndef HAVE_LCD_CHARCELLS
@ -242,11 +242,11 @@ void edit_list(void)
{ {
case 0: case 0:
exit = true; exit = true;
rb->splash(HZ*2, true, "Saving " RFA_FILE); rb->splash(HZ*2, "Saving " RFA_FILE);
fd = rb->open(RFA_FILE, O_CREAT|O_WRONLY); fd = rb->open(RFA_FILE, O_CREAT|O_WRONLY);
if (fd < 0) if (fd < 0)
{ {
rb->splash(HZ, true, "Could Not Open " RFA_FILE); rb->splash(HZ, "Could Not Open " RFA_FILE);
break; break;
} }
dirs_count = 0; dirs_count = 0;

View file

@ -854,7 +854,7 @@ static int rockblox_loop (void)
/* Restore user's original backlight setting */ /* Restore user's original backlight setting */
rb->backlight_set_timeout (rb->global_settings->backlight_timeout); rb->backlight_set_timeout (rb->global_settings->backlight_timeout);
rb->splash(0, true, "Paused"); rb->splash(0, "Paused");
while (rb->button_hold ()) while (rb->button_hold ())
rb->sleep(HZ/10); rb->sleep(HZ/10);
@ -939,7 +939,7 @@ static int rockblox_loop (void)
break; break;
#ifdef ROCKBLOX_RESTART #ifdef ROCKBLOX_RESTART
case ROCKBLOX_RESTART: case ROCKBLOX_RESTART:
rb->splash (HZ * 1, true, "Restarting..."); rb->splash (HZ * 1, "Restarting...");
init_rockblox (); init_rockblox ();
new_block (); new_block ();
break; break;
@ -992,7 +992,7 @@ static int rockblox_loop (void)
#if LCD_DEPTH >= 2 #if LCD_DEPTH >= 2
rb->lcd_set_foreground (LCD_BLACK); rb->lcd_set_foreground (LCD_BLACK);
#endif #endif
rb->splash (HZ * 2, true, "Game Over"); rb->splash (HZ * 2, "Game Over");
init_rockblox (); init_rockblox ();
new_block (); new_block ();
} }
@ -1025,7 +1025,7 @@ enum plugin_status plugin_start (struct plugin_api *api, void *parameter)
#else #else
if (!pgfx_init(rb, 4, 2)) if (!pgfx_init(rb, 4, 2))
{ {
rb->splash(HZ*2, true, "Old LCD :("); rb->splash(HZ*2, "Old LCD :(");
return PLUGIN_OK; return PLUGIN_OK;
} }
#endif #endif

View file

@ -652,14 +652,14 @@ void DoUserDialog(char* filename)
/* this can only work if Rockbox runs in DRAM, not flash ROM */ /* this can only work if Rockbox runs in DRAM, not flash ROM */
if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */ if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */
{ /* we're running from flash */ { /* we're running from flash */
rb->splash(HZ*3, true, "Not from ROM"); rb->splash(HZ*3, "Not from ROM");
return; /* exit */ return; /* exit */
} }
/* refuse to work if the power may fail meanwhile */ /* refuse to work if the power may fail meanwhile */
if (!rb->battery_level_safe()) if (!rb->battery_level_safe())
{ {
rb->splash(HZ*3, true, "Battery too low!"); rb->splash(HZ*3, "Battery too low!");
return; /* exit */ return; /* exit */
} }
@ -667,7 +667,7 @@ void DoUserDialog(char* filename)
sector = rb->plugin_get_buffer(&memleft); sector = rb->plugin_get_buffer(&memleft);
if (memleft < SECTORSIZE) /* need buffer for a flash sector */ if (memleft < SECTORSIZE) /* need buffer for a flash sector */
{ {
rb->splash(HZ*3, true, "Out of memory"); rb->splash(HZ*3, "Out of memory");
return; /* exit */ return; /* exit */
} }
@ -681,12 +681,12 @@ void DoUserDialog(char* filename)
if (FlashInfo.size == 0) /* no valid chip */ if (FlashInfo.size == 0) /* no valid chip */
{ {
rb->splash(HZ*3, true, "Not flashable"); rb->splash(HZ*3, "Not flashable");
return; /* exit */ return; /* exit */
} }
else if (pos == 0) else if (pos == 0)
{ {
rb->splash(HZ*3, true, "No image"); rb->splash(HZ*3, "No image");
return; /* exit */ return; /* exit */
} }
@ -855,14 +855,14 @@ void DoUserDialog(char* filename)
/* this can only work if Rockbox runs in DRAM, not flash ROM */ /* this can only work if Rockbox runs in DRAM, not flash ROM */
if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */ if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */
{ /* we're running from flash */ { /* we're running from flash */
rb->splash(HZ*3, true, "Not from ROM"); rb->splash(HZ*3, "Not from ROM");
return; /* exit */ return; /* exit */
} }
/* refuse to work if the power may fail meanwhile */ /* refuse to work if the power may fail meanwhile */
if (!rb->battery_level_safe()) if (!rb->battery_level_safe())
{ {
rb->splash(HZ*3, true, "Batt. too low!"); rb->splash(HZ*3, "Batt. too low!");
return; /* exit */ return; /* exit */
} }
@ -870,7 +870,7 @@ void DoUserDialog(char* filename)
sector = rb->plugin_get_buffer(&memleft); sector = rb->plugin_get_buffer(&memleft);
if (memleft < SECTORSIZE) /* need buffer for a flash sector */ if (memleft < SECTORSIZE) /* need buffer for a flash sector */
{ {
rb->splash(HZ*3, true, "Out of memory"); rb->splash(HZ*3, "Out of memory");
return; /* exit */ return; /* exit */
} }
@ -879,12 +879,12 @@ void DoUserDialog(char* filename)
if (FlashInfo.size == 0) /* no valid chip */ if (FlashInfo.size == 0) /* no valid chip */
{ {
rb->splash(HZ*3, true, "Not flashable"); rb->splash(HZ*3, "Not flashable");
return; /* exit */ return; /* exit */
} }
else if (pos == 0) else if (pos == 0)
{ {
rb->splash(HZ*3, true, "No image"); rb->splash(HZ*3, "No image");
return; /* exit */ return; /* exit */
} }
@ -1016,7 +1016,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if (parameter == NULL) if (parameter == NULL)
{ {
rb->splash(HZ*3, true, "Play .ucl file!"); rb->splash(HZ*3, "Play .ucl file!");
return PLUGIN_OK; return PLUGIN_OK;
} }

View file

@ -928,7 +928,7 @@ next:
byte *ptr=mbc.rmap[PC>>12]; byte *ptr=mbc.rmap[PC>>12];
snprintf(meow,499,"PC: 0x%x 0x%x a: 0x%x\n", snprintf(meow,499,"PC: 0x%x 0x%x a: 0x%x\n",
ptr,PC, b ? b->address.d : 0); ptr,PC, b ? b->address.d : 0);
rb->splash(HZ*2,true,meow); rb->splash(HZ*2,meow);
while(b&&b->address.d!=((unsigned int)(ptr)+PC)) while(b&&b->address.d!=((unsigned int)(ptr)+PC))
{ {
p=b; p=b;

View file

@ -433,7 +433,7 @@ void dynamic_recompile (struct dynarec_block *newblock)
} }
#endif #endif
snprintf(meow,499,"Recompiling 0x%x",oldpc); snprintf(meow,499,"Recompiling 0x%x",oldpc);
rb->splash(HZ*1,1,meow); rb->splash(HZ*1,meow);
while(!done) while(!done)
{ {
#ifdef DYNA_DEBUG #ifdef DYNA_DEBUG

View file

@ -189,10 +189,10 @@ int sram_load(void)
fd = open(sramfile, O_RDONLY); fd = open(sramfile, O_RDONLY);
snprintf(meow,499,"Opening %s %d",sramfile,fd); snprintf(meow,499,"Opening %s %d",sramfile,fd);
rb->splash(HZ*2, true, meow); rb->splash(HZ*2, meow);
if (fd<0) return -1; if (fd<0) return -1;
snprintf(meow,499,"Loading savedata from %s",sramfile); snprintf(meow,499,"Loading savedata from %s",sramfile);
rb->splash(HZ*2, true, meow); rb->splash(HZ*2, meow);
read(fd,ram.sbank, 8192*mbc.ramsize); read(fd,ram.sbank, 8192*mbc.ramsize);
close(fd); close(fd);
@ -211,7 +211,7 @@ int sram_save(void)
fd = open(sramfile, O_WRONLY|O_CREAT|O_TRUNC); fd = open(sramfile, O_WRONLY|O_CREAT|O_TRUNC);
if (fd<0) return -1; if (fd<0) return -1;
snprintf(meow,499,"Saving savedata to %s",sramfile); snprintf(meow,499,"Saving savedata to %s",sramfile);
rb->splash(HZ*2, true, meow); rb->splash(HZ*2, meow);
write(fd,ram.sbank, 8192*mbc.ramsize); write(fd,ram.sbank, 8192*mbc.ramsize);
close(fd); close(fd);
@ -301,7 +301,7 @@ void loader_init(char *s)
romfile = s; romfile = s;
if(rom_load()) if(rom_load())
return; return;
rb->splash(HZ/2, true, rom.name); rb->splash(HZ/2, rom.name);
snprintf(saveprefix, 499, "%s/%s", savedir, rom.name); snprintf(saveprefix, 499, "%s/%s", savedir, rom.name);

View file

@ -201,7 +201,7 @@ static bool do_file(char *path, char *desc, bool is_load) {
/* print out a status message so the user knows the state loaded */ /* print out a status message so the user knows the state loaded */
snprintf(buf, 200, "Loaded state from \"%s\"", path); snprintf(buf, 200, "Loaded state from \"%s\"", path);
rb->splash(HZ * 1, true, buf); rb->splash(HZ * 1, buf);
} }
else else
{ {

View file

@ -194,7 +194,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if (!parameter) if (!parameter)
{ {
rb->splash(HZ*3, true, "Play gameboy ROM file! (.gb/.gbc)"); rb->splash(HZ*3, "Play gameboy ROM file! (.gb/.gbc)");
return PLUGIN_OK; return PLUGIN_OK;
} }
@ -223,11 +223,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if(shut&&!cleanshut) if(shut&&!cleanshut)
{ {
rb->splash(HZ/2, true, errormsg); rb->splash(HZ/2, errormsg);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
pcm_close(); pcm_close();
rb->splash(HZ/2, true, "Shutting down"); rb->splash(HZ/2, "Shutting down");
savesettings(); savesettings();

View file

@ -2475,12 +2475,12 @@ static void goto_menu(void)
{ {
if( load_bitmap( filename ) <= 0 ) if( load_bitmap( filename ) <= 0 )
{ {
rb->splash( 1*HZ, true, "Error while loading %s", rb->splash( 1*HZ, "Error while loading %s",
filename ); filename );
} }
else else
{ {
rb->splash( 1*HZ, true, "Image loaded (%s)", filename ); rb->splash( 1*HZ, "Image loaded (%s)", filename );
restore_screen(); restore_screen();
inv_cursor(true); inv_cursor(true);
return; return;
@ -2492,7 +2492,7 @@ static void goto_menu(void)
if( !rb->kbd_input( filename, MAX_PATH ) ) if( !rb->kbd_input( filename, MAX_PATH ) )
{ {
save_bitmap( filename ); save_bitmap( filename );
rb->splash( 1*HZ, true, "File saved (%s)", filename ); rb->splash( 1*HZ, "File saved (%s)", filename );
} }
break; break;
@ -2943,7 +2943,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->lcd_set_foreground(COLOR_WHITE); rb->lcd_set_foreground(COLOR_WHITE);
rb->lcd_set_backdrop(NULL); rb->lcd_set_backdrop(NULL);
rb->lcd_fillrect(0,0,LCD_WIDTH,LCD_HEIGHT); rb->lcd_fillrect(0,0,LCD_WIDTH,LCD_HEIGHT);
rb->splash( HZ/2, true, "Rock Paint"); rb->splash( HZ/2, "Rock Paint");
rb->lcd_clear_display(); rb->lcd_clear_display();
@ -2953,12 +2953,12 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
{ {
if( load_bitmap( parameter ) <= 0 ) if( load_bitmap( parameter ) <= 0 )
{ {
rb->splash( 1*HZ, true, "Error"); rb->splash( 1*HZ, "Error");
clear_drawing(); clear_drawing();
} }
else else
{ {
rb->splash( 1*HZ, true, "Image loaded (%s)", parameter ); rb->splash( 1*HZ, "Image loaded (%s)", parameter );
restore_screen(); restore_screen();
rb->strcpy( filename, parameter ); rb->strcpy( filename, parameter );
} }

View file

@ -121,7 +121,7 @@ static bool search_init(char* file)
if (!rb->kbd_input(search_string,sizeof search_string)) if (!rb->kbd_input(search_string,sizeof search_string))
{ {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(0, true, "Searching..."); rb->splash(0, "Searching...");
fd = rb->open(file, O_RDONLY); fd = rb->open(file, O_RDONLY);
if (fd==-1) if (fd==-1)
return false; return false;
@ -130,9 +130,9 @@ static bool search_init(char* file)
if (fdw < 0) { if (fdw < 0) {
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
rb->splash(HZ, true, "Failed to create result file!"); rb->splash(HZ, "Failed to create result file!");
#else #else
rb->splash(HZ, true, "File creation failed"); rb->splash(HZ, "File creation failed");
#endif #endif
return false; return false;
} }
@ -158,7 +158,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
/* Check the extension. We only allow .m3u files. */ /* Check the extension. We only allow .m3u files. */
if(rb->strcasecmp(&filename[rb->strlen(filename)-4], ".m3u") && if(rb->strcasecmp(&filename[rb->strlen(filename)-4], ".m3u") &&
rb->strcasecmp(&filename[rb->strlen(filename)-5], ".m3u8")) { rb->strcasecmp(&filename[rb->strlen(filename)-5], ".m3u8")) {
rb->splash(HZ, true, "Not a .m3u or .m3u8 file"); rb->splash(HZ, "Not a .m3u or .m3u8 file");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
@ -176,7 +176,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
search_buffer(); search_buffer();
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(HZ, true, "Done"); rb->splash(HZ, "Done");
rb->close(fdw); rb->close(fdw);
rb->close(fd); rb->close(fd);

View file

@ -47,7 +47,7 @@ unsigned char *parse(int fd) {
ret=parseMExpr(); ret=parseMExpr();
if(syntaxerror) { if(syntaxerror) {
PUTS("Syntaxerror"); PUTS("Syntaxerror");
rb->splash(HZ*3,true,errormsg); rb->splash(HZ*3,errormsg);
} }
parser_accept(TOKEN_EOF); parser_accept(TOKEN_EOF);
return ret; return ret;
@ -267,7 +267,7 @@ unsigned char *parseMExpr() {
if(filter[currentlevel][i]) // this should always be true if(filter[currentlevel][i]) // this should always be true
ret[i]=ret[i] || ret2[i]; ret[i]=ret[i] || ret2[i];
else else
rb->splash(HZ*2,true,"An or is having a filter, bad."); rb->splash(HZ*2,"An or is having a filter, bad.");
} }
return ret; return ret;
} }

View file

@ -71,7 +71,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
PUTS("SearchEngine v0.1"); PUTS("SearchEngine v0.1");
parsefd=rb->open(parameter,O_RDONLY); parsefd=rb->open(parameter,O_RDONLY);
if(parsefd<0) { if(parsefd<0) {
rb->splash(2*HZ,true,"Unable to open search tokenstream"); rb->splash(2*HZ,"Unable to open search tokenstream");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
result=parse(parsefd); result=parse(parsefd);
@ -90,7 +90,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->close(fd); rb->close(fd);
} }
rb->snprintf(buf,250,"Hits: %d",hits); rb->snprintf(buf,250,"Hits: %d",hits);
rb->splash(HZ*3,true,buf); rb->splash(HZ*3,buf);
if (result!=0) { if (result!=0) {
/* Return PLUGIN_USB_CONNECTED to force a file-tree refresh */ /* Return PLUGIN_USB_CONNECTED to force a file-tree refresh */
return PLUGIN_USB_CONNECTED; return PLUGIN_USB_CONNECTED;

View file

@ -43,14 +43,14 @@ char *getstring(struct token *token) {
return currententry->filename; return currententry->filename;
default: default:
rb->snprintf(buf,199,"unknown stringid intvalue %d",token->intvalue); rb->snprintf(buf,199,"unknown stringid intvalue %d",token->intvalue);
rb->splash(HZ*2,true,buf); rb->splash(HZ*2,buf);
return ""; return "";
} }
break; break;
default: default:
// report error // report error
rb->snprintf(buf,199,"unknown token %d in getstring..",token->kind); rb->snprintf(buf,199,"unknown token %d in getstring..",token->kind);
rb->splash(HZ*2,true,buf); rb->splash(HZ*2,buf);
return ""; return "";
} }
} }
@ -104,13 +104,13 @@ int getvalue(struct token *token) {
return (currententry->playcount-dbglobal.playcountmin)*10/(dbglobal.playcountmax-dbglobal.playcountmin); return (currententry->playcount-dbglobal.playcountmin)*10/(dbglobal.playcountmax-dbglobal.playcountmin);
default: default:
rb->snprintf(buf,199,"unknown numid intvalue %d",token->intvalue); rb->snprintf(buf,199,"unknown numid intvalue %d",token->intvalue);
rb->splash(HZ*2,true,buf); rb->splash(HZ*2,buf);
// report error. // report error.
return 0; return 0;
} }
default: default:
rb->snprintf(buf,199,"unknown token %d in getvalue..",token->kind); rb->snprintf(buf,199,"unknown token %d in getvalue..",token->kind);
rb->splash(HZ*2,true,buf); rb->splash(HZ*2,buf);
return 0; return 0;
} }
} }

View file

@ -351,7 +351,7 @@ int load_all_levels(void)
num_levels++; num_levels++;
if(num_levels > max_levels) if(num_levels > max_levels)
{ {
rb->splash(HZ, true, "Too many levels in file"); rb->splash(HZ, "Too many levels in file");
break; break;
} }
continue; continue;
@ -834,7 +834,7 @@ void die (void)
bool done=false; bool done=false;
char pscore[20]; char pscore[20];
rb->splash(HZ*2, true, "Oops!"); rb->splash(HZ*2, "Oops!");
rb->lcd_clear_display(); rb->lcd_clear_display();
@ -914,7 +914,7 @@ void collision ( int x, int y )
num_apples_to_get+=2; num_apples_to_get+=2;
game_b_level++; game_b_level++;
} }
rb->splash(HZ, true, "Level Completed!"); rb->splash(HZ, "Level Completed!");
rb->lcd_clear_display(); rb->lcd_clear_display();
new_level(level_from_file); new_level(level_from_file);
rb->lcd_clear_display(); rb->lcd_clear_display();
@ -1357,7 +1357,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
load_all_levels(); load_all_levels();
if (num_levels == 0) { if (num_levels == 0) {
rb->splash(HZ*2, true, "Failed loading levels!"); rb->splash(HZ*2, "Failed loading levels!");
return PLUGIN_OK; return PLUGIN_OK;
} }

View file

@ -181,7 +181,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS
if (!pgfx_init(rb, 4, 2)) if (!pgfx_init(rb, 4, 2))
{ {
rb->splash(HZ*2, true, "Old LCD :("); rb->splash(HZ*2, "Old LCD :(");
return PLUGIN_OK; return PLUGIN_OK;
} }
#endif #endif

View file

@ -460,7 +460,7 @@ static int read_levels(int initialize_count)
endpoint += NUM_BUFFERED_BOARDS; endpoint += NUM_BUFFERED_BOARDS;
if ((fd = rb->open(LEVELS_FILE, O_RDONLY)) < 0) { if ((fd = rb->open(LEVELS_FILE, O_RDONLY)) < 0) {
rb->splash(HZ*2, true, "Unable to open %s", LEVELS_FILE); rb->splash(HZ*2, "Unable to open %s", LEVELS_FILE);
return -1; return -1;
} }
@ -472,7 +472,7 @@ static int read_levels(int initialize_count)
* a mixed unix and dos CR/LF file format, I'm not going to * a mixed unix and dos CR/LF file format, I'm not going to
* do a precise check */ * do a precise check */
if (len < COLS) { if (len < COLS) {
rb->splash(HZ*2, true, "Error in levels file: short line"); rb->splash(HZ*2, "Error in levels file: short line");
return -1; return -1;
} }
if (level_count >= buffered_boards.low && level_count < endpoint) { if (level_count >= buffered_boards.low && level_count < endpoint) {
@ -487,8 +487,7 @@ static int read_levels(int initialize_count)
level_count++; level_count++;
if (level_count >= endpoint && !initialize_count) break; if (level_count >= endpoint && !initialize_count) break;
if (level_count && row != ROWS) { if (level_count && row != ROWS) {
rb->splash(HZ*2, true, rb->splash(HZ*2, "Error in levels file: short board");
"Error in levels file: short board");
return -1; return -1;
} }
row = 0; row = 0;

View file

@ -1159,7 +1159,7 @@ int solitaire( void )
/* if there aren't any, that means you won :) */ /* if there aren't any, that means you won :) */
if( biggest_col_length == 0 && rem == NOT_A_CARD ) if( biggest_col_length == 0 && rem == NOT_A_CARD )
{ {
rb->splash( HZ, true, "You Won :)" ); rb->splash( HZ, "You Won :)" );
return bouncing_cards(); return bouncing_cards();
} }
@ -1588,7 +1588,7 @@ enum plugin_status plugin_start( struct plugin_api* api, void* parameter )
(void)parameter; (void)parameter;
rb = api; rb = api;
rb->splash( HZ, true, "Welcome to Solitaire!" ); rb->splash( HZ, "Welcome to Solitaire!" );
configfile_init(rb); configfile_init(rb);
configfile_load(CONFIG_FILENAME, config, configfile_load(CONFIG_FILENAME, config,

View file

@ -191,32 +191,32 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
pointers = (char **)(buf + buf_size - sizeof(int)); pointers = (char **)(buf + buf_size - sizeof(int));
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(0, true, "Loading..."); rb->splash(0, "Loading...");
rc = read_buffer(0); rc = read_buffer(0);
if(rc == 0) { if(rc == 0) {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(0, true, "Sorting..."); rb->splash(0, "Sorting...");
sort_buffer(); sort_buffer();
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(0, true, "Writing..."); rb->splash(0, "Writing...");
rc = write_file(); rc = write_file();
if(rc < 0) { if(rc < 0) {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(HZ, true, "Can't write file: %d", rc); rb->splash(HZ, "Can't write file: %d", rc);
} else { } else {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(HZ, true, "Done"); rb->splash(HZ, "Done");
} }
} else { } else {
if(rc < 0) { if(rc < 0) {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(HZ, true, "Can't read file: %d", rc); rb->splash(HZ, "Can't read file: %d", rc);
} else { } else {
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->splash(HZ, true, "The file is too big"); rb->splash(HZ, "The file is too big");
} }
} }

View file

@ -543,14 +543,14 @@ static void generateFileName(char* file_name, int part_no)
} }
else else
{ {
rb->splash(0, true, "wrong extension"); rb->splash(0, "wrong extension");
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
} }
} }
else else
{ {
rb->splash(0, true, "name too long"); rb->splash(0, "name too long");
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
@ -585,7 +585,7 @@ static int copy_file(
bytes_written = rb->write(dest, buffer, bytes_read); bytes_written = rb->write(dest, buffer, bytes_read);
if (bytes_written < 0) { if (bytes_written < 0) {
rb->splash(0, true, "Write failed in copy."); rb->splash(0, "Write failed in copy.");
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
return -1; return -1;
@ -598,7 +598,7 @@ static int copy_file(
|| button == SPLITEDIT_RC_QUIT: || button == SPLITEDIT_RC_QUIT:
#endif #endif
) { ) {
rb->splash(0, true, "Aborting copy."); rb->splash(0, "Aborting copy.");
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
return -1; return -1;
@ -632,7 +632,7 @@ static int save(
if (file1 >= 0) if (file1 >= 0)
{ {
rb->close(file1); rb->close(file1);
rb->splash(0, true, "File 1 exists. Please rename."); rb->splash(0, "File 1 exists. Please rename.");
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
return -1; return -1;
@ -646,7 +646,7 @@ static int save(
if (file2 >= 0) if (file2 >= 0)
{ {
rb->close(file2); rb->close(file2);
rb->splash(0, true, "File 2 exists. Please rename."); rb->splash(0, "File 2 exists. Please rename.");
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
return -2; return -2;
@ -688,8 +688,7 @@ static int save(
if (close_stat != 0) if (close_stat != 0)
{ {
rb->splash(0, true, rb->splash(0, "failed closing file1: error %d", close_stat);
"failed closing file1: error %d", close_stat);
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
} else { } else {
@ -701,8 +700,7 @@ static int save(
} }
else else
{ {
rb->splash(0, true, rb->splash(0, "Can't write File1: error %d", file1);
"Can't write File1: error %d", file1);
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
retval = -1; retval = -1;
@ -713,8 +711,7 @@ static int save(
{ {
if (rb->lseek(src_file, end, SEEK_SET) < (off_t)end) if (rb->lseek(src_file, end, SEEK_SET) < (off_t)end)
{ {
rb->splash(0, true, rb->splash(0, "Src file to short: error %d", src_file);
"Src file to short: error %d", src_file);
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
} }
@ -732,8 +729,8 @@ static int save(
if (close_stat != 0) if (close_stat != 0)
{ {
rb->splash(0, true, rb->splash(0, "failed: closing file2: error %d",
"failed: closing file2: error %d", close_stat); close_stat);
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
} else { } else {
@ -745,8 +742,7 @@ static int save(
} }
else else
{ {
rb->splash(0, true, rb->splash(0, "Can't write File2: error %d", file2);
"Can't write File2: error %d", file2);
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
retval = -2; retval = -2;
@ -756,15 +752,14 @@ static int save(
close_stat = rb->close(src_file); close_stat = rb->close(src_file);
if (close_stat != 0) if (close_stat != 0)
{ {
rb->splash(0, true, rb->splash(0, "failed: closing src: error %d", close_stat);
"failed: closing src: error %d", close_stat);
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
} }
} }
else else
{ {
rb->splash(0, true, "Source file not found"); rb->splash(0, "Source file not found");
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
retval = -3; retval = -3;
@ -1051,7 +1046,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
/* MMC is slow - wait some time to allow track reload to finish */ /* MMC is slow - wait some time to allow track reload to finish */
rb->sleep(HZ/20); rb->sleep(HZ/20);
if (mp3->elapsed > play_end) /* reload in progress */ if (mp3->elapsed > play_end) /* reload in progress */
rb->splash(10*HZ, true, "Wait - reloading"); rb->splash(10*HZ, "Wait - reloading");
#endif #endif
rb->audio_resume(); rb->audio_resume();
break; break;
@ -1063,7 +1058,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
/* MMC is slow - wait some time to allow track reload to finish */ /* MMC is slow - wait some time to allow track reload to finish */
rb->sleep(HZ/20); rb->sleep(HZ/20);
if (mp3->elapsed > play_end) /* reload in progress */ if (mp3->elapsed > play_end) /* reload in progress */
rb->splash(10*HZ, true, "Wait - reloading"); rb->splash(10*HZ, "Wait - reloading");
#endif #endif
rb->audio_resume(); rb->audio_resume();
break; break;
@ -1228,7 +1223,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
if (rb->strncasecmp(path_mp3, new_mp3->path, if (rb->strncasecmp(path_mp3, new_mp3->path,
sizeof (path_mp3))) sizeof (path_mp3)))
{ {
rb->splash(0, true,"Abort due to file change"); rb->splash(0, "Abort due to file change");
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
exit_request = true; exit_request = true;
@ -1272,7 +1267,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
} }
else else
{ {
rb->splash(0, true, "Play or pause a mp3 file first."); rb->splash(0, "Play or pause a mp3 file first.");
rb->button_get(true); rb->button_get(true);
rb->button_get(true); rb->button_get(true);
} }

View file

@ -180,13 +180,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
rb->lcd_getstringsize("Files: ", &fontwidth, &fontheight); rb->lcd_getstringsize("Files: ", &fontwidth, &fontheight);
#endif #endif
rb->splash(HZ, true, "Counting..."); rb->splash(HZ, "Counting...");
update_screen(); update_screen();
lasttick = *rb->current_tick; lasttick = *rb->current_tick;
traversedir("", ""); traversedir("", "");
if (abort == true) { if (abort == true) {
rb->splash(HZ, true, "Aborted"); rb->splash(HZ, "Aborted");
return PLUGIN_OK; return PLUGIN_OK;
} }
update_screen(); update_screen();
@ -194,7 +194,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->remote_backlight_on(); rb->remote_backlight_on();
#endif #endif
rb->backlight_on(); rb->backlight_on();
rb->splash(HZ, true, "Done"); rb->splash(HZ, "Done");
update_screen(); update_screen();
button = rb->button_get(true); button = rb->button_get(true);
while (1) { while (1) {

View file

@ -490,7 +490,7 @@ void sudoku_solve(struct sudoku_state_t* state)
} }
} }
} else { } else {
rb->splash(HZ*2, true, "Solve failed"); rb->splash(HZ*2, "Solve failed");
} }
return; return;
@ -696,7 +696,7 @@ bool save_sudoku(struct sudoku_state_t* state)
char line[13]; char line[13];
char sep[13]; char sep[13];
rb->splash(0, true, "Saving..."); rb->splash(0, "Saving...");
rb->memcpy(line,"...|...|...\r\n",13); rb->memcpy(line,"...|...|...\r\n",13);
rb->memcpy(sep,"-----------\r\n",13); rb->memcpy(sep,"-----------\r\n",13);
@ -966,7 +966,7 @@ bool sudoku_generate(struct sudoku_state_t* state)
clear_state(&new_state); clear_state(&new_state);
display_board(&new_state); display_board(&new_state);
rb->splash(0, true, "Generating..."); rb->splash(0, "Generating...");
#ifdef HAVE_ADJUSTABLE_CPU_FREQ #ifdef HAVE_ADJUSTABLE_CPU_FREQ
rb->cpu_boost(true); rb->cpu_boost(true);
@ -982,11 +982,11 @@ bool sudoku_generate(struct sudoku_state_t* state)
rb->memcpy(state,&new_state,sizeof(new_state)); rb->memcpy(state,&new_state,sizeof(new_state));
rb->snprintf(str,sizeof(str),"Difficulty: %s",difficulty); rb->snprintf(str,sizeof(str),"Difficulty: %s",difficulty);
display_board(state); display_board(state);
rb->splash(HZ*3, true, str); rb->splash(HZ*3, str);
rb->strncpy(state->filename,GAME_FILE,MAX_PATH); rb->strncpy(state->filename,GAME_FILE,MAX_PATH);
} else { } else {
display_board(&new_state); display_board(&new_state);
rb->splash(HZ*2, true, "Aborted"); rb->splash(HZ*2, "Aborted");
} }
return res; return res;
} }
@ -1079,7 +1079,7 @@ int sudoku_edit_menu(struct sudoku_state_t* state)
if (save_sudoku(state)) { if (save_sudoku(state)) {
state->editmode=0; state->editmode=0;
} else { } else {
rb->splash(HZ*2, true, "Save failed"); rb->splash(HZ*2, "Save failed");
} }
break; break;
@ -1101,7 +1101,7 @@ void move_cursor(struct sudoku_state_t* state, int newx, int newy)
/* Check that the character at the cursor position is legal */ /* Check that the character at the cursor position is legal */
if (check_status(state)) { if (check_status(state)) {
rb->splash(HZ*2, true, "Illegal move!"); rb->splash(HZ*2, "Illegal move!");
/* Ignore any button presses during the splash */ /* Ignore any button presses during the splash */
rb->button_clear_queue(); rb->button_clear_queue();
return; return;
@ -1148,7 +1148,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
} }
} else { } else {
if (!load_sudoku(&state,(char*)parameter)) { if (!load_sudoku(&state,(char*)parameter)) {
rb->splash(HZ*2, true, "Load error"); rb->splash(HZ*2, "Load error");
return(PLUGIN_ERROR); return(PLUGIN_ERROR);
} }
} }
@ -1167,7 +1167,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
/* Exit game */ /* Exit game */
case SUDOKU_BUTTON_QUIT: case SUDOKU_BUTTON_QUIT:
if (check_status(&state)) { if (check_status(&state)) {
rb->splash(HZ*2, true, "Illegal move!"); rb->splash(HZ*2, "Illegal move!");
/* Ignore any button presses during the splash */ /* Ignore any button presses during the splash */
rb->button_clear_queue(); rb->button_clear_queue();
} else { } else {
@ -1316,7 +1316,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
#endif #endif
/* Don't let the user leave a game in a bad state */ /* Don't let the user leave a game in a bad state */
if (check_status(&state)) { if (check_status(&state)) {
rb->splash(HZ*2, true, "Illegal move!"); rb->splash(HZ*2, "Illegal move!");
/* Ignore any button presses during the splash */ /* Ignore any button presses during the splash */
rb->button_clear_queue(); rb->button_clear_queue();
} else { } else {

View file

@ -105,7 +105,7 @@ static bool test_fs(void)
fd = rb->creat(TEST_FILE); fd = rb->creat(TEST_FILE);
if (fd < 0) if (fd < 0)
{ {
rb->splash(0, true, "Couldn't create testfile."); rb->splash(0, "Couldn't create testfile.");
goto error; goto error;
} }
@ -123,7 +123,7 @@ static bool test_fs(void)
mem_fill_frnd(buf_start + align, current); mem_fill_frnd(buf_start + align, current);
if (current != rb->write(fd, buf_start + align, current)) if (current != rb->write(fd, buf_start + align, current))
{ {
rb->splash(0, true, "Write error."); rb->splash(0, "Write error.");
rb->close(fd); rb->close(fd);
goto error; goto error;
} }
@ -134,7 +134,7 @@ static bool test_fs(void)
fd = rb->open(TEST_FILE, O_RDONLY); fd = rb->open(TEST_FILE, O_RDONLY);
if (fd < 0) if (fd < 0)
{ {
rb->splash(0, true, "Couldn't open testfile."); rb->splash(0, "Couldn't open testfile.");
goto error; goto error;
} }
@ -151,7 +151,7 @@ static bool test_fs(void)
if (current != rb->read(fd, buf_start + align, current)) if (current != rb->read(fd, buf_start + align, current))
{ {
rb->splash(0, true, "Read error."); rb->splash(0, "Read error.");
rb->close(fd); rb->close(fd);
goto error; goto error;
} }
@ -196,13 +196,13 @@ static bool test_speed(void)
fd = rb->creat(TEST_FILE); fd = rb->creat(TEST_FILE);
if (fd < 0) if (fd < 0)
{ {
rb->splash(0, true, "Couldn't create testfile."); rb->splash(0, "Couldn't create testfile.");
goto error; goto error;
} }
time = *rb->current_tick; time = *rb->current_tick;
if (buf_len != rb->write(fd, buf_start, buf_len)) if (buf_len != rb->write(fd, buf_start, buf_len))
{ {
rb->splash(0, true, "Write error."); rb->splash(0, "Write error.");
rb->close(fd); rb->close(fd);
goto error; goto error;
} }
@ -215,13 +215,13 @@ static bool test_speed(void)
fd = rb->open(TEST_FILE, O_WRONLY); fd = rb->open(TEST_FILE, O_WRONLY);
if (fd < 0) if (fd < 0)
{ {
rb->splash(0, true, "Couldn't open testfile."); rb->splash(0, "Couldn't open testfile.");
goto error; goto error;
} }
time = *rb->current_tick; time = *rb->current_tick;
if (buf_len != rb->write(fd, buf_start, buf_len)) if (buf_len != rb->write(fd, buf_start, buf_len))
{ {
rb->splash(0, true, "Write error."); rb->splash(0, "Write error.");
rb->close(fd); rb->close(fd);
goto error; goto error;
} }
@ -234,13 +234,13 @@ static bool test_speed(void)
fd = rb->open(TEST_FILE, O_WRONLY); fd = rb->open(TEST_FILE, O_WRONLY);
if (fd < 0) if (fd < 0)
{ {
rb->splash(0, true, "Couldn't open testfile."); rb->splash(0, "Couldn't open testfile.");
goto error; goto error;
} }
time = *rb->current_tick; time = *rb->current_tick;
if (buf_len != rb->write(fd, buf_start + 1, buf_len)) if (buf_len != rb->write(fd, buf_start + 1, buf_len))
{ {
rb->splash(0, true, "Write error."); rb->splash(0, "Write error.");
rb->close(fd); rb->close(fd);
goto error; goto error;
} }
@ -253,13 +253,13 @@ static bool test_speed(void)
fd = rb->open(TEST_FILE, O_RDONLY); fd = rb->open(TEST_FILE, O_RDONLY);
if (fd < 0) if (fd < 0)
{ {
rb->splash(0, true, "Couldn't open testfile."); rb->splash(0, "Couldn't open testfile.");
goto error; goto error;
} }
time = *rb->current_tick; time = *rb->current_tick;
if (buf_len != rb->read(fd, buf_start, buf_len)) if (buf_len != rb->read(fd, buf_start, buf_len))
{ {
rb->splash(0, true, "Read error."); rb->splash(0, "Read error.");
rb->close(fd); rb->close(fd);
goto error; goto error;
} }
@ -272,13 +272,13 @@ static bool test_speed(void)
fd = rb->open(TEST_FILE, O_RDONLY); fd = rb->open(TEST_FILE, O_RDONLY);
if (fd < 0) if (fd < 0)
{ {
rb->splash(0, true, "Couldn't open testfile."); rb->splash(0, "Couldn't open testfile.");
goto error; goto error;
} }
time = *rb->current_tick; time = *rb->current_tick;
if (buf_len != rb->read(fd, buf_start + 1, buf_len)) if (buf_len != rb->read(fd, buf_start + 1, buf_len))
{ {
rb->splash(0, true, "Read error."); rb->splash(0, "Read error.");
rb->close(fd); rb->close(fd);
goto error; goto error;
} }

View file

@ -178,7 +178,7 @@ void save_changes(int overwrite)
fd = rb->open(filename,O_WRONLY|O_CREAT|O_TRUNC); fd = rb->open(filename,O_WRONLY|O_CREAT|O_TRUNC);
if (fd < 0) if (fd < 0)
{ {
rb->splash(HZ*2,1,"Changes NOT saved"); rb->splash(HZ*2, "Changes NOT saved");
return; return;
} }
@ -315,7 +315,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
fd = rb->open(filename,O_RDONLY); fd = rb->open(filename,O_RDONLY);
if (fd<0) if (fd<0)
{ {
rb->splash(HZ*2,true,"Couldnt open file: %s",(char*)parameter); rb->splash(HZ*2,"Couldnt open file: %s",(char*)parameter);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }
/* read in the file */ /* read in the file */
@ -323,7 +323,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
{ {
if (!do_action(ACTION_INSERT,temp_line,line_count)) if (!do_action(ACTION_INSERT,temp_line,line_count))
{ {
rb->splash(HZ*2,true,"Error reading file: %s",(char*)parameter); rb->splash(HZ*2,"Error reading file: %s",(char*)parameter);
rb->close(fd); rb->close(fd);
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }

View file

@ -118,7 +118,7 @@ static int insert_data_in_file(char *fname, int fpos, char *buf, int num_bytes)
static void fileerror(int rc) static void fileerror(int rc)
{ {
rb->splash(HZ*2, true, "File error: %d", rc); rb->splash(HZ*2, "File error: %d", rc);
} }
static const unsigned char empty_id3_header[] = static const unsigned char empty_id3_header[] =
@ -259,7 +259,7 @@ static bool vbr_fix(char *selected_file)
{ {
/* Not a VBR file */ /* Not a VBR file */
DEBUGF("Not a VBR file\n"); DEBUGF("Not a VBR file\n");
rb->splash(HZ*2, true, "Not a VBR file"); rb->splash(HZ*2, "Not a VBR file");
} }
return false; return false;

View file

@ -986,7 +986,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if (parameter == NULL) if (parameter == NULL)
{ {
rb->splash(HZ*2, true, "Play .rvf file!"); rb->splash(HZ*2, "Play .rvf file!");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }

View file

@ -1043,12 +1043,12 @@ static void viewer_load_settings(void) /* same name as global, but not the same
settings_fd=rb->open(SETTINGS_FILE, O_RDONLY); settings_fd=rb->open(SETTINGS_FILE, O_RDONLY);
if (settings_fd < 0) if (settings_fd < 0)
{ {
rb->splash(HZ*2, true, "No Settings File"); rb->splash(HZ*2, "No Settings File");
return; return;
} }
if (rb->filesize(settings_fd) != sizeof(struct preferences)) if (rb->filesize(settings_fd) != sizeof(struct preferences))
{ {
rb->splash(HZ*2, true, "Settings File Invalid"); rb->splash(HZ*2, "Settings File Invalid");
return; return;
} }
@ -1313,7 +1313,7 @@ static void viewer_menu(void)
switch (result) switch (result)
{ {
case 0: /* quit */ case 0: /* quit */
rb->splash(1, true, "Saving Settings"); rb->splash(1, "Saving Settings");
rb->menu_exit(m); rb->menu_exit(m);
viewer_exit(NULL); viewer_exit(NULL);
done = true; done = true;
@ -1350,7 +1350,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
file_name = file; file_name = file;
ok = viewer_init(); ok = viewer_init();
if (!ok) { if (!ok) {
rb->splash(HZ, false, "Error"); rb->splash(HZ, "Error");
viewer_exit(NULL); viewer_exit(NULL);
return PLUGIN_OK; return PLUGIN_OK;
} }

View file

@ -327,9 +327,9 @@ void load_settings(void) {
else { else {
reset_settings(); reset_settings();
#if CONFIG_KEYPAD == RECORDER_PAD #if CONFIG_KEYPAD == RECORDER_PAD
rb->splash(HZ, true, "Press ON for help"); rb->splash(HZ, "Press ON for help");
#elif CONFIG_KEYPAD == ONDIO_PAD #elif CONFIG_KEYPAD == ONDIO_PAD
rb->splash(HZ, true, "Press MODE for help"); rb->splash(HZ, "Press MODE for help");
#endif #endif
} }
} }

View file

@ -124,19 +124,19 @@ static int wav2wv (char *filename)
extension = filename + rb->strlen (filename) - 3; extension = filename + rb->strlen (filename) - 3;
if (rb->strcasecmp (extension, "wav")) { if (rb->strcasecmp (extension, "wav")) {
rb->splash(HZ*2, true, "only for wav files!"); rb->splash(HZ*2, "only for wav files!");
return 1; return 1;
} }
in_fd = rb->open(filename, O_RDONLY); in_fd = rb->open(filename, O_RDONLY);
if (in_fd < 0) { if (in_fd < 0) {
rb->splash(HZ*2, true, "could not open file!"); rb->splash(HZ*2, "could not open file!");
return true; return true;
} }
if (rb->read (in_fd, &raw_header, sizeof (raw_header)) != sizeof (raw_header)) { if (rb->read (in_fd, &raw_header, sizeof (raw_header)) != sizeof (raw_header)) {
rb->splash(HZ*2, true, "could not read file!"); rb->splash(HZ*2, "could not read file!");
return true; return true;
} }
@ -148,7 +148,7 @@ static int wav2wv (char *filename)
rb->strncmp (native_header.fmt_ckID, "fmt ", 4) || rb->strncmp (native_header.fmt_ckID, "fmt ", 4) ||
rb->strncmp (native_header.data_ckID, "data", 4) || rb->strncmp (native_header.data_ckID, "data", 4) ||
native_header.FormatTag != 1 || native_header.BitsPerSample != 16) { native_header.FormatTag != 1 || native_header.BitsPerSample != 16) {
rb->splash(HZ*2, true, "incompatible wav file!"); rb->splash(HZ*2, "incompatible wav file!");
return true; return true;
} }
@ -164,7 +164,7 @@ static int wav2wv (char *filename)
/* config.flags |= CONFIG_HIGH_FLAG; */ /* config.flags |= CONFIG_HIGH_FLAG; */
if (!WavpackSetConfiguration (wpc, &config, total_samples)) { if (!WavpackSetConfiguration (wpc, &config, total_samples)) {
rb->splash(HZ*2, true, "internal error!"); rb->splash(HZ*2, "internal error!");
rb->close (in_fd); rb->close (in_fd);
return true; return true;
} }
@ -180,7 +180,7 @@ static int wav2wv (char *filename)
extension [1] = save_a; extension [1] = save_a;
if (out_fd < 0) { if (out_fd < 0) {
rb->splash(HZ*2, true, "could not create file!"); rb->splash(HZ*2, "could not create file!");
rb->close (in_fd); rb->close (in_fd);
return true; return true;
} }
@ -201,7 +201,7 @@ static int wav2wv (char *filename)
bytes_count = samples_count * num_chans * 2; bytes_count = samples_count * num_chans * 2;
if (rb->read (in_fd, input_buffer, bytes_count) != (int32_t) bytes_count) { if (rb->read (in_fd, input_buffer, bytes_count) != (int32_t) bytes_count) {
rb->splash(HZ*2, true, "could not read file!"); rb->splash(HZ*2, "could not read file!");
error = true; error = true;
break; break;
} }
@ -237,7 +237,7 @@ static int wav2wv (char *filename)
} }
if (!WavpackPackSamples (wpc, temp_buffer, samples_this_pass)) { if (!WavpackPackSamples (wpc, temp_buffer, samples_this_pass)) {
rb->splash(HZ*2, true, "internal error!"); rb->splash(HZ*2, "internal error!");
error = true; error = true;
break; break;
} }
@ -251,7 +251,7 @@ static int wav2wv (char *filename)
bytes_count = WavpackFinishBlock (wpc); bytes_count = WavpackFinishBlock (wpc);
if (rb->write (out_fd, output_buffer, bytes_count) != (int32_t) bytes_count) { if (rb->write (out_fd, output_buffer, bytes_count) != (int32_t) bytes_count) {
rb->splash(HZ*2, true, "could not write file!"); rb->splash(HZ*2, "could not write file!");
error = true; error = true;
break; break;
} }
@ -265,7 +265,7 @@ static int wav2wv (char *filename)
buttons = rb->button_status (); buttons = rb->button_status ();
if (last_buttons == BUTTON_NONE && buttons != BUTTON_NONE) { if (last_buttons == BUTTON_NONE && buttons != BUTTON_NONE) {
rb->splash(HZ*2, true, "operation aborted!"); rb->splash(HZ*2, "operation aborted!");
error = true; error = true;
break; break;
} }
@ -285,7 +285,7 @@ static int wav2wv (char *filename)
extension [1] = save_a; extension [1] = save_a;
} }
else else
rb->splash(HZ*3, true, "operation successful"); rb->splash(HZ*3, "operation successful");
return error; return error;
} }
@ -309,7 +309,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void *parameter)
audiobuf = rb->plugin_get_audio_buffer(&audiobuflen); audiobuf = rb->plugin_get_audio_buffer(&audiobuflen);
if (audiobuflen < 0x200000) { if (audiobuflen < 0x200000) {
rb->splash(HZ*2, true, "not enough memory!"); rb->splash(HZ*2, "not enough memory!");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }

View file

@ -3465,7 +3465,7 @@ int play_file(char* filename)
fd = rb->open(filename, O_RDONLY); fd = rb->open(filename, O_RDONLY);
if (fd < 0) if (fd < 0)
{ {
rb->splash(2*HZ, true, "Couldn't open WAV file"); rb->splash(2*HZ, "Couldn't open WAV file");
return PLAY_ERROR; return PLAY_ERROR;
} }
@ -3474,13 +3474,13 @@ int play_file(char* filename)
got = rb->read(fd, aud_buf, wanted); /* wav header */ got = rb->read(fd, aud_buf, wanted); /* wav header */
if (got < 0) if (got < 0)
{ {
rb->splash(2*HZ, true, "Read error"); rb->splash(2*HZ, "Read error");
rb->close(fd); rb->close(fd);
return PLAY_ERROR; return PLAY_ERROR;
} }
else if (got < wanted) else if (got < wanted)
{ {
rb->splash(2*HZ, true, "File too short"); rb->splash(2*HZ, "File too short");
rb->close(fd); rb->close(fd);
return PLAY_ERROR; return PLAY_ERROR;
} }
@ -3490,7 +3490,7 @@ int play_file(char* filename)
|| rb->memcmp(aud_buf + 12, "fmt ", 4) || rb->memcmp(aud_buf + 12, "fmt ", 4)
|| rb->memcmp(aud_buf + 36, "data", 4)) || rb->memcmp(aud_buf + 36, "data", 4))
{ {
rb->splash(2*HZ, true, "No canonical WAV file"); rb->splash(2*HZ, "No canonical WAV file");
rb->close(fd); rb->close(fd);
return PLAY_ERROR; return PLAY_ERROR;
} }
@ -3498,7 +3498,7 @@ int play_file(char* filename)
format = letoh16(*(uint16_t *)(aud_buf + 20)); format = letoh16(*(uint16_t *)(aud_buf + 20));
if (format != 1) if (format != 1)
{ {
rb->splash(2*HZ, true, "Unsupported format: %d", format); rb->splash(2*HZ, "Unsupported format: %d", format);
rb->close(fd); rb->close(fd);
return PLAY_ERROR; return PLAY_ERROR;
} }
@ -3506,7 +3506,7 @@ int play_file(char* filename)
channels = letoh16(*(uint16_t *)(aud_buf + 22)); channels = letoh16(*(uint16_t *)(aud_buf + 22));
if (channels > 2) if (channels > 2)
{ {
rb->splash(2*HZ, true, "Too many channels: %d", channels); rb->splash(2*HZ, "Too many channels: %d", channels);
rb->close(fd); rb->close(fd);
return PLAY_ERROR; return PLAY_ERROR;
} }
@ -3514,7 +3514,7 @@ int play_file(char* filename)
samplebits = letoh16(*(uint16_t *)(aud_buf + 34)); samplebits = letoh16(*(uint16_t *)(aud_buf + 34));
if (samplebits != 16) if (samplebits != 16)
{ {
rb->splash(2*HZ, true, "Unsupported sample depth: %dbit", samplebits); rb->splash(2*HZ, "Unsupported sample depth: %dbit", samplebits);
rb->close(fd); rb->close(fd);
return PLAY_ERROR; return PLAY_ERROR;
} }
@ -3532,7 +3532,7 @@ int play_file(char* filename)
case 44100: rate = 9; break; case 44100: rate = 9; break;
case 48000: rate = 10; break; case 48000: rate = 10; break;
default: default:
rb->splash(2*HZ, true, "Unsupported samplerate: %dHz", samplerate); rb->splash(2*HZ, "Unsupported samplerate: %dHz", samplerate);
rb->close(fd); rb->close(fd);
return PLAY_ERROR; return PLAY_ERROR;
} }
@ -3655,14 +3655,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if (!parameter) if (!parameter)
{ {
rb->splash(HZ, true, "Play WAV file!"); rb->splash(HZ, "Play WAV file!");
return PLUGIN_OK; return PLUGIN_OK;
} }
plug_buf = rb->plugin_get_buffer(&buf_size); plug_buf = rb->plugin_get_buffer(&buf_size);
if (buf_size < 6700) /* needed for i2c transfer */ if (buf_size < 6700) /* needed for i2c transfer */
{ {
rb->splash(HZ, true, "Out of memory."); rb->splash(HZ, "Out of memory.");
return PLUGIN_ERROR; return PLUGIN_ERROR;
} }

View file

@ -1659,7 +1659,7 @@ static int run(void)
cycle_start = *rb->current_tick; cycle_start = *rb->current_tick;
} }
rb->splash(HZ*2, true, "Game Over!"); rb->splash(HZ*2, "Game Over!");
return 2; /* back to menu */ return 2; /* back to menu */
} }

View file

@ -573,7 +573,7 @@ static void die (void)
player.gameover = true; player.gameover = true;
else { else {
refresh_board (); refresh_board ();
rb->splash (HZ, true, "Crash!"); rb->splash (HZ, "Crash!");
complete_trail (false); complete_trail (false);
player.move = MOVE_NO; player.move = MOVE_NO;
player.drawing = false; player.drawing = false;
@ -700,13 +700,13 @@ static inline void move_board (void)
} }
j = percentage (); j = percentage ();
if (j > 75) { /* finished level */ if (j > 75) { /* finished level */
rb->splash (HZ * 2, true, "Level %d finished", player.level+1); rb->splash (HZ * 2, "Level %d finished", player.level+1);
player.score += j; player.score += j;
if (player.level < MAX_LEVEL) if (player.level < MAX_LEVEL)
player.level++; player.level++;
init_board (); init_board ();
refresh_board (); refresh_board ();
rb->splash (HZ * 2, true, "Ready?"); rb->splash (HZ * 2, "Ready?");
} }
} }
@ -785,7 +785,7 @@ static void init_game (void)
rb->lcd_setfont(FONT_SYSFIXED); rb->lcd_setfont(FONT_SYSFIXED);
init_board (); init_board ();
refresh_board (); refresh_board ();
rb->splash (HZ * 2, true, "Ready?"); rb->splash (HZ * 2, "Ready?");
} }
/* general keypad handler loop */ /* general keypad handler loop */
@ -801,7 +801,7 @@ static int xobox_loop (void)
#ifdef HAS_BUTTON_HOLD #ifdef HAS_BUTTON_HOLD
if (rb->button_hold()) { if (rb->button_hold()) {
pause = true; pause = true;
rb->splash (HZ, true, "PAUSED"); rb->splash (HZ, "PAUSED");
} }
#endif #endif
@ -826,7 +826,7 @@ static int xobox_loop (void)
case PAUSE: case PAUSE:
pause = !pause; pause = !pause;
if (pause) if (pause)
rb->splash (HZ, true, "Paused"); rb->splash (HZ, "Paused");
break; break;
case QUIT: case QUIT:
ret = game_menu (); ret = game_menu ();
@ -845,7 +845,7 @@ static int xobox_loop (void)
refresh_board (); refresh_board ();
} }
if (player.gameover) { if (player.gameover) {
rb->splash (HZ, true, "Game Over!"); rb->splash (HZ, "Game Over!");
ret = game_menu (); ret = game_menu ();
if (ret == MENU_START) if (ret == MENU_START)
init_game (); init_game ();

View file

@ -95,7 +95,7 @@ char *spif_get_tape_fileinfo(int *startp, int *nump)
void put_msg(const char *msg) void put_msg(const char *msg)
{ {
#ifndef USE_GRAY #ifndef USE_GRAY
rb->splash (HZ/2,true , msg ); rb->splash (HZ/2, msg );
#else #else
LOGF(msg); LOGF(msg);
(void)msg; (void)msg;
@ -106,7 +106,7 @@ void put_msg(const char *msg)
void put_tmp_msg(const char *msg) void put_tmp_msg(const char *msg)
{ {
#ifndef USE_GRAY #ifndef USE_GRAY
rb->splash (HZ/10,true , msg ); rb->splash (HZ/10, msg );
#else #else
LOGF(msg); LOGF(msg);
(void)msg; (void)msg;

View file

@ -651,7 +651,7 @@ void load_snapshot_file_type(char *name, int type)
snsh = rb->open(filenamebuf, O_RDONLY); snsh = rb->open(filenamebuf, O_RDONLY);
if(snsh < 0) { if(snsh < 0) {
#ifndef USE_GRAY #ifndef USE_GRAY
rb->splash(HZ,true, "Could not open snapshot file `%s'",filenamebuf); rb->splash(HZ, "Could not open snapshot file `%s'",filenamebuf);
#endif #endif
return; return;
} }

View file

@ -297,7 +297,7 @@ static void options_menu(void){
no_yes, 2, NULL); no_yes, 2, NULL);
if (new_setting != settings.invert_colors ) if (new_setting != settings.invert_colors )
settings.invert_colors=new_setting; settings.invert_colors=new_setting;
rb->splash(HZ, true , "Restart to see effect"); rb->splash(HZ, "Restart to see effect");
break; break;
case 3: case 3:
new_setting = settings.frameskip; new_setting = settings.frameskip;
@ -467,7 +467,7 @@ static void run_singlemode(void)
#ifdef USE_GRAY #ifdef USE_GRAY
gray_show(false); gray_show(false);
#endif #endif
rb->splash(0,true,"Saving settings..."); rb->splash(0, "Saving settings...");
configfile_save(GLOBALCFG, config,sizeof(config)/sizeof(*config),SETTINGS_VERSION); configfile_save(GLOBALCFG, config,sizeof(config)/sizeof(*config),SETTINGS_VERSION);
} }
@ -531,7 +531,7 @@ static void init_load(void *parameter)
check_params (parameter); check_params (parameter);
if(spcf_init_snapshot != NULL) { if(spcf_init_snapshot != NULL) {
#ifndef USE_GRAY #ifndef USE_GRAY
rb->splash(HZ,true, "Loading snapshot '%s'", spcf_init_snapshot); rb->splash(HZ, "Loading snapshot '%s'", spcf_init_snapshot);
#endif #endif
load_snapshot_file_type(spcf_init_snapshot, spcf_init_snapshot_type); load_snapshot_file_type(spcf_init_snapshot, spcf_init_snapshot_type);

View file

@ -64,7 +64,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb = api; rb = api;
rb->lcd_set_backdrop(NULL); rb->lcd_set_backdrop(NULL);
rb->splash(HZ, true, "Welcome to ZXBox"); rb->splash(HZ, "Welcome to ZXBox");
sp_init(); sp_init();

Some files were not shown because too many files have changed in this diff Show more