aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-04-25 15:44:11 +0000
committerMartin Kiewitz2010-04-25 15:44:11 +0000
commitc893ba1508ac849c34ca555496a3eb465192a362 (patch)
tree31c4253a0e1b2ef6547584a035429d859cc13b59
parent482e89ea9f5f3b9ada2d1efa7feafdf22c7176dc (diff)
downloadscummvm-rg350-c893ba1508ac849c34ca555496a3eb465192a362.tar.gz
scummvm-rg350-c893ba1508ac849c34ca555496a3eb465192a362.tar.bz2
scummvm-rg350-c893ba1508ac849c34ca555496a3eb465192a362.zip
SCI: replaced value with constant when checking if controls are selected
svn-id: r48795
-rw-r--r--engines/sci/engine/kgraphics.cpp2
-rw-r--r--engines/sci/graphics/controls.cpp8
-rw-r--r--engines/sci/graphics/controls.h6
3 files changed, 8 insertions, 8 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 732041d820..b7e5728fb0 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -872,7 +872,7 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) {
// 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);
diff --git a/engines/sci/graphics/controls.cpp b/engines/sci/graphics/controls.cpp
index 6f133815a5..6ffb316924 100644
--- a/engines/sci/graphics/controls.cpp
+++ b/engines/sci/graphics/controls.cpp
@@ -248,7 +248,7 @@ void GfxControls::kernelDrawButton(Common::Rect rect, reg_t obj, const char *tex
_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 @@ void GfxControls::kernelDrawText(Common::Rect rect, reg_t obj, const char *text,
_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 @@ void GfxControls::kernelDrawTextEdit(Common::Rect rect, reg_t obj, const char *t
_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 @@ void GfxControls::kernelDrawList(Common::Rect rect, reg_t obj, int16 maxChars, i
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())
diff --git a/engines/sci/graphics/controls.h b/engines/sci/graphics/controls.h
index af8972f156..9beaebe532 100644
--- a/engines/sci/graphics/controls.h
+++ b/engines/sci/graphics/controls.h
@@ -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