mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 22:54:24 +00:00
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
@ -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…
x
Reference in New Issue
Block a user