X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fresources.h;h=35f264f9eeb8763c59008960a5473f52fa776a00;hb=99095f57c0c103f77fe0a12624450e6f99435830;hp=18e4ecbb90bfafcfff78a19654eb88439a1c0929;hpb=236df51d91f0845cd4e06b3269e262911d81f5db;p=supertux.git diff --git a/src/resources.h b/src/resources.h index 18e4ecbb9..35f264f9e 100644 --- a/src/resources.h +++ b/src/resources.h @@ -16,60 +16,53 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - #ifndef SUPERTUX_RESOURCES_H #define SUPERTUX_RESOURCES_H #include "audio/musicref.h" +using namespace SuperTux; + class SpriteManager; +class Menu; +class Font; +class Surface; class SoundManager; - -/* Sound files: */ -enum { - SND_JUMP, - SND_BIGJUMP, - SND_SKID, - SND_DISTRO, - SND_HERRING, - SND_BRICK, - SND_HURT, - SND_SQUISH, - SND_FALL, - SND_RICOCHET, - SND_BUMP_UPGRADE, - SND_UPGRADE, - SND_EXCELLENT, - SND_COFFEE, - SND_SHOOT, - SND_LIFEUP, - SND_STOMP, - SND_KICK, - SND_EXPLODE, - NUM_SOUNDS -}; - -extern char* soundfilenames[NUM_SOUNDS]; - -extern Surface* img_waves[3]; -extern Surface* img_water; -extern Surface* img_pole; -extern Surface* img_poletop; -extern Surface* img_flag[2]; -extern Surface* img_cloud[2][4]; +class TileManager; extern Surface* img_super_bkgd; +extern Surface* tux_life; extern MusicRef herring_song; extern MusicRef level_end_song; extern SpriteManager* sprite_manager; +extern TileManager* tile_manager; extern SoundManager* sound_manager; -void loadshared(); -void unloadshared(); +extern Menu* contrib_menu; +extern Menu* contrib_subset_menu; +extern Menu* main_menu; +extern Menu* game_menu; +extern Menu* options_menu; +extern Menu* load_game_menu; -#endif +extern Font* gold_text; +extern Font* white_text; +extern Font* blue_text; +extern Font* gray_text; +extern Font* white_small_text; +extern Font* white_big_text; +extern Font* yellow_nums; -/* EOF */ +/** maps a virtual resource path to a real path (ie. levels/bla is mapped to + * $DATADIR/levels/bla or $HOME/.supertux/levels/bla) + * All paths inside the game should be handled in as virtual paths and then + * expanded with this function just before the call to fopen or std::ifstream. + */ +std::string get_resource_filename(const std::string& resource); +void load_shared(); +void unload_shared(); + +#endif