LevelSubset::~LevelSubset()
{
- delete image;
+ delete image;
}
void LevelSubset::create(const std::string& subset_name)
Level::~Level()
{
- free_gfx();
+ delete img_bkgd;
}
void
snprintf(fname, 1024, "%s/background/%s", st_dir, bkgd_image.c_str());
if(!faccessible(fname))
snprintf(fname, 1024, "%s/images/background/%s", datadir.c_str(), bkgd_image.c_str());
+ delete img_bkgd;
img_bkgd = new Surface(fname, IGNORE_ALPHA);
}
else
{
+ delete img_bkgd;
img_bkgd = 0;
}
}
-void
-Level::free_gfx()
-{
- delete img_bkgd;
-}
-
/* Load a level-specific graphic... */
void
Level::load_image(Surface** ptexture, string theme,const char * file, int use_alpha)
flipscreen();
}
- le_quit();
return done;
}
if(i)
{
- le_current_level->free_gfx();
le_current_level->load_gfx();
}
le_set_defaults();
- le_current_level->free_gfx();
le_current_level->load_gfx();
le_world.activate_bad_guys();
delete le_current_level;
le_current_level = 0;
+ delete le_level_subset;
+ le_level_subset = 0;
for(TileGroupsMap::iterator i = tilegroups_map.begin();
i != tilegroups_map.end(); ++i)