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
392def1e
Commit
392def1e
authored
Dec 15, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replay: remove WriteInt8, WriteInt16
parent
80187919
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
12 deletions
+4
-12
gframe/replay.cpp
gframe/replay.cpp
+0
-6
gframe/replay.h
gframe/replay.h
+0
-2
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/single_mode.cpp
gframe/single_mode.cpp
+2
-2
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
No files found.
gframe/replay.cpp
View file @
392def1e
...
...
@@ -63,12 +63,6 @@ void Replay::WriteData(const void* data, size_t length, bool flush) {
void
Replay
::
WriteInt32
(
int
data
,
bool
flush
)
{
WriteData
(
&
data
,
sizeof
data
,
flush
);
}
void
Replay
::
WriteInt16
(
short
data
,
bool
flush
)
{
WriteData
(
&
data
,
sizeof
data
,
flush
);
}
void
Replay
::
WriteInt8
(
char
data
,
bool
flush
)
{
WriteData
(
&
data
,
sizeof
data
,
flush
);
}
void
Replay
::
Flush
()
{
if
(
!
is_recording
)
return
;
...
...
gframe/replay.h
View file @
392def1e
...
...
@@ -40,8 +40,6 @@ public:
WriteData
(
&
data
,
sizeof
(
T
),
flush
);
}
void
WriteInt32
(
int
data
,
bool
flush
=
true
);
void
WriteInt16
(
short
data
,
bool
flush
=
true
);
void
WriteInt8
(
char
data
,
bool
flush
=
true
);
void
Flush
();
void
EndRecord
();
void
SaveReplay
(
const
wchar_t
*
name
);
...
...
gframe/single_duel.cpp
View file @
392def1e
...
...
@@ -1413,7 +1413,7 @@ void SingleDuel::GetResponse(DuelPlayer* dp, unsigned char* pdata, unsigned int
if
(
len
>
SIZE_RETURN_VALUE
)
len
=
SIZE_RETURN_VALUE
;
std
::
memcpy
(
resb
,
pdata
,
len
);
last_replay
.
Write
Int8
(
len
);
last_replay
.
Write
<
uint8_t
>
(
len
);
last_replay
.
WriteData
(
resb
,
len
);
set_responseb
(
pduel
,
resb
);
players
[
dp
->
type
]
->
state
=
0xff
;
...
...
gframe/single_mode.cpp
View file @
392def1e
...
...
@@ -25,7 +25,7 @@ void SingleMode::StopPlay(bool is_exiting) {
void
SingleMode
::
SetResponse
(
unsigned
char
*
resp
,
unsigned
int
len
)
{
if
(
!
pduel
)
return
;
last_replay
.
Write
Int8
(
len
);
last_replay
.
Write
<
uint8_t
>
(
len
);
last_replay
.
WriteData
(
resp
,
len
);
set_responseb
(
pduel
,
resp
);
}
...
...
@@ -119,7 +119,7 @@ int SingleMode::SinglePlayThread() {
last_replay
.
WriteInt32
(
start_hand
,
false
);
last_replay
.
WriteInt32
(
draw_count
,
false
);
last_replay
.
WriteInt32
(
opt
,
false
);
last_replay
.
Write
Int16
(
slen
,
false
);
last_replay
.
Write
<
uint16_t
>
(
slen
,
false
);
last_replay
.
WriteData
(
filename
,
slen
,
false
);
last_replay
.
Flush
();
start_duel
(
pduel
,
opt
);
...
...
gframe/tag_duel.cpp
View file @
392def1e
...
...
@@ -1515,7 +1515,7 @@ void TagDuel::GetResponse(DuelPlayer* dp, unsigned char* pdata, unsigned int len
if
(
len
>
SIZE_RETURN_VALUE
)
len
=
SIZE_RETURN_VALUE
;
std
::
memcpy
(
resb
,
pdata
,
len
);
last_replay
.
Write
Int8
(
len
);
last_replay
.
Write
<
uint8_t
>
(
len
);
last_replay
.
WriteData
(
resb
,
len
);
set_responseb
(
pduel
,
resb
);
players
[
dp
->
type
]
->
state
=
0xff
;
...
...
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