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
Commits
f6f1eaa1
Commit
f6f1eaa1
authored
Dec 05, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit 'upstream/master' into server-develop
parents
bbced0ec
7e1c4b75
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
72 additions
and
70 deletions
+72
-70
gframe/bufferio.h
gframe/bufferio.h
+11
-7
gframe/client_field.cpp
gframe/client_field.cpp
+7
-7
gframe/client_field.h
gframe/client_field.h
+1
-3
gframe/config.h
gframe/config.h
+5
-5
gframe/data_manager.cpp
gframe/data_manager.cpp
+3
-3
gframe/data_manager.h
gframe/data_manager.h
+3
-3
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+1
-3
gframe/duelclient.cpp
gframe/duelclient.cpp
+1
-1
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+18
-10
gframe/replay.cpp
gframe/replay.cpp
+8
-15
gframe/replay.h
gframe/replay.h
+1
-1
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/single_mode.cpp
gframe/single_mode.cpp
+10
-9
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
No files found.
gframe/bufferio.h
View file @
f6f1eaa1
...
...
@@ -256,14 +256,18 @@ public:
str
[
N
-
1
]
=
0
;
}
static
int
GetVal
(
const
wchar_t
*
pstr
)
{
unsigned
int
ret
=
0
;
while
(
*
pstr
>=
L'0'
&&
*
pstr
<=
L'9'
)
{
ret
=
ret
*
10
+
(
*
pstr
-
L'0'
);
pstr
++
;
if
(
*
pstr
>=
L'0'
&&
*
pstr
<=
L'9'
)
{
int
ret
{};
wchar_t
*
str_end
{};
ret
=
std
::
wcstol
(
pstr
,
&
str_end
,
10
);
if
(
*
str_end
==
0
)
return
ret
;
else
return
0
;
}
if
(
*
pstr
==
0
)
return
(
int
)
ret
;
else
return
0
;
}
};
...
...
gframe/client_field.cpp
View file @
f6f1eaa1
...
...
@@ -1397,8 +1397,7 @@ bool ClientField::check_sum_trib(std::set<ClientCard*>::const_iterator index, st
||
check_sum_trib
(
index
,
end
,
acc
+
l2
)
||
check_sum_trib
(
index
,
end
,
acc
);
}
template
<
class
T
>
static
bool
is_declarable
(
T
const
&
cd
,
const
std
::
vector
<
int
>&
opcode
)
{
static
bool
is_declarable
(
const
CardData
&
cd
,
const
std
::
vector
<
unsigned
int
>&
opcode
)
{
std
::
stack
<
int
>
stack
;
for
(
auto
it
=
opcode
.
begin
();
it
!=
opcode
.
end
();
++
it
)
{
switch
(
*
it
)
{
...
...
@@ -1448,7 +1447,7 @@ static bool is_declarable(T const& cd, const std::vector<int>& opcode) {
stack
.
pop
();
int
lhs
=
stack
.
top
();
stack
.
pop
();
stack
.
push
(
lhs
&&
rhs
);
stack
.
push
(
static_cast
<
int
>
(
lhs
&&
rhs
)
);
}
break
;
}
...
...
@@ -1458,7 +1457,7 @@ static bool is_declarable(T const& cd, const std::vector<int>& opcode) {
stack
.
pop
();
int
lhs
=
stack
.
top
();
stack
.
pop
();
stack
.
push
(
lhs
||
rhs
);
stack
.
push
(
static_cast
<
int
>
(
lhs
||
rhs
)
);
}
break
;
}
...
...
@@ -1474,7 +1473,7 @@ static bool is_declarable(T const& cd, const std::vector<int>& opcode) {
if
(
stack
.
size
()
>=
1
)
{
int
val
=
stack
.
top
();
stack
.
pop
();
stack
.
push
(
!
val
);
stack
.
push
(
static_cast
<
int
>
(
!
val
)
);
}
break
;
}
...
...
@@ -1527,8 +1526,9 @@ static bool is_declarable(T const& cd, const std::vector<int>& opcode) {
}
if
(
stack
.
size
()
!=
1
||
stack
.
top
()
==
0
)
return
false
;
return
cd
.
code
==
CARD_MARINE_DOLPHIN
||
cd
.
code
==
CARD_TWINKLE_MOSS
||
(
!
cd
.
alias
&&
(
cd
.
type
&
(
TYPE_MONSTER
+
TYPE_TOKEN
))
!=
(
TYPE_MONSTER
+
TYPE_TOKEN
));
if
(
cd
.
type
&
TYPE_TOKEN
)
return
false
;
return
!
cd
.
alias
||
second_code
.
find
(
cd
.
code
)
!=
second_code
.
end
();
}
void
ClientField
::
UpdateDeclarableList
()
{
const
wchar_t
*
pname
=
mainGame
->
ebANCard
->
getText
();
...
...
gframe/client_field.h
View file @
f6f1eaa1
...
...
@@ -69,7 +69,7 @@ public:
std
::
vector
<
ClientCard
*>
selected_cards
;
std
::
set
<
ClientCard
*>
selectsum_cards
;
std
::
vector
<
ClientCard
*>
selectsum_all
;
std
::
vector
<
int
>
declare_opcodes
;
std
::
vector
<
unsigned
int
>
declare_opcodes
;
std
::
vector
<
ClientCard
*>
display_cards
;
std
::
vector
<
int
>
sort_list
;
std
::
map
<
int
,
int
>
player_desc_hints
[
2
];
...
...
@@ -158,8 +158,6 @@ public:
}
//special cards
#define CARD_MARINE_DOLPHIN 78734254
#define CARD_TWINKLE_MOSS 13857930
#define CARD_QUESTION 38723936
#endif //CLIENT_FIELD_H
gframe/config.h
View file @
f6f1eaa1
...
...
@@ -58,16 +58,16 @@ inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) {
#include "../ocgcore/ocgapi.h"
#include "../ocgcore/common.h"
inline
FILE
*
myfopen
(
const
char
*
filename
,
const
char
*
mode
)
{
inline
FILE
*
myfopen
(
const
wchar_t
*
filename
,
const
char
*
mode
)
{
FILE
*
fp
{};
#ifdef _WIN32
wchar_t
wname
[
256
]{};
wchar_t
wmode
[
20
]{};
BufferIO
::
DecodeUTF8
(
filename
,
wname
);
BufferIO
::
CopyCharArray
(
mode
,
wmode
);
fp
=
_wfopen
(
w
name
,
wmode
);
fp
=
_wfopen
(
file
name
,
wmode
);
#else
fp
=
fopen
(
filename
,
mode
);
char
fname
[
1024
]{};
BufferIO
::
EncodeUTF8
(
filename
,
fname
);
fp
=
fopen
(
fname
,
mode
);
#endif
return
fp
;
}
...
...
gframe/data_manager.cpp
View file @
f6f1eaa1
...
...
@@ -8,7 +8,7 @@
namespace
ygo
{
const
wchar_t
*
DataManager
::
unknown_string
=
L"???"
;
byte
DataManager
::
scriptBuffer
[
0x20000
];
unsigned
char
DataManager
::
scriptBuffer
[
0x20000
];
#if !defined(YGOPRO_SERVER_MODE) || defined(SERVER_ZIP_SUPPORT)
IFileSystem
*
DataManager
::
FileSystem
;
#endif
...
...
@@ -414,7 +414,7 @@ uint32 DataManager::CardReader(uint32 code, card_data* pData) {
pData
->
clear
();
return
0
;
}
byte
*
DataManager
::
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
)
{
unsigned
char
*
DataManager
::
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
)
{
// default script name: ./script/c%d.lua
#ifdef YGOPRO_SERVER_MODE
char
first
[
256
]{};
...
...
@@ -445,7 +445,7 @@ byte* DataManager::ScriptReaderEx(const char* script_name, int* slen) {
return
ScriptReader
(
second
,
slen
);
#endif //YGOPRO_SERVER_MODE
}
byte
*
DataManager
::
ScriptReader
(
const
char
*
script_name
,
int
*
slen
)
{
unsigned
char
*
DataManager
::
ScriptReader
(
const
char
*
script_name
,
int
*
slen
)
{
#if defined(YGOPRO_SERVER_MODE) && !defined(SERVER_ZIP_SUPPORT)
FILE
*
fp
=
fopen
(
script_name
,
"rb"
);
if
(
!
fp
)
...
...
gframe/data_manager.h
View file @
f6f1eaa1
...
...
@@ -52,11 +52,11 @@ public:
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_sysStrings
;
char
errmsg
[
512
]{};
static
byte
scriptBuffer
[
0x20000
];
static
unsigned
char
scriptBuffer
[
0x20000
];
static
const
wchar_t
*
unknown_string
;
static
uint32
CardReader
(
uint32
,
card_data
*
);
static
byte
*
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
);
static
byte
*
ScriptReader
(
const
char
*
script_name
,
int
*
slen
);
static
unsigned
char
*
ScriptReaderEx
(
const
char
*
script_name
,
int
*
slen
);
static
unsigned
char
*
ScriptReader
(
const
char
*
script_name
,
int
*
slen
);
#if !defined(YGOPRO_SERVER_MODE) || defined(SERVER_ZIP_SUPPORT)
static
IFileSystem
*
FileSystem
;
#endif
...
...
gframe/deck_manager.cpp
View file @
f6f1eaa1
...
...
@@ -273,9 +273,7 @@ void DeckManager::GetDeckFile(wchar_t* ret, irr::gui::IGUIComboBox* cbCategory,
}
}
FILE
*
DeckManager
::
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
)
{
char
fullname
[
256
]{};
BufferIO
::
EncodeUTF8
(
file
,
fullname
);
FILE
*
fp
=
myfopen
(
fullname
,
mode
);
FILE
*
fp
=
myfopen
(
file
,
mode
);
return
fp
;
}
IReadFile
*
DeckManager
::
OpenDeckReader
(
const
wchar_t
*
file
)
{
...
...
gframe/duelclient.cpp
View file @
f6f1eaa1
...
...
@@ -3644,7 +3644,7 @@ int DuelClient::ClientAnalyze(unsigned char* msg, unsigned int len) {
int
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
mainGame
->
dField
.
declare_opcodes
.
clear
();
for
(
int
i
=
0
;
i
<
count
;
++
i
)
mainGame
->
dField
.
declare_opcodes
.
push_back
(
BufferIO
::
ReadInt32
(
pbuf
));
mainGame
->
dField
.
declare_opcodes
.
push_back
(
buffer_read
<
uint32_t
>
(
pbuf
));
if
(
select_hint
)
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetDesc
(
select_hint
));
else
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
564
));
...
...
gframe/menu_handler.cpp
View file @
f6f1eaa1
...
...
@@ -236,9 +236,12 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
ReplayMode
::
cur_replay
.
OpenReplay
(
open_file_name
);
open_file
=
false
;
}
else
{
if
(
mainGame
->
lstReplayList
->
getSelected
()
==
-
1
)
auto
selected
=
mainGame
->
lstReplayList
->
getSelected
();
if
(
selected
==
-
1
)
break
;
if
(
!
ReplayMode
::
cur_replay
.
OpenReplay
(
mainGame
->
lstReplayList
->
getListItem
(
mainGame
->
lstReplayList
->
getSelected
())))
wchar_t
replay_path
[
256
]{};
myswprintf
(
replay_path
,
L"./replay/%ls"
,
mainGame
->
lstReplayList
->
getListItem
(
selected
));
if
(
!
ReplayMode
::
cur_replay
.
OpenReplay
(
replay_path
))
break
;
}
mainGame
->
ClearCardInfo
();
...
...
@@ -293,14 +296,17 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break
;
}
case
BUTTON_EXPORT_DECK
:
{
if
(
mainGame
->
lstReplayList
->
getSelected
()
==
-
1
)
auto
selected
=
mainGame
->
lstReplayList
->
getSelected
();
if
(
selected
==
-
1
)
break
;
Replay
replay
;
wchar_t
ex_filename
[
256
]{};
wchar_t
namebuf
[
4
][
20
]{};
wchar_t
filename
[
256
]{};
myswprintf
(
ex_filename
,
L"%ls"
,
mainGame
->
lstReplayList
->
getListItem
(
mainGame
->
lstReplayList
->
getSelected
()));
if
(
!
replay
.
OpenReplay
(
ex_filename
))
wchar_t
replay_path
[
256
]{};
BufferIO
::
CopyWideString
(
mainGame
->
lstReplayList
->
getListItem
(
selected
),
ex_filename
);
myswprintf
(
replay_path
,
L"./replay/%ls"
,
ex_filename
);
if
(
!
replay
.
OpenReplay
(
replay_path
))
break
;
const
ReplayHeader
&
rh
=
replay
.
pheader
;
if
(
rh
.
flag
&
REPLAY_SINGLE_MODE
)
...
...
@@ -537,9 +543,13 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
int
sel
=
mainGame
->
lstReplayList
->
getSelected
();
if
(
sel
==
-
1
)
break
;
if
(
!
ReplayMode
::
cur_replay
.
OpenReplay
(
mainGame
->
lstReplayList
->
getListItem
(
sel
)))
wchar_t
replay_path
[
256
]{};
myswprintf
(
replay_path
,
L"./replay/%ls"
,
mainGame
->
lstReplayList
->
getListItem
(
sel
));
if
(
!
ReplayMode
::
cur_replay
.
OpenReplay
(
replay_path
))
{
mainGame
->
stReplayInfo
->
setText
(
L""
);
break
;
wchar_t
infobuf
[
256
];
}
wchar_t
infobuf
[
256
]{};
std
::
wstring
repinfo
;
time_t
curtime
;
if
(
ReplayMode
::
cur_replay
.
pheader
.
flag
&
REPLAY_UNIFORM
)
...
...
@@ -572,9 +582,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
const
wchar_t
*
name
=
mainGame
->
lstSinglePlayList
->
getListItem
(
sel
);
wchar_t
fname
[
256
];
myswprintf
(
fname
,
L"./single/%ls"
,
name
);
char
fullname
[
256
]{};
BufferIO
::
EncodeUTF8
(
fname
,
fullname
);
FILE
*
fp
=
myfopen
(
fullname
,
"rb"
);
FILE
*
fp
=
myfopen
(
fname
,
"rb"
);
if
(
!
fp
)
{
mainGame
->
stSinglePlayInfo
->
setText
(
L""
);
break
;
...
...
gframe/replay.cpp
View file @
f6f1eaa1
...
...
@@ -147,9 +147,7 @@ void Replay::SaveReplay(const wchar_t* name) {
return
;
wchar_t
fname
[
256
];
myswprintf
(
fname
,
L"./replay/%ls.yrp"
,
name
);
char
fullname
[
256
]{};
BufferIO
::
EncodeUTF8
(
fname
,
fullname
);
FILE
*
rfp
=
myfopen
(
fullname
,
"wb"
);
FILE
*
rfp
=
myfopen
(
fname
,
"wb"
);
if
(
!
rfp
)
return
;
fwrite
(
&
pheader
,
sizeof
pheader
,
1
,
rfp
);
...
...
@@ -157,14 +155,11 @@ void Replay::SaveReplay(const wchar_t* name) {
fclose
(
rfp
);
}
bool
Replay
::
OpenReplay
(
const
wchar_t
*
name
)
{
char
fullname
[
256
]{};
BufferIO
::
EncodeUTF8
(
name
,
fullname
);
FILE
*
rfp
=
myfopen
(
fullname
,
"rb"
);
FILE
*
rfp
=
myfopen
(
name
,
"rb"
);
if
(
!
rfp
)
{
wchar_t
fname
[
256
];
myswprintf
(
fname
,
L"./replay/%ls"
,
name
);
BufferIO
::
EncodeUTF8
(
fname
,
fullname
);
rfp
=
myfopen
(
fullname
,
"rb"
);
rfp
=
myfopen
(
fname
,
"rb"
);
}
if
(
!
rfp
)
return
false
;
...
...
@@ -181,7 +176,7 @@ bool Replay::OpenReplay(const wchar_t* name) {
if
(
pheader
.
flag
&
REPLAY_COMPRESSED
)
{
comp_size
=
fread
(
comp_data
,
1
,
MAX_COMP_SIZE
,
rfp
);
fclose
(
rfp
);
if
(
(
int
)
pheader
.
datasize
<
0
&&
(
int
)
pheader
.
datasize
>
MAX_REPLAY_SIZE
)
if
(
pheader
.
datasize
>
MAX_REPLAY_SIZE
)
return
false
;
replay_size
=
pheader
.
datasize
;
if
(
LzmaUncompress
(
replay_data
,
&
replay_size
,
comp_data
,
&
comp_size
,
pheader
.
props
,
5
)
!=
SZ_OK
)
...
...
@@ -201,9 +196,7 @@ bool Replay::OpenReplay(const wchar_t* name) {
bool
Replay
::
CheckReplay
(
const
wchar_t
*
name
)
{
wchar_t
fname
[
256
];
myswprintf
(
fname
,
L"./replay/%ls"
,
name
);
char
fullname
[
256
]{};
BufferIO
::
EncodeUTF8
(
fname
,
fullname
);
FILE
*
rfp
=
myfopen
(
fullname
,
"rb"
);
FILE
*
rfp
=
myfopen
(
fname
,
"rb"
);
if
(
!
rfp
)
return
false
;
ReplayHeader
rheader
;
...
...
@@ -253,13 +246,13 @@ bool Replay::ReadNextResponse(unsigned char resp[]) {
return
false
;
return
true
;
}
void
Replay
::
ReadName
(
wchar_t
*
data
)
{
bool
Replay
::
ReadName
(
wchar_t
*
data
)
{
uint16_t
buffer
[
20
]{};
if
(
!
ReadData
(
buffer
,
sizeof
buffer
))
{
data
[
0
]
=
0
;
return
;
return
false
;
}
BufferIO
::
CopyWStr
(
buffer
,
data
,
20
);
return
true
;
}
bool
Replay
::
ReadData
(
void
*
data
,
int
length
)
{
if
(
!
is_replaying
)
...
...
gframe/replay.h
View file @
f6f1eaa1
...
...
@@ -54,7 +54,7 @@ public:
static
bool
DeleteReplay
(
const
wchar_t
*
name
);
static
bool
RenameReplay
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
);
bool
ReadNextResponse
(
unsigned
char
resp
[]);
void
ReadName
(
wchar_t
*
data
);
bool
ReadName
(
wchar_t
*
data
);
//void ReadHeader(ReplayHeader& header);
bool
ReadData
(
void
*
data
,
int
length
);
template
<
typename
T
>
...
...
gframe/replay_mode.cpp
View file @
f6f1eaa1
...
...
@@ -886,7 +886,7 @@ inline void ReplayMode::ReloadLocation(int player, int location, int flag, std::
mainGame
->
dField
.
UpdateFieldCard
(
mainGame
->
LocalPlayer
(
player
),
location
,
queryBuffer
.
data
());
}
void
ReplayMode
::
ReplayRefresh
(
int
flag
)
{
std
::
vector
<
byte
>
queryBuffer
;
std
::
vector
<
unsigned
char
>
queryBuffer
;
queryBuffer
.
resize
(
SIZE_QUERY_BUFFER
);
ReloadLocation
(
0
,
LOCATION_MZONE
,
flag
,
queryBuffer
);
ReloadLocation
(
1
,
LOCATION_MZONE
,
flag
,
queryBuffer
);
...
...
gframe/single_duel.cpp
View file @
f6f1eaa1
...
...
@@ -1786,7 +1786,7 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
return
0
;
}
void
SingleDuel
::
GetResponse
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
unsigned
int
len
)
{
byte
resb
[
SIZE_RETURN_VALUE
]{};
unsigned
char
resb
[
SIZE_RETURN_VALUE
]{};
if
(
len
>
SIZE_RETURN_VALUE
)
len
=
SIZE_RETURN_VALUE
;
std
::
memcpy
(
resb
,
pdata
,
len
);
...
...
gframe/single_mode.cpp
View file @
f6f1eaa1
...
...
@@ -55,13 +55,13 @@ int SingleMode::SinglePlayThread() {
mainGame
->
dInfo
.
turn
=
0
;
if
(
mainGame
->
chkSinglePlayReturnDeckTop
->
isChecked
())
opt
|=
DUEL_RETURN_DECK_TOP
;
char
filename
[
256
];
char
filename
[
256
]
{}
;
int
slen
=
0
;
if
(
open_file
)
{
open_file
=
false
;
slen
=
BufferIO
::
EncodeUTF8
(
open_file_name
,
filename
);
if
(
!
preload_script
(
pduel
,
filename
))
{
wchar_t
fname
[
256
];
wchar_t
fname
[
256
]
{}
;
myswprintf
(
fname
,
L"./single/%ls"
,
open_file_name
);
slen
=
BufferIO
::
EncodeUTF8
(
fname
,
filename
);
if
(
!
preload_script
(
pduel
,
filename
))
...
...
@@ -69,7 +69,7 @@ int SingleMode::SinglePlayThread() {
}
}
else
{
const
wchar_t
*
name
=
mainGame
->
lstSinglePlayList
->
getListItem
(
mainGame
->
lstSinglePlayList
->
getSelected
());
wchar_t
fname
[
256
];
wchar_t
fname
[
256
]
{}
;
myswprintf
(
fname
,
L"./single/%ls"
,
name
);
slen
=
BufferIO
::
EncodeUTF8
(
fname
,
filename
);
if
(
!
preload_script
(
pduel
,
filename
))
...
...
@@ -109,11 +109,12 @@ int SingleMode::SinglePlayThread() {
is_continuing
=
SinglePlayAnalyze
(
engineBuffer
.
data
(),
len
);
last_replay
.
BeginRecord
();
last_replay
.
WriteHeader
(
rh
);
uint16_t
buffer
[
20
];
BufferIO
::
CopyCharArray
(
mainGame
->
dInfo
.
hostname
,
buffer
);
last_replay
.
WriteData
(
buffer
,
40
,
false
);
BufferIO
::
CopyCharArray
(
mainGame
->
dInfo
.
clientname
,
buffer
);
last_replay
.
WriteData
(
buffer
,
40
,
false
);
uint16_t
host_name
[
20
]{};
BufferIO
::
CopyCharArray
(
mainGame
->
dInfo
.
hostname
,
host_name
);
last_replay
.
WriteData
(
host_name
,
sizeof
host_name
,
false
);
uint16_t
client_name
[
20
]{};
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_hand
,
false
);
last_replay
.
WriteInt32
(
draw_count
,
false
);
...
...
@@ -814,7 +815,7 @@ void SingleMode::SinglePlayRefreshSingle(int player, int location, int sequence,
mainGame
->
dField
.
UpdateCard
(
mainGame
->
LocalPlayer
(
player
),
location
,
sequence
,
queryBuffer
);
}
void
SingleMode
::
SinglePlayReload
()
{
std
::
vector
<
byte
>
queryBuffer
;
std
::
vector
<
unsigned
char
>
queryBuffer
;
queryBuffer
.
resize
(
SIZE_QUERY_BUFFER
);
unsigned
int
flag
=
0xffdfff
;
ReloadLocation
(
0
,
LOCATION_MZONE
,
flag
,
queryBuffer
);
...
...
gframe/tag_duel.cpp
View file @
f6f1eaa1
...
...
@@ -1889,7 +1889,7 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
return
0
;
}
void
TagDuel
::
GetResponse
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
unsigned
int
len
)
{
byte
resb
[
SIZE_RETURN_VALUE
]{};
unsigned
char
resb
[
SIZE_RETURN_VALUE
]{};
if
(
len
>
SIZE_RETURN_VALUE
)
len
=
SIZE_RETURN_VALUE
;
std
::
memcpy
(
resb
,
pdata
,
len
);
...
...
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