diff options
author | Paul Gilbert | 2012-01-20 17:18:38 +1100 |
---|---|---|
committer | Strangerke | 2012-04-06 08:20:14 +0200 |
commit | 412124baa66628c1d2b6804db0ce748b45e5a4cc (patch) | |
tree | 816bb2218581cfb209e794f033435cfc86dc6474 /engines/mortevielle | |
parent | 5c628fedd2a21d4aee5f984dd1a1a4bcfc63024e (diff) | |
download | scummvm-rg350-412124baa66628c1d2b6804db0ce748b45e5a4cc.tar.gz scummvm-rg350-412124baa66628c1d2b6804db0ce748b45e5a4cc.tar.bz2 scummvm-rg350-412124baa66628c1d2b6804db0ce748b45e5a4cc.zip |
MORTEVIELLE: Fix compiler warnings and added assert
Diffstat (limited to 'engines/mortevielle')
-rw-r--r-- | engines/mortevielle/graphics.cpp | 1 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.h | 1 | ||||
-rw-r--r-- | engines/mortevielle/mouse.cpp | 4 |
3 files changed, 3 insertions, 3 deletions
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp index 27595992c7..ee9c63228b 100644 --- a/engines/mortevielle/graphics.cpp +++ b/engines/mortevielle/graphics.cpp @@ -1011,6 +1011,7 @@ void ScreenSurface::clearScreen() { * simulate the original 640x400 surface, all Y values have to be doubled */ void ScreenSurface::setPixel(const Common::Point &pt, int palIndex) { + assert((pt.x >= 0) && (pt.y >= 0) && (pt.x <= SCREEN_WIDTH) && (pt.y <= SCREEN_ORIG_HEIGHT)); Graphics::Surface destSurface = lockArea(Common::Rect(pt.x, pt.y * 2, pt.x + 1, (pt.y + 1) * 2)); byte *destP = (byte *)destSurface.pixels; diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h index 3010ae8664..0555f302ab 100644 --- a/engines/mortevielle/mortevielle.h +++ b/engines/mortevielle/mortevielle.h @@ -42,6 +42,7 @@ enum { #define SCREEN_WIDTH 640 #define SCREEN_HEIGHT 400 +#define SCREEN_ORIG_HEIGHT 200 #define MORT_DAT_REQUIRED_VERSION 1 #define MORT_DAT "mort.dat" #define GAME_FRAME_DELAY (1000 / 50) diff --git a/engines/mortevielle/mouse.cpp b/engines/mortevielle/mouse.cpp index 2ea8434a1c..04b6c116e0 100644 --- a/engines/mortevielle/mouse.cpp +++ b/engines/mortevielle/mouse.cpp @@ -265,8 +265,6 @@ void show_mouse() { } void pos_mouse(int x, int y) { - registres reg; - if (x > 314 * res) x = 314 * res; else if (x < 0) x = 0; if (y > 199) y = 199; @@ -286,7 +284,7 @@ void read_pos_mouse(int &x, int &y, int &c) { void mov_mouse(bool &funct, char &key) { bool p_key; char in1, in2; - int x, y, cx, cy, cd; + int cx, cy, cd; // If mouse button clicked, return it if (g_vm->getMouseButtons() != 0) { |