diff options
Diffstat (limited to '')
-rw-r--r-- | src/cutScene.cpp | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/src/cutScene.cpp b/src/cutScene.cpp index f60122f..cde9c2c 100644 --- a/src/cutScene.cpp +++ b/src/cutScene.cpp @@ -75,21 +75,13 @@ int dScCutScene_c::onExecute() { // deal with loading first // what do we want to load? - int loadBegin, loadEnd; - if (nextScene == 0) { - loadBegin = 0; - loadEnd = 1; - } else { - loadBegin = ((currentScene + 1) > nextScene) ? (currentScene + 1) : nextScene; - loadEnd = data->sceneCount; - } + if (currentScene >= 0 || nextScene >= 0) { + int whatToLoad = (nextScene >= 0) ? nextScene : (currentScene + 1); - for (int i = loadBegin; i < loadEnd; i++) { - sceneLoaders[i].load(data->scenes[i]->sceneName); + sceneLoaders[whatToLoad].load(data->scenes[whatToLoad]->sceneName); } - // now, do all other processing if (currentScene >= 0) { @@ -135,15 +127,32 @@ int dScCutScene_c::onExecute() { layout->disableAllAnimations(); layout->enableNonLoopAnim(0); - if (IsWideScreen()) { - layout->clippingEnabled = true; - layout->clipX = 66; - layout->clipY = 0; - layout->clipWidth = 508; - layout->clipHeight = 456; - layout->layout.rootPane->scale.x = 0.794f; + if (data->scenes[nextScene]->widescreenFlag) { + // Native on 16:9, letterboxed on 4:3 + if (!IsWideScreen()) { + layout->clippingEnabled = true; + layout->clipX = 0; + layout->clipY = 52; + layout->clipWidth = 640; + layout->clipHeight = 352; + layout->layout.rootPane->scale.x = 0.7711f; + layout->layout.rootPane->scale.y = 0.7711f; + } + } else { + // Native on 4:3, black bars on 16:9 + if (IsWideScreen()) { + layout->clippingEnabled = true; + layout->clipX = 66; + layout->clipY = 0; + layout->clipWidth = 508; + layout->clipHeight = 456; + layout->layout.rootPane->scale.x = 0.794f; + } } + layout->execAnimations(); + layout->update(); + OSReport("Loaded scene %d\n", currentScene); nextScene = -1; |