X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fresources.h;h=dee4ee003905e43572012dd062ba06d9b16ae354;hb=6f988a2dfbe4de1096a5ca6a4b30e7fc5355316c;hp=1287060a9c362c8cf3af286b2e45792dd84bf553;hpb=76d092bebada7aca0db7435a2810ce749816a056;p=supertux.git diff --git a/src/resources.h b/src/resources.h index 1287060a9..dee4ee003 100644 --- a/src/resources.h +++ b/src/resources.h @@ -21,15 +21,19 @@ #define SUPERTUX_RESOURCES_H #include "audio/musicref.h" -#include "gui/menu.h" using namespace SuperTux; namespace SuperTux { class SpriteManager; class SoundManager; +class Menu; +class Font; +class Surface; } +class TileManager; + /* Sound files: */ enum { SND_JUMP, @@ -58,20 +62,13 @@ enum { 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]; - extern Surface* img_super_bkgd; extern MusicRef herring_song; extern MusicRef level_end_song; extern SpriteManager* sprite_manager; -extern SoundManager* sound_manager; +extern TileManager* tile_manager; extern Menu* contrib_menu; extern Menu* contrib_subset_menu; @@ -92,10 +89,14 @@ extern Font* white_small_text; extern Font* white_big_text; extern Font* yellow_nums; +/** 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 loadshared(); void unloadshared(); #endif - -/* EOF */ -