diff --git a/engines/grim/gfx_opengl.cpp b/engines/grim/gfx_opengl.cpp index 7ae5dcdacaf..57274383a67 100644 --- a/engines/grim/gfx_opengl.cpp +++ b/engines/grim/gfx_opengl.cpp @@ -439,7 +439,7 @@ void GfxOpenGL::drawEMIModelFace(const EMIModel* model, const EMIMeshFace* face) glEnable(GL_TEXTURE_2D); glBegin(GL_TRIANGLES); - for (int j = 0; j < face->_faceLength * 3; j++) { + for (uint j = 0; j < face->_faceLength * 3; j++) { int index = indices[j]; if (face->_hasTexture) { @@ -1145,8 +1145,8 @@ void GfxOpenGL::drawMovieFrame(int offsetX, int offsetY) { glDepthMask(GL_FALSE); glEnable(GL_SCISSOR_TEST); - offsetX *= _scaleW; - offsetY *= _scaleH; + offsetX = (int)(offsetX * _scaleW); + offsetY = (int)(offsetY * _scaleH); glScissor(offsetX, _screenHeight - (offsetY + _smushHeight), _smushWidth, _smushHeight); diff --git a/engines/grim/gfx_tinygl.cpp b/engines/grim/gfx_tinygl.cpp index f6a910d9e3e..ba8d266aeb6 100644 --- a/engines/grim/gfx_tinygl.cpp +++ b/engines/grim/gfx_tinygl.cpp @@ -560,7 +560,7 @@ void GfxTinyGL::drawEMIModelFace(const EMIModel* model, const EMIMeshFace* face) else tglDisable(TGL_TEXTURE_2D); tglBegin(TGL_TRIANGLES); - for (int j = 0; j < face->_faceLength * 3; j++) { + for (uint j = 0; j < face->_faceLength * 3; j++) { int index = indices[j]; if (face->_hasTexture) { @@ -1089,7 +1089,7 @@ void GfxTinyGL::dimRegion(int x, int y, int w, int h, float level) { for (int lx = x; lx < x + w; lx++) { uint8 r, g, b; _zb->pbuf.getRGBAt(ly * _gameWidth + lx, r, g, b); - uint32 color = ((r + g + b) / 3) * level; + uint32 color = (uint32)(((r + g + b) / 3) * level); _zb->pbuf.setPixelAt(ly * _gameWidth + lx, color, color, color); } }