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
3435621a
Commit
3435621a
authored
May 15, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update auto pos
parent
8258cf65
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
15 deletions
+26
-15
gframe/duelclient.cpp
gframe/duelclient.cpp
+3
-1
gframe/game.cpp
gframe/game.cpp
+17
-11
gframe/game.h
gframe/game.h
+4
-2
system.conf
system.conf
+2
-1
No files found.
gframe/duelclient.cpp
View file @
3435621a
...
...
@@ -1304,7 +1304,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
select_hint
=
0
;
mainGame
->
stHintMsg
->
setText
(
textBuffer
);
mainGame
->
stHintMsg
->
setVisible
(
true
);
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_PLACE
&&
mainGame
->
chkAutoPos
->
isChecked
())
{
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_PLACE
&&
(
(
mainGame
->
chkMAutoPos
->
isChecked
()
&&
mainGame
->
dField
.
selectable_field
&
0x7f007f
)
||
(
mainGame
->
chkSTAutoPos
->
isChecked
()
&&
!
(
mainGame
->
dField
.
selectable_field
&
0x7f007f
))))
{
unsigned
int
filter
;
if
(
mainGame
->
dField
.
selectable_field
&
0x7f
)
{
respbuf
[
0
]
=
mainGame
->
LocalPlayer
(
0
);
...
...
gframe/game.cpp
View file @
3435621a
...
...
@@ -249,17 +249,19 @@ bool Game::Initialize() {
btnClearLog
=
env
->
addButton
(
rect
<
s32
>
(
160
,
300
,
260
,
325
),
tabLog
,
BUTTON_CLEAR_LOG
,
dataManager
.
GetSysString
(
1272
));
//system
irr
::
gui
::
IGUITab
*
tabSystem
=
wInfos
->
addTab
(
dataManager
.
GetSysString
(
1273
));
chkAutoPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
20
,
280
,
45
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1274
));
chkAutoPos
->
setChecked
(
gameConf
.
chkAutoPos
!=
0
);
chkRandomPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
40
,
50
,
300
,
75
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1275
));
chkMAutoPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
20
,
280
,
45
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1274
));
chkMAutoPos
->
setChecked
(
gameConf
.
chkMAutoPos
!=
0
);
chkSTAutoPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
50
,
280
,
75
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1278
));
chkSTAutoPos
->
setChecked
(
gameConf
.
chkSTAutoPos
!=
0
);
chkRandomPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
40
,
80
,
300
,
105
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1275
));
chkRandomPos
->
setChecked
(
gameConf
.
chkRandomPos
!=
0
);
chkAutoChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
80
,
280
,
10
5
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1276
));
chkAutoChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
110
,
280
,
13
5
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1276
));
chkAutoChain
->
setChecked
(
gameConf
.
chkAutoChain
!=
0
);
chkWaitChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
1
10
,
280
,
13
5
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1277
));
chkWaitChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
1
40
,
280
,
16
5
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1277
));
chkWaitChain
->
setChecked
(
gameConf
.
chkWaitChain
!=
0
);
chkIgnore1
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
170
,
280
,
19
5
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1290
));
chkIgnore1
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
200
,
280
,
22
5
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1290
));
chkIgnore1
->
setChecked
(
gameConf
.
chkIgnore1
!=
0
);
chkIgnore2
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
2
00
,
280
,
22
5
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1291
));
chkIgnore2
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
2
30
,
280
,
25
5
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1291
));
chkIgnore2
->
setChecked
(
gameConf
.
chkIgnore2
!=
0
);
chkHideSetname
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
260
,
280
,
285
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1354
));
chkHideSetname
->
setChecked
(
gameConf
.
chkHideSetname
!=
0
);
...
...
@@ -897,7 +899,8 @@ void Game::LoadConfig() {
gameConf
.
lastport
[
0
]
=
0
;
gameConf
.
roompass
[
0
]
=
0
;
//settings
gameConf
.
chkAutoPos
=
1
;
gameConf
.
chkMAutoPos
=
0
;
gameConf
.
chkSTAutoPos
=
1
;
gameConf
.
chkRandomPos
=
0
;
gameConf
.
chkAutoChain
=
0
;
gameConf
.
chkWaitChain
=
0
;
...
...
@@ -941,8 +944,10 @@ void Game::LoadConfig() {
}
else
if
(
!
strcmp
(
strbuf
,
"roompass"
))
{
BufferIO
::
DecodeUTF8
(
valbuf
,
wstr
);
BufferIO
::
CopyWStr
(
wstr
,
gameConf
.
roompass
,
20
);
}
else
if
(
!
strcmp
(
strbuf
,
"autopos"
))
{
gameConf
.
chkAutoPos
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"automonsterpos"
))
{
gameConf
.
chkMAutoPos
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"autospellpos"
))
{
gameConf
.
chkSTAutoPos
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"randompos"
))
{
gameConf
.
chkRandomPos
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"autochain"
))
{
...
...
@@ -1006,7 +1011,8 @@ void Game::SaveConfig() {
BufferIO
::
EncodeUTF8
(
gameConf
.
lastport
,
linebuf
);
fprintf
(
fp
,
"lastport = %s
\n
"
,
linebuf
);
//settings
fprintf
(
fp
,
"autopos = %d
\n
"
,
((
mainGame
->
chkAutoPos
->
isChecked
())
?
1
:
0
));
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
));
...
...
gframe/game.h
View file @
3435621a
...
...
@@ -25,7 +25,8 @@ struct Config {
wchar_t
numfont
[
256
];
wchar_t
roompass
[
20
];
//settings
int
chkAutoPos
;
int
chkMAutoPos
;
int
chkSTAutoPos
;
int
chkRandomPos
;
int
chkAutoChain
;
int
chkWaitChain
;
...
...
@@ -201,7 +202,8 @@ public:
irr
::
gui
::
IGUIStaticText
*
stSetName
;
irr
::
gui
::
IGUIStaticText
*
stText
;
irr
::
gui
::
IGUIScrollBar
*
scrCardText
;
irr
::
gui
::
IGUICheckBox
*
chkAutoPos
;
irr
::
gui
::
IGUICheckBox
*
chkMAutoPos
;
irr
::
gui
::
IGUICheckBox
*
chkSTAutoPos
;
irr
::
gui
::
IGUICheckBox
*
chkRandomPos
;
irr
::
gui
::
IGUICheckBox
*
chkAutoChain
;
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
...
...
system.conf
View file @
3435621a
...
...
@@ -11,7 +11,8 @@ numfont = c:/windows/fonts/arialbd.ttf
serverport
=
7911
lasthost
=
127
.
0
.
0
.
1
lastport
=
7911
autopos
=
1
automonsterpos
=
0
autospellpos
=
1
randompos
=
0
autochain
=
0
waitchain
=
0
...
...
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