[Scummvm-cvs-logs] SF.net SVN: scummvm:[55179] scummvm/trunk/engines/sci/graphics

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Jan 9 01:32:26 CET 2011


Revision: 55179
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55179&view=rev
Author:   thebluegr
Date:     2011-01-09 00:32:26 +0000 (Sun, 09 Jan 2011)

Log Message:
-----------
SCI: Changed the bShow parameter of GfxText16:Box() into a bool

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/controls.cpp
    scummvm/trunk/engines/sci/graphics/paint16.cpp
    scummvm/trunk/engines/sci/graphics/ports.cpp
    scummvm/trunk/engines/sci/graphics/text16.cpp
    scummvm/trunk/engines/sci/graphics/text16.h

Modified: scummvm/trunk/engines/sci/graphics/controls.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/controls.cpp	2011-01-08 23:16:44 UTC (rev 55178)
+++ scummvm/trunk/engines/sci/graphics/controls.cpp	2011-01-09 00:32:26 UTC (rev 55179)
@@ -78,9 +78,9 @@
 	// They "fixed" this in SQ4 by having the arrow character start one pixel line later, we don't adjust there
 	if (g_sci->getGameId() != GID_SQ4)
 		workerRect.top++;
-	_text16->Box(controlListUpArrow, 0, workerRect, SCI_TEXT16_ALIGNMENT_CENTER, 0);
+	_text16->Box(controlListUpArrow, false, workerRect, SCI_TEXT16_ALIGNMENT_CENTER, 0);
 	workerRect.top = workerRect.bottom - 10;
-	_text16->Box(controlListDownArrow, 0, workerRect, SCI_TEXT16_ALIGNMENT_CENTER, 0);
+	_text16->Box(controlListDownArrow, false, workerRect, SCI_TEXT16_ALIGNMENT_CENTER, 0);
 
 	// Draw inner lines
 	workerRect.top = rect.top + 9;
@@ -261,7 +261,7 @@
 			g_sci->getVocabulary()->checkAltInput(text, cursorPos);
 		texteditCursorErase();
 		_paint16->eraseRect(rect);
-		_text16->Box(text.c_str(), 0, rect, SCI_TEXT16_ALIGNMENT_LEFT, -1);
+		_text16->Box(text.c_str(), false, rect, SCI_TEXT16_ALIGNMENT_LEFT, -1);
 		_paint16->bitsShow(rect);
 		texteditCursorDraw(rect, text.c_str(), cursorPos);
 		_text16->SetFont(oldFontId);
@@ -300,7 +300,7 @@
 		_paint16->frameRect(rect);
 		rect.grow(-2);
 		_ports->textGreyedOutput(style & 1 ? false : true);
-		_text16->Box(text, 0, rect, SCI_TEXT16_ALIGNMENT_CENTER, fontId);
+		_text16->Box(text, false, rect, SCI_TEXT16_ALIGNMENT_CENTER, fontId);
 		_ports->textGreyedOutput(false);
 		rect.grow(1);
 		if (style & SCI_CONTROLS_STYLE_SELECTED)
@@ -328,7 +328,7 @@
 		rect.grow(1);
 		_paint16->eraseRect(rect);
 		rect.grow(-1);
-		_text16->Box(text, 0, rect, alignment, fontId);
+		_text16->Box(text, false, rect, alignment, fontId);
 		if (style & SCI_CONTROLS_STYLE_SELECTED) {
 			_paint16->frameRect(rect);
 		}
@@ -349,7 +349,7 @@
 	_texteditCursorVisible = false;
 	texteditCursorErase();
 	_paint16->eraseRect(rect);
-	_text16->Box(text, 0, textRect, SCI_TEXT16_ALIGNMENT_LEFT, fontId);
+	_text16->Box(text, false, textRect, SCI_TEXT16_ALIGNMENT_LEFT, fontId);
 	_paint16->frameRect(rect);
 	if (style & SCI_CONTROLS_STYLE_SELECTED) {
 		_text16->SetFont(fontId);

Modified: scummvm/trunk/engines/sci/graphics/paint16.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.cpp	2011-01-08 23:16:44 UTC (rev 55178)
+++ scummvm/trunk/engines/sci/graphics/paint16.cpp	2011-01-09 00:32:26 UTC (rev 55179)
@@ -594,7 +594,7 @@
 		result = bitsSave(rect, GFX_SCREEN_MASK_VISUAL);
 	if (colorBack != -1)
 		fillRect(rect, GFX_SCREEN_MASK_VISUAL, colorBack, 0, 0);
-	_text16->Box(text, 0, rect, alignment, -1);
+	_text16->Box(text, false, rect, alignment, -1);
 	if (_screen->_picNotValid == 0 && bRedraw)
 		bitsShow(rect);
 	// restoring port and cursor pos

Modified: scummvm/trunk/engines/sci/graphics/ports.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/ports.cpp	2011-01-08 23:16:44 UTC (rev 55178)
+++ scummvm/trunk/engines/sci/graphics/ports.cpp	2011-01-09 00:32:26 UTC (rev 55179)
@@ -415,7 +415,7 @@
 				if (!pWnd->title.empty()) {
 					int16 oldcolor = getPort()->penClr;
 					penColor(_screen->getColorWhite());
-					_text16->Box(pWnd->title.c_str(), 1, r, SCI_TEXT16_ALIGNMENT_CENTER, 0);
+					_text16->Box(pWnd->title.c_str(), true, r, SCI_TEXT16_ALIGNMENT_CENTER, 0);
 					penColor(oldcolor);
 				}
 

Modified: scummvm/trunk/engines/sci/graphics/text16.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/text16.cpp	2011-01-08 23:16:44 UTC (rev 55178)
+++ scummvm/trunk/engines/sci/graphics/text16.cpp	2011-01-09 00:32:26 UTC (rev 55179)
@@ -403,7 +403,7 @@
 }
 
 // Draws a text in rect.
-void GfxText16::Box(const char *text, int16 bshow, const Common::Rect &rect, TextAlignment alignment, GuiResourceId fontId) {
+void GfxText16::Box(const char *text, bool show, const Common::Rect &rect, TextAlignment alignment, GuiResourceId fontId) {
 	int16 textWidth, maxTextWidth, textHeight, charCount;
 	int16 offset = 0;
 	int16 hline = 0;
@@ -448,7 +448,7 @@
 		}
 		_ports->moveTo(rect.left + offset, rect.top + hline);
 
-		if (bshow) {
+		if (show) {
 			Show(text, 0, charCount, fontId, previousPenColor);
 		} else {
 			Draw(text, 0, charCount, fontId, previousPenColor);

Modified: scummvm/trunk/engines/sci/graphics/text16.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/text16.h	2011-01-08 23:16:44 UTC (rev 55178)
+++ scummvm/trunk/engines/sci/graphics/text16.h	2011-01-09 00:32:26 UTC (rev 55179)
@@ -62,7 +62,7 @@
 	int16 Size(Common::Rect &rect, const char *text, GuiResourceId fontId, int16 maxWidth);
 	void Draw(const char *text, int16 from, int16 len, GuiResourceId orgFontId, int16 orgPenColor);
 	void Show(const char *text, int16 from, int16 len, GuiResourceId orgFontId, int16 orgPenColor);
-	void Box(const char *text, int16 bshow, const Common::Rect &rect, TextAlignment alignment, GuiResourceId fontId);
+	void Box(const char *text, bool show, const Common::Rect &rect, TextAlignment alignment, GuiResourceId fontId);
 	void DrawString(const char *text);
 	void DrawStatus(const char *text);
 


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