1
0
Fork 0
forked from len0rd/rockbox

Slight clean up of splash calls, use HZ instead of explicit numbers

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18624 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2008-09-24 17:48:10 +00:00
parent 1121af7b5e
commit 7d4cebd7da

View file

@ -257,7 +257,7 @@ void cb_levelup ( void ) {
cb_setlevel ( 1 ); cb_setlevel ( 1 );
else else
cb_setlevel ( Level+1 ); cb_setlevel ( Level+1 );
rb->splash ( 50 , level_string[Level-1] ); rb->splash ( HZ/2 , level_string[Level-1] );
}; };
/* ---- Save current position ---- */ /* ---- Save current position ---- */
@ -452,7 +452,7 @@ void cb_start_viewer(char* filename){
first_game = pgn_list_games(rb, filename); first_game = pgn_list_games(rb, filename);
if (first_game == NULL){ if (first_game == NULL){
rb->splash ( 200 , "No games found !" ); rb->splash ( HZ*2 , "No games found !" );
return; return;
} }
@ -482,7 +482,7 @@ void cb_start_viewer(char* filename){
if (curr_ply->prev_node != NULL){ if (curr_ply->prev_node != NULL){
curr_ply = curr_ply->prev_node; curr_ply = curr_ply->prev_node;
} else { } else {
rb->splash ( 200 , "At the begining of the game" ); rb->splash ( HZ*2 , "At the begining of the game" );
break; break;
} }
board[locn[curr_ply->row_from][curr_ply->column_from]] board[locn[curr_ply->row_from][curr_ply->column_from]]
@ -528,7 +528,7 @@ void cb_start_viewer(char* filename){
case COMMAND_NEXT: case COMMAND_NEXT:
/* apply the current move */ /* apply the current move */
if (curr_ply->player == neutral){ if (curr_ply->player == neutral){
rb->splash ( 200 , "At the end of the game" ); rb->splash ( HZ*2 , "At the end of the game" );
break; break;
} }
board[locn[curr_ply->row_to][curr_ply->column_to]] board[locn[curr_ply->row_to][curr_ply->column_to]]
@ -580,7 +580,7 @@ void cb_start_viewer(char* filename){
} }
} while (!exit_game && !exit_viewer); } while (!exit_game && !exit_viewer);
} else { } else {
rb->splash ( 200 , "Error parsing game !"); rb->splash ( HZ*2 , "Error parsing game !");
} }
} while (!exit_viewer); } while (!exit_viewer);
} }
@ -781,7 +781,7 @@ void cb_play_game(void) {
while (!exit) { while (!exit) {
if ( mate ) { if ( mate ) {
rb->splash ( 500 , "Checkmate!" ); rb->splash ( HZ*3 , "Checkmate!" );
rb->button_get(true); rb->button_get(true);
pgn_store_game(rb, game); pgn_store_game(rb, game);
GNUChess_Initialize(); GNUChess_Initialize();
@ -792,7 +792,7 @@ void cb_play_game(void) {
switch (command.type) { switch (command.type) {
case COMMAND_MOVE: case COMMAND_MOVE:
if ( ! VerifyMove (opponent, command.mv_s , 0 , &command.mv, move_buffer ) ) { if ( ! VerifyMove (opponent, command.mv_s , 0 , &command.mv, move_buffer ) ) {
rb->splash ( 50 , "Illegal move!" ); rb->splash ( HZ/2 , "Illegal move!" );
cb_drawboard(); cb_drawboard();
} else { } else {
cb_drawboard(); cb_drawboard();