yeti cleanup and death animation rework, hitbox fix ups
[supertux.git] / src / misc.cpp
1 //  $Id$
2 //
3 //  SuperTux
4 //  Copyright (C) 2004 Tobas Glaesser <tobi.web@gmx.de>
5 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
6 //
7 //  This program is free software; you can redistribute it and/or
8 //  modify it under the terms of the GNU General Public License
9 //  as published by the Free Software Foundation; either version 2
10 //  of the License, or (at your option) any later version.
11 //
12 //  This program is distributed in the hope that it will be useful,
13 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 //  GNU General Public License for more details.
16 //
17 //  You should have received a copy of the GNU General Public License
18 //  along with this program; if not, write to the Free Software
19 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20 #include <config.h>
21
22 #include "misc.hpp"
23 #include "main.hpp"
24 #include "gameconfig.hpp"
25 #include "game_session.hpp"
26 #include "gui/menu.hpp"
27 #include "gui/button.hpp"
28 #include "audio/sound_manager.hpp"
29 #include "title.hpp"
30 #include "resources.hpp"
31 #include "worldmap.hpp"
32 #include "gettext.hpp"
33 #include "options_menu.hpp"
34 #include "control/joystickkeyboardcontroller.hpp"
35
36 Menu* main_menu      = 0;
37 Menu* game_menu      = 0;
38
39 void setup_menu()
40 {
41   main_menu      = new Menu();
42   game_menu      = new Menu();
43   worldmap_menu  = new Menu();
44
45   main_menu->set_pos(SCREEN_WIDTH/2, 335);
46   main_menu->add_entry(MNID_STARTGAME, _("Start Game"));
47   main_menu->add_entry(MNID_LEVELS_CONTRIB, _("Contrib Levels"));
48   main_menu->add_submenu(_("Options"), get_options_menu());
49   main_menu->add_entry(MNID_CREDITS, _("Credits"));
50   main_menu->add_entry(MNID_QUITMAINMENU, _("Quit"));
51   
52   game_menu->add_label(_("Pause"));
53   game_menu->add_hl();
54   game_menu->add_entry(MNID_CONTINUE, _("Continue"));
55   game_menu->add_submenu(_("Options"), get_options_menu());
56   game_menu->add_hl();
57   game_menu->add_entry(MNID_ABORTLEVEL, _("Abort Level"));
58
59   worldmap_menu->add_label(_("Pause"));
60   worldmap_menu->add_hl();
61   worldmap_menu->add_entry(WorldMapNS::MNID_RETURNWORLDMAP, _("Continue"));
62   worldmap_menu->add_submenu(_("Options"), get_options_menu());
63   worldmap_menu->add_hl();
64   worldmap_menu->add_entry(WorldMapNS::MNID_QUITWORLDMAP, _("Quit Game"));
65 }
66
67 void free_menu()
68 {
69   delete worldmap_menu;
70   delete main_menu;
71   delete game_menu;
72   free_options_menu();
73 }
74