message_displayed = true;
Sector::current()->get_level()->stats.secrets++;
- // FIXME: testing only
- // fade away tilemaps named "secret"
- Sector& sector = *Sector::current();
- for(Sector::GameObjects::iterator i = sector.gameobjects.begin(); i != sector.gameobjects.end(); ++i) {
- TileMap* tm = dynamic_cast<TileMap*>(*i);
- if (!tm) continue;
- if (tm->get_name() != fade_tilemap) continue;
- tm->fade(0.0, 1.0);
+ if (fade_tilemap != "") {
+ // fade away tilemaps
+ Sector& sector = *Sector::current();
+ for(Sector::GameObjects::iterator i = sector.gameobjects.begin(); i != sector.gameobjects.end(); ++i) {
+ TileMap* tm = dynamic_cast<TileMap*>(*i);
+ if (!tm) continue;
+ if (tm->get_name() != fade_tilemap) continue;
+ tm->fade(0.0, 1.0);
+ }
}
}