35f264f9eeb8763c59008960a5473f52fa776a00
[supertux.git] / src / resources.h
1 //  $Id$
2 //
3 //  SuperTux -  A Jump'n Run
4 //  Copyright (C) 2003 Tobias Glaesser <tobi.web@gmx.de>
5 //
6 //  This program is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU General Public License
8 //  as published by the Free Software Foundation; either version 2
9 //  of the License, or (at your option) any later version.
10 //
11 //  This program is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 //  GNU General Public License for more details.
15 //
16 //  You should have received a copy of the GNU General Public License
17 //  along with this program; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19 #ifndef SUPERTUX_RESOURCES_H
20 #define SUPERTUX_RESOURCES_H
21
22 #include "audio/musicref.h"
23
24 using namespace SuperTux;
25
26 class SpriteManager;
27 class Menu;
28 class Font;
29 class Surface;
30 class SoundManager;
31 class TileManager;
32
33 extern Surface* img_super_bkgd;
34 extern Surface* tux_life;
35
36 extern MusicRef herring_song;
37 extern MusicRef level_end_song;
38
39 extern SpriteManager* sprite_manager;
40 extern TileManager* tile_manager;
41 extern SoundManager* sound_manager;
42
43 extern Menu* contrib_menu;
44 extern Menu* contrib_subset_menu;
45 extern Menu* main_menu;
46 extern Menu* game_menu;
47 extern Menu* options_menu;
48 extern Menu* load_game_menu;
49
50 extern Font* gold_text;
51 extern Font* white_text;
52 extern Font* blue_text;
53 extern Font* gray_text;
54 extern Font* white_small_text;
55 extern Font* white_big_text;
56 extern Font* yellow_nums;
57
58 /** maps a virtual resource path to a real path (ie. levels/bla is mapped to
59  * $DATADIR/levels/bla or $HOME/.supertux/levels/bla)
60  * All paths inside the game should be handled in as virtual paths and then
61  * expanded with this function just before the call to fopen or std::ifstream.
62  */
63 std::string get_resource_filename(const std::string& resource);
64
65 void load_shared();
66 void unload_shared();
67
68 #endif