From: Ingo Ruhnke Date: Fri, 9 Apr 2004 00:49:47 +0000 (+0000) Subject: - cleaned up title screen a bit X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7bdfe568af536c2379a1c396524990e4463e5261;p=supertux.git - cleaned up title screen a bit SVN-Revision: 434 --- diff --git a/src/menu.cpp b/src/menu.cpp index c338f49e7..35f602d2c 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -370,10 +370,10 @@ Menu::draw_item(int index, // Position of the current item in the menu /* 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 @@ Menu::draw() /* 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) { diff --git a/src/setup.cpp b/src/setup.cpp index 15e6ba037..7dfc780a8 100644 --- a/src/setup.cpp +++ b/src/setup.cpp @@ -359,6 +359,7 @@ void st_menu(void) 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 @@ void st_menu(void) 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); diff --git a/src/supertux.cpp b/src/supertux.cpp index 26da3cfe0..d43ca9eb2 100644 --- a/src/supertux.cpp +++ b/src/supertux.cpp @@ -38,8 +38,6 @@ int main(int argc, char * argv[]) } else { - done = intro(); - done = 0; while (!done) diff --git a/src/title.cpp b/src/title.cpp index 5b5523501..bec3b11b6 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -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 @@ void draw_background() /* 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 @@ void draw_background() 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 @@ int title(void) /* 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 @@ int title(void) /* 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 @@ int title(void) process_save_load_game_menu(false); } + texture_draw(&logo, 160, 30); + mouse_cursor->draw(); flipscreen(); @@ -345,8 +338,7 @@ int title(void) /* Free surfaces: */ texture_free(&bkg_title); - texture_free(&anim1); - texture_free(&anim2); + texture_free(&logo); string_list_free(&level_subsets); /* Return to main! */