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
194bcd13
Commit
194bcd13
authored
Jun 03, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro into server
parents
fbaec881
562ad942
Pipeline
#27480
failed with stages
in 46 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
49 deletions
+48
-49
gframe/network.h
gframe/network.h
+45
-47
ocgcore
ocgcore
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+1
-0
No files found.
gframe/network.h
View file @
194bcd13
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include <event2/thread.h>
#include <event2/thread.h>
#include <type_traits>
#include <type_traits>
#define check_trivially_copyable(T) static_assert(std::is_trivially_copyable<T>::value == true, "not trivially copyable")
#define check_trivially_copyable(T) static_assert(std::is_trivially_copyable<T>::value == true
&& std::is_standard_layout<T>::value == true
, "not trivially copyable")
namespace
ygo
{
namespace
ygo
{
constexpr
int
SIZE_NETWORK_BUFFER
=
0x2000
;
constexpr
int
SIZE_NETWORK_BUFFER
=
0x2000
;
...
@@ -113,6 +113,7 @@ struct STOC_HandResult {
...
@@ -113,6 +113,7 @@ struct STOC_HandResult {
check_trivially_copyable
(
STOC_HandResult
);
check_trivially_copyable
(
STOC_HandResult
);
static_assert
(
sizeof
(
STOC_HandResult
)
==
2
,
"size mismatch: STOC_HandResult"
);
static_assert
(
sizeof
(
STOC_HandResult
)
==
2
,
"size mismatch: STOC_HandResult"
);
// reserved for STOC_CREATE_GAME
struct
STOC_CreateGame
{
struct
STOC_CreateGame
{
uint32_t
gameid
;
uint32_t
gameid
;
};
};
...
@@ -131,6 +132,7 @@ struct STOC_TypeChange {
...
@@ -131,6 +132,7 @@ struct STOC_TypeChange {
check_trivially_copyable
(
STOC_TypeChange
);
check_trivially_copyable
(
STOC_TypeChange
);
static_assert
(
sizeof
(
STOC_TypeChange
)
==
1
,
"size mismatch: STOC_TypeChange"
);
static_assert
(
sizeof
(
STOC_TypeChange
)
==
1
,
"size mismatch: STOC_TypeChange"
);
// reserved for STOC_LEAVE_GAME
struct
STOC_ExitGame
{
struct
STOC_ExitGame
{
unsigned
char
pos
;
unsigned
char
pos
;
};
};
...
@@ -253,52 +255,48 @@ public:
...
@@ -253,52 +255,48 @@ public:
#define NETPLAYER_TYPE_PLAYER6 5
#define NETPLAYER_TYPE_PLAYER6 5
#define NETPLAYER_TYPE_OBSERVER 7
#define NETPLAYER_TYPE_OBSERVER 7
#define CTOS_RESPONSE 0x1
#define CTOS_RESPONSE 0x1 // byte array
#define CTOS_UPDATE_DECK 0x2
#define CTOS_UPDATE_DECK 0x2 // int32_t array
#define CTOS_HAND_RESULT 0x3
#define CTOS_HAND_RESULT 0x3 // CTOS_HandResult
#define CTOS_TP_RESULT 0x4
#define CTOS_TP_RESULT 0x4 // CTOS_TPResult
#define CTOS_PLAYER_INFO 0x10
#define CTOS_PLAYER_INFO 0x10 // CTOS_PlayerInfo
#define CTOS_CREATE_GAME 0x11
#define CTOS_CREATE_GAME 0x11 // CTOS_CreateGame
#define CTOS_JOIN_GAME 0x12
#define CTOS_JOIN_GAME 0x12 // CTOS_JoinGame
#define CTOS_LEAVE_GAME 0x13
#define CTOS_LEAVE_GAME 0x13 // no data
#define CTOS_SURRENDER 0x14
#define CTOS_SURRENDER 0x14 // no data
#define CTOS_TIME_CONFIRM 0x15
#define CTOS_TIME_CONFIRM 0x15 // no data
#define CTOS_CHAT 0x16
#define CTOS_CHAT 0x16 // uint16_t array
#define CTOS_HS_TODUELIST 0x20
#define CTOS_HS_TODUELIST 0x20 // no data
#define CTOS_HS_TOOBSERVER 0x21
#define CTOS_HS_TOOBSERVER 0x21 // no data
#define CTOS_HS_READY 0x22
#define CTOS_HS_READY 0x22 // no data
#define CTOS_HS_NOTREADY 0x23
#define CTOS_HS_NOTREADY 0x23 // no data
#define CTOS_HS_KICK 0x24
#define CTOS_HS_KICK 0x24 // CTOS_Kick
#define CTOS_HS_START 0x25
#define CTOS_HS_START 0x25 // no data
#ifdef YGOPRO_SERVER_MODE
#define CTOS_REQUEST_FIELD 0x30
#define CTOS_REQUEST_FIELD 0x30
#endif
#define STOC_GAME_MSG 0x1 // byte array
#define STOC_ERROR_MSG 0x2 // STOC_ErrorMsg
#define STOC_GAME_MSG 0x1
#define STOC_SELECT_HAND 0x3 // no data
#define STOC_ERROR_MSG 0x2
#define STOC_SELECT_TP 0x4 // no data
#define STOC_SELECT_HAND 0x3
#define STOC_HAND_RESULT 0x5 // STOC_HandResult
#define STOC_SELECT_TP 0x4
#define STOC_TP_RESULT 0x6 // reserved
#define STOC_HAND_RESULT 0x5
#define STOC_CHANGE_SIDE 0x7 // no data
#define STOC_TP_RESULT 0x6
#define STOC_WAITING_SIDE 0x8 // no data
#define STOC_CHANGE_SIDE 0x7
#define STOC_DECK_COUNT 0x9 // int16_t[6]
#define STOC_WAITING_SIDE 0x8
#define STOC_CREATE_GAME 0x11 // reserved
#define STOC_DECK_COUNT 0x9
#define STOC_JOIN_GAME 0x12 // STOC_JoinGame
#define STOC_CREATE_GAME 0x11
#define STOC_TYPE_CHANGE 0x13 // STOC_TypeChange
#define STOC_JOIN_GAME 0x12
#define STOC_LEAVE_GAME 0x14 // reserved
#define STOC_TYPE_CHANGE 0x13
#define STOC_DUEL_START 0x15 // no data
#define STOC_LEAVE_GAME 0x14
#define STOC_DUEL_END 0x16 // no data
#define STOC_DUEL_START 0x15
#define STOC_REPLAY 0x17 // ReplayHeader + byte array
#define STOC_DUEL_END 0x16
#define STOC_TIME_LIMIT 0x18 // STOC_TimeLimit
#define STOC_REPLAY 0x17
#define STOC_CHAT 0x19 // uint16_t + uint16_t array
#define STOC_TIME_LIMIT 0x18
#define STOC_HS_PLAYER_ENTER 0x20 // STOC_HS_PlayerEnter
#define STOC_CHAT 0x19
#define STOC_HS_PLAYER_CHANGE 0x21 // STOC_HS_PlayerChange
#define STOC_HS_PLAYER_ENTER 0x20
#define STOC_HS_WATCH_CHANGE 0x22 // STOC_HS_WatchChange
#define STOC_HS_PLAYER_CHANGE 0x21
#define STOC_TEAMMATE_SURRENDER 0x23 // no data
#define STOC_HS_WATCH_CHANGE 0x22
#define STOC_FIELD_FINISH 0x30
#define STOC_TEAMMATE_SURRENDER 0x23
#ifdef YGOPRO_SERVER_MODE
#define STOC_FIELD_FINISH 0x30
#endif
#define PLAYERCHANGE_OBSERVE 0x8
#define PLAYERCHANGE_OBSERVE 0x8
#define PLAYERCHANGE_READY 0x9
#define PLAYERCHANGE_READY 0x9
...
...
ocgcore
@
8286637c
Subproject commit 8
b10e2f3d92dbb35abebfa77869e5ab518571e44
Subproject commit 8
286637c21cd54968067718813ef32248b3732be
script
@
60efea7b
Subproject commit
93a1888bf21b6707f496c20b88af23620a038748
Subproject commit
60efea7b3e7f6e84e44a6a61e2e0074f128d7ccc
strings.conf
View file @
194bcd13
...
@@ -139,6 +139,7 @@
...
@@ -139,6 +139,7 @@
!
system
572
请选择要放置指示物的卡
!
system
572
请选择要放置指示物的卡
!
system
573
请选择要无效的卡
!
system
573
请选择要无效的卡
!
system
574
请选择要操作的卡
!
system
574
请选择要操作的卡
!
system
575
请选择场上的卡(按取消可选择其他区域的卡)
!
system
1000
卡组
!
system
1000
卡组
!
system
1001
手卡
!
system
1001
手卡
!
system
1002
怪兽区
!
system
1002
怪兽区
...
...
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