Commit 952fb20f authored by mercury233's avatar mercury233

Merge branch 'sound' into link

parents 052d5ee1 d8378afb
...@@ -1011,6 +1011,7 @@ bool ClientField::ShowSelectSum(bool panelmode) { ...@@ -1011,6 +1011,7 @@ bool ClientField::ShowSelectSum(bool panelmode) {
BufferIO::CopyWStrRef(dataManager.GetSysString(210), pwbuf, 256); BufferIO::CopyWStrRef(dataManager.GetSysString(210), pwbuf, 256);
mainGame->stQMessage->setText(wbuf); mainGame->stQMessage->setText(wbuf);
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
} }
} else { } else {
select_ready = false; select_ready = false;
...@@ -1032,6 +1033,7 @@ bool ClientField::ShowSelectSum(bool panelmode) { ...@@ -1032,6 +1033,7 @@ bool ClientField::ShowSelectSum(bool panelmode) {
BufferIO::CopyWStrRef(dataManager.GetSysString(210), pwbuf, 256); BufferIO::CopyWStrRef(dataManager.GetSysString(210), pwbuf, 256);
mainGame->stQMessage->setText(wbuf); mainGame->stQMessage->setText(wbuf);
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
} }
} else } else
select_ready = false; select_ready = false;
......
...@@ -76,7 +76,9 @@ void DeckBuilder::Initialize() { ...@@ -76,7 +76,9 @@ void DeckBuilder::Initialize() {
hovered_code = 0; hovered_code = 0;
hovered_pos = 0; hovered_pos = 0;
hovered_seq = -1; hovered_seq = -1;
is_lastcard = 0;
is_draging = false; is_draging = false;
is_starting_dragging = false;
prev_deck = mainGame->cbDBDecks->getSelected(); prev_deck = mainGame->cbDBDecks->getSelected();
prev_operation = 0; prev_operation = 0;
is_modified = false; is_modified = false;
...@@ -116,11 +118,13 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -116,11 +118,13 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break; break;
switch(event.GUIEvent.EventType) { switch(event.GUIEvent.EventType) {
case irr::gui::EGET_BUTTON_CLICKED: { case irr::gui::EGET_BUTTON_CLICKED: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
switch(id) { switch(id) {
case BUTTON_CLEAR_DECK: { case BUTTON_CLEAR_DECK: {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)dataManager.GetSysString(1339)); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)dataManager.GetSysString(1339));
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
prev_operation = id; prev_operation = id;
break; break;
...@@ -177,6 +181,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -177,6 +181,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
myswprintf(textBuffer, L"%ls\n%ls", mainGame->cbDBDecks->getItem(sel), dataManager.GetSysString(1337)); myswprintf(textBuffer, L"%ls\n%ls", mainGame->cbDBDecks->getItem(sel), dataManager.GetSysString(1337));
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)textBuffer); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)textBuffer);
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
prev_operation = id; prev_operation = id;
break; break;
...@@ -186,6 +191,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -186,6 +191,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)dataManager.GetSysString(1356)); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)dataManager.GetSysString(1356));
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
prev_operation = id; prev_operation = id;
break; break;
...@@ -343,6 +349,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -343,6 +349,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)dataManager.GetSysString(1356)); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)dataManager.GetSysString(1356));
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
prev_operation = id; prev_operation = id;
break; break;
...@@ -487,25 +494,21 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -487,25 +494,21 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if(!check_limit(draging_pointer)) if(!check_limit(draging_pointer))
break; break;
} }
if(hovered_pos == 1) is_starting_dragging = true;
pop_main(hovered_seq);
else if(hovered_pos == 2)
pop_extra(hovered_seq);
else if(hovered_pos == 3)
pop_side(hovered_seq);
is_draging = true;
break; break;
} }
case irr::EMIE_LMOUSE_LEFT_UP: { case irr::EMIE_LMOUSE_LEFT_UP: {
is_starting_dragging = false;
if(!is_draging) if(!is_draging)
break; break;
mainGame->PlaySoundEffect(SOUND_CARD_DROP);
bool pushed = false; bool pushed = false;
if(hovered_pos == 1) if(hovered_pos == 1)
pushed = push_main(draging_pointer, hovered_seq); pushed = push_main(draging_pointer, hovered_seq);
else if(hovered_pos == 2) else if(hovered_pos == 2)
pushed = push_extra(draging_pointer, hovered_seq); pushed = push_extra(draging_pointer, hovered_seq + is_lastcard);
else if(hovered_pos == 3) else if(hovered_pos == 3)
pushed = push_side(draging_pointer, hovered_seq); pushed = push_side(draging_pointer, hovered_seq + is_lastcard);
else if(hovered_pos == 4 && !mainGame->is_siding) else if(hovered_pos == 4 && !mainGame->is_siding)
pushed = true; pushed = true;
if(!pushed) { if(!pushed) {
...@@ -528,6 +531,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -528,6 +531,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
auto pointer = dataManager.GetCodePointer(hovered_code); auto pointer = dataManager.GetCodePointer(hovered_code);
if(pointer == dataManager._datas.end()) if(pointer == dataManager._datas.end())
break; break;
mainGame->PlaySoundEffect(SOUND_CARD_DROP);
if(hovered_pos == 1) { if(hovered_pos == 1) {
if(push_side(pointer)) if(push_side(pointer))
pop_main(hovered_seq); pop_main(hovered_seq);
...@@ -545,6 +549,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -545,6 +549,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if(!is_draging) { if(!is_draging) {
if(hovered_pos == 0 || hovered_seq == -1) if(hovered_pos == 0 || hovered_seq == -1)
break; break;
mainGame->PlaySoundEffect(SOUND_CARD_DROP);
if(hovered_pos == 1) { if(hovered_pos == 1) {
pop_main(hovered_seq); pop_main(hovered_seq);
} else if(hovered_pos == 2) { } else if(hovered_pos == 2) {
...@@ -561,6 +566,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -561,6 +566,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
push_side(pointer); push_side(pointer);
} }
} else { } else {
mainGame->PlaySoundEffect(SOUND_CARD_PICK);
if(click_pos == 1) { if(click_pos == 1) {
push_side(draging_pointer); push_side(draging_pointer);
} else if(click_pos == 2) { } else if(click_pos == 2) {
...@@ -587,6 +593,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -587,6 +593,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
auto pointer = dataManager.GetCodePointer(hovered_code); auto pointer = dataManager.GetCodePointer(hovered_code);
if(!check_limit(pointer)) if(!check_limit(pointer))
break; break;
mainGame->PlaySoundEffect(SOUND_CARD_PICK);
if (hovered_pos == 1) { if (hovered_pos == 1) {
if(!push_main(pointer)) if(!push_main(pointer))
push_side(pointer); push_side(pointer);
...@@ -603,6 +610,17 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -603,6 +610,17 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break; break;
} }
case irr::EMIE_MOUSE_MOVED: { case irr::EMIE_MOUSE_MOVED: {
if(is_starting_dragging) {
is_draging = true;
mainGame->PlaySoundEffect(SOUND_CARD_PICK);
if(hovered_pos == 1)
pop_main(hovered_seq);
else if(hovered_pos == 2)
pop_extra(hovered_seq);
else if(hovered_pos == 3)
pop_side(hovered_seq);
is_starting_dragging = false;
}
mouse_pos.set(event.MouseInput.X, event.MouseInput.Y); mouse_pos.set(event.MouseInput.X, event.MouseInput.Y);
GetHoveredCard(); GetHoveredCard();
break; break;
...@@ -640,6 +658,7 @@ void DeckBuilder::GetHoveredCard() { ...@@ -640,6 +658,7 @@ void DeckBuilder::GetHoveredCard() {
int pre_code = hovered_code; int pre_code = hovered_code;
hovered_pos = 0; hovered_pos = 0;
hovered_code = 0; hovered_code = 0;
is_lastcard = 0;
if(x >= 314 && x <= 794) { if(x >= 314 && x <= 794) {
if(y >= 164 && y <= 435) { if(y >= 164 && y <= 435) {
int lx = 10, px, py = (y - 164) / 68; int lx = 10, px, py = (y - 164) / 68;
...@@ -671,6 +690,8 @@ void DeckBuilder::GetHoveredCard() { ...@@ -671,6 +690,8 @@ void DeckBuilder::GetHoveredCard() {
hovered_code = 0; hovered_code = 0;
} else { } else {
hovered_code = deckManager.current_deck.extra[hovered_seq]->first; hovered_code = deckManager.current_deck.extra[hovered_seq]->first;
if(x >= 772)
is_lastcard = 1;
} }
} else if (y >= 564 && y <= 628) { } else if (y >= 564 && y <= 628) {
int lx = deckManager.current_deck.side.size(); int lx = deckManager.current_deck.side.size();
...@@ -686,6 +707,8 @@ void DeckBuilder::GetHoveredCard() { ...@@ -686,6 +707,8 @@ void DeckBuilder::GetHoveredCard() {
hovered_code = 0; hovered_code = 0;
} else { } else {
hovered_code = deckManager.current_deck.side[hovered_seq]->first; hovered_code = deckManager.current_deck.side[hovered_seq]->first;
if(x >= 772)
is_lastcard = 1;
} }
} }
} else if(x >= 810 && x <= 995 && y >= 165 && y <= 626) { } else if(x >= 810 && x <= 995 && y >= 165 && y <= 626) {
......
...@@ -49,8 +49,10 @@ public: ...@@ -49,8 +49,10 @@ public:
int hovered_code; int hovered_code;
int hovered_pos; int hovered_pos;
int hovered_seq; int hovered_seq;
int is_lastcard;
int click_pos; int click_pos;
bool is_draging; bool is_draging;
bool is_starting_dragging;
int dragx; int dragx;
int dragy; int dragy;
size_t pre_mainc; size_t pre_mainc;
......
...@@ -519,6 +519,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -519,6 +519,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->btnCancelOrFinish->setVisible(false); mainGame->btnCancelOrFinish->setVisible(false);
mainGame->stMessage->setText(dataManager.GetSysString(1500)); mainGame->stMessage->setText(dataManager.GetSysString(1500));
mainGame->PopupElement(mainGame->wMessage); mainGame->PopupElement(mainGame->wMessage);
mainGame->PlaySoundEffect(SOUND_INFO);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset(); mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait(); mainGame->actionSignal.Wait();
...@@ -559,6 +560,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -559,6 +560,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mbstowcs(timetext, timebuf, size); mbstowcs(timetext, timebuf, size);
mainGame->ebRSName->setText(timetext); mainGame->ebRSName->setText(timetext);
mainGame->PopupElement(mainGame->wReplaySave); mainGame->PopupElement(mainGame->wReplaySave);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->replaySignal.Reset(); mainGame->replaySignal.Reset();
mainGame->replaySignal.Wait(); mainGame->replaySignal.Wait();
...@@ -626,7 +628,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -626,7 +628,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
break; break;
} }
case STOC_HS_PLAYER_ENTER: { case STOC_HS_PLAYER_ENTER: {
mainGame->PlaySoundEffect("./sound/playerenter.wav"); mainGame->PlaySoundEffect(SOUND_PLAYER_ENTER);
STOC_HS_PlayerEnter* pkt = (STOC_HS_PlayerEnter*)pdata; STOC_HS_PlayerEnter* pkt = (STOC_HS_PlayerEnter*)pdata;
if(pkt->pos > 3) if(pkt->pos > 3)
break; break;
...@@ -661,7 +663,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -661,7 +663,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
break; break;
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
if(state < 8) { if(state < 8) {
mainGame->PlaySoundEffect("./sound/playerenter.wav"); mainGame->PlaySoundEffect(SOUND_PLAYER_ENTER);
wchar_t* prename = (wchar_t*)mainGame->stHostPrepDuelist[pos]->getText(); wchar_t* prename = (wchar_t*)mainGame->stHostPrepDuelist[pos]->getText();
mainGame->stHostPrepDuelist[state]->setText(prename); mainGame->stHostPrepDuelist[state]->setText(prename);
mainGame->stHostPrepDuelist[pos]->setText(L""); mainGame->stHostPrepDuelist[pos]->setText(L"");
...@@ -732,6 +734,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -732,6 +734,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->stMessage->setText(L"Error occurs."); mainGame->stMessage->setText(L"Error occurs.");
mainGame->PopupElement(mainGame->wMessage); mainGame->PopupElement(mainGame->wMessage);
mainGame->PlaySoundEffect(SOUND_INFO);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset(); mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait(); mainGame->actionSignal.Wait();
...@@ -766,6 +769,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -766,6 +769,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->stMessage->setText(dataManager.GetDesc(data)); mainGame->stMessage->setText(dataManager.GetDesc(data));
mainGame->PopupElement(mainGame->wMessage); mainGame->PopupElement(mainGame->wMessage);
mainGame->PlaySoundEffect(SOUND_INFO);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset(); mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait(); mainGame->actionSignal.Wait();
...@@ -1115,6 +1119,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1115,6 +1119,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, textBuffer); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, textBuffer);
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
return false; return false;
} }
...@@ -1125,6 +1130,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1125,6 +1130,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)dataManager.GetDesc(desc)); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)dataManager.GetDesc(desc));
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
return false; return false;
} }
...@@ -1148,6 +1154,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1148,6 +1154,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
select_hint = 0; select_hint = 0;
mainGame->wOptions->setText(textBuffer); mainGame->wOptions->setText(textBuffer);
mainGame->PopupElement(mainGame->wOptions); mainGame->PopupElement(mainGame->wOptions);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
return false; return false;
} }
...@@ -1292,6 +1299,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1292,6 +1299,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
myswprintf(textBuffer, L"%ls\n%ls", event_string, dataManager.GetSysString(203)); myswprintf(textBuffer, L"%ls\n%ls", event_string, dataManager.GetSysString(203));
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)textBuffer); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, (wchar_t*)textBuffer);
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
} }
} }
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
...@@ -1611,6 +1619,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1611,6 +1619,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_CONFIRM_CARDS: { case MSG_CONFIRM_CARDS: {
mainGame->PlaySoundEffect(SOUND_REVEAL);
/*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadInt8(pbuf);
int code, c, l, s; int code, c, l, s;
...@@ -1712,7 +1721,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1712,7 +1721,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_SHUFFLE_DECK: { case MSG_SHUFFLE_DECK: {
mainGame->PlaySoundEffect("./sound/shuffle.wav"); mainGame->PlaySoundEffect(SOUND_SHUFFLE);
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
if(mainGame->dField.deck[player].size() < 2) if(mainGame->dField.deck[player].size() < 2)
return true; return true;
...@@ -1907,7 +1916,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1907,7 +1916,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_NEW_TURN: { case MSG_NEW_TURN: {
mainGame->PlaySoundEffect("./sound/nextturn.wav"); mainGame->PlaySoundEffect(SOUND_NEXT_TURN);
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
mainGame->dInfo.turn++; mainGame->dInfo.turn++;
if(!mainGame->dInfo.isTag && !mainGame->dInfo.isReplay && mainGame->dInfo.player_type < 7) { if(!mainGame->dInfo.isTag && !mainGame->dInfo.isReplay && mainGame->dInfo.player_type < 7) {
...@@ -1944,7 +1953,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1944,7 +1953,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_NEW_PHASE: { case MSG_NEW_PHASE: {
mainGame->PlaySoundEffect("./sound/phase.wav"); mainGame->PlaySoundEffect(SOUND_PHASE);
unsigned short phase = BufferIO::ReadInt16(pbuf); unsigned short phase = BufferIO::ReadInt16(pbuf);
mainGame->btnPhaseStatus->setVisible(false); mainGame->btnPhaseStatus->setVisible(false);
mainGame->btnBP->setVisible(false); mainGame->btnBP->setVisible(false);
...@@ -1999,8 +2008,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1999,8 +2008,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int cs = BufferIO::ReadInt8(pbuf); int cs = BufferIO::ReadInt8(pbuf);
int cp = BufferIO::ReadInt8(pbuf); int cp = BufferIO::ReadInt8(pbuf);
int reason = BufferIO::ReadInt32(pbuf); int reason = BufferIO::ReadInt32(pbuf);
if(reason & REASON_DESTROY && pl != cl) if(cl & LOCATION_REMOVED)
mainGame->PlaySoundEffect("./sound/destroyed.wav"); mainGame->PlaySoundEffect(SOUND_BANISHED);
else if(reason & REASON_DESTROY && pl != cl)
mainGame->PlaySoundEffect(SOUND_DESTROYED);
if (pl == 0) { if (pl == 0) {
ClientCard* pcard = new ClientCard(); ClientCard* pcard = new ClientCard();
pcard->position = cp; pcard->position = cp;
...@@ -2216,7 +2227,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2216,7 +2227,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_SET: { case MSG_SET: {
mainGame->PlaySoundEffect("./sound/set.wav"); mainGame->PlaySoundEffect(SOUND_SET);
/*int code = */BufferIO::ReadInt32(pbuf); /*int code = */BufferIO::ReadInt32(pbuf);
/*int cc = mainGame->LocalPlayer*/(BufferIO::ReadInt8(pbuf)); /*int cc = mainGame->LocalPlayer*/(BufferIO::ReadInt8(pbuf));
/*int cl = */BufferIO::ReadInt8(pbuf); /*int cl = */BufferIO::ReadInt8(pbuf);
...@@ -2269,7 +2280,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2269,7 +2280,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_SUMMONING: { case MSG_SUMMONING: {
mainGame->PlaySoundEffect("./sound/summon.wav"); mainGame->PlaySoundEffect(SOUND_SUMMON);
unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf);
/*int cc = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); /*int cc = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
/*int cl = */BufferIO::ReadInt8(pbuf); /*int cl = */BufferIO::ReadInt8(pbuf);
...@@ -2292,7 +2303,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2292,7 +2303,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_SPSUMMONING: { case MSG_SPSUMMONING: {
mainGame->PlaySoundEffect("./sound/specialsummon.wav"); mainGame->PlaySoundEffect(SOUND_SPECIAL_SUMMON);
unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf);
/*int cc = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); /*int cc = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
/*int cl = */BufferIO::ReadInt8(pbuf); /*int cl = */BufferIO::ReadInt8(pbuf);
...@@ -2314,7 +2325,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2314,7 +2325,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_FLIPSUMMONING: { case MSG_FLIPSUMMONING: {
mainGame->PlaySoundEffect("./sound/flip.wav"); mainGame->PlaySoundEffect(SOUND_FILP);
unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf);
int cc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int cc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int cl = BufferIO::ReadInt8(pbuf); int cl = BufferIO::ReadInt8(pbuf);
...@@ -2342,7 +2353,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2342,7 +2353,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_CHAINING: { case MSG_CHAINING: {
mainGame->PlaySoundEffect("./sound/activate.wav"); mainGame->PlaySoundEffect(SOUND_ACTIVATE);
unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf);
int pcc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int pcc = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int pcl = BufferIO::ReadInt8(pbuf); int pcl = BufferIO::ReadInt8(pbuf);
...@@ -2450,6 +2461,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2450,6 +2461,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_RANDOM_SELECTED: { case MSG_RANDOM_SELECTED: {
//mainGame->PlaySoundEffect(SOUND_TARGET);
/*int player = */BufferIO::ReadInt8(pbuf); /*int player = */BufferIO::ReadInt8(pbuf);
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadInt8(pbuf);
if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) {
...@@ -2474,6 +2486,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2474,6 +2486,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_BECOME_TARGET: { case MSG_BECOME_TARGET: {
//mainGame->PlaySoundEffect(SOUND_TARGET);
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadInt8(pbuf);
if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) { if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) {
pbuf += count * 4; pbuf += count * 4;
...@@ -2521,7 +2534,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2521,7 +2534,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
} }
} else { } else {
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
mainGame->PlaySoundEffect("./sound/draw.wav"); mainGame->PlaySoundEffect(SOUND_DRAW);
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
pcard = mainGame->dField.GetCard(player, LOCATION_DECK, mainGame->dField.deck[player].size() - 1); pcard = mainGame->dField.GetCard(player, LOCATION_DECK, mainGame->dField.deck[player].size() - 1);
mainGame->dField.deck[player].erase(mainGame->dField.deck[player].end() - 1); mainGame->dField.deck[player].erase(mainGame->dField.deck[player].end() - 1);
...@@ -2538,7 +2551,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2538,7 +2551,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_DAMAGE: { case MSG_DAMAGE: {
mainGame->PlaySoundEffect("./sound/damage.wav"); mainGame->PlaySoundEffect(SOUND_DAMAGE);
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int val = BufferIO::ReadInt32(pbuf); int val = BufferIO::ReadInt32(pbuf);
int final = mainGame->dInfo.lp[player] - val; int final = mainGame->dInfo.lp[player] - val;
...@@ -2569,7 +2582,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2569,7 +2582,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_RECOVER: { case MSG_RECOVER: {
mainGame->PlaySoundEffect("./sound/gainlp.wav"); mainGame->PlaySoundEffect(SOUND_RECOVER);
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int val = BufferIO::ReadInt32(pbuf); int val = BufferIO::ReadInt32(pbuf);
int final = mainGame->dInfo.lp[player] + val; int final = mainGame->dInfo.lp[player] + val;
...@@ -2598,7 +2611,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2598,7 +2611,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_EQUIP: { case MSG_EQUIP: {
mainGame->PlaySoundEffect("./sound/equip.wav"); mainGame->PlaySoundEffect(SOUND_EQUIP);
int c1 = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int c1 = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int l1 = BufferIO::ReadInt8(pbuf); int l1 = BufferIO::ReadInt8(pbuf);
int s1 = BufferIO::ReadInt8(pbuf); int s1 = BufferIO::ReadInt8(pbuf);
...@@ -2723,7 +2736,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2723,7 +2736,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
break; break;
} }
case MSG_PAY_LPCOST: { case MSG_PAY_LPCOST: {
mainGame->PlaySoundEffect("./sound/damage.wav"); mainGame->PlaySoundEffect(SOUND_DAMAGE);
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int cost = BufferIO::ReadInt32(pbuf); int cost = BufferIO::ReadInt32(pbuf);
int final = mainGame->dInfo.lp[player] - cost; int final = mainGame->dInfo.lp[player] - cost;
...@@ -2750,7 +2763,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2750,7 +2763,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_ADD_COUNTER: { case MSG_ADD_COUNTER: {
mainGame->PlaySoundEffect("./sound/addcounter.wav"); mainGame->PlaySoundEffect(SOUND_COUNTER_ADD);
int type = BufferIO::ReadInt16(pbuf); int type = BufferIO::ReadInt16(pbuf);
int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int l = BufferIO::ReadInt8(pbuf); int l = BufferIO::ReadInt8(pbuf);
...@@ -2773,7 +2786,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2773,7 +2786,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_REMOVE_COUNTER: { case MSG_REMOVE_COUNTER: {
mainGame->PlaySoundEffect("./sound/removecounter.wav"); mainGame->PlaySoundEffect(SOUND_COUNTER_REMOVE);
int type = BufferIO::ReadInt16(pbuf); int type = BufferIO::ReadInt16(pbuf);
int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int l = BufferIO::ReadInt8(pbuf); int l = BufferIO::ReadInt8(pbuf);
...@@ -2796,7 +2809,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2796,7 +2809,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_ATTACK: { case MSG_ATTACK: {
mainGame->PlaySoundEffect("./sound/attack.wav");
int ca = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int ca = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int la = BufferIO::ReadInt8(pbuf); int la = BufferIO::ReadInt8(pbuf);
int sa = BufferIO::ReadInt8(pbuf); int sa = BufferIO::ReadInt8(pbuf);
...@@ -2806,6 +2818,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2806,6 +2818,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int ld = BufferIO::ReadInt8(pbuf); int ld = BufferIO::ReadInt8(pbuf);
int sd = BufferIO::ReadInt8(pbuf); int sd = BufferIO::ReadInt8(pbuf);
BufferIO::ReadInt8(pbuf); BufferIO::ReadInt8(pbuf);
if(ld != 0)
mainGame->PlaySoundEffect(SOUND_ATTACK);
else
mainGame->PlaySoundEffect(SOUND_DIRECT_ATTACK);
if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping)
return true; return true;
float sy; float sy;
...@@ -2905,7 +2921,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2905,7 +2921,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_TOSS_COIN: { case MSG_TOSS_COIN: {
mainGame->PlaySoundEffect("./sound/coinflip.wav"); mainGame->PlaySoundEffect(SOUND_COIN);
/*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadInt8(pbuf);
wchar_t* pwbuf = textBuffer; wchar_t* pwbuf = textBuffer;
...@@ -2929,7 +2945,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2929,7 +2945,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return true; return true;
} }
case MSG_TOSS_DICE: { case MSG_TOSS_DICE: {
mainGame->PlaySoundEffect("./sound/diceroll.wav"); mainGame->PlaySoundEffect(SOUND_DICE);
/*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadInt8(pbuf);
wchar_t* pwbuf = textBuffer; wchar_t* pwbuf = textBuffer;
...@@ -2995,6 +3011,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2995,6 +3011,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->wANRace->setText(textBuffer); mainGame->wANRace->setText(textBuffer);
mainGame->PopupElement(mainGame->wANRace); mainGame->PopupElement(mainGame->wANRace);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
return false; return false;
} }
...@@ -3015,6 +3032,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3015,6 +3032,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->wANAttribute->setText(textBuffer); mainGame->wANAttribute->setText(textBuffer);
mainGame->PopupElement(mainGame->wANAttribute); mainGame->PopupElement(mainGame->wANAttribute);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
return false; return false;
} }
...@@ -3031,6 +3049,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3031,6 +3049,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->wANCard->setText(textBuffer); mainGame->wANCard->setText(textBuffer);
mainGame->dField.UpdateDeclarableCode(true); mainGame->dField.UpdateDeclarableCode(true);
mainGame->PopupElement(mainGame->wANCard); mainGame->PopupElement(mainGame->wANCard);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
return false; return false;
} }
...@@ -3051,6 +3070,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3051,6 +3070,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
select_hint = 0; select_hint = 0;
mainGame->wANNumber->setText(textBuffer); mainGame->wANNumber->setText(textBuffer);
mainGame->PopupElement(mainGame->wANNumber); mainGame->PopupElement(mainGame->wANNumber);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
return false; return false;
} }
...@@ -3070,6 +3090,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3070,6 +3090,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->wANCard->setText(textBuffer); mainGame->wANCard->setText(textBuffer);
mainGame->dField.UpdateDeclarableCode(true); mainGame->dField.UpdateDeclarableCode(true);
mainGame->PopupElement(mainGame->wANCard); mainGame->PopupElement(mainGame->wANCard);
mainGame->PlaySoundEffect(SOUND_QUESTION);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
return false; return false;
} }
......
...@@ -40,6 +40,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -40,6 +40,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
} }
case BUTTON_FIRST: case BUTTON_FIRST:
case BUTTON_SECOND: { case BUTTON_SECOND: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
mainGame->HideElement(mainGame->wFTSelect); mainGame->HideElement(mainGame->wFTSelect);
CTOS_TPResult cstr; CTOS_TPResult cstr;
cstr.res = BUTTON_SECOND - id; cstr.res = BUTTON_SECOND - id;
...@@ -49,6 +50,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -49,6 +50,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case BUTTON_REPLAY_START: { case BUTTON_REPLAY_START: {
if(!mainGame->dInfo.isReplay) if(!mainGame->dInfo.isReplay)
break; break;
mainGame->PlaySoundEffect(SOUND_BUTTON);
mainGame->btnReplayStart->setVisible(false); mainGame->btnReplayStart->setVisible(false);
mainGame->btnReplayPause->setVisible(true); mainGame->btnReplayPause->setVisible(true);
mainGame->btnReplayStep->setVisible(false); mainGame->btnReplayStep->setVisible(false);
...@@ -59,6 +61,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -59,6 +61,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case BUTTON_REPLAY_PAUSE: { case BUTTON_REPLAY_PAUSE: {
if(!mainGame->dInfo.isReplay) if(!mainGame->dInfo.isReplay)
break; break;
mainGame->PlaySoundEffect(SOUND_BUTTON);
mainGame->btnReplayStart->setVisible(true); mainGame->btnReplayStart->setVisible(true);
mainGame->btnReplayPause->setVisible(false); mainGame->btnReplayPause->setVisible(false);
mainGame->btnReplayStep->setVisible(true); mainGame->btnReplayStep->setVisible(true);
...@@ -69,16 +72,19 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -69,16 +72,19 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case BUTTON_REPLAY_STEP: { case BUTTON_REPLAY_STEP: {
if(!mainGame->dInfo.isReplay) if(!mainGame->dInfo.isReplay)
break; break;
mainGame->PlaySoundEffect(SOUND_BUTTON);
ReplayMode::Pause(false, true); ReplayMode::Pause(false, true);
break; break;
} }
case BUTTON_REPLAY_EXIT: { case BUTTON_REPLAY_EXIT: {
if(!mainGame->dInfo.isReplay) if(!mainGame->dInfo.isReplay)
break; break;
mainGame->PlaySoundEffect(SOUND_BUTTON);
ReplayMode::StopReplay(); ReplayMode::StopReplay();
break; break;
} }
case BUTTON_REPLAY_SWAP: { case BUTTON_REPLAY_SWAP: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
if(mainGame->dInfo.isReplay) if(mainGame->dInfo.isReplay)
ReplayMode::SwapField(); ReplayMode::SwapField();
else if (mainGame->dInfo.player_type == 7) else if (mainGame->dInfo.player_type == 7)
...@@ -88,24 +94,28 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -88,24 +94,28 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case BUTTON_REPLAY_UNDO: { case BUTTON_REPLAY_UNDO: {
if(!mainGame->dInfo.isReplay) if(!mainGame->dInfo.isReplay)
break; break;
mainGame->PlaySoundEffect(SOUND_BUTTON);
ReplayMode::Undo(); ReplayMode::Undo();
break; break;
} }
case BUTTON_REPLAY_SAVE: { case BUTTON_REPLAY_SAVE: {
if(mainGame->ebRSName->getText()[0] == 0) if(mainGame->ebRSName->getText()[0] == 0)
break; break;
mainGame->PlaySoundEffect(SOUND_BUTTON);
mainGame->actionParam = 1; mainGame->actionParam = 1;
mainGame->HideElement(mainGame->wReplaySave); mainGame->HideElement(mainGame->wReplaySave);
mainGame->replaySignal.Set(); mainGame->replaySignal.Set();
break; break;
} }
case BUTTON_REPLAY_CANCEL: { case BUTTON_REPLAY_CANCEL: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
mainGame->actionParam = 0; mainGame->actionParam = 0;
mainGame->HideElement(mainGame->wReplaySave); mainGame->HideElement(mainGame->wReplaySave);
mainGame->replaySignal.Set(); mainGame->replaySignal.Set();
break; break;
} }
case BUTTON_LEAVE_GAME: { case BUTTON_LEAVE_GAME: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
if(mainGame->dInfo.isSingleMode) { if(mainGame->dInfo.isSingleMode) {
mainGame->singleSignal.SetNoWait(true); mainGame->singleSignal.SetNoWait(true);
SingleMode::StopPlay(false); SingleMode::StopPlay(false);
...@@ -131,6 +141,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -131,6 +141,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_CHAIN_IGNORE: { case BUTTON_CHAIN_IGNORE: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
mainGame->ignore_chain = mainGame->btnChainIgnore->isPressed(); mainGame->ignore_chain = mainGame->btnChainIgnore->isPressed();
mainGame->always_chain = false; mainGame->always_chain = false;
mainGame->chain_when_avail = false; mainGame->chain_when_avail = false;
...@@ -138,6 +149,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -138,6 +149,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_CHAIN_ALWAYS: { case BUTTON_CHAIN_ALWAYS: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
mainGame->always_chain = mainGame->btnChainAlways->isPressed(); mainGame->always_chain = mainGame->btnChainAlways->isPressed();
mainGame->ignore_chain = false; mainGame->ignore_chain = false;
mainGame->chain_when_avail = false; mainGame->chain_when_avail = false;
...@@ -145,6 +157,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -145,6 +157,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_CHAIN_WHENAVAIL: { case BUTTON_CHAIN_WHENAVAIL: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
mainGame->chain_when_avail = mainGame->btnChainWhenAvail->isPressed(); mainGame->chain_when_avail = mainGame->btnChainWhenAvail->isPressed();
mainGame->always_chain = false; mainGame->always_chain = false;
mainGame->ignore_chain = false; mainGame->ignore_chain = false;
...@@ -152,6 +165,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -152,6 +165,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_CANCEL_OR_FINISH: { case BUTTON_CANCEL_OR_FINISH: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
switch (mainGame->dInfo.curMsg) { switch (mainGame->dInfo.curMsg) {
case MSG_WAITING: { case MSG_WAITING: {
if (mainGame->wCardSelect->isVisible()) { if (mainGame->wCardSelect->isVisible()) {
...@@ -261,6 +275,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -261,6 +275,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
} }
else { else {
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
ShowCancelOrFinishButton(0); ShowCancelOrFinishButton(0);
} }
if (mainGame->wOptions->isVisible()) { if (mainGame->wOptions->isVisible()) {
...@@ -282,11 +297,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -282,11 +297,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_MSG_OK: { case BUTTON_MSG_OK: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
mainGame->HideElement(mainGame->wMessage); mainGame->HideElement(mainGame->wMessage);
mainGame->actionSignal.Set(); mainGame->actionSignal.Set();
break; break;
} }
case BUTTON_YES: { case BUTTON_YES: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
switch(mainGame->dInfo.curMsg) { switch(mainGame->dInfo.curMsg) {
case MSG_SELECT_YESNO: case MSG_SELECT_YESNO:
case MSG_SELECT_EFFECTYN: { case MSG_SELECT_EFFECTYN: {
...@@ -320,6 +337,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -320,6 +337,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_NO: { case BUTTON_NO: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
switch(mainGame->dInfo.curMsg) { switch(mainGame->dInfo.curMsg) {
case MSG_SELECT_YESNO: case MSG_SELECT_YESNO:
case MSG_SELECT_EFFECTYN: { case MSG_SELECT_EFFECTYN: {
...@@ -372,6 +390,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -372,6 +390,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_OPTION_PREV: { case BUTTON_OPTION_PREV: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
selected_option--; selected_option--;
mainGame->btnOptionn->setVisible(true); mainGame->btnOptionn->setVisible(true);
if(selected_option == 0) if(selected_option == 0)
...@@ -380,6 +399,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -380,6 +399,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_OPTION_NEXT: { case BUTTON_OPTION_NEXT: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
selected_option++; selected_option++;
mainGame->btnOptionp->setVisible(true); mainGame->btnOptionp->setVisible(true);
if(selected_option == select_options.size() - 1) if(selected_option == select_options.size() - 1)
...@@ -388,6 +408,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -388,6 +408,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_OPTION_OK: { case BUTTON_OPTION_OK: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
if (mainGame->dInfo.curMsg == MSG_SELECT_OPTION) { if (mainGame->dInfo.curMsg == MSG_SELECT_OPTION) {
DuelClient::SetResponseI(selected_option); DuelClient::SetResponseI(selected_option);
} else { } else {
...@@ -405,11 +426,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -405,11 +426,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_ANNUMBER_OK: { case BUTTON_ANNUMBER_OK: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
DuelClient::SetResponseI(mainGame->cbANNumber->getSelected()); DuelClient::SetResponseI(mainGame->cbANNumber->getSelected());
mainGame->HideElement(mainGame->wANNumber, true); mainGame->HideElement(mainGame->wANNumber, true);
break; break;
} }
case BUTTON_ANCARD_OK: { case BUTTON_ANCARD_OK: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
int sel = mainGame->lstANCard->getSelected(); int sel = mainGame->lstANCard->getSelected();
if(sel == -1) if(sel == -1)
break; break;
...@@ -1426,6 +1449,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1426,6 +1449,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
BufferIO::CopyWStrRef(dataManager.GetSysString(210), pwbuf, 256); BufferIO::CopyWStrRef(dataManager.GetSysString(210), pwbuf, 256);
mainGame->stQMessage->setText(wbuf); mainGame->stQMessage->setText(wbuf);
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
} }
} }
} else { } else {
...@@ -1601,6 +1625,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1601,6 +1625,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->HideElement(mainGame->wQuery, true); mainGame->HideElement(mainGame->wQuery, true);
} else { } else {
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->PlaySoundEffect(SOUND_QUESTION);
ShowCancelOrFinishButton(0); ShowCancelOrFinishButton(0);
} }
if(mainGame->wOptions->isVisible()) { if(mainGame->wOptions->isVisible()) {
...@@ -1951,6 +1976,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -1951,6 +1976,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
s32 id = event.GUIEvent.Caller->getID(); s32 id = event.GUIEvent.Caller->getID();
switch(event.GUIEvent.EventType) { switch(event.GUIEvent.EventType) {
case irr::gui::EGET_BUTTON_CLICKED: { case irr::gui::EGET_BUTTON_CLICKED: {
mainGame->PlaySoundEffect(SOUND_BUTTON);
switch(id) { switch(id) {
case BUTTON_CLEAR_LOG: { case BUTTON_CLEAR_LOG: {
mainGame->lstLog->clear(); mainGame->lstLog->clear();
......
...@@ -629,12 +629,12 @@ No.41 ...@@ -629,12 +629,12 @@ No.41
btnChainIgnore->setVisible(false); btnChainIgnore->setVisible(false);
btnChainAlways->setVisible(false); btnChainAlways->setVisible(false);
btnChainWhenAvail->setVisible(false); btnChainWhenAvail->setVisible(false);
//cancel or finish
btnCancelOrFinish = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_CANCEL_OR_FINISH, dataManager.GetSysString(1295));
btnCancelOrFinish->setVisible(false);
//shuffle //shuffle
btnShuffle = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_CMD_SHUFFLE, dataManager.GetSysString(1297)); btnShuffle = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_CMD_SHUFFLE, dataManager.GetSysString(1297));
btnShuffle->setVisible(false); btnShuffle->setVisible(false);
//cancel or finish
btnCancelOrFinish = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_CANCEL_OR_FINISH, dataManager.GetSysString(1295));
btnCancelOrFinish->setVisible(false);
//leave/surrender/exit //leave/surrender/exit
btnLeaveGame = env->addButton(rect<s32>(205, 5, 295, 80), 0, BUTTON_LEAVE_GAME, L""); btnLeaveGame = env->addButton(rect<s32>(205, 5, 295, 80), 0, BUTTON_LEAVE_GAME, L"");
btnLeaveGame->setVisible(false); btnLeaveGame->setVisible(false);
...@@ -1156,11 +1156,130 @@ void Game::SaveConfig() { ...@@ -1156,11 +1156,130 @@ void Game::SaveConfig() {
fprintf(fp, "music_mode = %d\n", ((mainGame->chkMusicMode->isChecked()) ? 1 : 0)); fprintf(fp, "music_mode = %d\n", ((mainGame->chkMusicMode->isChecked()) ? 1 : 0));
fclose(fp); fclose(fp);
} }
void Game::PlaySoundEffect(char* sound) { void Game::PlaySoundEffect(int sound) {
if(mainGame->chkEnableSound->isChecked()) { if(!mainGame->chkEnableSound->isChecked())
engineSound->play2D(sound); return;
engineSound->setSoundVolume(gameConf.sound_volume); switch(sound) {
case SOUND_SUMMON: {
engineSound->play2D("./sound/summon.wav");
break;
}
case SOUND_SPECIAL_SUMMON: {
engineSound->play2D("./sound/specialsummon.wav");
break;
}
case SOUND_ACTIVATE: {
engineSound->play2D("./sound/activate.wav");
break;
}
case SOUND_SET: {
engineSound->play2D("./sound/set.wav");
break;
}
case SOUND_FILP: {
engineSound->play2D("./sound/flip.wav");
break;
}
case SOUND_REVEAL: {
engineSound->play2D("./sound/reveal.wav");
break;
}
case SOUND_EQUIP: {
engineSound->play2D("./sound/equip.wav");
break;
}
case SOUND_DESTROYED: {
engineSound->play2D("./sound/destroyed.wav");
break;
}
case SOUND_BANISHED: {
engineSound->play2D("./sound/banished.wav");
break;
}
case SOUND_ATTACK: {
engineSound->play2D("./sound/attack.wav");
break;
}
case SOUND_DIRECT_ATTACK: {
engineSound->play2D("./sound/directattack.wav");
break;
}
case SOUND_DRAW: {
engineSound->play2D("./sound/draw.wav");
break;
}
case SOUND_SHUFFLE: {
engineSound->play2D("./sound/shuffle.wav");
break;
}
case SOUND_DAMAGE: {
engineSound->play2D("./sound/damage.wav");
break;
}
case SOUND_RECOVER: {
engineSound->play2D("./sound/gainlp.wav");
break;
}
case SOUND_COUNTER_ADD: {
engineSound->play2D("./sound/addcounter.wav");
break;
}
case SOUND_COUNTER_REMOVE: {
engineSound->play2D("./sound/removecounter.wav");
break;
}
case SOUND_COIN: {
engineSound->play2D("./sound/coinflip.wav");
break;
}
case SOUND_DICE: {
engineSound->play2D("./sound/diceroll.wav");
break;
}
case SOUND_NEXT_TURN: {
engineSound->play2D("./sound/nextturn.wav");
break;
}
case SOUND_PHASE: {
engineSound->play2D("./sound/phase.wav");
break;
}
case SOUND_MENU: {
engineSound->play2D("./sound/menu.wav");
break;
}
case SOUND_BUTTON: {
engineSound->play2D("./sound/button.wav");
break;
}
case SOUND_INFO: {
engineSound->play2D("./sound/info.wav");
break;
}
case SOUND_QUESTION: {
engineSound->play2D("./sound/question.wav");
break;
}
case SOUND_CARD_PICK: {
engineSound->play2D("./sound/cardpick.wav");
break;
}
case SOUND_CARD_DROP: {
engineSound->play2D("./sound/carddrop.wav");
break;
}
case SOUND_PLAYER_ENTER: {
engineSound->play2D("./sound/playerenter.wav");
break;
}
case SOUND_CHAT: {
engineSound->play2D("./sound/chatmessage.wav");
break;
}
default:
break;
} }
engineSound->setSoundVolume(gameConf.sound_volume);
} }
void Game::PlayMusic(char* song, bool loop) { void Game::PlayMusic(char* song, bool loop) {
if(mainGame->chkEnableMusic->isChecked()) { if(mainGame->chkEnableMusic->isChecked()) {
...@@ -1286,17 +1405,17 @@ void Game::AddChatMsg(wchar_t* msg, int player) { ...@@ -1286,17 +1405,17 @@ void Game::AddChatMsg(wchar_t* msg, int player) {
chatMsg[0].append(L": "); chatMsg[0].append(L": ");
break; break;
case 1: //from client case 1: //from client
mainGame->PlaySoundEffect("./sound/chatmessage.wav"); mainGame->PlaySoundEffect(SOUND_CHAT);
chatMsg[0].append(dInfo.clientname); chatMsg[0].append(dInfo.clientname);
chatMsg[0].append(L": "); chatMsg[0].append(L": ");
break; break;
case 2: //host tag case 2: //host tag
mainGame->PlaySoundEffect("./sound/chatmessage.wav"); mainGame->PlaySoundEffect(SOUND_CHAT);
chatMsg[0].append(dInfo.hostname_tag); chatMsg[0].append(dInfo.hostname_tag);
chatMsg[0].append(L": "); chatMsg[0].append(L": ");
break; break;
case 3: //client tag case 3: //client tag
mainGame->PlaySoundEffect("./sound/chatmessage.wav"); mainGame->PlaySoundEffect(SOUND_CHAT);
chatMsg[0].append(dInfo.clientname_tag); chatMsg[0].append(dInfo.clientname_tag);
chatMsg[0].append(L": "); chatMsg[0].append(L": ");
break; break;
...@@ -1305,7 +1424,7 @@ void Game::AddChatMsg(wchar_t* msg, int player) { ...@@ -1305,7 +1424,7 @@ void Game::AddChatMsg(wchar_t* msg, int player) {
chatMsg[0].append(L": "); chatMsg[0].append(L": ");
break; break;
case 8: //system custom message, no prefix. case 8: //system custom message, no prefix.
mainGame->PlaySoundEffect("./sound/chatmessage.wav"); mainGame->PlaySoundEffect(SOUND_CHAT);
chatMsg[0].append(L"[System]: "); chatMsg[0].append(L"[System]: ");
break; break;
case 9: //error message case 9: //error message
......
...@@ -120,7 +120,7 @@ public: ...@@ -120,7 +120,7 @@ public:
void AddDebugMsg(char* msgbuf); void AddDebugMsg(char* msgbuf);
void ClearTextures(); void ClearTextures();
void CloseDuelWindow(); void CloseDuelWindow();
void PlaySoundEffect(char* sound); void PlaySoundEffect(int sound);
void PlayMusic(char* song, bool loop); void PlayMusic(char* song, bool loop);
void PlayBGM(); void PlayBGM();
...@@ -581,5 +581,37 @@ extern Game* mainGame; ...@@ -581,5 +581,37 @@ extern Game* mainGame;
#define BUTTON_MARKS_FILTER 380 #define BUTTON_MARKS_FILTER 380
#define BUTTON_MARKERS_OK 381 #define BUTTON_MARKERS_OK 381
#define SOUND_SUMMON 101
#define SOUND_SPECIAL_SUMMON 102
#define SOUND_ACTIVATE 103
#define SOUND_SET 104
#define SOUND_FILP 105
#define SOUND_REVEAL 106
#define SOUND_EQUIP 107
#define SOUND_DESTROYED 108
#define SOUND_BANISHED 109
#define SOUND_ATTACK 201
#define SOUND_DIRECT_ATTACK 202
#define SOUND_DRAW 203
#define SOUND_SHUFFLE 204
#define SOUND_DAMAGE 205
#define SOUND_RECOVER 206
#define SOUND_COUNTER_ADD 207
#define SOUND_COUNTER_REMOVE 208
#define SOUND_COIN 209
#define SOUND_DICE 210
#define SOUND_NEXT_TURN 211
#define SOUND_PHASE 212
#define SOUND_MENU 301
#define SOUND_BUTTON 302
#define SOUND_INFO 303
#define SOUND_QUESTION 304
#define SOUND_CARD_PICK 305
#define SOUND_CARD_DROP 306
#define SOUND_PLAYER_ENTER 307
#define SOUND_CHAT 308
#define DEFAULT_DUEL_RULE 4 #define DEFAULT_DUEL_RULE 4
#endif // GAME_H #endif // GAME_H
...@@ -17,6 +17,10 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -17,6 +17,10 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
s32 id = caller->getID(); s32 id = caller->getID();
switch(event.GUIEvent.EventType) { switch(event.GUIEvent.EventType) {
case irr::gui::EGET_BUTTON_CLICKED: { case irr::gui::EGET_BUTTON_CLICKED: {
if(id < 110)
mainGame->PlaySoundEffect(SOUND_MENU);
else
mainGame->PlaySoundEffect(SOUND_BUTTON);
switch(id) { switch(id) {
case BUTTON_MODE_EXIT: { case BUTTON_MODE_EXIT: {
mainGame->device->closeDevice(); mainGame->device->closeDevice();
......
...@@ -174,6 +174,7 @@ int ReplayMode::ReplayThread(void* param) { ...@@ -174,6 +174,7 @@ int ReplayMode::ReplayThread(void* param) {
if(mainGame->wCardSelect->isVisible()) if(mainGame->wCardSelect->isVisible())
mainGame->HideElement(mainGame->wCardSelect); mainGame->HideElement(mainGame->wCardSelect);
mainGame->PopupElement(mainGame->wMessage); mainGame->PopupElement(mainGame->wMessage);
mainGame->PlaySoundEffect(SOUND_INFO);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->actionSignal.Wait(); mainGame->actionSignal.Wait();
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
...@@ -327,6 +328,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { ...@@ -327,6 +328,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->stMessage->setText(L"Error occurs."); mainGame->stMessage->setText(L"Error occurs.");
mainGame->PopupElement(mainGame->wMessage); mainGame->PopupElement(mainGame->wMessage);
mainGame->PlaySoundEffect(SOUND_INFO);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset(); mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait(); mainGame->actionSignal.Wait();
......
...@@ -132,6 +132,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { ...@@ -132,6 +132,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->stMessage->setText(L"Error occurs."); mainGame->stMessage->setText(L"Error occurs.");
mainGame->PopupElement(mainGame->wMessage); mainGame->PopupElement(mainGame->wMessage);
mainGame->PlaySoundEffect(SOUND_INFO);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset(); mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait(); mainGame->actionSignal.Wait();
...@@ -738,6 +739,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { ...@@ -738,6 +739,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stMessage, 310, mainGame->textFont, msg); mainGame->SetStaticText(mainGame->stMessage, 310, mainGame->textFont, msg);
mainGame->PopupElement(mainGame->wMessage); mainGame->PopupElement(mainGame->wMessage);
mainGame->PlaySoundEffect(SOUND_INFO);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset(); mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait(); mainGame->actionSignal.Wait();
......
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