summaryrefslogtreecommitdiff
path: root/src/cutScene.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-02 04:44:26 +0200
committerTreeki <treeki@gmail.com>2012-09-02 04:44:26 +0200
commite1f58a4b2b7cd3c696bb4125f6c0a665b9324430 (patch)
tree0dc9fca91d42345d48b7c205f127a26795d6bce4 /src/cutScene.cpp
parentf1d937694dc9d9f9637af8c72293dab9edeaf7a2 (diff)
downloadkamek-e1f58a4b2b7cd3c696bb4125f6c0a665b9324430.tar.gz
kamek-e1f58a4b2b7cd3c696bb4125f6c0a665b9324430.zip
added support for wide/non-wide cutscenes, might not even be useful for us, oh well
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;