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
苍蓝
ygopro
Commits
3c500212
Commit
3c500212
authored
Jan 06, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro
parents
580dfd1f
6258542b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
gframe/duelclient.cpp
gframe/duelclient.cpp
+8
-4
gframe/game.cpp
gframe/game.cpp
+1
-1
gframe/gframe.cpp
gframe/gframe.cpp
+1
-3
No files found.
gframe/duelclient.cpp
View file @
3c500212
...
...
@@ -1764,13 +1764,15 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
grave
[
player
].
swap
(
mainGame
->
dField
.
deck
[
player
]);
for
(
auto
cit
=
mainGame
->
dField
.
grave
[
player
].
begin
();
cit
!=
mainGame
->
dField
.
grave
[
player
].
end
();
++
cit
)
(
*
cit
)
->
location
=
LOCATION_GRAVE
;
int
m
=
0
;
for
(
auto
cit
=
mainGame
->
dField
.
deck
[
player
].
begin
();
cit
!=
mainGame
->
dField
.
deck
[
player
].
end
();
)
{
if
((
*
cit
)
->
type
&
0x802040
)
{
(
*
cit
)
->
location
=
LOCATION_EXTRA
;
mainGame
->
dField
.
extra
[
player
].
push_back
(
*
cit
);
(
*
cit
)
->
position
=
POS_FACEDOWN
;
mainGame
->
dField
.
AddCard
(
*
cit
,
player
,
LOCATION_EXTRA
,
0
);
cit
=
mainGame
->
dField
.
deck
[
player
].
erase
(
cit
);
}
else
{
(
*
cit
)
->
location
=
LOCATION_DECK
;
(
*
cit
)
->
sequence
=
m
++
;
++
cit
;
}
}
...
...
@@ -1781,14 +1783,16 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
(
*
cit
)
->
location
=
LOCATION_GRAVE
;
mainGame
->
dField
.
MoveCard
(
*
cit
,
10
);
}
int
m
=
0
;
for
(
auto
cit
=
mainGame
->
dField
.
deck
[
player
].
begin
();
cit
!=
mainGame
->
dField
.
deck
[
player
].
end
();
)
{
ClientCard
*
pcard
=
*
cit
;
if
(
pcard
->
type
&
0x802040
)
{
pcard
->
location
=
LOCATION_EXTRA
;
mainGame
->
dField
.
extra
[
player
].
push_back
(
pcard
);
pcard
->
position
=
POS_FACEDOWN
;
mainGame
->
dField
.
AddCard
(
pcard
,
player
,
LOCATION_EXTRA
,
0
);
cit
=
mainGame
->
dField
.
deck
[
player
].
erase
(
cit
);
}
else
{
pcard
->
location
=
LOCATION_DECK
;
pcard
->
sequence
=
m
++
;
++
cit
;
}
mainGame
->
dField
.
MoveCard
(
pcard
,
10
);
...
...
gframe/game.cpp
View file @
3c500212
...
...
@@ -904,7 +904,7 @@ void Game::LoadConfig() {
gameConf
.
serverport
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"lasthost"
))
{
BufferIO
::
DecodeUTF8
(
valbuf
,
wstr
);
BufferIO
::
CopyWStr
(
wstr
,
gameConf
.
lasthost
,
2
0
);
BufferIO
::
CopyWStr
(
wstr
,
gameConf
.
lasthost
,
10
0
);
}
else
if
(
!
strcmp
(
strbuf
,
"lastport"
))
{
BufferIO
::
DecodeUTF8
(
valbuf
,
wstr
);
BufferIO
::
CopyWStr
(
wstr
,
gameConf
.
lastport
,
20
);
...
...
gframe/gframe.cpp
View file @
3c500212
...
...
@@ -5,7 +5,6 @@
int
enable_log
=
0
;
bool
exit_on_return
=
false
;
bool
keep_on_return
=
false
;
bool
open_file
=
false
;
wchar_t
open_file_name
[
256
]
=
L""
;
...
...
@@ -48,6 +47,7 @@ int main(int argc, char* argv[]) {
if
(
!
ygo
::
mainGame
->
Initialize
())
return
0
;
bool
keep_on_return
=
false
;
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
{
if
(
argv
[
i
][
0
]
==
'-'
&&
argv
[
i
][
1
]
==
'e'
)
{
char
param
[
128
];
...
...
@@ -84,8 +84,6 @@ int main(int argc, char* argv[]) {
GetParameterW
(
param
,
&
argv
[
i
][
0
]);
ygo
::
mainGame
->
ebJoinPass
->
setText
(
param
);
continue
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-x"
))
{
// eXit on return
exit_on_return
=
true
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-k"
))
{
// Keep on return
exit_on_return
=
false
;
keep_on_return
=
true
;
...
...
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