1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

- fixed wrong battlefield (#961)

- minor tweaks
This commit is contained in:
Ivan Savenko
2012-05-19 11:47:26 +00:00
parent 7116377e4e
commit 6f6cd6814e
6 changed files with 29 additions and 26 deletions

View File

@ -279,6 +279,9 @@ void CSDL_Ext::printAt( const std::string & text, int dstX, int dstY, EFonts fon
int lineBegin = std::max<int>(0, clipRect.y - dstY);
int lineEnd = std::min<int>(f->height, clipRect.y + clipRect.h - dstY - 1);
int rowBegin = std::max(0, clipRect.x - dstX);
int rowEnd = std::min(f->chars[symbol].width, clipRect.x + clipRect.w - dstX - 1);
//for each line in symbol
for(int dy = lineBegin; dy <lineEnd; dy++)
{
@ -288,9 +291,6 @@ void CSDL_Ext::printAt( const std::string & text, int dstX, int dstY, EFonts fon
dstLine += (dstY+dy) * dst->pitch + dstX * bpp;
srcLine += dy * f->chars[symbol].width;
int rowBegin = std::max(0, clipRect.x - dstX);
int rowEnd = std::min(f->chars[symbol].width, clipRect.x + clipRect.w - dstX - 1);
//for each column in line
for(int dx = rowBegin; dx < rowEnd; dx++)
{