[Super-tux-commit] supertux/src menu.cpp,1.22,1.23 setup.cpp,1.22,1.23 supertux.cpp,1.4,1.5 title.cp
Brought to you by:
wkendrick
From: Ingo R. <gr...@us...> - 2004-04-09 01:03:01
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22903 Modified Files: menu.cpp setup.cpp supertux.cpp title.cpp Log Message: - cleaned up title screen a bit Index: menu.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/menu.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- menu.cpp 29 Mar 2004 13:24:42 -0000 1.22 +++ menu.cpp 9 Apr 2004 00:49:47 -0000 1.23 @@ -370,10 +370,10 @@ /* Draw a horizontal line with a little 3d effect */ fillrect(x, y + 6, menu_width, 4, - 210,50,50,225); + 150,200,255,225); fillrect(x, y + 6, menu_width, 2, - 0,0,0,255); + 255,255,255,255); break; } case MN_LABEL: @@ -498,7 +498,8 @@ /* Draw a transparent background */ fillrect(pos_x - menu_width/2, pos_y - 24*num_items/2, - menu_width,menu_height,150,150,150,100); + menu_width,menu_height, + 150,180,200,100); for(int i = 0; i < num_items; ++i) { Index: title.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/title.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- title.cpp 4 Apr 2004 00:32:10 -0000 1.16 +++ title.cpp 9 Apr 2004 00:49:47 -0000 1.17 @@ -42,10 +42,13 @@ void loadshared(void); void activate_particle_systems(void); -static texture_type bkg_title, img_choose_subset, anim1, anim2; +static texture_type bkg_title; +static texture_type logo; +static texture_type img_choose_subset; + static SDL_Event event; static SDLKey key; -static int frame, pict, i; +static int frame, i; static unsigned int last_update_time; static unsigned int update_time; @@ -56,17 +59,6 @@ /* Draw the title background: */ texture_draw_bg(&bkg_title); - - /* Animate title screen: */ - - pict = (frame / 5) % 3; - - if (pict == 0) - texture_draw_part(&bkg_title, 560, 270, 560, 270, 80, 75); - else if (pict == 1) - texture_draw(&anim1, 560, 270); - else if (pict == 2) - texture_draw(&anim2, 560, 270); } /* --- TITLE SCREEN --- */ @@ -74,7 +66,6 @@ int title(void) { int done; - char str[80]; string_list_type level_subsets; st_subset subset; level_subsets = dsubdirs("/levels", "info"); @@ -100,9 +91,8 @@ /* Load images: */ - texture_load(&bkg_title,datadir + "/images/title/title.png", IGNORE_ALPHA); - texture_load(&anim1,datadir + "/images/title/title-anim2.png", IGNORE_ALPHA); - texture_load(&anim2,datadir + "/images/title/title-anim1.png", IGNORE_ALPHA); + texture_load(&bkg_title,datadir + "/images/title/background.jpg", IGNORE_ALPHA); + texture_load(&logo,datadir + "/images/title/logo.png", USE_ALPHA); texture_load(&img_choose_subset,datadir + "/images/status/choose-level-subset.png", USE_ALPHA); /* --- Main title loop: --- */ @@ -214,11 +204,12 @@ /* DEMO end */ /* Draw the high score: */ + /* sprintf(str, "High score: %d", hs_score); text_drawf(&gold_text, str, 0, -40, A_HMIDDLE, A_BOTTOM, 1); sprintf(str, "by %s", hs_name); text_drawf(&gold_text, str, 0, -20, A_HMIDDLE, A_BOTTOM, 1); - + */ /* Don't draw menu, if quit is true */ if(show_menu && !quit) @@ -329,6 +320,8 @@ process_save_load_game_menu(false); } + texture_draw(&logo, 160, 30); + mouse_cursor->draw(); flipscreen(); @@ -345,8 +338,7 @@ /* Free surfaces: */ texture_free(&bkg_title); - texture_free(&anim1); - texture_free(&anim2); + texture_free(&logo); string_list_free(&level_subsets); /* Return to main! */ Index: setup.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/setup.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- setup.cpp 28 Mar 2004 12:41:11 -0000 1.22 +++ setup.cpp 9 Apr 2004 00:49:47 -0000 1.23 @@ -359,6 +359,7 @@ game_menu = new Menu(); highscore_menu = new Menu(); + main_menu->set_pos(screen->w/2, 350); main_menu->additem(MN_LABEL,"Main Menu",0,0); main_menu->additem(MN_HL,"",0,0); main_menu->additem(MN_ACTION,"Start Game",0,0); @@ -366,8 +367,8 @@ main_menu->additem(MN_GOTO,"Options",0,options_menu); main_menu->additem(MN_ACTION,"Level editor",0,0); main_menu->additem(MN_ACTION,"Credits",0,0); - main_menu->additem(MN_HL,"",0,0); main_menu->additem(MN_ACTION,"Quit",0,0); + main_menu->additem(MN_HL,"",0,0); options_menu->additem(MN_LABEL,"Options",0,0); options_menu->additem(MN_HL,"",0,0); Index: supertux.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/supertux.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- supertux.cpp 24 Mar 2004 14:35:11 -0000 1.4 +++ supertux.cpp 9 Apr 2004 00:49:47 -0000 1.5 @@ -38,8 +38,6 @@ } else { - done = intro(); - done = 0; while (!done) |