SurfacePtr Resources::arrow_left;
SurfacePtr Resources::arrow_right;
-TileSet* Resources::general_tiles;
-TileSet* Resources::worldmap_tiles;
-TileSet* Resources::iceworld_tiles;
-
/* Load graphics/sounds shared between all levels: */
void
Resources::load_shared()
tile_manager = new TileManager();
sprite_manager = new SpriteManager();
-
- /* Create a reference to tilesets */
- general_tiles = tile_manager->get_tileset("images/tiles.strf");
- worldmap_tiles = tile_manager->get_tileset("images/worldmap.strf");
- iceworld_tiles = tile_manager->get_tileset("images/ice_world.strf");
}
/* Free shared data: */
big_font.reset();
/* Free tilesets */
- delete worldmap_tiles;
- worldmap_tiles = NULL;
- delete general_tiles;
- general_tiles = NULL;
- delete iceworld_tiles;
- iceworld_tiles = NULL;
+ for(TileManager::TileSets::iterator it = tile_manager->tilesets.begin();
+ it != tile_manager->tilesets.end(); ++it)
+ {
+ delete it->second;
+ it->second = NULL;
+ }
delete sprite_manager;
sprite_manager = NULL;
static SurfacePtr back;
static SurfacePtr arrow_left;
static SurfacePtr arrow_right;
-
-private:
- static TileSet* general_tiles;
- static TileSet* worldmap_tiles;
- static TileSet* iceworld_tiles;
public:
static void load_shared();