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-520DIY
ygopro
Commits
a696078d
Commit
a696078d
authored
Nov 30, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix SingleMode::SinglePlayThread
parent
4d82b74e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
gframe/single_mode.cpp
gframe/single_mode.cpp
+9
-8
No files found.
gframe/single_mode.cpp
View file @
a696078d
...
@@ -55,13 +55,13 @@ int SingleMode::SinglePlayThread() {
...
@@ -55,13 +55,13 @@ int SingleMode::SinglePlayThread() {
mainGame
->
dInfo
.
turn
=
0
;
mainGame
->
dInfo
.
turn
=
0
;
if
(
mainGame
->
chkSinglePlayReturnDeckTop
->
isChecked
())
if
(
mainGame
->
chkSinglePlayReturnDeckTop
->
isChecked
())
opt
|=
DUEL_RETURN_DECK_TOP
;
opt
|=
DUEL_RETURN_DECK_TOP
;
char
filename
[
256
];
char
filename
[
256
]
{}
;
int
slen
=
0
;
int
slen
=
0
;
if
(
open_file
)
{
if
(
open_file
)
{
open_file
=
false
;
open_file
=
false
;
slen
=
BufferIO
::
EncodeUTF8
(
open_file_name
,
filename
);
slen
=
BufferIO
::
EncodeUTF8
(
open_file_name
,
filename
);
if
(
!
preload_script
(
pduel
,
filename
))
{
if
(
!
preload_script
(
pduel
,
filename
))
{
wchar_t
fname
[
256
];
wchar_t
fname
[
256
]
{}
;
myswprintf
(
fname
,
L"./single/%ls"
,
open_file_name
);
myswprintf
(
fname
,
L"./single/%ls"
,
open_file_name
);
slen
=
BufferIO
::
EncodeUTF8
(
fname
,
filename
);
slen
=
BufferIO
::
EncodeUTF8
(
fname
,
filename
);
if
(
!
preload_script
(
pduel
,
filename
))
if
(
!
preload_script
(
pduel
,
filename
))
...
@@ -69,7 +69,7 @@ int SingleMode::SinglePlayThread() {
...
@@ -69,7 +69,7 @@ int SingleMode::SinglePlayThread() {
}
}
}
else
{
}
else
{
const
wchar_t
*
name
=
mainGame
->
lstSinglePlayList
->
getListItem
(
mainGame
->
lstSinglePlayList
->
getSelected
());
const
wchar_t
*
name
=
mainGame
->
lstSinglePlayList
->
getListItem
(
mainGame
->
lstSinglePlayList
->
getSelected
());
wchar_t
fname
[
256
];
wchar_t
fname
[
256
]
{}
;
myswprintf
(
fname
,
L"./single/%ls"
,
name
);
myswprintf
(
fname
,
L"./single/%ls"
,
name
);
slen
=
BufferIO
::
EncodeUTF8
(
fname
,
filename
);
slen
=
BufferIO
::
EncodeUTF8
(
fname
,
filename
);
if
(
!
preload_script
(
pduel
,
filename
))
if
(
!
preload_script
(
pduel
,
filename
))
...
@@ -109,11 +109,12 @@ int SingleMode::SinglePlayThread() {
...
@@ -109,11 +109,12 @@ int SingleMode::SinglePlayThread() {
is_continuing
=
SinglePlayAnalyze
(
engineBuffer
.
data
(),
len
);
is_continuing
=
SinglePlayAnalyze
(
engineBuffer
.
data
(),
len
);
last_replay
.
BeginRecord
();
last_replay
.
BeginRecord
();
last_replay
.
WriteHeader
(
rh
);
last_replay
.
WriteHeader
(
rh
);
uint16_t
buffer
[
20
];
uint16_t
host_name
[
20
]{};
BufferIO
::
CopyCharArray
(
mainGame
->
dInfo
.
hostname
,
buffer
);
BufferIO
::
CopyCharArray
(
mainGame
->
dInfo
.
hostname
,
host_name
);
last_replay
.
WriteData
(
buffer
,
40
,
false
);
last_replay
.
WriteData
(
host_name
,
sizeof
host_name
,
false
);
BufferIO
::
CopyCharArray
(
mainGame
->
dInfo
.
clientname
,
buffer
);
uint16_t
client_name
[
20
]{};
last_replay
.
WriteData
(
buffer
,
40
,
false
);
BufferIO
::
CopyCharArray
(
mainGame
->
dInfo
.
clientname
,
client_name
);
last_replay
.
WriteData
(
client_name
,
sizeof
client_name
,
false
);
last_replay
.
WriteInt32
(
start_lp
,
false
);
last_replay
.
WriteInt32
(
start_lp
,
false
);
last_replay
.
WriteInt32
(
start_hand
,
false
);
last_replay
.
WriteInt32
(
start_hand
,
false
);
last_replay
.
WriteInt32
(
draw_count
,
false
);
last_replay
.
WriteInt32
(
draw_count
,
false
);
...
...
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