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
2fe20b38
Commit
2fe20b38
authored
Mar 19, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary code
parent
ee2dd22c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
gframe/game.cpp
gframe/game.cpp
+20
-20
No files found.
gframe/game.cpp
View file @
2fe20b38
...
...
@@ -511,7 +511,7 @@ bool Game::Initialize() {
ebCardName
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
btnEffectFilter
=
env
->
addButton
(
rect
<
s32
>
(
345
,
20
+
50
/
6
,
390
,
60
+
75
/
6
),
wFilter
,
BUTTON_EFFECT_FILTER
,
dataManager
.
GetSysString
(
1326
));
btnStartFilter
=
env
->
addButton
(
rect
<
s32
>
(
205
,
80
+
125
/
6
,
390
,
100
+
125
/
6
),
wFilter
,
BUTTON_START_FILTER
,
dataManager
.
GetSysString
(
1327
));
if
(
mainGame
->
gameConf
.
separate_clear_button
)
{
if
(
gameConf
.
separate_clear_button
)
{
btnStartFilter
->
setRelativePosition
(
rect
<
s32
>
(
260
,
80
+
125
/
6
,
390
,
100
+
125
/
6
));
btnClearFilter
=
env
->
addButton
(
rect
<
s32
>
(
205
,
80
+
125
/
6
,
255
,
100
+
125
/
6
),
wFilter
,
BUTTON_CLEAR_FILTER
,
dataManager
.
GetSysString
(
1304
));
}
...
...
@@ -729,7 +729,7 @@ void Game::MainLoop() {
}
}
DuelClient
::
StopClient
(
true
);
if
(
mainGame
->
dInfo
.
isSingleMode
)
if
(
dInfo
.
isSingleMode
)
SingleMode
::
StopPlay
(
true
);
#ifdef _WIN32
Sleep
(
500
);
...
...
@@ -1106,22 +1106,22 @@ void Game::SaveConfig() {
BufferIO
::
EncodeUTF8
(
gameConf
.
lastport
,
linebuf
);
fprintf
(
fp
,
"lastport = %s
\n
"
,
linebuf
);
//settings
fprintf
(
fp
,
"automonsterpos = %d
\n
"
,
(
(
mainGame
->
chkMAutoPos
->
isChecked
()
)
?
1
:
0
));
fprintf
(
fp
,
"autospellpos = %d
\n
"
,
(
(
mainGame
->
chkSTAutoPos
->
isChecked
()
)
?
1
:
0
));
fprintf
(
fp
,
"randompos = %d
\n
"
,
(
(
mainGame
->
chkRandomPos
->
isChecked
()
)
?
1
:
0
));
fprintf
(
fp
,
"autochain = %d
\n
"
,
(
(
mainGame
->
chkAutoChain
->
isChecked
()
)
?
1
:
0
));
fprintf
(
fp
,
"waitchain = %d
\n
"
,
(
(
mainGame
->
chkWaitChain
->
isChecked
()
)
?
1
:
0
));
fprintf
(
fp
,
"mute_opponent = %d
\n
"
,
(
(
mainGame
->
chkIgnore1
->
isChecked
()
)
?
1
:
0
));
fprintf
(
fp
,
"mute_spectators = %d
\n
"
,
(
(
mainGame
->
chkIgnore2
->
isChecked
()
)
?
1
:
0
));
fprintf
(
fp
,
"hide_setname = %d
\n
"
,
(
(
mainGame
->
chkHideSetname
->
isChecked
()
)
?
1
:
0
));
fprintf
(
fp
,
"hide_hint_button = %d
\n
"
,
(
(
mainGame
->
chkHideHintButton
->
isChecked
()
)
?
1
:
0
));
fprintf
(
fp
,
"automonsterpos = %d
\n
"
,
(
chkMAutoPos
->
isChecked
(
)
?
1
:
0
));
fprintf
(
fp
,
"autospellpos = %d
\n
"
,
(
chkSTAutoPos
->
isChecked
(
)
?
1
:
0
));
fprintf
(
fp
,
"randompos = %d
\n
"
,
(
chkRandomPos
->
isChecked
(
)
?
1
:
0
));
fprintf
(
fp
,
"autochain = %d
\n
"
,
(
chkAutoChain
->
isChecked
(
)
?
1
:
0
));
fprintf
(
fp
,
"waitchain = %d
\n
"
,
(
chkWaitChain
->
isChecked
(
)
?
1
:
0
));
fprintf
(
fp
,
"mute_opponent = %d
\n
"
,
(
chkIgnore1
->
isChecked
(
)
?
1
:
0
));
fprintf
(
fp
,
"mute_spectators = %d
\n
"
,
(
chkIgnore2
->
isChecked
(
)
?
1
:
0
));
fprintf
(
fp
,
"hide_setname = %d
\n
"
,
(
chkHideSetname
->
isChecked
(
)
?
1
:
0
));
fprintf
(
fp
,
"hide_hint_button = %d
\n
"
,
(
chkHideHintButton
->
isChecked
(
)
?
1
:
0
));
fprintf
(
fp
,
"#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
\n
"
);
fprintf
(
fp
,
"control_mode = %d
\n
"
,
gameConf
.
control_mode
);
fprintf
(
fp
,
"draw_field_spell = %d
\n
"
,
gameConf
.
draw_field_spell
);
fprintf
(
fp
,
"separate_clear_button = %d
\n
"
,
gameConf
.
separate_clear_button
);
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
));
fprintf
(
fp
,
"ignore_deck_changes = %d
\n
"
,
(
chkIgnoreDeckChanges
->
isChecked
(
)
?
1
:
0
));
fprintf
(
fp
,
"default_ot = %d
\n
"
,
gameConf
.
defaultOT
);
fprintf
(
fp
,
"enable_bot_mode = %d
\n
"
,
gameConf
.
enable_bot_mode
);
fclose
(
fp
);
...
...
@@ -1138,7 +1138,7 @@ void Game::ShowCardInfo(int code) {
else
myswprintf
(
formatBuffer
,
L"%ls[%08d]"
,
dataManager
.
GetName
(
code
),
code
);
stName
->
setText
(
formatBuffer
);
int
offset
=
0
;
if
(
!
mainGame
->
chkHideSetname
->
isChecked
())
{
if
(
!
chkHideSetname
->
isChecked
())
{
unsigned
long
long
sc
=
cd
.
setcode
;
if
(
cd
.
alias
)
{
auto
aptr
=
dataManager
.
_datas
.
find
(
cd
.
alias
);
...
...
@@ -1229,7 +1229,7 @@ void Game::AddChatMsg(wchar_t* msg, int player) {
chatMsg
[
0
].
append
(
L": "
);
break
;
case
7
:
//local name
chatMsg
[
0
].
append
(
mainGame
->
ebNickName
->
getText
());
chatMsg
[
0
].
append
(
ebNickName
->
getText
());
chatMsg
[
0
].
append
(
L": "
);
break
;
case
8
:
//system custom message, no prefix.
...
...
@@ -1249,7 +1249,7 @@ void Game::AddDebugMsg(char* msg)
if
(
enable_log
&
0x1
)
{
wchar_t
wbuf
[
1024
];
BufferIO
::
DecodeUTF8
(
msg
,
wbuf
);
mainGame
->
AddChatMsg
(
wbuf
,
9
);
AddChatMsg
(
wbuf
,
9
);
}
if
(
enable_log
&
0x2
)
{
FILE
*
fp
=
fopen
(
"error.log"
,
"at"
);
...
...
@@ -1265,12 +1265,12 @@ void Game::AddDebugMsg(char* msg)
}
void
Game
::
ClearTextures
()
{
matManager
.
mCard
.
setTexture
(
0
,
0
);
mainGame
->
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
mainGame
->
btnPSAU
->
setImage
();
mainGame
->
btnPSDU
->
setImage
();
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
btnPSAU
->
setImage
();
btnPSDU
->
setImage
();
for
(
int
i
=
0
;
i
<=
4
;
++
i
)
{
mainGame
->
btnCardSelect
[
i
]
->
setImage
();
mainGame
->
btnCardDisplay
[
i
]
->
setImage
();
btnCardSelect
[
i
]
->
setImage
();
btnCardDisplay
[
i
]
->
setImage
();
}
imageManager
.
ClearTexture
();
}
...
...
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