summaryrefslogtreecommitdiff
path: root/src/cutScene.cpp
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-09-01 22:06:56 -0500
committerColin Noga <Tempus@chronometry.ca>2012-09-01 22:06:56 -0500
commit9483344fcecf669e2be98b61d1fdb6c6e3aa5520 (patch)
treed9b4a1321fecf407cc11db771c626868bc16dfeb /src/cutScene.cpp
parent349ad50d3daefca5dfed6a79d03c6058aae7c581 (diff)
parente1f58a4b2b7cd3c696bb4125f6c0a665b9324430 (diff)
downloadkamek-9483344fcecf669e2be98b61d1fdb6c6e3aa5520.tar.gz
kamek-9483344fcecf669e2be98b61d1fdb6c6e3aa5520.zip
Merge branch 'level-select' of ssh://treeki.rustedlogic.net:30000/Kamek into level-select
Diffstat (limited to '')
-rw-r--r--src/cutScene.cpp45
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;