- cleaned up title screen a bit
authorIngo Ruhnke <grumbel@gmx.de>
Fri, 9 Apr 2004 00:49:47 +0000 (00:49 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Fri, 9 Apr 2004 00:49:47 +0000 (00:49 +0000)
SVN-Revision: 434

src/menu.cpp
src/setup.cpp
src/supertux.cpp
src/title.cpp

index c338f49..35f602d 100644 (file)
@@ -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,
         /* 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,
         fillrect(x, y + 6,
                  menu_width, 2,
-                 0,0,0,255);
+                 255,255,255,255);
         break;
       }
     case MN_LABEL:
         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,
   /* 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)
     {
 
   for(int i = 0; i < num_items; ++i)
     {
index 15e6ba0..7dfc780 100644 (file)
@@ -359,6 +359,7 @@ void st_menu(void)
   game_menu      = new Menu();
   highscore_menu = new Menu();
 
   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);
   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_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_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);
 
   options_menu->additem(MN_LABEL,"Options",0,0);
   options_menu->additem(MN_HL,"",0,0);
index 26da3cf..d43ca9e 100644 (file)
@@ -38,8 +38,6 @@ int main(int argc, char * argv[])
     }
   else
     {  
     }
   else
     {  
-      done = intro();
-  
       done = 0;
   
       while (!done)
       done = 0;
   
       while (!done)
index 5b55235..bec3b11 100644 (file)
 void loadshared(void);
 void activate_particle_systems(void);
 
 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 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;
 
 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);
   /* 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 --- */
 }
 
 /* --- TITLE SCREEN --- */
@@ -74,7 +66,6 @@ void draw_background()
 int title(void)
 {
   int done;
 int title(void)
 {
   int done;
-  char str[80];
   string_list_type level_subsets;
   st_subset subset;
   level_subsets = dsubdirs("/levels", "info");
   string_list_type level_subsets;
   st_subset subset;
   level_subsets = dsubdirs("/levels", "info");
@@ -100,9 +91,8 @@ int title(void)
 
   /* Load images: */
 
 
   /* 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: --- */
   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: */
       /* 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);
       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)
 
       /* 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);
         }
 
           process_save_load_game_menu(false);
         }
 
+      texture_draw(&logo, 160, 30);
+
       mouse_cursor->draw();
       
       flipscreen();
       mouse_cursor->draw();
       
       flipscreen();
@@ -345,8 +338,7 @@ int title(void)
   /* Free surfaces: */
 
   texture_free(&bkg_title);
   /* Free surfaces: */
 
   texture_free(&bkg_title);
-  texture_free(&anim1);
-  texture_free(&anim2);
+  texture_free(&logo);
   string_list_free(&level_subsets);
 
   /* Return to main! */
   string_list_free(&level_subsets);
 
   /* Return to main! */