summaryrefslogtreecommitdiff
path: root/src/koopatlas/pathmanager.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-10-23 05:44:25 +0200
committerTreeki <treeki@gmail.com>2012-10-23 05:45:50 +0200
commit20aa16033547f5a1f0b5032f0c17acf32cbbc7f5 (patch)
tree8a6056465b7245aa73941ba51bce8e068b20ad23 /src/koopatlas/pathmanager.cpp
parenteea011371eee3bd9e6d9660b5f43b80b1a0c336d (diff)
downloadkamek-20aa16033547f5a1f0b5032f0c17acf32cbbc7f5.tar.gz
kamek-20aa16033547f5a1f0b5032f0c17acf32cbbc7f5.zip
musics and things
Diffstat (limited to 'src/koopatlas/pathmanager.cpp')
-rw-r--r--src/koopatlas/pathmanager.cpp47
1 files changed, 26 insertions, 21 deletions
diff --git a/src/koopatlas/pathmanager.cpp b/src/koopatlas/pathmanager.cpp
index abcfd76..6b28d66 100644
--- a/src/koopatlas/pathmanager.cpp
+++ b/src/koopatlas/pathmanager.cpp
@@ -657,31 +657,36 @@ void dWMPathManager_c::moveThroughPath() {
OSReport("Activating world change %d\n", to->worldID);
const dKPWorldDef_s *world = dScKoopatlas_c::instance->mapData.findWorldDef(to->worldID);
if (world) {
+ bool visiblyChange = false;
if (strncmp(save->newerWorldName, world->name, 32) == 0) {
- OSReport("Already here\n");
- } else {
- OSReport("Found!\n");
- strncpy(save->newerWorldName, world->name, 32);
- save->newerWorldName[31] = 0;
- save->newerWorldID = world->worldID;
- save->currentMapMusic = world->trackID;
-
- for (int i = 0; i < 2; i++) {
- save->fsTextColours[i] = world->fsTextColours[i];
- save->fsHintColours[i] = world->fsHintColours[i];
- save->hudTextColours[i] = world->hudTextColours[i];
- }
-
- save->hudHintH = world->hudHintH;
- save->hudHintS = world->hudHintS;
- save->hudHintL = world->hudHintL;
+ OSReport("Already here, but setting BGM track\n");
+ visiblyChange = true;
+ }
- save->titleScreenWorld = world->titleScreenWorld;
- save->titleScreenLevel = world->titleScreenLevel;
+ OSReport("Found!\n");
+ strncpy(save->newerWorldName, world->name, 32);
+ save->newerWorldName[31] = 0;
+ save->newerWorldID = world->worldID;
+ save->currentMapMusic = world->trackID;
- if (dWMHud_c::instance)
- dWMHud_c::instance->showFooter();
+ for (int i = 0; i < 2; i++) {
+ save->fsTextColours[i] = world->fsTextColours[i];
+ save->fsHintColours[i] = world->fsHintColours[i];
+ save->hudTextColours[i] = world->hudTextColours[i];
}
+
+ save->hudHintH = world->hudHintH;
+ save->hudHintS = world->hudHintS;
+ save->hudHintL = world->hudHintL;
+
+ save->titleScreenWorld = world->titleScreenWorld;
+ save->titleScreenLevel = world->titleScreenLevel;
+
+ if (visiblyChange && dWMHud_c::instance)
+ dWMHud_c::instance->showFooter();
+
+ dScKoopatlas_c::instance->setBGMTrack(world->trackID);
+
} else if (to->worldID == 0) {
OSReport("No world\n");
save->newerWorldName[0] = 0;