diff options
author | Einar Johan Trøan Sømåen | 2012-12-09 12:18:38 +0100 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-12-09 12:18:38 +0100 |
commit | 32e63091d6842e2ca769733c5cfcc518b212270b (patch) | |
tree | 967a37c95148b1d4010fc70de0f8cdff630671de | |
parent | 0e93e898c5b80e99da60a97faf3816091b6e1b35 (diff) | |
download | scummvm-rg350-32e63091d6842e2ca769733c5cfcc518b212270b.tar.gz scummvm-rg350-32e63091d6842e2ca769733c5cfcc518b212270b.tar.bz2 scummvm-rg350-32e63091d6842e2ca769733c5cfcc518b212270b.zip |
WINTERMUTE: Privatize AdScaleLevel and AdWaypointGroup's members.
-rw-r--r-- | engines/wintermute/ad/ad_scale_level.cpp | 3 | ||||
-rw-r--r-- | engines/wintermute/ad/ad_scale_level.h | 4 | ||||
-rw-r--r-- | engines/wintermute/ad/ad_scene.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/ad/ad_waypoint_group.h | 13 |
4 files changed, 16 insertions, 8 deletions
diff --git a/engines/wintermute/ad/ad_scale_level.cpp b/engines/wintermute/ad/ad_scale_level.cpp index 4e9293d875..bee0f54d78 100644 --- a/engines/wintermute/ad/ad_scale_level.cpp +++ b/engines/wintermute/ad/ad_scale_level.cpp @@ -48,6 +48,9 @@ AdScaleLevel::~AdScaleLevel() { } +float AdScaleLevel::getScale() { + return _scale; +} ////////////////////////////////////////////////////////////////////////// bool AdScaleLevel::loadFile(const char *filename) { diff --git a/engines/wintermute/ad/ad_scale_level.h b/engines/wintermute/ad/ad_scale_level.h index 628a385eb4..ee0c683cdf 100644 --- a/engines/wintermute/ad/ad_scale_level.h +++ b/engines/wintermute/ad/ad_scale_level.h @@ -37,12 +37,14 @@ namespace Wintermute { class AdScaleLevel : public BaseObject { public: DECLARE_PERSISTENT(AdScaleLevel, BaseObject) - float _scale; AdScaleLevel(BaseGame *inGame); virtual ~AdScaleLevel(); virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent); bool loadFile(const char *filename); bool loadBuffer(byte *buffer, bool complete = true); + float getScale(); +private: + float _scale; }; } // end of namespace Wintermute diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp index c6c034b4a7..7cdc70e00e 100644 --- a/engines/wintermute/ad/ad_scene.cpp +++ b/engines/wintermute/ad/ad_scene.cpp @@ -2277,11 +2277,11 @@ float AdScene::getScaleAt(int Y) { } int delta_y = next->_posY - prev->_posY; - float delta_scale = next->_scale - prev->_scale; + float delta_scale = next->getScale() - prev->getScale(); Y -= prev->_posY; float percent = (float)Y / ((float)delta_y / 100.0f); - return prev->_scale + delta_scale / 100 * percent; + return prev->getScale() + delta_scale / 100 * percent; } diff --git a/engines/wintermute/ad/ad_waypoint_group.h b/engines/wintermute/ad/ad_waypoint_group.h index 13d6bbadd7..7e427313e6 100644 --- a/engines/wintermute/ad/ad_waypoint_group.h +++ b/engines/wintermute/ad/ad_waypoint_group.h @@ -35,22 +35,25 @@ namespace Wintermute { class BasePoint; class AdWaypointGroup : public BaseObject { public: - float _lastMimicScale; - int _lastMimicX; - int _lastMimicY; void cleanup(); bool mimic(AdWaypointGroup *wpt, float scale = 100.0f, int x = 0, int y = 0); DECLARE_PERSISTENT(AdWaypointGroup, BaseObject) virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent); - bool _active; AdWaypointGroup(BaseGame *inGame); bool loadFile(const char *filename); bool loadBuffer(byte *buffer, bool complete = true); virtual ~AdWaypointGroup(); + + bool _active; BaseArray<BasePoint *> _points; - int _editorSelectedPoint; + virtual ScValue *scGetProperty(const Common::String &name); virtual bool scSetProperty(const char *name, ScValue *value); +private: + int _editorSelectedPoint; + float _lastMimicScale; + int _lastMimicX; + int _lastMimicY; }; } // end of namespace Wintermute |