diff options
author | Einar Johan Trøan Sømåen | 2013-04-17 22:07:14 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-04-18 10:13:02 +0200 |
commit | 4783d643f6f6546c073dfba96f73b35c931b54ea (patch) | |
tree | 710e7b524c704e56b6d66d5af4659f0620e3decc /engines | |
parent | d926b47186813faed167ed7b82f879b54ff2ee3e (diff) | |
download | scummvm-rg350-4783d643f6f6546c073dfba96f73b35c931b54ea.tar.gz scummvm-rg350-4783d643f6f6546c073dfba96f73b35c931b54ea.tar.bz2 scummvm-rg350-4783d643f6f6546c073dfba96f73b35c931b54ea.zip |
WINTERMUTE: Constify AdRotLevel
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wintermute/ad/ad_rot_level.h | 3 | ||||
-rw-r--r-- | engines/wintermute/ad/ad_scene.cpp | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/wintermute/ad/ad_rot_level.h b/engines/wintermute/ad/ad_rot_level.h index d7f5f8edf0..36229b9ce3 100644 --- a/engines/wintermute/ad/ad_rot_level.h +++ b/engines/wintermute/ad/ad_rot_level.h @@ -34,11 +34,12 @@ namespace Wintermute { class AdRotLevel : public BaseObject { + float _rotation; public: DECLARE_PERSISTENT(AdRotLevel, BaseObject) AdRotLevel(BaseGame *inGame); virtual ~AdRotLevel(); - float _rotation; + float getRotation() const { return _rotation; } virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent); bool loadFile(const char *filename); bool loadBuffer(byte *buffer, bool complete = true); diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp index 53d6562215..f7a6fdc7f4 100644 --- a/engines/wintermute/ad/ad_scene.cpp +++ b/engines/wintermute/ad/ad_scene.cpp @@ -2774,11 +2774,11 @@ float AdScene::getRotationAt(int x, int y) { } int delta_x = next->_posX - prev->_posX; - float delta_rot = next->_rotation - prev->_rotation; + float delta_rot = next->getRotation() - prev->getRotation(); x -= prev->_posX; float percent = (float)x / ((float)delta_x / 100.0f); - return prev->_rotation + delta_rot / 100 * percent; + return prev->getRotation() + delta_rot / 100 * percent; } |