move over rewritten lispreader from tuxkart (with additional fixes), generalized...
[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
20 #ifndef SUPERTUX_RESOURCES_H
21 #define SUPERTUX_RESOURCES_H
22
23 #include "audio/musicref.h"
24
25 using namespace SuperTux;
26
27 namespace SuperTux {
28 class SpriteManager;
29 class SoundManager;
30 class Menu;
31 class Font;
32 class Surface;
33 }
34
35 class TileManager;
36
37 /* Sound files: */
38 enum {
39   SND_JUMP,
40   SND_BIGJUMP,
41   SND_SKID,
42   SND_DISTRO,
43   SND_HERRING,
44   SND_BRICK,
45   SND_HURT,
46   SND_SQUISH,
47   SND_FALL,
48   SND_RICOCHET,
49   SND_BUMP_UPGRADE,
50   SND_UPGRADE,
51   SND_EXCELLENT,
52   SND_COFFEE,
53   SND_SHOOT,
54   SND_LIFEUP,
55   SND_STOMP,
56   SND_KICK,
57   SND_EXPLODE,
58   SND_WARP,
59   SND_FIREWORKS,
60   NUM_SOUNDS
61 };
62
63 extern char* soundfilenames[NUM_SOUNDS];
64
65 extern Surface* img_waves[3]; 
66 extern Surface* img_water;
67 extern Surface* img_pole;
68 extern Surface* img_poletop;
69 extern Surface* img_flag[2];
70 extern Surface* img_cloud[2][4];
71
72 extern Surface* img_super_bkgd;
73
74 extern MusicRef herring_song;
75 extern MusicRef level_end_song;
76
77 extern SpriteManager* sprite_manager;
78 extern TileManager* tile_manager;
79
80 extern Menu* contrib_menu;
81 extern Menu* contrib_subset_menu;
82 extern Menu* main_menu;
83 extern Menu* game_menu;
84 extern Menu* options_menu;
85 extern Menu* options_keys_menu;
86 extern Menu* options_joystick_menu;
87 extern Menu* highscore_menu;
88 extern Menu* load_game_menu;
89 extern Menu* save_game_menu;
90
91 extern Font* gold_text;
92 extern Font* white_text;
93 extern Font* blue_text;
94 extern Font* gray_text;
95 extern Font* white_small_text;
96 extern Font* white_big_text;
97 extern Font* yellow_nums;
98
99 // maps a virtual resource path to a real path (ie. levels/bla is mapped to
100 // $DATADIR/levels/bla or $HOME/.supertux/levels/bla)
101 std::string get_resource_filename(const std::string& resource);
102
103 void loadshared();
104 void unloadshared();
105
106 #endif
107