diff options
| -rw-r--r-- | engines/draci/font.cpp | 14 | ||||
| -rw-r--r-- | engines/draci/font.h | 2 | 
2 files changed, 8 insertions, 8 deletions
| diff --git a/engines/draci/font.cpp b/engines/draci/font.cpp index 2a9185e725..093b8d9d17 100644 --- a/engines/draci/font.cpp +++ b/engines/draci/font.cpp @@ -132,7 +132,7 @@ uint8 Font::getCharWidth(uint8 chr) const {   * @param ty  	Vertical offset on the surface   */ -void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, bool markDirty) const { +void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty) const {  	assert(dst != NULL);  	assert(tx >= 0);  	assert(ty >= 0); @@ -189,11 +189,6 @@ void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, bool markDirty) con  		// Advance to next row  		ptr += dst->pitch;	  	} - -	if (markDirty) { -		Common::Rect r(tx, ty, tx + xPixelsToDraw + 1, ty + yPixelsToDraw); -		dst->markDirtyRect(r); -	}  }  /** @@ -248,9 +243,14 @@ void Font::drawString(Surface *dst, const Common::String &str,  			break;  		}		 -		drawChar(dst, str[i], curx, cury, markDirty); +		drawChar(dst, str[i], curx, cury);  		curx += getCharWidth(str[i]) + spacing;  	} + +	if (markDirty) { +		Common::Rect r(x, y, x + widest, y + getStringHeight(str)); +		dst->markDirtyRect(r); +	}  }  /** diff --git a/engines/draci/font.h b/engines/draci/font.h index e81b344af1..5258108add 100644 --- a/engines/draci/font.h +++ b/engines/draci/font.h @@ -61,7 +61,7 @@ public:  	uint8 getFontHeight() const { return _fontHeight; };  	uint8 getMaxCharWidth() const { return _maxCharWidth; };  	uint8 getCharWidth(byte chr) const; -	void drawChar(Surface *dst, uint8 chr, int tx, int ty, bool markDirty = true) const; +	void drawChar(Surface *dst, uint8 chr, int tx, int ty) const;  	void drawString(Surface *dst, const byte *str, uint len, int x, int y,   					int spacing, bool markDirty = true) const; | 
