From 0195ee51e97081fc5e9a531cf5046bd650a12bab Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 11 Nov 2015 01:50:37 +0100 Subject: MADS: Implement sceneScale for v2+ games --- engines/mads/scene.cpp | 10 ++++++++-- engines/mads/scene.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index 4e7ec2f61c..01cea1166d 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -841,8 +841,14 @@ void Scene::playSpeech(int idx) { _vm->_audio->playSound(idx - 1); } -void Scene::sceneScale(int front_y, int front_scale, int back_y, int back_scale) { - warning("TODO: Scene:scaleRoom"); +void Scene::sceneScale(int yFront, int maxScale, int yBack, int minScale) { + _sceneInfo->_yBandsEnd = yFront; + _sceneInfo->_maxScale = maxScale; + _sceneInfo->_yBandsStart = yBack; + _sceneInfo->_minScale = minScale; + + _bandsRange = _sceneInfo->_yBandsEnd - _sceneInfo->_yBandsStart; + _scaleRange = _sceneInfo->_maxScale - _sceneInfo->_minScale; } void Scene::animations_tick() { diff --git a/engines/mads/scene.h b/engines/mads/scene.h index 9a9ebf71de..e1eee9154a 100644 --- a/engines/mads/scene.h +++ b/engines/mads/scene.h @@ -263,7 +263,7 @@ public: void deleteSequence(int idx); void loadSpeech(int idx); void playSpeech(int idx); - void sceneScale(int front_y, int front_scale, int back_y, int back_scale); + void sceneScale(int yFront, int maxScale, int yBack, int minScale); void animations_tick(); int _speechReady; -- cgit v1.2.3