Commit 77c9b43b authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents b7c0df7c 8e548735
...@@ -156,7 +156,7 @@ void SoundManager::PlaySoundEffect(int sound) { ...@@ -156,7 +156,7 @@ void SoundManager::PlaySoundEffect(int sound) {
break; break;
} }
case SOUND_RECOVER: { case SOUND_RECOVER: {
strcpy(soundName, "recover"); strcpy(soundName, "gainlp");
break; break;
} }
case SOUND_COUNTER_ADD: { case SOUND_COUNTER_ADD: {
...@@ -168,11 +168,11 @@ void SoundManager::PlaySoundEffect(int sound) { ...@@ -168,11 +168,11 @@ void SoundManager::PlaySoundEffect(int sound) {
break; break;
} }
case SOUND_COIN: { case SOUND_COIN: {
strcpy(soundName, "coin"); strcpy(soundName, "coinflip");
break; break;
} }
case SOUND_DICE: { case SOUND_DICE: {
strcpy(soundName, "dice"); strcpy(soundName, "diceroll");
break; break;
} }
case SOUND_NEXT_TURN: { case SOUND_NEXT_TURN: {
...@@ -212,7 +212,7 @@ void SoundManager::PlaySoundEffect(int sound) { ...@@ -212,7 +212,7 @@ void SoundManager::PlaySoundEffect(int sound) {
break; break;
} }
case SOUND_CHAT: { case SOUND_CHAT: {
strcpy(soundName, "chat"); strcpy(soundName, "chatmessage");
break; break;
} }
default: default:
...@@ -270,7 +270,13 @@ void SoundManager::PlayMusic(char* song, bool loop) { ...@@ -270,7 +270,13 @@ void SoundManager::PlayMusic(char* song, bool loop) {
StopBGM(); StopBGM();
#ifdef YGOPRO_USE_MINIAUDIO #ifdef YGOPRO_USE_MINIAUDIO
strcpy(currentPlayingMusic, song); strcpy(currentPlayingMusic, song);
#ifdef _WIN32
wchar_t song_w[1024];
BufferIO::DecodeUTF8(song, song_w);
ma_sound_init_from_file_w(&engineMusic, song_w, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM);
#else
ma_sound_init_from_file(&engineMusic, song, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM); ma_sound_init_from_file(&engineMusic, song, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM);
#endif
ma_sound_set_looping(&soundBGM, loop); ma_sound_set_looping(&soundBGM, loop);
ma_sound_start(&soundBGM); ma_sound_start(&soundBGM);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment