X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fresources.h;h=dee4ee003905e43572012dd062ba06d9b16ae354;hb=6f988a2dfbe4de1096a5ca6a4b30e7fc5355316c;hp=2519b046f4d902dd6844e56841508e586ebcd280;hpb=d46c78c842ab4090a3f46e560c891234167f124b;p=supertux.git diff --git a/src/resources.h b/src/resources.h index 2519b046f..dee4ee003 100644 --- a/src/resources.h +++ b/src/resources.h @@ -32,6 +32,8 @@ class Font; class Surface; } +class TileManager; + /* Sound files: */ enum { SND_JUMP, @@ -60,19 +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 TileManager* tile_manager; extern Menu* contrib_menu; extern Menu* contrib_subset_menu; @@ -93,8 +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 -