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-520DIY
ygopro
Commits
a13d71af
Commit
a13d71af
authored
Jun 15, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into server-develop
parents
8075ab18
db9afc59
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
21 deletions
+13
-21
gframe/client_field.cpp
gframe/client_field.cpp
+0
-1
gframe/data_manager.cpp
gframe/data_manager.cpp
+1
-2
gframe/drawing.cpp
gframe/drawing.cpp
+0
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+5
-1
gframe/event_handler.cpp
gframe/event_handler.cpp
+0
-2
gframe/netserver.cpp
gframe/netserver.cpp
+5
-3
gframe/network.h
gframe/network.h
+0
-11
gframe/sound_manager.cpp
gframe/sound_manager.cpp
+2
-0
No files found.
gframe/client_field.cpp
View file @
a13d71af
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
#include "image_manager.h"
#include "image_manager.h"
#include "game.h"
#include "game.h"
#include "materials.h"
#include "materials.h"
#include "../ocgcore/common.h"
namespace
ygo
{
namespace
ygo
{
...
...
gframe/data_manager.cpp
View file @
a13d71af
...
@@ -189,8 +189,7 @@ void DataManager::ReadStringConfLine(const char* linebuf) {
...
@@ -189,8 +189,7 @@ void DataManager::ReadStringConfLine(const char* linebuf) {
}
}
#endif //YGOPRO_SERVER_MODE
#endif //YGOPRO_SERVER_MODE
bool
DataManager
::
Error
(
sqlite3
*
pDB
,
sqlite3_stmt
*
pStmt
)
{
bool
DataManager
::
Error
(
sqlite3
*
pDB
,
sqlite3_stmt
*
pStmt
)
{
errmsg
[
0
]
=
'\0'
;
std
::
snprintf
(
errmsg
,
sizeof
errmsg
,
"%s"
,
sqlite3_errmsg
(
pDB
));
std
::
strncat
(
errmsg
,
sqlite3_errmsg
(
pDB
),
sizeof
errmsg
-
1
);
if
(
pStmt
)
if
(
pStmt
)
sqlite3_finalize
(
pStmt
);
sqlite3_finalize
(
pStmt
);
return
false
;
return
false
;
...
...
gframe/drawing.cpp
View file @
a13d71af
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
#include "deck_manager.h"
#include "deck_manager.h"
#include "sound_manager.h"
#include "sound_manager.h"
#include "duelclient.h"
#include "duelclient.h"
#include "../ocgcore/common.h"
namespace
ygo
{
namespace
ygo
{
...
...
gframe/duelclient.cpp
View file @
a13d71af
...
@@ -891,8 +891,12 @@ void DuelClient::HandleSTOCPacketLan(unsigned char* data, int len) {
...
@@ -891,8 +891,12 @@ void DuelClient::HandleSTOCPacketLan(unsigned char* data, int len) {
break
;
break
;
}
}
case
STOC_CHAT
:
{
case
STOC_CHAT
:
{
if
(
len
<
1
+
sizeof
(
uint16_t
)
+
sizeof
(
uint16_t
)
*
1
)
return
;
if
(
len
>
1
+
sizeof
(
uint16_t
)
+
sizeof
(
uint16_t
)
*
LEN_CHAT_MSG
)
return
;
const
int
chat_msg_size
=
len
-
1
-
sizeof
(
uint16_t
);
const
int
chat_msg_size
=
len
-
1
-
sizeof
(
uint16_t
);
if
(
!
check_msg_size
(
chat_msg_size
))
if
(
chat_msg_size
%
sizeof
(
uint16_t
))
return
;
return
;
uint16_t
chat_player_type
=
buffer_read
<
uint16_t
>
(
pdata
);
uint16_t
chat_player_type
=
buffer_read
<
uint16_t
>
(
pdata
);
uint16_t
chat_msg
[
LEN_CHAT_MSG
];
uint16_t
chat_msg
[
LEN_CHAT_MSG
];
...
...
gframe/event_handler.cpp
View file @
a13d71af
#include "event_handler.h"
#include "event_handler.h"
#include "client_field.h"
#include "client_field.h"
#include "math.h"
#include "network.h"
#include "network.h"
#include "game.h"
#include "game.h"
#include "duelclient.h"
#include "duelclient.h"
...
@@ -11,7 +10,6 @@
...
@@ -11,7 +10,6 @@
#include "replay_mode.h"
#include "replay_mode.h"
#include "single_mode.h"
#include "single_mode.h"
#include "materials.h"
#include "materials.h"
#include "../ocgcore/common.h"
namespace
ygo
{
namespace
ygo
{
...
...
gframe/netserver.cpp
View file @
a13d71af
...
@@ -297,7 +297,11 @@ void NetServer::HandleCTOSPacket(DuelPlayer* dp, unsigned char* data, int len) {
...
@@ -297,7 +297,11 @@ void NetServer::HandleCTOSPacket(DuelPlayer* dp, unsigned char* data, int len) {
case
CTOS_CHAT
:
{
case
CTOS_CHAT
:
{
if
(
!
dp
->
game
)
if
(
!
dp
->
game
)
return
;
return
;
if
(
len
<
1
+
(
int
)
sizeof
(
unsigned
char
))
if
(
len
<
1
+
sizeof
(
uint16_t
)
*
1
)
return
;
if
(
len
>
1
+
sizeof
(
uint16_t
)
*
LEN_CHAT_MSG
)
return
;
if
((
len
-
1
)
%
sizeof
(
uint16_t
))
return
;
return
;
duel_mode
->
Chat
(
dp
,
pdata
,
len
-
1
);
duel_mode
->
Chat
(
dp
,
pdata
,
len
-
1
);
break
;
break
;
...
@@ -459,8 +463,6 @@ void NetServer::HandleCTOSPacket(DuelPlayer* dp, unsigned char* data, int len) {
...
@@ -459,8 +463,6 @@ void NetServer::HandleCTOSPacket(DuelPlayer* dp, unsigned char* data, int len) {
}
}
}
}
size_t
NetServer
::
CreateChatPacket
(
unsigned
char
*
src
,
int
src_size
,
unsigned
char
*
dst
,
uint16_t
dst_player_type
)
{
size_t
NetServer
::
CreateChatPacket
(
unsigned
char
*
src
,
int
src_size
,
unsigned
char
*
dst
,
uint16_t
dst_player_type
)
{
if
(
!
check_msg_size
(
src_size
))
return
0
;
uint16_t
src_msg
[
LEN_CHAT_MSG
];
uint16_t
src_msg
[
LEN_CHAT_MSG
];
std
::
memcpy
(
src_msg
,
src
,
src_size
);
std
::
memcpy
(
src_msg
,
src
,
src_size
);
const
int
src_len
=
src_size
/
sizeof
(
uint16_t
);
const
int
src_len
=
src_size
/
sizeof
(
uint16_t
);
...
...
gframe/network.h
View file @
a13d71af
...
@@ -196,17 +196,6 @@ struct DuelPlayer {
...
@@ -196,17 +196,6 @@ struct DuelPlayer {
bufferevent
*
bev
{};
bufferevent
*
bev
{};
};
};
inline
bool
check_msg_size
(
int
size
)
{
// empty string is not allowed
if
(
size
<
2
*
sizeof
(
uint16_t
))
return
false
;
if
(
size
>
LEN_CHAT_MSG
*
sizeof
(
uint16_t
))
return
false
;
if
(
size
%
sizeof
(
uint16_t
)
!=
0
)
return
false
;
return
true
;
}
inline
unsigned
int
GetPosition
(
unsigned
char
*
qbuf
,
size_t
offset
)
{
inline
unsigned
int
GetPosition
(
unsigned
char
*
qbuf
,
size_t
offset
)
{
unsigned
int
info
=
0
;
unsigned
int
info
=
0
;
std
::
memcpy
(
&
info
,
qbuf
+
offset
,
sizeof
info
);
std
::
memcpy
(
&
info
,
qbuf
+
offset
,
sizeof
info
);
...
...
gframe/sound_manager.cpp
View file @
a13d71af
...
@@ -68,6 +68,7 @@ void SoundManager::RefreshBGMList() {
...
@@ -68,6 +68,7 @@ void SoundManager::RefreshBGMList() {
#endif
#endif
}
}
void
SoundManager
::
RefershBGMDir
(
std
::
wstring
path
,
int
scene
)
{
void
SoundManager
::
RefershBGMDir
(
std
::
wstring
path
,
int
scene
)
{
#ifdef YGOPRO_USE_AUDIO
std
::
wstring
search
=
L"./sound/BGM/"
+
path
;
std
::
wstring
search
=
L"./sound/BGM/"
+
path
;
FileSystem
::
TraversalDir
(
search
.
c_str
(),
[
this
,
&
path
,
scene
](
const
wchar_t
*
name
,
bool
isdir
)
{
FileSystem
::
TraversalDir
(
search
.
c_str
(),
[
this
,
&
path
,
scene
](
const
wchar_t
*
name
,
bool
isdir
)
{
if
(
!
isdir
&&
(
if
(
!
isdir
&&
(
...
@@ -81,6 +82,7 @@ void SoundManager::RefershBGMDir(std::wstring path, int scene) {
...
@@ -81,6 +82,7 @@ void SoundManager::RefershBGMDir(std::wstring path, int scene) {
BGMList
[
scene
].
push_back
(
filename
);
BGMList
[
scene
].
push_back
(
filename
);
}
}
});
});
#endif // YGOPRO_USE_AUDIO
}
}
void
SoundManager
::
PlaySound
(
wchar_t
*
sound
)
{
void
SoundManager
::
PlaySound
(
wchar_t
*
sound
)
{
#ifdef YGOPRO_USE_AUDIO
#ifdef YGOPRO_USE_AUDIO
...
...
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