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
REIKAI
ygopro
Commits
a147f470
Commit
a147f470
authored
Mar 31, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c3ee2692
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
30 deletions
+5
-30
gframe/game.cpp
gframe/game.cpp
+4
-24
gframe/game.h
gframe/game.h
+0
-5
ocgcore
ocgcore
+1
-1
No files found.
gframe/game.cpp
View file @
a147f470
...
@@ -1082,15 +1082,15 @@ void Game::LoadConfig() {
...
@@ -1082,15 +1082,15 @@ void Game::LoadConfig() {
gameConf
.
chkIgnoreDeckChanges
=
0
;
gameConf
.
chkIgnoreDeckChanges
=
0
;
gameConf
.
defaultOT
=
1
;
gameConf
.
defaultOT
=
1
;
gameConf
.
enable_bot_mode
=
0
;
gameConf
.
enable_bot_mode
=
0
;
gameConf
.
window_maximized
=
false
;
gameConf
.
window_width
=
1024
;
gameConf
.
window_height
=
640
;
gameConf
.
resize_popup_menu
=
false
;
gameConf
.
enable_sound
=
true
;
gameConf
.
enable_sound
=
true
;
gameConf
.
sound_volume
=
0.5
;
gameConf
.
sound_volume
=
0.5
;
gameConf
.
enable_music
=
true
;
gameConf
.
enable_music
=
true
;
gameConf
.
music_volume
=
0.5
;
gameConf
.
music_volume
=
0.5
;
gameConf
.
music_mode
=
1
;
gameConf
.
music_mode
=
1
;
gameConf
.
window_maximized
=
false
;
gameConf
.
window_width
=
1024
;
gameConf
.
window_height
=
640
;
gameConf
.
resize_popup_menu
=
false
;
while
(
fgets
(
linebuf
,
256
,
fp
))
{
while
(
fgets
(
linebuf
,
256
,
fp
))
{
sscanf
(
linebuf
,
"%s = %s"
,
strbuf
,
valbuf
);
sscanf
(
linebuf
,
"%s = %s"
,
strbuf
,
valbuf
);
if
(
!
strcmp
(
strbuf
,
"antialias"
))
{
if
(
!
strcmp
(
strbuf
,
"antialias"
))
{
...
@@ -1171,16 +1171,6 @@ void Game::LoadConfig() {
...
@@ -1171,16 +1171,6 @@ void Game::LoadConfig() {
gameConf
.
window_height
=
atoi
(
valbuf
);
gameConf
.
window_height
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"resize_popup_menu"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"resize_popup_menu"
))
{
gameConf
.
resize_popup_menu
=
atoi
(
valbuf
)
>
0
;
gameConf
.
resize_popup_menu
=
atoi
(
valbuf
)
>
0
;
}
else
if
(
!
strcmp
(
strbuf
,
"enable_sound"
))
{
gameConf
.
enable_sound
=
atoi
(
valbuf
)
>
0
;
}
else
if
(
!
strcmp
(
strbuf
,
"sound_volume"
))
{
gameConf
.
sound_volume
=
atof
(
valbuf
)
/
100
;
}
else
if
(
!
strcmp
(
strbuf
,
"enable_music"
))
{
gameConf
.
enable_music
=
atoi
(
valbuf
)
>
0
;
}
else
if
(
!
strcmp
(
strbuf
,
"music_volume"
))
{
gameConf
.
music_volume
=
atof
(
valbuf
)
/
100
;
}
else
if
(
!
strcmp
(
strbuf
,
"music_mode"
))
{
gameConf
.
music_mode
=
atoi
(
valbuf
);
}
else
{
}
else
{
// options allowing multiple words
// options allowing multiple words
sscanf
(
linebuf
,
"%s = %240[^
\n
]"
,
strbuf
,
valbuf
);
sscanf
(
linebuf
,
"%s = %240[^
\n
]"
,
strbuf
,
valbuf
);
...
@@ -1255,16 +1245,6 @@ void Game::SaveConfig() {
...
@@ -1255,16 +1245,6 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"window_width = %d
\n
"
,
gameConf
.
window_width
);
fprintf
(
fp
,
"window_width = %d
\n
"
,
gameConf
.
window_width
);
fprintf
(
fp
,
"window_height = %d
\n
"
,
gameConf
.
window_height
);
fprintf
(
fp
,
"window_height = %d
\n
"
,
gameConf
.
window_height
);
fprintf
(
fp
,
"resize_popup_menu = %d
\n
"
,
gameConf
.
resize_popup_menu
?
1
:
0
);
fprintf
(
fp
,
"resize_popup_menu = %d
\n
"
,
gameConf
.
resize_popup_menu
?
1
:
0
);
fprintf
(
fp
,
"enable_sound = %d
\n
"
,
(
chkEnableSound
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"enable_music = %d
\n
"
,
(
chkEnableMusic
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"#Volume of sound and music, between 0 and 100
\n
"
);
int
vol
=
gameConf
.
sound_volume
*
100
;
if
(
vol
<
0
)
vol
=
0
;
else
if
(
vol
>
100
)
vol
=
100
;
fprintf
(
fp
,
"sound_volume = %d
\n
"
,
vol
);
vol
=
gameConf
.
music_volume
*
100
;
if
(
vol
<
0
)
vol
=
0
;
else
if
(
vol
>
100
)
vol
=
100
;
fprintf
(
fp
,
"music_volume = %d
\n
"
,
vol
);
fprintf
(
fp
,
"music_mode = %d
\n
"
,
(
chkMusicMode
->
isChecked
()
?
1
:
0
));
fclose
(
fp
);
fclose
(
fp
);
}
}
void
Game
::
ShowCardInfo
(
int
code
,
bool
resize
)
{
void
Game
::
ShowCardInfo
(
int
code
,
bool
resize
)
{
...
...
gframe/game.h
View file @
a147f470
...
@@ -51,11 +51,6 @@ struct Config {
...
@@ -51,11 +51,6 @@ struct Config {
int
window_width
;
int
window_width
;
int
window_height
;
int
window_height
;
bool
resize_popup_menu
;
bool
resize_popup_menu
;
bool
enable_sound
;
bool
enable_music
;
double
sound_volume
;
double
music_volume
;
int
music_mode
;
};
};
struct
DuelInfo
{
struct
DuelInfo
{
...
...
ocgcore
@
cf3e356b
Subproject commit
a4e17256838bf1b657238f554362d9cc9841b233
Subproject commit
cf3e356b2ea0bf269cd3d93d70a3e0fcdb39f497
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