@@ -537,8 +537,8 @@ OPENAL_BUFFER* caveslairmusic = NULL;
537
537
OPENAL_BUFFER* bramscastlemusic = NULL ;
538
538
OPENAL_BUFFER* hamletmusic = NULL ;
539
539
OPENAL_BUFFER* tutorialmusic = nullptr ;
540
- OPENAL_BUFFER* introstorymusic = nullptr ;
541
540
OPENAL_BUFFER* gameovermusic = nullptr ;
541
+ OPENAL_BUFFER* introstorymusic = nullptr ;
542
542
bool levelmusicplaying = false ;
543
543
544
544
OPENAL_SOUND* music_channel = nullptr ;
@@ -1160,6 +1160,7 @@ bool physfsSearchMusicToUpdate()
1160
1160
themeMusic.push_back (" music/hamlet.ogg" );
1161
1161
themeMusic.push_back (" music/tutorial.ogg" );
1162
1162
themeMusic.push_back (" sound/Death.ogg" );
1163
+ themeMusic.push_back (" sound/ui/StoryMusicV3.ogg" );
1163
1164
1164
1165
for ( std::vector<std::string>::iterator it = themeMusic.begin (); it != themeMusic.end (); ++it )
1165
1166
{
@@ -1281,6 +1282,7 @@ void physfsReloadMusic(bool &introMusicChanged, bool reloadAll) //TODO: This sho
1281
1282
themeMusic.push_back (" music/hamlet.ogg" );
1282
1283
themeMusic.push_back (" music/tutorial.ogg" );
1283
1284
themeMusic.push_back (" sound/Death.ogg" );
1285
+ themeMusic.push_back (" sound/ui/StoryMusicV3.ogg" );
1284
1286
1285
1287
int index = 0 ;
1286
1288
#ifdef USE_OPENAL
@@ -1583,6 +1585,20 @@ void physfsReloadMusic(bool &introMusicChanged, bool reloadAll) //TODO: This sho
1583
1585
fmod_result = fmod_system->createStream (musicDir.c_str (), FMOD_DEFAULT, nullptr , &gameovermusic);
1584
1586
}
1585
1587
break ;
1588
+ case 20 :
1589
+ if ( introstorymusic )
1590
+ {
1591
+ introstorymusic->release ();
1592
+ }
1593
+ if ( musicPreload )
1594
+ {
1595
+ fmod_result = fmod_system->createSound (musicDir.c_str (), FMOD_DEFAULT, nullptr , &introstorymusic);
1596
+ }
1597
+ else
1598
+ {
1599
+ fmod_result = fmod_system->createStream (musicDir.c_str (), FMOD_DEFAULT, nullptr , &introstorymusic);
1600
+ }
1601
+ break ;
1586
1602
default :
1587
1603
break ;
1588
1604
}
0 commit comments