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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Sun Apr 25 17:44:11 CEST 2010


Revision: 48795
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48795&view=rev
Author:   m_kiewitz
Date:     2010-04-25 15:44:11 +0000 (Sun, 25 Apr 2010)

Log Message:
-----------
SCI: replaced value with constant when checking if controls are selected

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/graphics/controls.cpp
    scummvm/trunk/engines/sci/graphics/controls.h

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-04-25 15:20:52 UTC (rev 48794)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-04-25 15:44:11 UTC (rev 48795)
@@ -872,7 +872,7 @@
 	// change the directory where saved games are placed
 	if (objName == "changeDirI") {
 		int state = GET_SEL32V(s->_segMan, controlObject, SELECTOR(state));
-		PUT_SEL32V(s->_segMan, controlObject, SELECTOR(state), (state | kControlStateDisabled) & ~kControlStateEnabled);
+		PUT_SEL32V(s->_segMan, controlObject, SELECTOR(state), (state | SCI_CONTROLS_STYLE_DISABLED) & ~SCI_CONTROLS_STYLE_ENABLED);
 	}
 
 	_k_GenericDrawControl(s, controlObject, false);

Modified: scummvm/trunk/engines/sci/graphics/controls.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/controls.cpp	2010-04-25 15:20:52 UTC (rev 48794)
+++ scummvm/trunk/engines/sci/graphics/controls.cpp	2010-04-25 15:44:11 UTC (rev 48795)
@@ -248,7 +248,7 @@
 		_text16->Box(text, 0, rect, SCI_TEXT16_ALIGNMENT_CENTER, fontId);
 		_ports->textGreyedOutput(false);
 		rect.grow(1);
-		if (style & 8) // selected
+		if (style & SCI_CONTROLS_STYLE_SELECTED)
 			_paint16->frameRect(rect);
 		if (!getPicNotValid()) {
 			rect.grow(1);
@@ -266,7 +266,7 @@
 		_paint16->eraseRect(rect);
 		rect.grow(-1);
 		_text16->Box(text, 0, rect, alignment, fontId);
-		if (style & 8) { // selected
+		if (style & SCI_CONTROLS_STYLE_SELECTED) {
 			_paint16->frameRect(rect);
 		}
 		rect.grow(1);
@@ -288,7 +288,7 @@
 	_paint16->eraseRect(rect);
 	_text16->Box(text, 0, textRect, SCI_TEXT16_ALIGNMENT_LEFT, fontId);
 	_paint16->frameRect(rect);
-	if (style & 8) {
+	if (style & SCI_CONTROLS_STYLE_SELECTED) {
 		_text16->SetFont(fontId);
 		rect.grow(-1);
 		texteditCursorDraw(rect, text, cursorPos);
@@ -317,7 +317,7 @@
 	if (!hilite) {
 		drawListControl(rect, obj, maxChars, count, entries, fontId, upperPos, cursorPos, isAlias);
 		rect.grow(1);
-		if (isAlias && (style & 8)) {
+		if (isAlias && (style & SCI_CONTROLS_STYLE_SELECTED)) {
 			_paint16->frameRect(rect);
 		}
 		if (!getPicNotValid())

Modified: scummvm/trunk/engines/sci/graphics/controls.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/controls.h	2010-04-25 15:20:52 UTC (rev 48794)
+++ scummvm/trunk/engines/sci/graphics/controls.h	2010-04-25 15:44:11 UTC (rev 48795)
@@ -29,9 +29,9 @@
 namespace Sci {
 
 enum controlStateFlags {
-	kControlStateEnabled      = 0x0001,  ///< 0001 - enabled buttons
-	kControlStateDisabled     = 0x0004,  ///< 0010 - grayed out buttons
-	kControlStateFramed       = 0x0008   ///< 1000 - widgets surrounded by a frame
+	SCI_CONTROLS_STYLE_ENABLED  = 0x0001,  ///< 0001 - enabled buttons
+	SCI_CONTROLS_STYLE_DISABLED = 0x0004,  ///< 0010 - grayed out buttons
+	SCI_CONTROLS_STYLE_SELECTED = 0x0008   ///< 1000 - widgets surrounded by a frame
 };
 
 // Control types and flags


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