From 2ca5143155d472f0140ed27d4ec15e4d08655a01 Mon Sep 17 00:00:00 2001 From: uruk Date: Wed, 5 Feb 2014 10:20:46 +0100 Subject: AVALANCHE: Remove unnecessary checks from picture creatings. --- engines/avalanche/graphics.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp index dd08eac7f0..2a4a29c1c9 100644 --- a/engines/avalanche/graphics.cpp +++ b/engines/avalanche/graphics.cpp @@ -515,8 +515,7 @@ void GraphicManager::ghostDrawGhost(byte ghostArr[2][66][26], uint16 destX, uint byte pixel = ghostArr[kPlaneToUse[plane]][y][x]; for (int bit = 0; bit < 8; bit++) { byte pixelBit = (pixel >> bit) & 1; - if (pixelBit != 0) - *(byte *)ghostPic.getBasePtr(x * 8 + 7 - bit, y) += (pixelBit << plane); + *(byte *)ghostPic.getBasePtr(x * 8 + 7 - bit, y) += (pixelBit << plane); } } } @@ -541,8 +540,7 @@ void GraphicManager::ghostDrawGlerk(byte glerkArr[4][35][9], uint16 destX, uint1 byte pixel = glerkArr[plane][y][x]; for (int bit = 0; bit < 8; bit++) { byte pixelBit = (pixel >> bit) & 1; - if (pixelBit != 0) - *(byte *)glerkPic.getBasePtr(x * 8 + 7 - bit, y) += (pixelBit << plane); + *(byte *)glerkPic.getBasePtr(x * 8 + 7 - bit, y) += (pixelBit << plane); } } } @@ -640,8 +638,7 @@ Graphics::Surface GraphicManager::loadPictureGraphic(Common::File &file) { byte pixel = file.readByte(); for (int bit = 0; bit < 8; bit++) { byte pixelBit = (pixel >> bit) & 1; - if (pixelBit != 0) - *(byte *)picture.getBasePtr(x + 7 - bit, y) += (pixelBit << plane); + *(byte *)picture.getBasePtr(x + 7 - bit, y) += (pixelBit << plane); } } } @@ -689,8 +686,7 @@ Graphics::Surface GraphicManager::loadPictureSign(Common::File &file, int xl, in byte pixel = file.readByte(); for (int bit = 0; bit < 8; bit++) { byte pixelBit = (pixel >> bit) & 1; - if (pixelBit != 0) - *(byte *)picture.getBasePtr(xx + 7 - bit, yy) += (pixelBit << plane); + *(byte *)picture.getBasePtr(xx + 7 - bit, yy) += (pixelBit << plane); } } } -- cgit v1.2.3