From d4497c3df44d03dd8433fa63ff6763f714e88c0f Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 3 Jul 2010 18:29:22 +0200 Subject: [PATCH] Do not load music when we do not need to show a cutscene. --- src/cutscene.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/cutscene.cpp b/src/cutscene.cpp index 8657767..1def602 100644 --- a/src/cutscene.cpp +++ b/src/cutscene.cpp @@ -216,13 +216,12 @@ void checkStartCutscene() return; } - audio.loadMusic("music/cutscene"); - char sceneName[1024]; snprintf(sceneName, sizeof sceneName, "%s Start", game.stageName); if (setupScene(sceneName)) { + audio.loadMusic("music/cutscene"); showScene(true); } @@ -238,15 +237,7 @@ void checkEndCutscene() return; } - if (strcmp(game.stageName, "Final Battle") != 0) - { - audio.loadMusic("music/cutscene"); - } - else - { - audio.loadMusic("music/end"); - } - + char sceneName[1024]; snprintf(sceneName, sizeof sceneName, "%s End", game.stageName); @@ -263,6 +254,15 @@ void checkEndCutscene() if (setupScene(sceneName)) { + if (strcmp(game.stageName, "Final Battle") != 0) + { + audio.loadMusic("music/cutscene"); + } + else + { + audio.loadMusic("music/end"); + } + showScene(allowSkip); } -- 2.39.5