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
403fd495
Commit
403fd495
authored
Aug 18, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into develop
parents
f75f4817
12259071
Pipeline
#29264
passed with stages
in 5 minutes and 8 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
15 deletions
+16
-15
gframe/config.h
gframe/config.h
+2
-2
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+1
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-2
gframe/game.cpp
gframe/game.cpp
+1
-0
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+1
-1
gframe/netserver.cpp
gframe/netserver.cpp
+2
-2
gframe/single_duel.cpp
gframe/single_duel.cpp
+4
-4
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+3
-3
No files found.
gframe/config.h
View file @
403fd495
...
...
@@ -43,7 +43,7 @@
#define mystrncasecmp strncasecmp
#endif
#include <
string
>
#include <
wchar.h
>
template
<
size_t
N
,
typename
...
TR
>
inline
int
myswprintf
(
wchar_t
(
&
buf
)[
N
],
const
wchar_t
*
fmt
,
TR
...
args
)
{
return
swprintf
(
buf
,
N
,
fmt
,
args
...);
...
...
@@ -51,9 +51,9 @@ inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) {
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include <iostream>
#include <algorithm>
#include <string>
#include "bufferio.h"
#include "../ocgcore/ocgapi.h"
#include "../ocgcore/common.h"
...
...
gframe/deck_manager.cpp
View file @
403fd495
...
...
@@ -304,7 +304,7 @@ bool DeckManager::LoadCurrentDeck(const wchar_t* file, bool is_packlist) {
reader
->
drop
();
return
false
;
}
memset
(
deckBuffer
,
0
,
sizeof
(
deckBuffer
)
);
std
::
memset
(
deckBuffer
,
0
,
sizeof
deckBuffer
);
reader
->
read
(
deckBuffer
,
size
);
reader
->
drop
();
std
::
istringstream
deckStream
(
deckBuffer
);
...
...
gframe/duelclient.cpp
View file @
403fd495
...
...
@@ -44,7 +44,7 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
client_base
=
event_base_new
();
if
(
!
client_base
)
return
false
;
memset
(
&
sin
,
0
,
sizeof
(
sin
)
);
std
::
memset
(
&
sin
,
0
,
sizeof
sin
);
sin
.
sin_family
=
AF_INET
;
sin
.
sin_addr
.
s_addr
=
htonl
(
ip
);
sin
.
sin_port
=
htons
(
port
);
...
...
@@ -4062,7 +4062,7 @@ void DuelClient::BeginRefreshHost() {
return
;
SOCKET
reply
=
socket
(
AF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
);
sockaddr_in
reply_addr
;
memset
(
&
reply_addr
,
0
,
sizeof
(
reply_addr
)
);
std
::
memset
(
&
reply_addr
,
0
,
sizeof
reply_addr
);
reply_addr
.
sin_family
=
AF_INET
;
reply_addr
.
sin_port
=
htons
(
7921
);
reply_addr
.
sin_addr
.
s_addr
=
0
;
...
...
gframe/game.cpp
View file @
403fd495
...
...
@@ -10,6 +10,7 @@
#include "duelclient.h"
#include "netserver.h"
#include "single_mode.h"
#include <thread>
const
unsigned
short
PRO_VERSION
=
0x1361
;
...
...
gframe/menu_handler.cpp
View file @
403fd495
...
...
@@ -78,7 +78,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
BufferIO
::
CopyWStr
(
mainGame
->
ebJoinPort
->
getText
(),
port
,
6
);
struct
evutil_addrinfo
hints
;
struct
evutil_addrinfo
*
answer
=
NULL
;
memset
(
&
hints
,
0
,
sizeof
(
hints
)
);
std
::
memset
(
&
hints
,
0
,
sizeof
hints
);
hints
.
ai_family
=
AF_INET
;
hints
.
ai_socktype
=
SOCK_STREAM
;
hints
.
ai_protocol
=
IPPROTO_TCP
;
...
...
gframe/netserver.cpp
View file @
403fd495
...
...
@@ -20,7 +20,7 @@ bool NetServer::StartServer(unsigned short port) {
if
(
!
net_evbase
)
return
false
;
sockaddr_in
sin
;
memset
(
&
sin
,
0
,
sizeof
(
sin
)
);
std
::
memset
(
&
sin
,
0
,
sizeof
sin
);
server_port
=
port
;
sin
.
sin_family
=
AF_INET
;
sin
.
sin_addr
.
s_addr
=
htonl
(
INADDR_ANY
);
...
...
@@ -44,7 +44,7 @@ bool NetServer::StartBroadcast() {
setsockopt
(
udp
,
SOL_SOCKET
,
SO_BROADCAST
,
(
const
char
*
)
&
opt
,
sizeof
opt
);
setsockopt
(
udp
,
SOL_SOCKET
,
SO_REUSEADDR
,
(
const
char
*
)
&
opt
,
sizeof
opt
);
sockaddr_in
addr
;
memset
(
&
addr
,
0
,
sizeof
(
addr
)
);
std
::
memset
(
&
addr
,
0
,
sizeof
addr
);
addr
.
sin_family
=
AF_INET
;
addr
.
sin_port
=
htons
(
7920
);
addr
.
sin_addr
.
s_addr
=
0
;
...
...
gframe/single_duel.cpp
View file @
403fd495
...
...
@@ -1495,7 +1495,7 @@ void SingleDuel::RefreshMzone(int player, int flag, int use_cache) {
continue
;
auto
position
=
GetPosition
(
qbuf
,
8
);
if
(
position
&
POS_FACEDOWN
)
memset
(
qbuf
,
0
,
clen
-
4
);
std
::
memset
(
qbuf
,
0
,
clen
-
4
);
qbuf
+=
clen
-
4
;
}
NetServer
::
SendBufferToPlayer
(
players
[
1
-
player
],
STOC_GAME_MSG
,
query_buffer
.
data
(),
len
+
3
);
...
...
@@ -1516,7 +1516,7 @@ void SingleDuel::RefreshSzone(int player, int flag, int use_cache) {
continue
;
auto
position
=
GetPosition
(
qbuf
,
8
);
if
(
position
&
POS_FACEDOWN
)
memset
(
qbuf
,
0
,
clen
-
4
);
std
::
memset
(
qbuf
,
0
,
clen
-
4
);
qbuf
+=
clen
-
4
;
}
NetServer
::
SendBufferToPlayer
(
players
[
1
-
player
],
STOC_GAME_MSG
,
query_buffer
.
data
(),
len
+
3
);
...
...
@@ -1537,7 +1537,7 @@ void SingleDuel::RefreshHand(int player, int flag, int use_cache) {
continue
;
auto
position
=
GetPosition
(
qbuf
,
8
);
if
(
!
(
position
&
POS_FACEUP
))
memset
(
qbuf
,
0
,
slen
-
4
);
std
::
memset
(
qbuf
,
0
,
slen
-
4
);
qbuf
+=
slen
-
4
;
}
NetServer
::
SendBufferToPlayer
(
players
[
1
-
player
],
STOC_GAME_MSG
,
query_buffer
.
data
(),
len
+
3
);
...
...
@@ -1578,7 +1578,7 @@ void SingleDuel::RefreshSingle(int player, int location, int sequence, int flag)
if
(
position
&
POS_FACEDOWN
)
{
BufferIO
::
WriteInt32
(
qbuf
,
QUERY_CODE
);
BufferIO
::
WriteInt32
(
qbuf
,
0
);
memset
(
qbuf
,
0
,
clen
-
12
);
std
::
memset
(
qbuf
,
0
,
clen
-
12
);
}
NetServer
::
SendBufferToPlayer
(
players
[
1
-
player
],
STOC_GAME_MSG
,
query_buffer
,
len
+
4
);
for
(
auto
pit
=
observers
.
begin
();
pit
!=
observers
.
end
();
++
pit
)
...
...
gframe/tag_duel.cpp
View file @
403fd495
...
...
@@ -1619,7 +1619,7 @@ void TagDuel::RefreshMzone(int player, int flag, int use_cache) {
continue
;
auto
position
=
GetPosition
(
qbuf
,
8
);
if
(
position
&
POS_FACEDOWN
)
memset
(
qbuf
,
0
,
clen
-
4
);
std
::
memset
(
qbuf
,
0
,
clen
-
4
);
qbuf
+=
clen
-
4
;
}
pid
=
2
-
pid
;
...
...
@@ -1644,7 +1644,7 @@ void TagDuel::RefreshSzone(int player, int flag, int use_cache) {
continue
;
auto
position
=
GetPosition
(
qbuf
,
8
);
if
(
position
&
POS_FACEDOWN
)
memset
(
qbuf
,
0
,
clen
-
4
);
std
::
memset
(
qbuf
,
0
,
clen
-
4
);
qbuf
+=
clen
-
4
;
}
pid
=
2
-
pid
;
...
...
@@ -1667,7 +1667,7 @@ void TagDuel::RefreshHand(int player, int flag, int use_cache) {
continue
;
auto
position
=
GetPosition
(
qbuf
,
8
);
if
(
!
(
position
&
POS_FACEUP
))
memset
(
qbuf
,
0
,
slen
-
4
);
std
::
memset
(
qbuf
,
0
,
slen
-
4
);
qbuf
+=
slen
-
4
;
}
for
(
int
i
=
0
;
i
<
4
;
++
i
)
...
...
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