- More work on scripting interface
[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 <string>
23 #include "audio/musicref.h"
24
25 class SpriteManager;
26 class Menu;
27 class Font;
28 class Surface;
29 class SoundManager;
30 class TileManager;
31 class MouseCursor;
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 MouseCursor* mouse_cursor;
51
52 extern Font* gold_text;
53 extern Font* white_text;
54 extern Font* blue_text;
55 extern Font* gray_text;
56 extern Font* white_small_text;
57 extern Font* white_big_text;
58 extern Font* yellow_nums;
59
60 extern std::string datadir;
61 extern std::string user_dir;
62
63 /** maps a virtual resource path to a real path (ie. levels/bla is mapped to
64  * $DATADIR/levels/bla or $HOME/.supertux/levels/bla)
65  * All paths inside the game should be handled in as virtual paths and then
66  * expanded with this function just before the call to fopen or std::ifstream.
67  */
68 std::string get_resource_filename(const std::string& resource);
69
70 void load_shared();
71 void unload_shared();
72
73 #endif