protect the colors

This commit is contained in:
Gwenhael Le Moine 2011-07-01 17:24:03 +02:00
parent 6ffa3ef86d
commit b25a90e024

7
star.c
View file

@ -8,7 +8,8 @@
#define LEVEL_HEIGHT 9
#define LEVEL_WIDTH 16
enum { color_BALL = 1,
enum {
color_BALL = 1,
color_CUBE,
color_VOID,
color_GIFT,
@ -471,7 +472,7 @@ int main( int argc, char* argv[] )
nonl();
intrflush( w_main, FALSE );
keypad( w_main, TRUE );
/* if ( has_colors( ) == TRUE ) { */
if ( has_colors( ) == TRUE ) {
start_color( );
init_pair( color_CUBE, COLOR_RED, COLOR_BLACK );
init_pair( color_BALL, COLOR_BLUE, COLOR_BLACK );
@ -480,7 +481,7 @@ int main( int argc, char* argv[] )
init_pair( color_VOID, COLOR_BLACK, COLOR_BLACK );
init_pair( color_CUBE_SELECTED, COLOR_RED, COLOR_YELLOW );
init_pair( color_BALL_SELECTED, COLOR_BLUE, COLOR_YELLOW );
/* } */
}
/* load the first level to start the loop in a correct state */
load_level( s, levels[ lvl ] );