aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hopkins/graphics.cpp')
-rw-r--r--engines/hopkins/graphics.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index de9f043763..7227c3e833 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -28,7 +28,7 @@
#include "common/system.h"
#include "graphics/palette.h"
-#include "graphics/decoders/pcx.h"
+#include "image/pcx.h"
#include "common/file.h"
#include "common/rect.h"
#include "engines/util.h"
@@ -301,7 +301,7 @@ void GraphicsManager::fillSurface(byte *surface, byte *col, int size) {
void GraphicsManager::loadPCX640(byte *surface, const Common::String &file, byte *palette, bool typeFlag) {
Common::File f;
- Graphics::PCXDecoder pcxDecoder;
+ Image::PCXDecoder pcxDecoder;
// Clear the passed surface
memset(surface, 0, SCREEN_WIDTH * 2 * SCREEN_HEIGHT);
@@ -439,9 +439,7 @@ void GraphicsManager::display8BitRect(const byte *surface, int xs, int ys, int w
}
void GraphicsManager::displayScaled8BitRect(const byte *surface, int xp, int yp, int width, int height, int destX, int destY) {
- int xCtr;
const byte *palette;
- int savedXCount;
byte *loopDestP;
const byte *loopSrcP;
int yCtr;
@@ -454,10 +452,10 @@ void GraphicsManager::displayScaled8BitRect(const byte *surface, int xp, int yp,
do {
yCtr = yCount;
- xCtr = xCount;
+ int xCtr = xCount;
loopSrcP = srcP;
loopDestP = destP;
- savedXCount = xCount;
+ int savedXCount = xCount;
palette = _palettePixels;
do {
@@ -1359,7 +1357,7 @@ void GraphicsManager::drawCompressedSprite(byte *surface, const byte *srcData, i
_posYClipped = 0;
_clipX1 = 0;
_clipY1 = 0;
- if ((xp300 <= _minX) || (yp300 <= _minY) || (xp300 >= _maxX + 300) || (yp300 >= _maxY + 300))
+ if ((xp300 <= _minX) || (yp300 <= _minY) || (xp300 >= _maxX + 300) || (yp300 >= _maxY + 300))
return;
// Clipped values are greater or equal to zero, thanks to the previous test
@@ -1781,7 +1779,7 @@ void GraphicsManager::initScreen(const Common::String &file, int mode, bool init
do {
int dataVal1 = _vm->_script->handleOpcode(ptr + 20 * dataOffset);
- if (_vm->shouldQuit())
+ if (dataVal1 == -1 || _vm->shouldQuit())
return;
if (dataVal1 == 2)