diff options
Diffstat (limited to 'engines/wintermute')
-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; } |