Make sure the image cache is flushed when a new builder object is created,
also make sure the existance cache is flushed. The previous behaviour caused the upcomming themable offmap tile to fail.
This commit is contained in:
parent
745a49d8e8
commit
b4c9f875fe
2 changed files with 5 additions and 0 deletions
|
@ -130,6 +130,10 @@ const terrain_builder::tile& terrain_builder::tilemap::operator[] (const gamemap
|
|||
terrain_builder::terrain_builder(const config& cfg, const config& level, const gamemap& gmap) :
|
||||
map_(gmap), tile_map_(gmap.w(), gmap.h())
|
||||
{
|
||||
// make sure there's nothing left in the cache since it might
|
||||
// give problems
|
||||
image::flush_cache();
|
||||
|
||||
parse_config(cfg);
|
||||
parse_config(level);
|
||||
build_terrains();
|
||||
|
|
|
@ -89,6 +89,7 @@ void flush_cache()
|
|||
reset_cache(semi_brightened_images_);
|
||||
mini_terrain_cache.clear();
|
||||
reversed_images_.clear();
|
||||
image_existance_map.clear();
|
||||
}
|
||||
|
||||
int locator::last_index_ = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue