Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wind2009
ygopro
Commits
b3eb9985
Commit
b3eb9985
authored
Dec 15, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add PlayDialogSound
parent
bd8b1f92
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
22 additions
and
25 deletions
+22
-25
gframe/client_field.cpp
gframe/client_field.cpp
+0
-2
gframe/deck_con.cpp
gframe/deck_con.cpp
+0
-4
gframe/drawing.cpp
gframe/drawing.cpp
+2
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+0
-13
gframe/event_handler.cpp
gframe/event_handler.cpp
+0
-3
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+0
-1
gframe/single_mode.cpp
gframe/single_mode.cpp
+0
-2
gframe/sound_manager.cpp
gframe/sound_manager.cpp
+19
-0
gframe/sound_manager.h
gframe/sound_manager.h
+1
-0
No files found.
gframe/client_field.cpp
View file @
b3eb9985
...
@@ -1019,7 +1019,6 @@ bool ClientField::ShowSelectSum(bool panelmode) {
...
@@ -1019,7 +1019,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
}
}
}
else
{
}
else
{
select_ready
=
false
;
select_ready
=
false
;
...
@@ -1041,7 +1040,6 @@ bool ClientField::ShowSelectSum(bool panelmode) {
...
@@ -1041,7 +1040,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
}
}
}
else
}
else
select_ready
=
false
;
select_ready
=
false
;
...
...
gframe/deck_con.cpp
View file @
b3eb9985
...
@@ -128,7 +128,6 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -128,7 +128,6 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
prev_operation
=
id
;
prev_operation
=
id
;
break
;
break
;
...
@@ -185,7 +184,6 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -185,7 +184,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
prev_operation
=
id
;
prev_operation
=
id
;
break
;
break
;
...
@@ -195,7 +193,6 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -195,7 +193,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
prev_operation
=
id
;
prev_operation
=
id
;
break
;
break
;
...
@@ -359,7 +356,6 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -359,7 +356,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
prev_operation
=
id
;
prev_operation
=
id
;
break
;
break
;
...
...
gframe/drawing.cpp
View file @
b3eb9985
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#include "materials.h"
#include "materials.h"
#include "image_manager.h"
#include "image_manager.h"
#include "deck_manager.h"
#include "deck_manager.h"
#include "sound_manager.h"
#include "duelclient.h"
#include "duelclient.h"
#include "../ocgcore/field.h"
#include "../ocgcore/field.h"
...
@@ -1008,6 +1009,7 @@ void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) {
...
@@ -1008,6 +1009,7 @@ void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) {
fadingList
.
push_back
(
fu
);
fadingList
.
push_back
(
fu
);
}
}
void
Game
::
PopupElement
(
irr
::
gui
::
IGUIElement
*
element
,
int
hideframe
)
{
void
Game
::
PopupElement
(
irr
::
gui
::
IGUIElement
*
element
,
int
hideframe
)
{
soundManager
.
PlayDialogSound
(
element
);
element
->
getParent
()
->
bringToFront
(
element
);
element
->
getParent
()
->
bringToFront
(
element
);
if
(
!
mainGame
->
is_building
)
if
(
!
mainGame
->
is_building
)
dField
.
panel
=
element
;
dField
.
panel
=
element
;
...
...
gframe/duelclient.cpp
View file @
b3eb9985
...
@@ -590,7 +590,6 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -590,7 +590,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_INFO
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Wait
();
mainGame
->
actionSignal
.
Wait
();
...
@@ -633,7 +632,6 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -633,7 +632,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
replaySignal
.
Reset
();
mainGame
->
replaySignal
.
Reset
();
mainGame
->
replaySignal
.
Wait
();
mainGame
->
replaySignal
.
Wait
();
...
@@ -820,7 +818,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -820,7 +818,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_INFO
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Wait
();
mainGame
->
actionSignal
.
Wait
();
...
@@ -857,7 +854,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -857,7 +854,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_INFO
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Wait
();
mainGame
->
actionSignal
.
Wait
();
...
@@ -1241,7 +1237,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1241,7 +1237,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
}
}
...
@@ -1252,7 +1247,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1252,7 +1247,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
}
}
...
@@ -1276,7 +1270,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1276,7 +1270,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
}
}
...
@@ -1421,7 +1414,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1421,7 +1414,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
}
}
}
}
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
...
@@ -3143,7 +3135,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3143,7 +3135,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
}
}
...
@@ -3164,7 +3155,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3164,7 +3155,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
}
}
...
@@ -3181,7 +3171,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3181,7 +3171,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
}
}
...
@@ -3202,7 +3191,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3202,7 +3191,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
}
}
...
@@ -3222,7 +3210,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3222,7 +3210,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
}
}
...
...
gframe/event_handler.cpp
View file @
b3eb9985
...
@@ -278,7 +278,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -278,7 +278,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
}
else
{
else
{
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
ShowCancelOrFinishButton
(
0
);
ShowCancelOrFinishButton
(
0
);
}
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
if
(
mainGame
->
wOptions
->
isVisible
())
{
...
@@ -1452,7 +1451,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1452,7 +1451,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
}
}
}
}
}
else
{
}
else
{
...
@@ -1628,7 +1626,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1628,7 +1626,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_QUESTION
);
ShowCancelOrFinishButton
(
0
);
ShowCancelOrFinishButton
(
0
);
}
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
if
(
mainGame
->
wOptions
->
isVisible
())
{
...
...
gframe/replay_mode.cpp
View file @
b3eb9985
...
@@ -314,7 +314,6 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -314,7 +314,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_INFO
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Wait
();
mainGame
->
actionSignal
.
Wait
();
...
...
gframe/single_mode.cpp
View file @
b3eb9985
...
@@ -180,7 +180,6 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
...
@@ -180,7 +180,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_INFO
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Wait
();
mainGame
->
actionSignal
.
Wait
();
...
@@ -787,7 +786,6 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
...
@@ -787,7 +786,6 @@ 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
);
soundManager
.
PlaySoundEffect
(
SOUND_INFO
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Wait
();
mainGame
->
actionSignal
.
Wait
();
...
...
gframe/sound_manager.cpp
View file @
b3eb9985
...
@@ -195,6 +195,25 @@ void SoundManager::PlaySoundEffect(int sound) {
...
@@ -195,6 +195,25 @@ void SoundManager::PlaySoundEffect(int sound) {
engineSound
->
setSoundVolume
(
mainGame
->
gameConf
.
sound_volume
);
engineSound
->
setSoundVolume
(
mainGame
->
gameConf
.
sound_volume
);
#endif
#endif
}
}
void
SoundManager
::
PlayDialogSound
(
irr
::
gui
::
IGUIElement
*
element
)
{
if
(
element
==
mainGame
->
wMessage
)
{
PlaySoundEffect
(
SOUND_INFO
);
}
else
if
(
element
==
mainGame
->
wQuery
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
}
else
if
(
element
==
mainGame
->
wOptions
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
}
else
if
(
element
==
mainGame
->
wANAttribute
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
}
else
if
(
element
==
mainGame
->
wANCard
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
}
else
if
(
element
==
mainGame
->
wANNumber
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
}
else
if
(
element
==
mainGame
->
wANRace
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
}
else
if
(
element
==
mainGame
->
wReplaySave
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
}
}
void
SoundManager
::
PlayMusic
(
char
*
song
,
bool
loop
)
{
void
SoundManager
::
PlayMusic
(
char
*
song
,
bool
loop
)
{
#ifdef YGOPRO_USE_IRRKLANG
#ifdef YGOPRO_USE_IRRKLANG
if
(
!
mainGame
->
chkEnableMusic
->
isChecked
())
if
(
!
mainGame
->
chkEnableMusic
->
isChecked
())
...
...
gframe/sound_manager.h
View file @
b3eb9985
...
@@ -27,6 +27,7 @@ public:
...
@@ -27,6 +27,7 @@ public:
bool
Init
();
bool
Init
();
void
RefreshBGMList
();
void
RefreshBGMList
();
void
PlaySoundEffect
(
int
sound
);
void
PlaySoundEffect
(
int
sound
);
void
PlayDialogSound
(
irr
::
gui
::
IGUIElement
*
element
);
void
PlayMusic
(
char
*
song
,
bool
loop
);
void
PlayMusic
(
char
*
song
,
bool
loop
);
void
PlayBGM
(
int
scene
);
void
PlayBGM
(
int
scene
);
void
StopBGM
();
void
StopBGM
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment