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
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
Commits
79d7fd1e
Commit
79d7fd1e
authored
Aug 27, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #2033
parent
96b57ccd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
16 deletions
+24
-16
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+4
-4
gframe/replay.cpp
gframe/replay.cpp
+7
-0
gframe/replay.h
gframe/replay.h
+1
-0
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+12
-12
No files found.
gframe/menu_handler.cpp
View file @
79d7fd1e
...
...
@@ -302,11 +302,11 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
myswprintf
(
infobuf
,
L"%d/%d/%d %02d:%02d:%02d
\n
"
,
st
->
tm_year
+
1900
,
st
->
tm_mon
+
1
,
st
->
tm_mday
,
st
->
tm_hour
,
st
->
tm_min
,
st
->
tm_sec
);
repinfo
.
append
(
infobuf
);
wchar_t
namebuf
[
4
][
20
];
BufferIO
::
CopyWStr
((
unsigned
short
*
)
&
ReplayMode
::
cur_replay
.
replay_data
[
0
],
namebuf
[
0
],
20
);
BufferIO
::
CopyWStr
((
unsigned
short
*
)
&
ReplayMode
::
cur_replay
.
replay_data
[
40
],
namebuf
[
1
],
20
);
ReplayMode
::
cur_replay
.
ReadName
(
namebuf
[
0
]
);
ReplayMode
::
cur_replay
.
ReadName
(
namebuf
[
1
]
);
if
(
ReplayMode
::
cur_replay
.
pheader
.
flag
&
REPLAY_TAG
)
{
BufferIO
::
CopyWStr
((
unsigned
short
*
)
&
ReplayMode
::
cur_replay
.
replay_data
[
80
],
namebuf
[
2
],
20
);
BufferIO
::
CopyWStr
((
unsigned
short
*
)
&
ReplayMode
::
cur_replay
.
replay_data
[
120
],
namebuf
[
3
],
20
);
ReplayMode
::
cur_replay
.
ReadName
(
namebuf
[
2
]
);
ReplayMode
::
cur_replay
.
ReadName
(
namebuf
[
3
]
);
}
if
(
ReplayMode
::
cur_replay
.
pheader
.
flag
&
REPLAY_TAG
)
myswprintf
(
infobuf
,
L"%ls
\n
%ls
\n
===VS===
\n
%ls
\n
%ls
\n
"
,
namebuf
[
0
],
namebuf
[
1
],
namebuf
[
2
],
namebuf
[
3
]);
...
...
gframe/replay.cpp
View file @
79d7fd1e
...
...
@@ -202,6 +202,13 @@ bool Replay::ReadNextResponse(unsigned char resp[64]) {
pdata
+=
len
;
return
true
;
}
void
Replay
::
ReadName
(
wchar_t
*
data
)
{
if
(
!
is_replaying
)
return
;
unsigned
short
buffer
[
20
];
ReadData
(
buffer
,
40
);
BufferIO
::
CopyWStr
(
buffer
,
data
,
20
);
}
void
Replay
::
ReadData
(
void
*
data
,
unsigned
int
length
)
{
if
(
!
is_replaying
)
return
;
...
...
gframe/replay.h
View file @
79d7fd1e
...
...
@@ -36,6 +36,7 @@ public:
bool
OpenReplay
(
const
wchar_t
*
name
);
static
bool
CheckReplay
(
const
wchar_t
*
name
);
bool
ReadNextResponse
(
unsigned
char
resp
[
64
]);
void
ReadName
(
wchar_t
*
data
);
void
ReadHeader
(
ReplayHeader
&
header
);
void
ReadData
(
void
*
data
,
unsigned
int
length
);
int
ReadInt32
();
...
...
gframe/replay_mode.cpp
View file @
79d7fd1e
...
...
@@ -61,16 +61,16 @@ int ReplayMode::ReplayThread(void* param) {
int
seed
=
rh
.
seed
;
rnd
.
reset
(
seed
);
if
(
rh
.
flag
&
REPLAY_TAG
)
{
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
hostname
,
40
);
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
hostname_tag
,
40
);
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
clientname_tag
,
40
);
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
clientname
,
40
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
hostname
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
hostname_tag
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
clientname_tag
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
clientname
);
mainGame
->
dInfo
.
isTag
=
true
;
mainGame
->
dInfo
.
tag_player
[
0
]
=
false
;
mainGame
->
dInfo
.
tag_player
[
1
]
=
false
;
}
else
{
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
hostname
,
40
);
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
clientname
,
40
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
hostname
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
clientname
);
}
set_script_reader
(
default_script_reader
);
set_card_reader
((
card_reader
)
DataManager
::
CardReader
);
...
...
@@ -205,16 +205,16 @@ void ReplayMode::Restart(bool refresh) {
int
seed
=
rh
.
seed
;
rnd
.
reset
(
seed
);
if
(
rh
.
flag
&
REPLAY_TAG
)
{
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
hostname
,
40
);
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
hostname_tag
,
40
);
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
clientname_tag
,
40
);
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
clientname
,
40
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
hostname
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
hostname_tag
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
clientname_tag
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
clientname
);
mainGame
->
dInfo
.
isTag
=
true
;
mainGame
->
dInfo
.
tag_player
[
0
]
=
false
;
mainGame
->
dInfo
.
tag_player
[
1
]
=
false
;
}
else
{
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
hostname
,
40
);
cur_replay
.
Read
Data
(
mainGame
->
dInfo
.
clientname
,
40
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
hostname
);
cur_replay
.
Read
Name
(
mainGame
->
dInfo
.
clientname
);
}
//set_card_reader((card_reader)DataManager::CardReader);
//set_message_handler((message_handler)MessageHandler);
...
...
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