aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-09-28 23:55:41 +0200
committerEinar Johan Trøan Sømåen2012-09-28 23:55:41 +0200
commit03e7bffc77c8b4e74bee34573da35fe88459703e (patch)
tree1c36392a4f3551793c905d22791ec5d7a1717c4f /engines
parentb31d6212ffc35b987cfb7ee35a5ae3f75bf34a60 (diff)
downloadscummvm-rg350-03e7bffc77c8b4e74bee34573da35fe88459703e.tar.gz
scummvm-rg350-03e7bffc77c8b4e74bee34573da35fe88459703e.tar.bz2
scummvm-rg350-03e7bffc77c8b4e74bee34573da35fe88459703e.zip
WINTERMUTE: Privatize variables in BaseRegion and BaseSubFrame
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/base/base_region.h7
-rw-r--r--engines/wintermute/base/base_sub_frame.cpp3
-rw-r--r--engines/wintermute/base/base_sub_frame.h3
-rw-r--r--engines/wintermute/ui/ui_tiled_image.cpp4
4 files changed, 11 insertions, 6 deletions
diff --git a/engines/wintermute/base/base_region.h b/engines/wintermute/base/base_region.h
index 8dd02fe928..51989de630 100644
--- a/engines/wintermute/base/base_region.h
+++ b/engines/wintermute/base/base_region.h
@@ -36,9 +36,6 @@ namespace Wintermute {
class BaseRegion : public BaseObject {
public:
- float _lastMimicScale;
- int _lastMimicX;
- int _lastMimicY;
void cleanup();
bool mimic(BaseRegion *region, float scale = 100.0f, int x = 0, int y = 0);
bool getBoundingRect(Rect32 *rect);
@@ -62,6 +59,10 @@ public:
virtual bool scSetProperty(const char *name, ScValue *value);
virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
virtual const char *scToString();
+private:
+ float _lastMimicScale;
+ int _lastMimicX;
+ int _lastMimicY;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp
index 2ff12e8deb..fd7ee50eda 100644
--- a/engines/wintermute/base/base_sub_frame.cpp
+++ b/engines/wintermute/base/base_sub_frame.cpp
@@ -226,6 +226,9 @@ void BaseSubFrame::setRect(Rect32 rect) {
_rect = rect;
}
+const char* BaseSubFrame::getSurfaceFilename() {
+ return _surfaceFilename;
+}
//////////////////////////////////////////////////////////////////////
bool BaseSubFrame::draw(int x, int y, BaseObject *registerOwner, float zoomX, float zoomY, bool precise, uint32 alpha, float rotate, TSpriteBlendMode blendMode) {
diff --git a/engines/wintermute/base/base_sub_frame.h b/engines/wintermute/base/base_sub_frame.h
index b174c6e5f0..0be77c544a 100644
--- a/engines/wintermute/base/base_sub_frame.h
+++ b/engines/wintermute/base/base_sub_frame.h
@@ -54,6 +54,7 @@ public:
bool loadBuffer(byte *buffer, int lifeTime, bool keepLoaded);
bool draw(int x, int y, BaseObject *registerOwner = NULL, float zoomX = 100, float zoomY = 100, bool precise = true, uint32 alpha = 0xFFFFFFFF, float rotate = 0.0f, TSpriteBlendMode blendMode = BLEND_NORMAL);
bool getBoundingRect(Rect32 *rect, int x, int y, float scaleX = 100, float scaleY = 100);
+ const char* getSurfaceFilename();
int _hotspotX;
int _hotspotY;
@@ -65,6 +66,7 @@ public:
private:
bool _wantsDefaultRect;
Rect32 _rect;
+ char *_surfaceFilename;
public:
bool _cKDefault;
byte _cKRed;
@@ -72,7 +74,6 @@ public:
byte _cKBlue;
int _lifeTime;
bool _keepLoaded;
- char *_surfaceFilename;
bool _2DOnly;
bool _3DOnly;
diff --git a/engines/wintermute/ui/ui_tiled_image.cpp b/engines/wintermute/ui/ui_tiled_image.cpp
index 472f4a884e..2b337330c7 100644
--- a/engines/wintermute/ui/ui_tiled_image.cpp
+++ b/engines/wintermute/ui/ui_tiled_image.cpp
@@ -334,8 +334,8 @@ bool UITiledImage::saveAsText(BaseDynamicBuffer *buffer, int indent) {
buffer->putTextIndent(indent, "TILED_IMAGE\n");
buffer->putTextIndent(indent, "{\n");
- if (_image && _image->_surfaceFilename) {
- buffer->putTextIndent(indent + 2, "IMAGE=\"%s\"\n", _image->_surfaceFilename);
+ if (_image && _image->getSurfaceFilename()) {
+ buffer->putTextIndent(indent + 2, "IMAGE=\"%s\"\n", _image->getSurfaceFilename());
}
int h1, h2, h3;