[Scummvm-cvs-logs] SF.net SVN: scummvm:[45410] scummvm/trunk/engines/sci/gui
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Oct 26 19:09:21 CET 2009
Revision: 45410
http://scummvm.svn.sourceforge.net/scummvm/?rev=45410&view=rev
Author: thebluegr
Date: 2009-10-26 18:09:21 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
Removed some duplicate code
Modified Paths:
--------------
scummvm/trunk/engines/sci/gui/gui_gfx.cpp
scummvm/trunk/engines/sci/gui/gui_gfx.h
Modified: scummvm/trunk/engines/sci/gui/gui_gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-26 16:01:34 UTC (rev 45409)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-26 18:09:21 UTC (rev 45410)
@@ -257,18 +257,7 @@
end.y += _curPort->top;
}
-byte SciGuiGfx::CharHeight(int16 ch) {
-#if 0
- CResFont *res = getResFont();
- return res ? res->getCharH(ch) : 0;
-#endif
- return 0;
-}
//-----------------------------
-byte SciGuiGfx::CharWidth(int16 ch) {
- SciGuiFont *font = GetFont();
- return font ? font->getCharWidth(ch) : 0;
-}
void SciGuiGfx::ClearChar(int16 chr) {
if (_curPort->penMode != 1)
@@ -277,7 +266,7 @@
rect.top = _curPort->curTop;
rect.bottom = rect.top + _curPort->fontHeight;
rect.left = _curPort->curLeft;
- rect.right = rect.left + CharWidth(chr);
+ rect.right = rect.left + GetFont()->getCharWidth(chr);
EraseRect(rect);
}
@@ -285,7 +274,7 @@
chr = chr & 0xFF;
ClearChar(chr);
StdChar(chr);
- _curPort->curLeft += CharWidth(chr);
+ _curPort->curLeft += GetFont()->getCharWidth(chr);
}
void SciGuiGfx::StdChar(int16 chr) {
@@ -806,7 +795,7 @@
_texteditCursorRect.left = rect.left + textWidth;
_texteditCursorRect.top = rect.top;
_texteditCursorRect.bottom = _texteditCursorRect.top + _font->getHeight();
- _texteditCursorRect.right = _texteditCursorRect.left + (text[curPos] == 0 ? 1 : CharWidth(text[curPos]));
+ _texteditCursorRect.right = _texteditCursorRect.left + (text[curPos] == 0 ? 1 : _font->getCharWidth(text[curPos]));
InvertRect(_texteditCursorRect);
BitsShow(_texteditCursorRect);
_texteditCursorVisible = true;
Modified: scummvm/trunk/engines/sci/gui/gui_gfx.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.h 2009-10-26 16:01:34 UTC (rev 45409)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.h 2009-10-26 18:09:21 UTC (rev 45410)
@@ -76,8 +76,6 @@
void OffsetRect(Common::Rect &r);
void OffsetLine(Common::Point &start, Common::Point &end);
- byte CharHeight(int16 ch);
- byte CharWidth(int16 ch);
void ClearChar(int16 chr);
void DrawChar(int16 chr);
void StdChar(int16 chr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list