aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
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/kyra
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/kyra')
-rw-r--r--engines/kyra/eobcommon.cpp4
-rw-r--r--engines/kyra/gui_eob.cpp6
-rw-r--r--engines/kyra/screen_v2.cpp2
-rw-r--r--engines/kyra/sequences_hof.cpp4
-rw-r--r--engines/kyra/sprites_lol.cpp4
-rw-r--r--engines/kyra/timer_eob.cpp2
-rw-r--r--engines/kyra/vqa.cpp2
7 files changed, 12 insertions, 12 deletions
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp
index 1489e4f1f5..a63f123258 100644
--- a/engines/kyra/eobcommon.cpp
+++ b/engines/kyra/eobcommon.cpp
@@ -2066,7 +2066,7 @@ bool EoBCoreEngine::characterAttackHitTest(int charIndex, int monsterIndex, int
s = CLIP(s, 1, 20);
- return s < m ? false : true;
+ return s >= m;
}
bool EoBCoreEngine::monsterAttackHitTest(EoBMonsterInPlay *m, int charIndex) {
@@ -2300,7 +2300,7 @@ bool EoBCoreEngine::trySavingThrow(void *target, int hpModifier, int level, int
s -= constMod[c->constitutionCur];
}
- return rollDice(1, 20) < s ? false : true;
+ return rollDice(1, 20) >= s;
}
bool EoBCoreEngine::specialAttackSavingThrow(int charIndex, int type) {
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index e8e69d5b1f..76e4f0dba9 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -1876,7 +1876,7 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
processButton(buttonList);
if (v6 && buttonList->buttonCallback)
- runLoop = ((*buttonList->buttonCallback.get())(buttonList)) ? false : true;
+ runLoop = !(*buttonList->buttonCallback.get())(buttonList);
if ((flgs2 & 2) && (flgs & 0x20))
runLoop = false;
@@ -2331,7 +2331,7 @@ bool GUI_EoB::confirmDialogue2(int dim, int id, int deflt) {
_screen->setFont(of);
_screen->setScreenDim(od);
- return newHighlight ? false : true;
+ return newHighlight == 0;
}
void GUI_EoB::messageDialogue(int dim, int id, int buttonTextCol) {
@@ -3548,7 +3548,7 @@ bool GUI_EoB::confirmDialogue(int id) {
_vm->removeInputTop();
if (inputFlag == _vm->_keyMap[Common::KEYCODE_KP5] || inputFlag == _vm->_keyMap[Common::KEYCODE_SPACE] || inputFlag == _vm->_keyMap[Common::KEYCODE_RETURN]) {
- result = lastHighlight ? false : true;
+ result = lastHighlight == 0;
inputFlag = 0x8021 + lastHighlight;
runLoop = false;
} else if (inputFlag == _vm->_keyMap[Common::KEYCODE_KP4] || inputFlag == _vm->_keyMap[Common::KEYCODE_LEFT] || inputFlag == _vm->_keyMap[Common::KEYCODE_KP6] || inputFlag == _vm->_keyMap[Common::KEYCODE_RIGHT]) {
diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp
index dde22498eb..7d4b064e2a 100644
--- a/engines/kyra/screen_v2.cpp
+++ b/engines/kyra/screen_v2.cpp
@@ -365,7 +365,7 @@ bool Screen_v2::calcBounds(int w0, int h0, int &x1, int &y1, int &w1, int &h1, i
}
}
- return (w1 == -1) ? false : true;
+ return w1 != -1;
}
void Screen_v2::checkedPageUpdate(int srcPage, int dstPage) {
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index 686c3c9320..f2abfb81dc 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -32,7 +32,7 @@ namespace Kyra {
void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
seq_init();
- bool allowSkip = (!(_flags.isDemo && !_flags.isTalkie) && (startSeq == kSequenceTitle)) ? false : true;
+ bool allowSkip = (_flags.isDemo && !_flags.isTalkie) || startSeq != kSequenceTitle;
if (endSeq == -1)
endSeq = startSeq;
@@ -74,7 +74,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
_seqFrameCounter = 0;
_seqStartTime = _system->getMillis();
- allowSkip = (!(_flags.isDemo && !_flags.isTalkie) && (seqNum == kSequenceTitle)) ? false : true;
+ allowSkip = (_flags.isDemo && !_flags.isTalkie) || seqNum != kSequenceTitle;
Sequence cseq = _sequences->seq[seqNum];
SeqProc cb = _callbackS[seqNum];
diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp
index 5a05d81a22..a07abd4580 100644
--- a/engines/kyra/sprites_lol.cpp
+++ b/engines/kyra/sprites_lol.cpp
@@ -248,7 +248,7 @@ bool LoLEngine::updateMonsterAdjustBlocks(LoLMonster *monster) {
int16 fx2 = 0;
setLevelShapesDim(x2 + dims[y2], fx1, fx2, 13);
- return (fx1 >= fx2) ? false : true;
+ return fx1 < fx2;
}
void LoLEngine::placeMonster(LoLMonster *monster, uint16 x, uint16 y) {
@@ -1447,7 +1447,7 @@ void LoLEngine::rearrangeAttackingMonster(LoLMonster *monster) {
uint16 mx = monster->x;
uint16 my = monster->y;
uint16 *c = (t & 1) ? &my : &mx;
- bool centered = (*c & 0x7f) ? false : true;
+ bool centered = (*c & 0x7f) == 0;
bool posFlag = true;
if (monster->properties->maxWidth <= 63) {
diff --git a/engines/kyra/timer_eob.cpp b/engines/kyra/timer_eob.cpp
index de1becfa72..766fe453ab 100644
--- a/engines/kyra/timer_eob.cpp
+++ b/engines/kyra/timer_eob.cpp
@@ -186,7 +186,7 @@ void EoBCoreEngine::timerProcessFlyingObjects(int timerNum) {
if (!fo->enable)
continue;
- bool endFlight = fo->distance ? false : true;
+ bool endFlight = fo->distance == 0;
uint8 pos = dirPosIndex[(fo->direction << 2) + (fo->curPos & 3)];
uint16 bl = fo->curBlock;
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp
index 04455ae307..471e83c9ed 100644
--- a/engines/kyra/vqa.cpp
+++ b/engines/kyra/vqa.cpp
@@ -395,7 +395,7 @@ void VQAMovie::displayFrame(uint frameNum) {
if (frameNum >= _header.numFrames || !_opened)
return;
- bool foundSound = _stream ? false : true;
+ bool foundSound = !_stream;
bool foundFrame = false;
uint i;