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
7f54f3c8
Commit
7f54f3c8
authored
Jun 19, 2025
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exclude reading replay in server mode
parent
bd68750c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
gframe/replay.cpp
gframe/replay.cpp
+4
-0
gframe/replay.h
gframe/replay.h
+6
-0
No files found.
gframe/replay.cpp
View file @
7f54f3c8
...
@@ -145,6 +145,7 @@ void Replay::SaveReplay(const wchar_t* name) {
...
@@ -145,6 +145,7 @@ void Replay::SaveReplay(const wchar_t* name) {
std
::
fwrite
(
comp_data
,
comp_size
,
1
,
rfp
);
std
::
fwrite
(
comp_data
,
comp_size
,
1
,
rfp
);
std
::
fclose
(
rfp
);
std
::
fclose
(
rfp
);
}
}
#ifndef YGOPRO_SERVER_MODE
bool
Replay
::
OpenReplay
(
const
wchar_t
*
name
)
{
bool
Replay
::
OpenReplay
(
const
wchar_t
*
name
)
{
FILE
*
rfp
=
mywfopen
(
name
,
"rb"
);
FILE
*
rfp
=
mywfopen
(
name
,
"rb"
);
if
(
!
rfp
)
{
if
(
!
rfp
)
{
...
@@ -260,6 +261,7 @@ void Replay::Rewind() {
...
@@ -260,6 +261,7 @@ void Replay::Rewind() {
data_position
=
0
;
data_position
=
0
;
can_read
=
true
;
can_read
=
true
;
}
}
#endif // YGOPRO_SERVER_MODE
void
Replay
::
Reset
()
{
void
Replay
::
Reset
()
{
is_recording
=
false
;
is_recording
=
false
;
is_replaying
=
false
;
is_replaying
=
false
;
...
@@ -273,6 +275,7 @@ void Replay::Reset() {
...
@@ -273,6 +275,7 @@ void Replay::Reset() {
decks
.
clear
();
decks
.
clear
();
script_name
.
clear
();
script_name
.
clear
();
}
}
#ifndef YGOPRO_SERVER_MODE
void
Replay
::
SkipInfo
(){
void
Replay
::
SkipInfo
(){
if
(
data_position
==
0
)
if
(
data_position
==
0
)
data_position
+=
info_offset
;
data_position
+=
info_offset
;
...
@@ -330,5 +333,6 @@ bool Replay::ReadInfo() {
...
@@ -330,5 +333,6 @@ bool Replay::ReadInfo() {
}
}
return
true
;
return
true
;
}
}
#endif // YGOPRO_SERVER_MODE
}
}
gframe/replay.h
View file @
7f54f3c8
...
@@ -83,6 +83,9 @@ public:
...
@@ -83,6 +83,9 @@ public:
return
deck_index
;
return
deck_index
;
}
}
}
}
#ifdef YGOPRO_SERVER_MODE
void
Reset
();
#else
bool
OpenReplay
(
const
wchar_t
*
name
);
bool
OpenReplay
(
const
wchar_t
*
name
);
bool
ReadNextResponse
(
unsigned
char
resp
[]);
bool
ReadNextResponse
(
unsigned
char
resp
[]);
bool
ReadName
(
wchar_t
*
data
);
bool
ReadName
(
wchar_t
*
data
);
...
@@ -99,6 +102,7 @@ public:
...
@@ -99,6 +102,7 @@ public:
void
Reset
();
void
Reset
();
void
SkipInfo
();
void
SkipInfo
();
bool
IsReplaying
()
const
;
bool
IsReplaying
()
const
;
#endif // YGOPRO_SERVER_MODE
FILE
*
fp
{
nullptr
};
FILE
*
fp
{
nullptr
};
#ifdef _WIN32
#ifdef _WIN32
...
@@ -116,7 +120,9 @@ public:
...
@@ -116,7 +120,9 @@ public:
std
::
string
script_name
;
// 2 bytes, script name (max: 256 bytes)
std
::
string
script_name
;
// 2 bytes, script name (max: 256 bytes)
private:
private:
#ifndef YGOPRO_SERVER_MODE
bool
ReadInfo
();
bool
ReadInfo
();
#endif
unsigned
char
*
replay_data
;
unsigned
char
*
replay_data
;
size_t
replay_size
{};
size_t
replay_size
{};
...
...
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