Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
62357ac3
Commit
62357ac3
authored
Dec 01, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updatedef
parent
679567da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
gframe/event_handler.cpp
gframe/event_handler.cpp
+1
-1
gframe/game.cpp
gframe/game.cpp
+6
-6
gframe/game.h
gframe/game.h
+3
-1
No files found.
gframe/event_handler.cpp
View file @
62357ac3
...
...
@@ -2046,7 +2046,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return
true
;
break
;
}
#ifdef
_WIN32
#ifdef
YGOPRO_USE_IRRKLANG
case
SCROLL_VOLUME
:
{
mainGame
->
gameConf
.
sound_volume
=
(
double
)
mainGame
->
scrSoundVolume
->
getPos
()
/
100
;
mainGame
->
gameConf
.
music_volume
=
(
double
)
mainGame
->
scrMusicVolume
->
getPos
()
/
100
;
...
...
gframe/game.cpp
View file @
62357ac3
...
...
@@ -283,6 +283,7 @@ bool Game::Initialize() {
chkAutoSearch
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabSystem
,
CHECKBOX_AUTO_SEARCH
,
dataManager
.
GetSysString
(
1358
));
chkAutoSearch
->
setChecked
(
gameConf
.
auto_search_limit
>=
0
);
posY
+=
30
;
#ifdef YGOPRO_USE_IRRKLANG
chkEnableSound
=
env
->
addCheckBox
(
gameConf
.
enable_sound
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
120
,
posY
+
25
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1279
));
chkEnableSound
->
setChecked
(
gameConf
.
enable_sound
);
scrSoundVolume
=
env
->
addScrollBar
(
true
,
rect
<
s32
>
(
posX
+
126
,
posY
+
4
,
posX
+
260
,
posY
+
21
),
tabSystem
,
SCROLL_VOLUME
);
...
...
@@ -303,6 +304,7 @@ bool Game::Initialize() {
posY
+=
30
;
chkMusicMode
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1281
));
chkMusicMode
->
setChecked
(
gameConf
.
music_mode
!=
0
);
#endif
//
wHand
=
env
->
addWindow
(
rect
<
s32
>
(
500
,
450
,
825
,
605
),
false
,
L""
);
wHand
->
getCloseButton
()
->
setVisible
(
false
);
...
...
@@ -678,12 +680,6 @@ bool Game::Initialize() {
chkEnableMusic
->
setEnabled
(
false
);
chkMusicMode
->
setEnabled
(
false
);
}
#else
chkEnableSound
->
setChecked
(
false
);
chkEnableSound
->
setEnabled
(
false
);
chkEnableMusic
->
setChecked
(
false
);
chkEnableMusic
->
setEnabled
(
false
);
chkMusicMode
->
setEnabled
(
false
);
#endif
hideChat
=
false
;
hideChatTimer
=
0
;
...
...
@@ -995,6 +991,7 @@ void Game::RefreshBGMList() {
RefershBGMDir
(
L"lose/"
,
BGM_LOSE
);
}
void
Game
::
RefershBGMDir
(
std
::
wstring
path
,
int
scene
)
{
#ifdef YGOPRO_USE_IRRKLANG
#ifdef _WIN32
WIN32_FIND_DATAW
fdataw
;
std
::
wstring
search
=
L"./sound/BGM/"
+
path
+
L"*.mp3"
;
...
...
@@ -1024,6 +1021,7 @@ void Game::RefershBGMDir(std::wstring path, int scene) {
}
closedir
(
dir
);
#endif
#endif
}
void
Game
::
RefreshBot
()
{
if
(
!
gameConf
.
enable_bot_mode
)
...
...
@@ -1242,6 +1240,7 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"#auto_search_limit >= 0: Start search automatically when the user enters N chars
\n
"
);
fprintf
(
fp
,
"auto_search_limit = %d
\n
"
,
gameConf
.
auto_search_limit
);
fprintf
(
fp
,
"ignore_deck_changes = %d
\n
"
,
((
mainGame
->
chkIgnoreDeckChanges
->
isChecked
())
?
1
:
0
));
#ifdef YGOPRO_USE_IRRKLANG
fprintf
(
fp
,
"enable_sound = %d
\n
"
,
((
mainGame
->
chkEnableSound
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"enable_music = %d
\n
"
,
((
mainGame
->
chkEnableMusic
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"#Volume of sound and music, between 0 and 100
\n
"
);
...
...
@@ -1252,6 +1251,7 @@ void Game::SaveConfig() {
if
(
vol
<
0
)
vol
=
0
;
else
if
(
vol
>
100
)
vol
=
100
;
fprintf
(
fp
,
"music_volume = %d
\n
"
,
vol
);
fprintf
(
fp
,
"music_mode = %d
\n
"
,
((
mainGame
->
chkMusicMode
->
isChecked
())
?
1
:
0
));
#endif
fprintf
(
fp
,
"default_ot = %d
\n
"
,
gameConf
.
defaultOT
);
fprintf
(
fp
,
"enable_bot_mode = %d
\n
"
,
gameConf
.
enable_bot_mode
);
fclose
(
fp
);
...
...
gframe/game.h
View file @
62357ac3
...
...
@@ -244,11 +244,13 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkHideHintButton
;
irr
::
gui
::
IGUICheckBox
*
chkIgnoreDeckChanges
;
irr
::
gui
::
IGUICheckBox
*
chkAutoSearch
;
#ifdef YGOPRO_USE_IRRKLANG
irr
::
gui
::
IGUICheckBox
*
chkEnableSound
;
irr
::
gui
::
IGUICheckBox
*
chkEnableMusic
;
irr
::
gui
::
IGUIScrollBar
*
scrSoundVolume
;
irr
::
gui
::
IGUIScrollBar
*
scrMusicVolume
;
irr
::
gui
::
IGUICheckBox
*
chkMusicMode
;
#endif
//main menu
irr
::
gui
::
IGUIWindow
*
wMainMenu
;
irr
::
gui
::
IGUIButton
*
btnLanMode
;
...
...
@@ -468,7 +470,7 @@ public:
irr
::
gui
::
IGUIButton
*
btnCancelOrFinish
;
//soundEngine
#ifdef
_WIN32
#ifdef
YGOPRO_USE_IRRKLANG
irrklang
::
ISoundEngine
*
engineSound
;
irrklang
::
ISoundEngine
*
engineMusic
;
irrklang
::
ISound
*
soundBGM
;
...
...
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