Skip to content

Commit

Permalink
MORTEVIELLE: Fix compiler warnings and added assert
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster authored and Strangerke committed Apr 6, 2012
1 parent 8a2d928 commit b884c8b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions engines/mortevielle/graphics.cpp
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions engines/mortevielle/mortevielle.h
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions engines/mortevielle/mouse.cpp
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit b884c8b

Please sign in to comment.