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
84eddec4
Commit
84eddec4
authored
May 21, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into server-develop
parents
f8ad279b
2e299472
Pipeline
#36584
passed with stages
in 11 minutes and 37 seconds
Changes
7
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
24 deletions
+45
-24
.ci/exec-macos-platform.sh
.ci/exec-macos-platform.sh
+2
-0
gframe/bufferio.h
gframe/bufferio.h
+5
-5
gframe/gframe.cpp
gframe/gframe.cpp
+9
-3
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+3
-3
gframe/single_mode.cpp
gframe/single_mode.cpp
+14
-10
premake/irrlicht/premake5.lua
premake/irrlicht/premake5.lua
+1
-0
premake5.lua
premake5.lua
+11
-3
No files found.
.ci/exec-macos-platform.sh
View file @
84eddec4
...
...
@@ -8,6 +8,8 @@ export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
export
EVENT_LIB_DIR
=
$PWD
/libevent-stable/lib
export
OPUS_INCLUDE_DIR
=
$PWD
/miniaudio/external-built/include/opus
export
OPUS_LIB_DIR
=
$PWD
/miniaudio/external-built/lib
export
OPUSFILE_INCLUDE_DIR
=
$PWD
/miniaudio/external-built/include/opus
export
OPUSFILE_LIB_DIR
=
$PWD
/miniaudio/external-built/lib
export
VORBIS_INCLUDE_DIR
=
$PWD
/miniaudio/external-built/include
export
VORBIS_LIB_DIR
=
$PWD
/miniaudio/external-built/lib
export
OGG_INCLUDE_DIR
=
$PWD
/miniaudio/external-built/include
...
...
gframe/bufferio.h
View file @
84eddec4
...
...
@@ -38,7 +38,7 @@ public:
* @brief Copy a C-style string to another C-style string.
* @param src The source wide string
* @param pstr The destination char string
* @param bufsize The
size
of the destination buffer
* @param bufsize The
length
of the destination buffer
* @return The length of the copied string
*/
template
<
typename
T1
,
typename
T2
>
...
...
@@ -68,13 +68,13 @@ public:
}
template
<
size_t
N
>
static
void
CopyString
(
const
char
*
src
,
char
(
&
dst
)[
N
])
{
dst
[
0
]
=
0
;
std
::
strncat
(
dst
,
src
,
N
-
1
)
;
std
::
strncpy
(
dst
,
src
,
N
-
1
)
;
dst
[
N
-
1
]
=
0
;
}
template
<
size_t
N
>
static
void
CopyWideString
(
const
wchar_t
*
src
,
wchar_t
(
&
dst
)[
N
])
{
dst
[
0
]
=
0
;
std
::
wcsncat
(
dst
,
src
,
N
-
1
)
;
std
::
wcsncpy
(
dst
,
src
,
N
-
1
)
;
dst
[
N
-
1
]
=
0
;
}
template
<
typename
T
>
static
bool
CheckUTF8Byte
(
const
T
*
str
,
int
len
)
{
...
...
gframe/gframe.cpp
View file @
84eddec4
...
...
@@ -37,11 +37,17 @@ int main(int argc, char* argv[]) {
#if defined __APPLE__ && !defined YGOPRO_SERVER_MODE
CFURLRef
bundle_url
=
CFBundleCopyBundleURL
(
CFBundleGetMainBundle
());
CFURLRef
bundle_base_url
=
CFURLCreateCopyDeletingLastPathComponent
(
nullptr
,
bundle_url
);
CFStringRef
bundle_ext
=
CFURLCopyPathExtension
(
bundle_url
);
if
(
bundle_ext
)
{
char
path
[
PATH_MAX
];
if
(
CFStringCompare
(
bundle_ext
,
CFSTR
(
"app"
),
kCFCompareCaseInsensitive
)
==
kCFCompareEqualTo
&&
CFURLGetFileSystemRepresentation
(
bundle_base_url
,
true
,
(
UInt8
*
)
path
,
PATH_MAX
))
{
chdir
(
path
);
}
CFRelease
(
bundle_ext
);
}
CFRelease
(
bundle_url
);
CFStringRef
path
=
CFURLCopyFileSystemPath
(
bundle_base_url
,
kCFURLPOSIXPathStyle
);
CFRelease
(
bundle_base_url
);
chdir
(
CFStringGetCStringPtr
(
path
,
kCFStringEncodingUTF8
));
CFRelease
(
path
);
#endif //__APPLE__
#ifdef _WIN32
if
(
argc
==
2
&&
(
ygo
::
IsExtension
(
argv
[
1
],
".ydk"
)
||
ygo
::
IsExtension
(
argv
[
1
],
".yrp"
)))
{
// open file from explorer
...
...
gframe/replay_mode.cpp
View file @
84eddec4
...
...
@@ -159,7 +159,7 @@ bool ReplayMode::StartDuel() {
unsigned
int
seed
=
rh
.
seed
;
std
::
mt19937
rnd
(
seed
);
cur_replay
.
SkipInfo
();
if
(
mainGame
->
dInfo
.
isTag
)
{
if
(
rh
.
flag
&
REPLAY_TAG
)
{
BufferIO
::
CopyWideString
(
cur_replay
.
players
[
0
].
c_str
(),
mainGame
->
dInfo
.
hostname
);
BufferIO
::
CopyWideString
(
cur_replay
.
players
[
1
].
c_str
(),
mainGame
->
dInfo
.
hostname_tag
);
BufferIO
::
CopyWideString
(
cur_replay
.
players
[
2
].
c_str
(),
mainGame
->
dInfo
.
clientname_tag
);
...
...
@@ -849,12 +849,12 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
break
;
}
case
MSG_AI_NAME
:
{
int
len
=
BufferIO
::
ReadInt16
(
pbuf
);
int
len
=
buffer_read
<
uint16_t
>
(
pbuf
);
pbuf
+=
len
+
1
;
break
;
}
case
MSG_SHOW_HINT
:
{
int
len
=
BufferIO
::
ReadInt16
(
pbuf
);
int
len
=
buffer_read
<
uint16_t
>
(
pbuf
);
pbuf
+=
len
+
1
;
break
;
}
...
...
gframe/single_mode.cpp
View file @
84eddec4
...
...
@@ -763,21 +763,25 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
case
MSG_AI_NAME
:
{
char
namebuf
[
128
]{};
wchar_t
wname
[
20
]{};
int
len
=
BufferIO
::
ReadInt16
(
pbuf
);
auto
begin
=
pbuf
;
pbuf
+=
len
+
1
;
std
::
memcpy
(
namebuf
,
begin
,
len
+
1
);
int
name_len
=
buffer_read
<
uint16_t
>
(
pbuf
);
if
(
name_len
+
1
<=
(
int
)
sizeof
namebuf
)
{
std
::
memcpy
(
namebuf
,
pbuf
,
name_len
);
namebuf
[
name_len
]
=
0
;
}
pbuf
+=
name_len
+
1
;
BufferIO
::
DecodeUTF8
(
namebuf
,
wname
);
BufferIO
::
CopyCharArray
(
wname
,
mainGame
->
dInfo
.
clientname
);
break
;
}
case
MSG_SHOW_HINT
:
{
char
msgbuf
[
1024
];
wchar_t
msg
[
1024
];
int
len
=
BufferIO
::
ReadInt16
(
pbuf
);
auto
begin
=
pbuf
;
pbuf
+=
len
+
1
;
std
::
memcpy
(
msgbuf
,
begin
,
len
+
1
);
char
msgbuf
[
1024
]{};
wchar_t
msg
[
1024
]{};
int
msg_len
=
buffer_read
<
uint16_t
>
(
pbuf
);
if
(
msg_len
+
1
<=
(
int
)
sizeof
msgbuf
)
{
std
::
memcpy
(
msgbuf
,
pbuf
,
msg_len
);
msgbuf
[
msg_len
]
=
0
;
}
pbuf
+=
msg_len
+
1
;
BufferIO
::
DecodeUTF8
(
msgbuf
,
msg
);
mainGame
->
gMutex
.
lock
();
mainGame
->
SetStaticText
(
mainGame
->
stMessage
,
310
,
mainGame
->
guiFont
,
msg
);
...
...
premake/irrlicht/premake5.lua
View file @
84eddec4
...
...
@@ -16,6 +16,7 @@ project "irrlicht"
"_IRR_STATIC_LIB_"
,
"NO_IRR_USE_NON_SYSTEM_BZLIB_"
,
"NO_IRR_COMPILE_WITH_BZIP2_"
,
"NO_IRR_COMPILE_WITH_LZMA_"
,
"NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_"
,
"NO_IRR_COMPILE_WITH_DIRECT3D_8_"
,
"NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_"
,
...
...
premake5.lua
View file @
84eddec4
...
...
@@ -133,6 +133,14 @@ function ApplyNumber(param)
end
end
function
FindHeaderWithSubDir
(
header
,
subdir
)
local
result
=
os
.
findheader
(
header
)
if
result
and
subdir
then
result
=
path
.
join
(
result
,
subdir
)
end
return
result
end
if
GetParam
(
"build-lua"
)
then
BUILD_LUA
=
true
elseif
GetParam
(
"no-build-lua"
)
then
...
...
@@ -169,7 +177,7 @@ elseif GetParam("no-build-freetype") then
BUILD_FREETYPE
=
false
end
if
not
BUILD_FREETYPE
then
FREETYPE_INCLUDE_DIR
=
GetParam
(
"freetype-include-dir"
)
or
os
.
findheader
(
"freetype2/ft2build.h"
)
..
"/freetype2"
FREETYPE_INCLUDE_DIR
=
GetParam
(
"freetype-include-dir"
)
or
FindHeaderWithSubDir
(
"freetype2/ft2build.h"
,
"freetype2"
)
FREETYPE_LIB_DIR
=
GetParam
(
"freetype-lib-dir"
)
or
os
.
findlib
(
"freetype"
)
end
...
...
@@ -227,9 +235,9 @@ if USE_AUDIO then
MINIAUDIO_BUILD_OPUS_VORBIS
=
true
end
if
not
MINIAUDIO_BUILD_OPUS_VORBIS
then
OPUS_INCLUDE_DIR
=
GetParam
(
"opus-include-dir"
)
or
os
.
findheader
(
"opus/opus.h"
)
..
"/opus"
OPUS_INCLUDE_DIR
=
GetParam
(
"opus-include-dir"
)
or
FindHeaderWithSubDir
(
"opus/opus.h"
,
"opus"
)
OPUS_LIB_DIR
=
GetParam
(
"opus-lib-dir"
)
or
os
.
findlib
(
"opus"
)
OPUSFILE_INCLUDE_DIR
=
GetParam
(
"opusfile-include-dir"
)
or
os
.
findheader
(
"opus/opusfile.h"
)
..
"/opus"
OPUSFILE_INCLUDE_DIR
=
GetParam
(
"opusfile-include-dir"
)
or
FindHeaderWithSubDir
(
"opus/opusfile.h"
,
"opus"
)
OPUSFILE_LIB_DIR
=
GetParam
(
"opusfile-lib-dir"
)
or
os
.
findlib
(
"opusfile"
)
VORBIS_INCLUDE_DIR
=
GetParam
(
"vorbis-include-dir"
)
or
os
.
findheader
(
"vorbis/vorbisfile.h"
)
VORBIS_LIB_DIR
=
GetParam
(
"vorbis-lib-dir"
)
or
os
.
findlib
(
"vorbis"
)
...
...
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