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
a3ee0390
Commit
a3ee0390
authored
Oct 24, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ot' into test
parents
c5390a91
c6872f54
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
1 deletion
+17
-1
gframe/drawing.cpp
gframe/drawing.cpp
+10
-1
gframe/game.cpp
gframe/game.cpp
+5
-0
gframe/game.h
gframe/game.h
+1
-0
system.conf
system.conf
+1
-0
textures/ot.png
textures/ot.png
+0
-0
No files found.
gframe/drawing.cpp
View file @
a3ee0390
...
@@ -1045,7 +1045,16 @@ void Game::DrawThumb(code_pointer cp, position2di pos, std::unordered_map<int, i
...
@@ -1045,7 +1045,16 @@ void Game::DrawThumb(code_pointer cp, position2di pos, std::unordered_map<int, i
break
;
break
;
}
}
}
}
if
(
mainGame
->
cbLimit
->
getSelected
()
>=
4
)
{
if
(
mainGame
->
cbLimit
->
getSelected
()
>=
4
&&
(
cp
->
second
.
ot
&
mainGame
->
gameConf
.
defaultOT
))
{
switch
(
cp
->
second
.
ot
)
{
case
1
:
driver
->
draw2DImage
(
imageManager
.
tOT
,
recti
(
pos
.
X
+
7
,
pos
.
Y
+
50
,
pos
.
X
+
37
,
pos
.
Y
+
65
),
recti
(
0
,
128
,
128
,
192
),
0
,
0
,
true
);
break
;
case
2
:
driver
->
draw2DImage
(
imageManager
.
tOT
,
recti
(
pos
.
X
+
7
,
pos
.
Y
+
50
,
pos
.
X
+
37
,
pos
.
Y
+
65
),
recti
(
0
,
192
,
128
,
256
),
0
,
0
,
true
);
break
;
}
}
else
if
(
mainGame
->
cbLimit
->
getSelected
()
>=
4
||
!
(
cp
->
second
.
ot
&
mainGame
->
gameConf
.
defaultOT
))
{
switch
(
cp
->
second
.
ot
)
{
switch
(
cp
->
second
.
ot
)
{
case
1
:
case
1
:
driver
->
draw2DImage
(
imageManager
.
tOT
,
recti
(
pos
.
X
+
7
,
pos
.
Y
+
50
,
pos
.
X
+
37
,
pos
.
Y
+
65
),
recti
(
0
,
0
,
128
,
64
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tOT
,
recti
(
pos
.
X
+
7
,
pos
.
Y
+
50
,
pos
.
X
+
37
,
pos
.
Y
+
65
),
recti
(
0
,
0
,
128
,
64
),
0
,
0
,
true
);
...
...
gframe/game.cpp
View file @
a3ee0390
...
@@ -147,6 +147,7 @@ bool Game::Initialize() {
...
@@ -147,6 +147,7 @@ bool Game::Initialize() {
cbRule
->
addItem
(
dataManager
.
GetSysString
(
1241
));
cbRule
->
addItem
(
dataManager
.
GetSysString
(
1241
));
cbRule
->
addItem
(
dataManager
.
GetSysString
(
1242
));
cbRule
->
addItem
(
dataManager
.
GetSysString
(
1242
));
cbRule
->
addItem
(
dataManager
.
GetSysString
(
1243
));
cbRule
->
addItem
(
dataManager
.
GetSysString
(
1243
));
cbRule
->
setSelected
(
gameConf
.
defaultOT
-
1
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1227
),
rect
<
s32
>
(
20
,
90
,
220
,
110
),
false
,
false
,
wCreateHost
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1227
),
rect
<
s32
>
(
20
,
90
,
220
,
110
),
false
,
false
,
wCreateHost
);
cbMatchMode
=
env
->
addComboBox
(
rect
<
s32
>
(
140
,
85
,
300
,
110
),
wCreateHost
);
cbMatchMode
=
env
->
addComboBox
(
rect
<
s32
>
(
140
,
85
,
300
,
110
),
wCreateHost
);
cbMatchMode
->
addItem
(
dataManager
.
GetSysString
(
1244
));
cbMatchMode
->
addItem
(
dataManager
.
GetSysString
(
1244
));
...
@@ -1039,6 +1040,7 @@ void Game::LoadConfig() {
...
@@ -1039,6 +1040,7 @@ void Game::LoadConfig() {
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
.
defaultOT
=
1
;
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"
))
{
...
@@ -1107,6 +1109,8 @@ void Game::LoadConfig() {
...
@@ -1107,6 +1109,8 @@ void Game::LoadConfig() {
gameConf
.
music_volume
=
atof
(
valbuf
)
/
100
;
gameConf
.
music_volume
=
atof
(
valbuf
)
/
100
;
}
else
if
(
!
strcmp
(
strbuf
,
"music_mode"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"music_mode"
))
{
gameConf
.
music_mode
=
atoi
(
valbuf
);
gameConf
.
music_mode
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"default_ot"
))
{
gameConf
.
defaultOT
=
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
);
...
@@ -1175,6 +1179,7 @@ void Game::SaveConfig() {
...
@@ -1175,6 +1179,7 @@ void Game::SaveConfig() {
if
(
vol
<
0
)
vol
=
0
;
else
if
(
vol
>
100
)
vol
=
100
;
if
(
vol
<
0
)
vol
=
0
;
else
if
(
vol
>
100
)
vol
=
100
;
fprintf
(
fp
,
"music_volume = %d
\n
"
,
vol
);
fprintf
(
fp
,
"music_volume = %d
\n
"
,
vol
);
fprintf
(
fp
,
"music_mode = %d
\n
"
,
((
mainGame
->
chkMusicMode
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"music_mode = %d
\n
"
,
((
mainGame
->
chkMusicMode
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"default_ot = %d
\n
"
,
gameConf
.
defaultOT
);
fclose
(
fp
);
fclose
(
fp
);
}
}
void
Game
::
PlaySoundEffect
(
int
sound
)
{
void
Game
::
PlaySoundEffect
(
int
sound
)
{
...
...
gframe/game.h
View file @
a3ee0390
...
@@ -45,6 +45,7 @@ struct Config {
...
@@ -45,6 +45,7 @@ struct Config {
double
sound_volume
;
double
sound_volume
;
double
music_volume
;
double
music_volume
;
int
music_mode
;
int
music_mode
;
int
defaultOT
;
};
};
struct
DuelInfo
{
struct
DuelInfo
{
...
...
system.conf
View file @
a3ee0390
...
@@ -33,3 +33,4 @@ enable_music = 1
...
@@ -33,3 +33,4 @@ enable_music = 1
sound_volume
=
50
sound_volume
=
50
music_volume
=
50
music_volume
=
50
music_mode
=
1
music_mode
=
1
default_ot
=
1
textures/ot.png
View replaced file @
c5390a91
View file @
a3ee0390
18.2 KB
|
W:
|
H:
8.26 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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