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
d2af7c9a
Commit
d2af7c9a
authored
May 12, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into develop
parents
3471da34
f29450b9
Pipeline
#27016
canceled with stages
in 18 seconds
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
233 additions
and
48 deletions
+233
-48
gframe/bufferio.h
gframe/bufferio.h
+9
-18
gframe/drawing.cpp
gframe/drawing.cpp
+1
-1
gframe/replay.cpp
gframe/replay.cpp
+10
-16
lflist.conf
lflist.conf
+213
-13
No files found.
gframe/bufferio.h
View file @
d2af7c9a
#ifndef BUFFERIO_H
#define BUFFERIO_H
#include <cstdint>
#include "../ocgcore/buffer.h"
class
BufferIO
{
public:
inline
static
int
ReadInt32
(
unsigned
char
*&
p
)
{
int
ret
=
*
(
int
*
)
p
;
p
+=
4
;
return
ret
;
return
buffer_read
<
int32_t
>
(
p
);
}
inline
static
short
ReadInt16
(
unsigned
char
*&
p
)
{
short
ret
=
*
(
short
*
)
p
;
p
+=
2
;
return
ret
;
return
buffer_read
<
int16_t
>
(
p
);
}
inline
static
char
ReadInt8
(
unsigned
char
*&
p
)
{
char
ret
=
*
(
char
*
)
p
;
p
++
;
return
ret
;
return
buffer_read
<
char
>
(
p
);
}
inline
static
unsigned
char
ReadUInt8
(
unsigned
char
*&
p
)
{
unsigned
char
ret
=
*
(
unsigned
char
*
)
p
;
p
++
;
return
ret
;
return
buffer_read
<
unsigned
char
>
(
p
);
}
inline
static
void
WriteInt32
(
unsigned
char
*&
p
,
int
val
)
{
(
*
(
int
*
)
p
)
=
val
;
p
+=
4
;
buffer_write
<
int32_t
>
(
p
,
val
);
}
inline
static
void
WriteInt16
(
unsigned
char
*&
p
,
short
val
)
{
(
*
(
short
*
)
p
)
=
val
;
p
+=
2
;
buffer_write
<
int16_t
>
(
p
,
val
);
}
inline
static
void
WriteInt8
(
unsigned
char
*&
p
,
char
val
)
{
*
p
=
val
;
p
++
;
buffer_write
<
char
>
(
p
,
val
);
}
template
<
typename
T1
,
typename
T2
>
inline
static
int
CopyWStr
(
T1
*
src
,
T2
*
pstr
,
int
bufsize
)
{
...
...
gframe/drawing.cpp
View file @
d2af7c9a
...
...
@@ -995,7 +995,7 @@ void Game::DrawSpec() {
0xffff4040
,
0xff40ff40
,
0xff4040ff
,
0xff40ffff
,
0xffff40ff
,
0xffffff40
,
0xffffffff
,
0xff808080
,
0xff404040
};
if
(
chatTiming
[
i
])
{
chatTiming
[
i
]
--
;
if
(
is_building
)
{
if
(
!
is_building
)
{
if
(
dInfo
.
isStarted
&&
i
>=
5
)
continue
;
if
(
!
showChat
&&
i
>
2
)
...
...
gframe/replay.cpp
View file @
d2af7c9a
#include "replay.h"
#include "../ocgcore/ocgapi.h"
#include "../ocgcore/common.h"
#include "lzma/LzmaLib.h"
namespace
ygo
{
...
...
@@ -54,7 +52,7 @@ void Replay::WriteData(const void* data, int length, bool flush) {
return
;
if
(
length
<
0
||
(
pdata
-
replay_data
)
+
length
>
MAX_REPLAY_SIZE
)
return
;
memcpy
(
pdata
,
data
,
length
);
std
::
memcpy
(
pdata
,
data
,
length
);
pdata
+=
length
;
#ifdef _WIN32
DWORD
size
;
...
...
@@ -70,8 +68,7 @@ void Replay::WriteInt32(int data, bool flush) {
return
;
if
((
pdata
-
replay_data
)
+
4
>
MAX_REPLAY_SIZE
)
return
;
*
((
int
*
)(
pdata
))
=
data
;
pdata
+=
4
;
BufferIO
::
WriteInt32
(
pdata
,
data
);
#ifdef _WIN32
DWORD
size
;
WriteFile
(
recording_fp
,
&
data
,
sizeof
(
int
),
&
size
,
NULL
);
...
...
@@ -86,8 +83,7 @@ void Replay::WriteInt16(short data, bool flush) {
return
;
if
((
pdata
-
replay_data
)
+
2
>
MAX_REPLAY_SIZE
)
return
;
*
((
short
*
)(
pdata
))
=
data
;
pdata
+=
2
;
BufferIO
::
WriteInt16
(
pdata
,
data
);
#ifdef _WIN32
DWORD
size
;
WriteFile
(
recording_fp
,
&
data
,
sizeof
(
short
),
&
size
,
NULL
);
...
...
@@ -102,8 +98,7 @@ void Replay::WriteInt8(char data, bool flush) {
return
;
if
((
pdata
-
replay_data
)
+
1
>
MAX_REPLAY_SIZE
)
return
;
*
pdata
=
data
;
pdata
++
;
BufferIO
::
WriteInt8
(
pdata
,
data
);
#ifdef _WIN32
DWORD
size
;
WriteFile
(
recording_fp
,
&
data
,
sizeof
(
char
),
&
size
,
NULL
);
...
...
@@ -266,7 +261,7 @@ bool Replay::ReadNextResponse(unsigned char resp[]) {
int
len
=
*
pdata
++
;
if
(
len
>
SIZE_RETURN_VALUE
)
return
false
;
memcpy
(
resp
,
pdata
,
len
);
std
::
memcpy
(
resp
,
pdata
,
len
);
pdata
+=
len
;
return
true
;
}
...
...
@@ -280,27 +275,26 @@ void Replay::ReadName(wchar_t* data) {
void
Replay
::
ReadData
(
void
*
data
,
int
length
)
{
if
(
!
is_replaying
)
return
;
memcpy
(
data
,
pdata
,
length
);
std
::
memcpy
(
data
,
pdata
,
length
);
pdata
+=
length
;
}
int
Replay
::
ReadInt32
()
{
if
(
!
is_replaying
)
return
-
1
;
int
ret
=
*
((
int
*
)
pdata
);
pdata
+=
4
;
int
ret
=
BufferIO
::
ReadInt32
(
pdata
);
return
ret
;
}
short
Replay
::
ReadInt16
()
{
if
(
!
is_replaying
)
return
-
1
;
short
ret
=
*
((
short
*
)
pdata
);
pdata
+=
2
;
short
ret
=
BufferIO
::
ReadInt16
(
pdata
);
return
ret
;
}
char
Replay
::
ReadInt8
()
{
if
(
!
is_replaying
)
return
-
1
;
return
*
pdata
++
;
char
ret
=
BufferIO
::
ReadInt8
(
pdata
);
return
ret
;
}
void
Replay
::
Rewind
()
{
pdata
=
replay_data
;
...
...
lflist.conf
View file @
d2af7c9a
This diff is collapsed.
Click to expand it.
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