aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorChristoph Mallon2012-03-13 10:40:41 +0100
committerAlyssa Milburn2012-03-13 15:43:36 +0100
commit75efdd2d84e21f5d3d01afcc89d61289ae87e4a2 (patch)
treef62ab385a4a0a483b894f91709dc7764bcec79ab /engines/sci/graphics
parent337d5da913477889e9b2312ecce02e52c5ddf803 (diff)
downloadscummvm-rg350-75efdd2d84e21f5d3d01afcc89d61289ae87e4a2.tar.gz
scummvm-rg350-75efdd2d84e21f5d3d01afcc89d61289ae87e4a2.tar.bz2
scummvm-rg350-75efdd2d84e21f5d3d01afcc89d61289ae87e4a2.zip
JANITORIAL: Replace (x ? false : true) by !(x).
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/controls16.cpp2
-rw-r--r--engines/sci/graphics/menu.cpp4
-rw-r--r--engines/sci/graphics/paint16.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/graphics/controls16.cpp b/engines/sci/graphics/controls16.cpp
index ab54e468d1..7c09969717 100644
--- a/engines/sci/graphics/controls16.cpp
+++ b/engines/sci/graphics/controls16.cpp
@@ -297,7 +297,7 @@ void GfxControls16::kernelDrawButton(Common::Rect rect, reg_t obj, const char *t
_paint16->eraseRect(rect);
_paint16->frameRect(rect);
rect.grow(-2);
- _ports->textGreyedOutput(style & 1 ? false : true);
+ _ports->textGreyedOutput(!(style & SCI_CONTROLS_STYLE_ENABLED));
_text16->Box(text, false, rect, SCI_TEXT16_ALIGNMENT_CENTER, fontId);
_ports->textGreyedOutput(false);
rect.grow(1);
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index 673729784f..47f34cf99d 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -286,7 +286,7 @@ void GfxMenu::kernelSetAttribute(uint16 menuId, uint16 itemId, uint16 attributeI
switch (attributeId) {
case SCI_MENU_ATTRIBUTE_ENABLED:
- itemEntry->enabled = value.isNull() ? false : true;
+ itemEntry->enabled = !value.isNull();
break;
case SCI_MENU_ATTRIBUTE_SAID:
itemEntry->saidVmPtr = value;
@@ -606,7 +606,7 @@ void GfxMenu::drawMenu(uint16 oldMenuId, uint16 newMenuId) {
listItemEntry = *listItemIterator;
if (listItemEntry->menuId == newMenuId) {
if (!listItemEntry->separatorLine) {
- _ports->textGreyedOutput(listItemEntry->enabled ? false : true);
+ _ports->textGreyedOutput(!listItemEntry->enabled);
_ports->moveTo(_menuRect.left, topPos);
_text16->DrawString(listItemEntry->textSplit.c_str());
_ports->moveTo(_menuRect.right - listItemEntry->textRightAlignedWidth - 5, topPos);
diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp
index 23177dfc7b..c951f3349d 100644
--- a/engines/sci/graphics/paint16.cpp
+++ b/engines/sci/graphics/paint16.cpp
@@ -513,7 +513,7 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) {
argc--; argv++;
break;
case SCI_DISPLAY_SETGREYEDOUTPUT:
- _ports->textGreyedOutput(argv[0].isNull() ? false : true);
+ _ports->textGreyedOutput(!argv[0].isNull());
argc--; argv++;
break;
case SCI_DISPLAY_SETFONT: