From: Guus Sliepen Date: Sat, 3 Jul 2010 16:29:22 +0000 (+0200) Subject: Do not load music when we do not need to show a cutscene. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d4497c3df44d03dd8433fa63ff6763f714e88c0f;p=quix0rs-blobwars.git Do not load music when we do not need to show a cutscene. --- 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); }