1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00
- recreate adventure map interface on each scenario (to make sure that
there is no garbage data from prev. game)
- added check to avoid such situations in future
This commit is contained in:
Ivan Savenko
2013-12-20 15:00:48 +00:00
parent 68bdf71db6
commit 41cb1603e1
3 changed files with 25 additions and 12 deletions

View File

@@ -680,10 +680,12 @@ void CMapHandler::terrainRect( int3 top_tile, ui8 anim, const std::vector< std::
if (pos.x < 0 || pos.x >= sizes.x ||
pos.y < 0 || pos.y >= sizes.y)
{
// outside of the map - print borders
SDL_Rect temp_rect = genRect(sr.h, sr.w, 0, 0);
SDL_Surface * src = ttiles[pos.x][pos.y][top_tile.z].terbitmap;
assert(src);
CSDL_Ext::blitSurface(ttiles[pos.x][pos.y][top_tile.z].terbitmap,
&temp_rect,extSurf,&sr);
CSDL_Ext::blitSurface(src, &temp_rect,extSurf,&sr);
}
else
{