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
1
Merge Requests
1
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
nanahira
ygopro
Commits
d63e2089
Commit
d63e2089
authored
Jul 30, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'server' of github.com:moecube/ygopro into server-develop
parents
fad58a3a
e257ab2e
Pipeline
#39711
failed with stages
in 5 minutes and 43 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
34 deletions
+34
-34
gframe/data_manager.cpp
gframe/data_manager.cpp
+1
-1
gframe/data_manager.h
gframe/data_manager.h
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+17
-17
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+15
-15
No files found.
gframe/data_manager.cpp
View file @
d63e2089
...
@@ -71,7 +71,7 @@ bool DataManager::ReadDB(sqlite3* pDB) {
...
@@ -71,7 +71,7 @@ bool DataManager::ReadDB(sqlite3* pDB) {
cs
.
desc
[
i
]
=
strBuffer
;
cs
.
desc
[
i
]
=
strBuffer
;
}
}
}
}
#endif
#endif
//YGOPRO_SERVER_MODE
}
}
sqlite3_finalize
(
pStmt
);
sqlite3_finalize
(
pStmt
);
for
(
const
auto
&
entry
:
extra_setcode
)
{
for
(
const
auto
&
entry
:
extra_setcode
)
{
...
...
gframe/data_manager.h
View file @
d63e2089
...
@@ -97,7 +97,7 @@ public:
...
@@ -97,7 +97,7 @@ public:
string_pointer
strings_end
()
const
noexcept
{
string_pointer
strings_end
()
const
noexcept
{
return
_strings
.
cend
();
return
_strings
.
cend
();
}
}
#endif
#endif
//YGOPRO_SERVER_MODE
bool
GetData
(
uint32_t
code
,
CardData
*
pData
)
const
;
bool
GetData
(
uint32_t
code
,
CardData
*
pData
)
const
;
#ifndef YGOPRO_SERVER_MODE
#ifndef YGOPRO_SERVER_MODE
bool
GetString
(
uint32_t
code
,
CardString
*
pStr
)
const
;
bool
GetString
(
uint32_t
code
,
CardString
*
pStr
)
const
;
...
...
gframe/single_duel.cpp
View file @
d63e2089
...
@@ -1250,7 +1250,7 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
...
@@ -1250,7 +1250,7 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
RefreshHand
(
0
);
RefreshHand
(
0
);
RefreshHand
(
1
);
RefreshHand
(
1
);
#ifdef YGOPRO_SERVER_MODE
#ifdef YGOPRO_SERVER_MODE
turn_player
=
BufferIO
::
Read
<
int8_t
>
(
pbuf
)
&
0x1
;
turn_player
=
BufferIO
::
Read
<
u
int8_t
>
(
pbuf
)
&
0x1
;
#else
#else
pbuf
++
;
pbuf
++
;
#endif
#endif
...
@@ -1273,7 +1273,7 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
...
@@ -1273,7 +1273,7 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
}
}
case
MSG_NEW_PHASE
:
{
case
MSG_NEW_PHASE
:
{
#ifdef YGOPRO_SERVER_MODE
#ifdef YGOPRO_SERVER_MODE
phase
=
BufferIO
::
Read
<
int16_t
>
(
pbuf
);
phase
=
BufferIO
::
Read
<
u
int16_t
>
(
pbuf
);
#else
#else
pbuf
+=
2
;
pbuf
+=
2
;
#endif
#endif
...
@@ -1956,28 +1956,28 @@ void SingleDuel::RequestField(DuelPlayer* dp) {
...
@@ -1956,28 +1956,28 @@ void SingleDuel::RequestField(DuelPlayer* dp) {
};
};
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
MSG_START
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
MSG_START
);
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
player
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
player
);
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
host_info
.
duel_rule
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
host_info
.
duel_rule
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
host_info
.
start_lp
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
host_info
.
start_lp
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
host_info
.
start_lp
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
host_info
.
start_lp
);
BufferIO
::
Write
<
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
u
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
u
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
u
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
u
int16_t
>
(
pbuf
,
0
);
});
});
uint8_t
newturn_count
=
(
turn_player
==
1
)
?
2
:
1
;
uint8_t
newturn_count
=
(
turn_player
==
1
)
?
2
:
1
;
for
(
uint8_t
i
=
0
;
i
<
newturn_count
;
++
i
)
{
for
(
uint8_t
i
=
0
;
i
<
newturn_count
;
++
i
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
MSG_NEW_TURN
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
MSG_NEW_TURN
);
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
i
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
i
);
});
});
}
}
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
MSG_NEW_PHASE
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
MSG_NEW_PHASE
);
BufferIO
::
Write
<
int16_t
>
(
pbuf
,
phase
);
BufferIO
::
Write
<
u
int16_t
>
(
pbuf
,
phase
);
});
});
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
...
@@ -2001,7 +2001,7 @@ void SingleDuel::RequestField(DuelPlayer* dp) {
...
@@ -2001,7 +2001,7 @@ void SingleDuel::RequestField(DuelPlayer* dp) {
// send MSG_REVERSE_DECK if deck is reversed
// send MSG_REVERSE_DECK if deck is reversed
if
(
deck_reversed
)
if
(
deck_reversed
)
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
MSG_REVERSE_DECK
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
MSG_REVERSE_DECK
);
});
});
uint8_t
query_buffer
[
SIZE_QUERY_BUFFER
];
uint8_t
query_buffer
[
SIZE_QUERY_BUFFER
];
...
@@ -2026,9 +2026,9 @@ void SingleDuel::RequestField(DuelPlayer* dp) {
...
@@ -2026,9 +2026,9 @@ void SingleDuel::RequestField(DuelPlayer* dp) {
code
|=
0x80000000
;
// mark as reversed
code
|=
0x80000000
;
// mark as reversed
if
(
deck_reversed
||
position
&
POS_FACEUP
)
if
(
deck_reversed
||
position
&
POS_FACEUP
)
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
MSG_DECK_TOP
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
MSG_DECK_TOP
);
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
i
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
i
);
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
code
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
code
);
});
});
}
}
...
...
gframe/tag_duel.cpp
View file @
d63e2089
...
@@ -1247,7 +1247,7 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
...
@@ -1247,7 +1247,7 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
}
}
case
MSG_NEW_PHASE
:
{
case
MSG_NEW_PHASE
:
{
#ifdef YGOPRO_SERVER_MODE
#ifdef YGOPRO_SERVER_MODE
phase
=
BufferIO
::
Read
<
int16_t
>
(
pbuf
);
phase
=
BufferIO
::
Read
<
u
int16_t
>
(
pbuf
);
#else
#else
pbuf
+=
2
;
pbuf
+=
2
;
#endif
#endif
...
@@ -2049,15 +2049,15 @@ void TagDuel::RequestField(DuelPlayer* dp) {
...
@@ -2049,15 +2049,15 @@ void TagDuel::RequestField(DuelPlayer* dp) {
};
};
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
MSG_START
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
MSG_START
);
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
player
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
player
);
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
host_info
.
duel_rule
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
host_info
.
duel_rule
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
host_info
.
start_lp
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
host_info
.
start_lp
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
host_info
.
start_lp
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
host_info
.
start_lp
);
BufferIO
::
Write
<
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
u
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
u
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
u
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
int16_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
u
int16_t
>
(
pbuf
,
0
);
});
});
uint8_t
newturn_count
=
turn_count
%
4
;
uint8_t
newturn_count
=
turn_count
%
4
;
...
@@ -2065,14 +2065,14 @@ void TagDuel::RequestField(DuelPlayer* dp) {
...
@@ -2065,14 +2065,14 @@ void TagDuel::RequestField(DuelPlayer* dp) {
newturn_count
=
4
;
newturn_count
=
4
;
for
(
uint8_t
i
=
0
;
i
<
newturn_count
;
++
i
)
{
for
(
uint8_t
i
=
0
;
i
<
newturn_count
;
++
i
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
MSG_NEW_TURN
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
MSG_NEW_TURN
);
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
i
%
2
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
i
%
2
);
});
});
}
}
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
MSG_NEW_PHASE
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
MSG_NEW_PHASE
);
BufferIO
::
Write
<
int16_t
>
(
pbuf
,
phase
);
BufferIO
::
Write
<
u
int16_t
>
(
pbuf
,
phase
);
});
});
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
...
@@ -2115,9 +2115,9 @@ void TagDuel::RequestField(DuelPlayer* dp) {
...
@@ -2115,9 +2115,9 @@ void TagDuel::RequestField(DuelPlayer* dp) {
code
|=
0x80000000
;
// mark as reversed
code
|=
0x80000000
;
// mark as reversed
if
(
deck_reversed
||
position
&
POS_FACEUP
)
if
(
deck_reversed
||
position
&
POS_FACEUP
)
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
WriteMsg
([
&
](
uint8_t
*&
pbuf
)
{
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
MSG_DECK_TOP
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
MSG_DECK_TOP
);
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
i
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
i
);
BufferIO
::
Write
<
int8_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
u
int8_t
>
(
pbuf
,
0
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
code
);
BufferIO
::
Write
<
int32_t
>
(
pbuf
,
code
);
});
});
}
}
...
...
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