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
wyykak
ygopro
Commits
78dcf33c
Commit
78dcf33c
authored
Oct 30, 2017
by
edo9300
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/origin/master' into advanced-rules--tset
parents
1a754caf
3e07dd40
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
gframe/duelclient.cpp
gframe/duelclient.cpp
+6
-3
gframe/game.cpp
gframe/game.cpp
+15
-0
gframe/game.h
gframe/game.h
+1
-0
No files found.
gframe/duelclient.cpp
View file @
78dcf33c
...
...
@@ -2605,12 +2605,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
}
case
MSG_SUMMONING
:
{
mainGame
->
PlaySoundEffect
(
"./sound/summon.wav"
);
unsigned
int
code
=
(
unsigned
int
)
BufferIO
::
ReadInt32
(
pbuf
);
/*int cc = */
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
/*int cl = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int cs = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int cp = */
BufferIO
::
ReadInt8
(
pbuf
);
if
(
!
mainGame
->
PlayChant
(
code
))
mainGame
->
PlaySoundEffect
(
"./sound/summon.wav"
);
if
(
!
mainGame
->
dInfo
.
isReplay
||
!
mainGame
->
dInfo
.
isReplaySkiping
)
{
myswprintf
(
event_string
,
dataManager
.
GetSysString
(
1603
),
dataManager
.
GetName
(
code
));
mainGame
->
showcardcode
=
code
;
...
...
@@ -2628,12 +2629,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
}
case
MSG_SPSUMMONING
:
{
mainGame
->
PlaySoundEffect
(
"./sound/specialsummon.wav"
);
unsigned
int
code
=
(
unsigned
int
)
BufferIO
::
ReadInt32
(
pbuf
);
/*int cc = */
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
/*int cl = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int cs = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int cp = */
BufferIO
::
ReadInt8
(
pbuf
);
if
(
!
mainGame
->
PlayChant
(
code
))
mainGame
->
PlaySoundEffect
(
"./sound/specialsummon.wav"
);
if
(
!
mainGame
->
dInfo
.
isReplay
||
!
mainGame
->
dInfo
.
isReplaySkiping
)
{
myswprintf
(
event_string
,
dataManager
.
GetSysString
(
1605
),
dataManager
.
GetName
(
code
));
mainGame
->
showcardcode
=
code
;
...
...
@@ -2650,12 +2652,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
}
case
MSG_FLIPSUMMONING
:
{
mainGame
->
PlaySoundEffect
(
"./sound/flip.wav"
);
unsigned
int
code
=
(
unsigned
int
)
BufferIO
::
ReadInt32
(
pbuf
);
int
cc
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
int
cl
=
BufferIO
::
ReadInt8
(
pbuf
);
int
cs
=
BufferIO
::
ReadInt8
(
pbuf
);
int
cp
=
BufferIO
::
ReadInt8
(
pbuf
);
if
(
!
mainGame
->
PlayChant
(
code
))
mainGame
->
PlaySoundEffect
(
"./sound/flip.wav"
);
ClientCard
*
pcard
=
mainGame
->
dField
.
GetCard
(
cc
,
cl
,
cs
);
pcard
->
SetCode
(
code
);
pcard
->
position
=
cp
;
...
...
gframe/game.cpp
View file @
78dcf33c
...
...
@@ -716,10 +716,12 @@ void Game::MainLoop() {
driver
->
setMaterial
(
irr
::
video
::
IdentityMaterial
);
driver
->
clearZBuffer
();
}
else
if
(
is_building
)
{
engineSound
->
stopAllSounds
();
DrawBackImage
(
imageManager
.
tBackGround_deck
);
DrawDeckBd
();
PlayMusic
(
"./sound/deck.mp3"
,
true
);
}
else
{
engineSound
->
stopAllSounds
();
DrawBackImage
(
imageManager
.
tBackGround_menu
);
PlayMusic
(
"./sound/menu.mp3"
,
true
);
}
...
...
@@ -776,6 +778,7 @@ void Game::MainLoop() {
usleep
(
500000
);
#endif
SaveConfig
();
engineSound
->
drop
();
engineMusic
->
drop
();
// device->drop();
}
...
...
@@ -1161,6 +1164,18 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"volume = %d
\n
"
,
vol
);
fclose
(
fp
);
}
bool
Game
::
PlayChant
(
unsigned
int
code
)
{
char
sound
[
1000
];
sprintf
(
sound
,
"./sound/chants/%d.wav"
,
code
);
FILE
*
file
=
fopen
(
sound
,
"r"
);
if
(
file
)
{
fclose
(
file
);
if
(
!
engineSound
->
isCurrentlyPlaying
(
sound
))
PlaySoundEffect
(
sound
);
return
true
;
}
return
false
;
}
void
Game
::
PlaySoundEffect
(
char
*
sound
)
{
if
(
chkEnableSound
->
isChecked
())
{
engineSound
->
play2D
(
sound
);
...
...
gframe/game.h
View file @
78dcf33c
...
...
@@ -120,6 +120,7 @@ public:
void
AddDebugMsg
(
char
*
msgbuf
);
void
ClearTextures
();
void
CloseDuelWindow
();
bool
PlayChant
(
unsigned
int
code
);
void
PlaySoundEffect
(
char
*
sound
);
void
PlayMusic
(
char
*
song
,
bool
loop
);
void
PlayBGM
();
...
...
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