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
f9f41307
Commit
f9f41307
authored
Nov 21, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ai' into test
parents
033ed689
4d9b81dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
gframe/game.cpp
gframe/game.cpp
+2
-2
gframe/game.h
gframe/game.h
+1
-1
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+3
-1
No files found.
gframe/game.cpp
View file @
f9f41307
...
@@ -1030,10 +1030,10 @@ void Game::RefreshBot() {
...
@@ -1030,10 +1030,10 @@ void Game::RefreshBot() {
if
(
linebuf
[
0
]
==
'!'
)
{
if
(
linebuf
[
0
]
==
'!'
)
{
BotInfo
newinfo
;
BotInfo
newinfo
;
sscanf
(
linebuf
,
"!%240[^
\n
]"
,
strbuf
);
sscanf
(
linebuf
,
"!%240[^
\n
]"
,
strbuf
);
BufferIO::DecodeUTF8(strbuf, newinfo.
internal
name);
BufferIO
::
DecodeUTF8
(
strbuf
,
newinfo
.
name
);
fgets
(
linebuf
,
256
,
fp
);
fgets
(
linebuf
,
256
,
fp
);
sscanf
(
linebuf
,
"%240[^
\n
]"
,
strbuf
);
sscanf
(
linebuf
,
"%240[^
\n
]"
,
strbuf
);
BufferIO::DecodeUTF8(strbuf, newinfo.
name
);
BufferIO
::
DecodeUTF8
(
strbuf
,
newinfo
.
command
);
fgets
(
linebuf
,
256
,
fp
);
fgets
(
linebuf
,
256
,
fp
);
sscanf
(
linebuf
,
"%240[^
\n
]"
,
strbuf
);
sscanf
(
linebuf
,
"%240[^
\n
]"
,
strbuf
);
BufferIO
::
DecodeUTF8
(
strbuf
,
newinfo
.
desc
);
BufferIO
::
DecodeUTF8
(
strbuf
,
newinfo
.
desc
);
...
...
gframe/game.h
View file @
f9f41307
...
@@ -75,8 +75,8 @@ struct DuelInfo {
...
@@ -75,8 +75,8 @@ struct DuelInfo {
};
};
struct
BotInfo
{
struct
BotInfo
{
wchar_t
internalname
[
256
];
wchar_t
name
[
32
];
wchar_t
name
[
32
];
wchar_t
command
[
256
];
wchar_t
desc
[
256
];
wchar_t
desc
[
256
];
int
flag
;
int
flag
;
};
};
...
...
gframe/menu_handler.cpp
View file @
f9f41307
...
@@ -257,7 +257,9 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -257,7 +257,9 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
si
.
cb
=
sizeof
(
si
);
si
.
cb
=
sizeof
(
si
);
ZeroMemory
(
&
pi
,
sizeof
(
pi
));
ZeroMemory
(
&
pi
,
sizeof
(
pi
));
LPTSTR
cmd
=
new
TCHAR
[
MAX_PATH
];
LPTSTR
cmd
=
new
TCHAR
[
MAX_PATH
];
myswprintf
(
cmd
,
L"Bot.exe
\"
%s
\"
%d %d"
,
mainGame
->
botInfo
[
sel
].
internalname
,
(
mainGame
->
chkBotHand
->
isChecked
()
?
1
:
0
),
mainGame
->
gameConf
.
serverport
);
int
flag
=
0
;
flag
+=
(
mainGame
->
chkBotHand
->
isChecked
()
?
0x1
:
0
);
myswprintf
(
cmd
,
L"Bot.exe
\"
%ls
\"
%d %d"
,
mainGame
->
botInfo
[
sel
].
command
,
flag
,
mainGame
->
gameConf
.
serverport
);
if
(
!
CreateProcess
(
NULL
,
cmd
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
))
if
(
!
CreateProcess
(
NULL
,
cmd
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
))
{
{
NetServer
::
StopServer
();
NetServer
::
StopServer
();
...
...
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