From 3fec1b6193724c0a7c5ca3ea95a9d88a7e19cd90 Mon Sep 17 00:00:00 2001 From: Treeki Date: Tue, 16 Apr 2013 18:44:20 +0200 Subject: fix cutscene memory leak and widescreen issues --- src/cutScene.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cutScene.cpp b/src/cutScene.cpp index 7b14ccb..29f295e 100644 --- a/src/cutScene.cpp +++ b/src/cutScene.cpp @@ -80,6 +80,11 @@ int dScCutScene_c::onDelete() { if (layout) return layout->free(); + for (int i = 0; i < data->sceneCount; i++) { + sceneLoaders[i].unload(); + } + settingsLoader.unload(); + return true; } @@ -259,9 +264,14 @@ int dScCutScene_c::onExecute() { layout->enableNonLoopAnim(0); u8 widescreenFlag = data->scenes[nextScene]->widescreenFlag; - if (widescreenFlag == 1) { + if (widescreenFlag == 1 || widescreenFlag == 3) { // Native on 16:9, letterboxed on 4:3 - if (!IsWideScreen()) { + if (IsWideScreen()) { + if (widescreenFlag == 3) { + layout->layout.rootPane->trans.x = -100.0f; + layout->layout.rootPane->scale.x = 0.75f; + } + } else { layout->clippingEnabled = true; layout->clipX = 0; layout->clipY = 52; -- cgit v1.2.3