aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/lab/engine.cpp3
-rw-r--r--engines/lab/image.cpp6
-rw-r--r--engines/lab/intro.cpp16
-rw-r--r--engines/lab/resource.cpp3
-rw-r--r--engines/lab/utils.cpp16
5 files changed, 16 insertions, 28 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index 51b20a7705..d0412b65d5 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -315,8 +315,7 @@ bool LabEngine::doUse(uint16 curInv) {
if (_conditions->in(kCondLampOn)) {
drawStaticMessage(kTextTurnLampOff);
_conditions->exclElement(kCondLampOn);
- }
- else {
+ } else {
drawStaticMessage(kTextTurnkLampOn);
_conditions->inclElement(kCondLampOn);
}
diff --git a/engines/lab/image.cpp b/engines/lab/image.cpp
index a947ced1c8..23a7f8c4d3 100644
--- a/engines/lab/image.cpp
+++ b/engines/lab/image.cpp
@@ -89,8 +89,10 @@ void Image::blitBitmap(uint16 xs, uint16 ys, Image *imDest,
while (ww-- > 0) {
byte c = *ss++;
- if (c) *dd++ = c - 1;
- else dd++;
+ if (c)
+ *dd++ = c - 1;
+ else
+ dd++;
}
s += _width;
diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp
index b08539711f..5c1c837da5 100644
--- a/engines/lab/intro.cpp
+++ b/engines/lab/intro.cpp
@@ -57,14 +57,12 @@ void Intro::introEatMessages() {
return;
}
- if (msg == NULL)
+ if (!msg)
return;
- else {
- if (((msg->_msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RIGHTBUTTON & msg->_qualifier)) ||
- ((msg->_msgClass == RAWKEY) && (msg->_code == 27))
- )
- _quitIntro = true;
- }
+
+ if (((msg->_msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RIGHTBUTTON & msg->_qualifier))
+ || ((msg->_msgClass == RAWKEY) && (msg->_code == 27)))
+ _quitIntro = true;
}
}
@@ -164,9 +162,7 @@ void Intro::doPictText(const char *filename, TextFont *msgFont, bool isScreen) {
delete[] textBuffer;
return;
- }
-
- else if (cls == MOUSEBUTTONS) {
+ } else if (cls == MOUSEBUTTONS) {
if (IEQUALIFIER_LEFTBUTTON & qualifier) {
if (end) {
if (isScreen)
diff --git a/engines/lab/resource.cpp b/engines/lab/resource.cpp
index 8b7d26f3ca..c09d1a6953 100644
--- a/engines/lab/resource.cpp
+++ b/engines/lab/resource.cpp
@@ -159,8 +159,7 @@ Common::String Resource::translateFileName(Common::String filename) {
fileNameStrFinal = "GAME/SPICT/";
else
fileNameStrFinal = "GAME/PICT/";
- }
- else if (filename.hasPrefix("LAB:"))
+ } else if (filename.hasPrefix("LAB:"))
fileNameStrFinal = "GAME/";
else if (filename.hasPrefix("MUSIC:"))
fileNameStrFinal = "GAME/MUSIC/";
diff --git a/engines/lab/utils.cpp b/engines/lab/utils.cpp
index 032a74fd3b..89af44e2ea 100644
--- a/engines/lab/utils.cpp
+++ b/engines/lab/utils.cpp
@@ -60,7 +60,6 @@ uint16 Utils::scaleY(uint16 y) {
return ((y * 10) / 24);
}
-
uint16 Utils::mapScaleX(uint16 x) {
if (_vm->_isHiRes)
return (x - 45);
@@ -110,9 +109,8 @@ Common::Point Utils::vgaUnscale(Common::Point pos) {
if (_vm->_isHiRes) {
result.x = pos.x / 2;
result.y = (pos.y * 5) / 12;
- } else {
+ } else
result = pos;
- }
return result;
}
@@ -213,9 +211,7 @@ void Utils::VUnDiffByteByte(byte *dest, byte *diff, uint16 bytesPerRow) {
if (skip == 255) {
counter += copy;
break;
- }
-
- else {
+ } else {
curPtr += (skip * bytesPerRow);
while (copy) {
@@ -248,9 +244,7 @@ void Utils::VUnDiffByteWord(uint16 *dest, uint16 *diff, uint16 bytesPerRow) {
if (skip == 255) {
counter += copy;
break;
- }
-
- else {
+ } else {
curPtr += (skip * wordsPerRow);
while (copy) {
@@ -283,9 +277,7 @@ void Utils::VUnDiffByteLong(uint32 *dest, uint32 *diff, uint16 bytesPerRow) {
if (skip == 255) {
counter += copy;
break;
- }
-
- else {
+ } else {
_curPtr += (skip * longsperrow);
while (copy) {