Erwan
- bug fix in JGE++ audio (improve HBL compatibility) - Added new rewards in story mode: random card, card (either by "name" or id), specific set - Story mode: added possibility to choose music, and bg for duel. -- See "01. Where it all begins" for examples of new features
This commit is contained in:
@@ -254,7 +254,8 @@ void GameApp::Destroy()
|
||||
SAFE_DELETE(Subtypes::subtypesList);
|
||||
SAFE_DELETE(DeckMetaDataList::decksMetaData);
|
||||
|
||||
SAFE_DELETE(music);
|
||||
playMusic("none");
|
||||
|
||||
Translator::EndInstance();
|
||||
WCFilterFactory::Destroy();
|
||||
SimpleMenu::destroy();
|
||||
@@ -426,3 +427,15 @@ void GameApp::DoTransition(int trans, int tostate, float dur, bool animonly){
|
||||
void GameApp::DoAnimation(int trans, float dur){
|
||||
DoTransition(trans,GAME_STATE_NONE,dur,true);
|
||||
}
|
||||
|
||||
void GameApp::playMusic(string filename, bool loop) {
|
||||
if (music) {
|
||||
JSoundSystem::GetInstance()->StopMusic(music);
|
||||
SAFE_DELETE(music);
|
||||
}
|
||||
|
||||
if (HasMusic && options[Options::MUSICVOLUME].number > 0){
|
||||
music = resources.ssLoadMusic(filename.c_str());
|
||||
if (music) JSoundSystem::GetInstance()->PlayMusic(music, loop);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user