aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/Base
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/Base')
-rw-r--r--engines/wintermute/Base/BImage.cpp6
-rw-r--r--engines/wintermute/Base/BRenderSDL.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/engines/wintermute/Base/BImage.cpp b/engines/wintermute/Base/BImage.cpp
index 2504850887..eadf845109 100644
--- a/engines/wintermute/Base/BImage.cpp
+++ b/engines/wintermute/Base/BImage.cpp
@@ -142,7 +142,7 @@ HRESULT CBImage::Resize(int NewWidth, int NewHeight) {
//////////////////////////////////////////////////////////////////////////
bool CBImage::writeBMPToStream(Common::WriteStream *stream) {
- if (!_surface) return NULL;
+ if (!_surface) return false;
/* The following is just copied over and inverted to write-ops from the BMP-decoder */
stream->writeByte('B');
@@ -164,7 +164,7 @@ bool CBImage::writeBMPToStream(Common::WriteStream *stream) {
uint32 width = _surface->w;
int32 height = _surface->h;
stream->writeUint32LE(width);
- stream->writeUint32LE(height);
+ stream->writeUint32LE((uint32)height);
if (width == 0 || height == 0)
return false;
@@ -240,7 +240,7 @@ bool CBImage::writeBMPToStream(Common::WriteStream *stream) {
return Buffer;
#endif
- return NULL;
+ return false;
}
diff --git a/engines/wintermute/Base/BRenderSDL.cpp b/engines/wintermute/Base/BRenderSDL.cpp
index 54119d3a7a..80c3372c62 100644
--- a/engines/wintermute/Base/BRenderSDL.cpp
+++ b/engines/wintermute/Base/BRenderSDL.cpp
@@ -120,11 +120,11 @@ HRESULT CBRenderSDL::InitRenderer(int width, int height, bool windowed) {
ratio = (float)_realWidth / (float)_width;
}
- _borderLeft = (_realWidth - (_width * ratio)) / 2;
- _borderRight = _realWidth - (_width * ratio) - _borderLeft;
+ _borderLeft = (int)((_realWidth - (_width * ratio)) / 2);
+ _borderRight = (int)(_realWidth - (_width * ratio) - _borderLeft);
- _borderTop = (_realHeight - (_height * ratio)) / 2;
- _borderBottom = _realHeight - (_height * ratio) - _borderTop;
+ _borderTop = (int)((_realHeight - (_height * ratio)) / 2);
+ _borderBottom = (int)(_realHeight - (_height * ratio) - _borderTop);