aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2013-04-17 19:57:39 +0200
committerEinar Johan Trøan Sømåen2013-04-17 19:57:39 +0200
commitfd7c38f6d8da83614e71a8a703f275f3ca251dbf (patch)
treef32ddfbe3868478116781ed37f22570e7e28107c /engines/wintermute
parent122279a10a44aa8d0286780d9549ec13ab523dd1 (diff)
downloadscummvm-rg350-fd7c38f6d8da83614e71a8a703f275f3ca251dbf.tar.gz
scummvm-rg350-fd7c38f6d8da83614e71a8a703f275f3ca251dbf.tar.bz2
scummvm-rg350-fd7c38f6d8da83614e71a8a703f275f3ca251dbf.zip
WINTERMUTE: Privatize thumbnail sizes in BaseGame.
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/base/base_game.h7
-rw-r--r--engines/wintermute/base/base_save_thumb_helper.cpp8
2 files changed, 9 insertions, 6 deletions
diff --git a/engines/wintermute/base/base_game.h b/engines/wintermute/base/base_game.h
index 5be1457668..c1bf32bbd2 100644
--- a/engines/wintermute/base/base_game.h
+++ b/engines/wintermute/base/base_game.h
@@ -107,8 +107,8 @@ public:
void DEBUG_DumpClassRegistry();
bool setWaitCursor(const char *filename);
- int _thumbnailWidth;
- int _thumbnailHeight;
+ int getSaveThumbWidth() const { return _thumbnailWidth; }
+ int getSaveThumbHeight() const { return _thumbnailHeight; }
bool _editorMode;
void getOffset(int *offsetX, int *offsetY);
@@ -303,6 +303,9 @@ private:
bool _personalizedSave;
+ int _thumbnailWidth;
+ int _thumbnailHeight;
+
void setWindowTitle();
BaseSprite *_cursorNoninteractive;
diff --git a/engines/wintermute/base/base_save_thumb_helper.cpp b/engines/wintermute/base/base_save_thumb_helper.cpp
index 76d703a697..9b68ed647c 100644
--- a/engines/wintermute/base/base_save_thumb_helper.cpp
+++ b/engines/wintermute/base/base_save_thumb_helper.cpp
@@ -50,7 +50,7 @@ BaseSaveThumbHelper::~BaseSaveThumbHelper(void) {
BaseImage *BaseSaveThumbHelper::storeThumb(bool doFlip, int width, int height) {
BaseImage *thumbnail = nullptr;
- if (_gameRef->_thumbnailWidth > 0 && _gameRef->_thumbnailHeight > 0) {
+ if (_gameRef->getSaveThumbWidth() > 0 && _gameRef->getSaveThumbHeight() > 0) {
if (doFlip) {
// when using opengl on windows it seems to be necessary to do this twice
// works normally for direct3d
@@ -67,7 +67,7 @@ BaseImage *BaseSaveThumbHelper::storeThumb(bool doFlip, int width, int height) {
}
// normal thumbnail
- if (_gameRef->_thumbnailWidth > 0 && _gameRef->_thumbnailHeight > 0) {
+ if (_gameRef->getSaveThumbWidth() > 0 && _gameRef->getSaveThumbHeight() > 0) {
thumbnail = new BaseImage();
thumbnail->copyFrom(screenshot, width, height);
}
@@ -84,9 +84,9 @@ bool BaseSaveThumbHelper::storeThumbnail(bool doFlip) {
delete _thumbnail;
_thumbnail = nullptr;
- if (_gameRef->_thumbnailWidth > 0 && _gameRef->_thumbnailHeight > 0) {
+ if (_gameRef->getSaveThumbWidth() > 0 && _gameRef->getSaveThumbHeight() > 0) {
- _thumbnail = storeThumb(doFlip, _gameRef->_thumbnailWidth, _gameRef->_thumbnailHeight);
+ _thumbnail = storeThumb(doFlip, _gameRef->getSaveThumbWidth(), _gameRef->getSaveThumbHeight());
if (!_thumbnail) {
return STATUS_FAILED;
}