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
89118afd
Commit
89118afd
authored
Jun 03, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into server-develop
parents
c1ca4d86
5e6f5064
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
101 additions
and
70 deletions
+101
-70
.github/workflows/build.yml
.github/workflows/build.yml
+29
-41
gframe/config.h
gframe/config.h
+1
-1
gframe/event_handler.cpp
gframe/event_handler.cpp
+1
-1
gframe/game.cpp
gframe/game.cpp
+4
-4
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+1
-2
gframe/premake5.lua
gframe/premake5.lua
+11
-3
gframe/replay.cpp
gframe/replay.cpp
+1
-1
gframe/sound_manager.cpp
gframe/sound_manager.cpp
+3
-1
ocgcore
ocgcore
+1
-1
premake/event/premake5.lua
premake/event/premake5.lua
+22
-4
premake/irrlicht/premake5.lua
premake/irrlicht/premake5.lua
+0
-3
premake/miniaudio/premake5.lua
premake/miniaudio/premake5.lua
+0
-3
premake5.lua
premake5.lua
+26
-4
script
script
+1
-1
No files found.
.github/workflows/build.yml
View file @
89118afd
...
...
@@ -13,9 +13,8 @@ jobs:
matrix
:
name
:
-
windows
-
windows-xp
-
windows-irrklang
-
windows-no-dxsdk
# - windows-irrklang
# - windows-no-dxsdk
-
windows-x64
# - windows-2025
include
:
...
...
@@ -23,20 +22,15 @@ jobs:
os
:
windows-2022
vs
:
vs2022
audiolib
:
miniaudio
-
name
:
windows-xp
os
:
windows-2019
vs
:
vs2019
audiolib
:
miniaudio
xp
:
true
-
name
:
windows-irrklang
os
:
windows-2022
vs
:
vs2022
audiolib
:
irrklang
-
name
:
windows-no-dxsdk
os
:
windows-2022
vs
:
vs2022
audiolib
:
miniaudio
nodxsdk
:
true
# - name: windows-irrklang
# os: windows-2022
# vs: vs2022
# audiolib: irrklang
# - name: windows-no-dxsdk
# os: windows-2022
# vs: vs2022
# audiolib: miniaudio
# nodxsdk: true
-
name
:
windows-x64
os
:
windows-2022
vs
:
vs2022
...
...
@@ -44,7 +38,7 @@ jobs:
x64
:
true
# - name: windows-2025
# os: windows-2025
# vs: vs202
2
# vs: vs202
5 # to be enabled after the release of Visual Studio 2025
# audiolib: miniaudio
runs-on
:
${{ matrix.os }}
...
...
@@ -233,7 +227,7 @@ jobs:
-
name
:
Use premake to generate Visual Studio solution
run
:
|
.\premake5.exe ${{ matrix.vs }} --audio-lib=${{ matrix.audiolib }}
${{ matrix.xp && '--winxp-support' || '' }}
.\premake5.exe ${{ matrix.vs }} --audio-lib=${{ matrix.audiolib }}
-
name
:
Add msbuild to PATH
uses
:
microsoft/setup-msbuild@v2
...
...
@@ -466,12 +460,6 @@ jobs:
make -j 4 config=release
cd ..
-
name
:
Strip symbols
run
:
|
cd bin/release
strip YGOPro
cd ../..
-
name
:
Upload build artifacts
uses
:
actions/upload-artifact@v4
with
:
...
...
@@ -485,18 +473,18 @@ jobs:
matrix
:
name
:
-
macos-13-intel
-
macos-13-arm-cross-compile-static-link
#
- macos-13-arm-cross-compile-static-link
-
macos-13-universal-static-link
-
macos-15-arm
-
macos-15-intel-cross-compile-static-link
-
macos-15-universal-static-link
#
- macos-15-intel-cross-compile-static-link
#
- macos-15-universal-static-link
include
:
-
name
:
macos-13-intel
os
:
macos-13
-
name
:
macos-13-arm-cross-compile-static-link
os
:
macos-13
cross-build-arm
:
true
static-link
:
true
#
- name: macos-13-arm-cross-compile-static-link
#
os: macos-13
#
cross-build-arm: true
#
static-link: true
-
name
:
macos-13-universal-static-link
os
:
macos-13
cross-build-intel
:
true
...
...
@@ -504,15 +492,15 @@ jobs:
static-link
:
true
-
name
:
macos-15-arm
os
:
macos-15
-
name
:
macos-15-intel-cross-compile-static-link
os
:
macos-15
cross-build-intel
:
true
static-link
:
true
-
name
:
macos-15-universal-static-link
os
:
macos-15
cross-build-intel
:
true
cross-build-arm
:
true
static-link
:
true
#
- name: macos-15-intel-cross-compile-static-link
#
os: macos-15
#
cross-build-intel: true
#
static-link: true
#
- name: macos-15-universal-static-link
#
os: macos-15
#
cross-build-intel: true
#
cross-build-arm: true
#
static-link: true
runs-on
:
${{ matrix.os }}
...
...
gframe/config.h
View file @
89118afd
...
...
@@ -13,7 +13,7 @@
#include <windows.h>
#include <ws2tcpip.h>
#if
def _MSC_VER
#if
defined(_MSC_VER) or defined(__MINGW32__)
#define mywcsncasecmp _wcsnicmp
#define mystrncasecmp _strnicmp
#else
...
...
gframe/event_handler.cpp
View file @
89118afd
...
...
@@ -1322,7 +1322,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
MSG_SELECT_DISFIELD
:
{
if
(
!
(
hovered_location
&
LOCATION_ONFIELD
))
break
;
unsigned
int
flag
=
1
<<
(
hovered_sequence
+
(
hovered_controler
<<
4
)
+
((
hovered_location
==
LOCATION_MZONE
)
?
0
:
8
));
unsigned
int
flag
=
0x1U
<<
(
hovered_sequence
+
(
hovered_controler
<<
4
)
+
((
hovered_location
==
LOCATION_MZONE
)
?
0
:
8
));
if
(
flag
&
selectable_field
)
{
if
(
flag
&
selected_field
)
{
selected_field
&=
~
flag
;
...
...
gframe/game.cpp
View file @
89118afd
...
...
@@ -869,14 +869,14 @@ bool Game::Initialize() {
cbAttribute
=
env
->
addComboBox
(
irr
::
core
::
rect
<
irr
::
s32
>
(
60
,
20
+
50
/
6
,
195
,
40
+
50
/
6
),
wFilter
,
COMBOBOX_ATTRIBUTE
);
cbAttribute
->
setMaxSelectionRows
(
10
);
cbAttribute
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
for
(
int
filter
=
0x1
;
filter
!=
0x80
;
filter
<<=
1
)
cbAttribute
->
addItem
(
dataManager
.
FormatAttribute
(
filter
).
c_str
(),
filter
);
for
(
int
filter
=
0
;
filter
<
ATTRIBUTES_COUNT
;
++
filter
)
cbAttribute
->
addItem
(
dataManager
.
FormatAttribute
(
0x1U
<<
filter
).
c_str
(),
0x1U
<<
filter
);
stRace
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1321
),
irr
::
core
::
rect
<
irr
::
s32
>
(
10
,
42
+
75
/
6
,
70
,
62
+
75
/
6
),
false
,
false
,
wFilter
);
cbRace
=
env
->
addComboBox
(
irr
::
core
::
rect
<
irr
::
s32
>
(
60
,
40
+
75
/
6
,
195
,
60
+
75
/
6
),
wFilter
,
COMBOBOX_RACE
);
cbRace
->
setMaxSelectionRows
(
10
);
cbRace
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
for
(
int
filter
=
0x1
;
filter
<
(
1
<<
RACES_COUNT
);
filter
<<=
1
)
cbRace
->
addItem
(
dataManager
.
FormatRace
(
filter
).
c_str
(),
filter
);
for
(
int
filter
=
0
;
filter
<
RACES_COUNT
;
++
filter
)
cbRace
->
addItem
(
dataManager
.
FormatRace
(
0x1U
<<
filter
).
c_str
(),
0x1U
<<
filter
);
stAttack
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1322
),
irr
::
core
::
rect
<
irr
::
s32
>
(
205
,
22
+
50
/
6
,
280
,
42
+
50
/
6
),
false
,
false
,
wFilter
);
ebAttack
=
env
->
addEditBox
(
L""
,
irr
::
core
::
rect
<
irr
::
s32
>
(
260
,
20
+
50
/
6
,
340
,
40
+
50
/
6
),
true
,
wFilter
,
EDITBOX_INPUTS
);
ebAttack
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
...
...
gframe/menu_handler.cpp
View file @
89118afd
...
...
@@ -532,9 +532,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
else
{
curtime
=
temp_replay
.
pheader
.
seed
;
wchar_t
version_info
[
256
]{};
myswprintf
(
version_info
,
L"version 0x%X"
,
temp_replay
.
pheader
.
version
);
myswprintf
(
version_info
,
L"version 0x%X
\n
"
,
temp_replay
.
pheader
.
version
);
repinfo
.
append
(
version_info
);
repinfo
.
append
(
L"
\n
"
);
}
std
::
wcsftime
(
infobuf
,
sizeof
infobuf
/
sizeof
infobuf
[
0
],
L"%Y/%m/%d %H:%M:%S
\n
"
,
std
::
localtime
(
&
curtime
));
repinfo
.
append
(
infobuf
);
...
...
gframe/premake5.lua
View file @
89118afd
...
...
@@ -54,6 +54,10 @@ project "ygopro"
links
{
"ocgcore"
,
"clzma"
,
"cspmemvfs"
,
LUA_LIB_NAME
,
"sqlite3"
,
"irrlicht"
,
"freetype"
,
"event"
}
end
if
not
BUILD_LUA
then
libdirs
{
LUA_LIB_DIR
}
end
if
BUILD_EVENT
then
includedirs
{
"../event/include"
}
else
...
...
@@ -120,7 +124,7 @@ end
if
SERVER_MODE
then
links
{
"ws2_32"
,
"iphlpapi"
}
else
links
{
"
opengl32"
,
"ws2_32"
,
"winmm"
,
"gdi32"
,
"kernel32"
,
"user32"
,
"imm
32"
,
"Dnsapi"
,
"iphlpapi"
}
links
{
"
ws2_
32"
,
"Dnsapi"
,
"iphlpapi"
}
end
if
USE_AUDIO
and
AUDIO_LIB
==
"irrklang"
then
links
{
"irrKlang"
}
...
...
@@ -134,11 +138,11 @@ end
end
end
filter
"not system:windows"
links
{
"
dl"
,
"pthread"
,
"
resolv"
}
links
{
"resolv"
}
filter
"system:macosx"
if
not
SERVER_MODE
then
openmp
"Off"
links
{
"
z
"
}
links
{
"
OpenGL.framework"
,
"Cocoa.framework"
,
"IOKit.framework
"
}
defines
{
"GL_SILENCE_DEPRECATION"
}
end
if
MAC_ARM
then
...
...
@@ -150,6 +154,7 @@ end
if
USE_AUDIO
and
AUDIO_LIB
==
"irrklang"
then
links
{
"irrklang"
}
end
filter
"system:linux"
linkoptions
{
"-static-libstdc++"
,
"-static-libgcc"
}
if
not
SERVER_MODE
then
...
...
@@ -160,3 +165,6 @@ end
links
{
"IrrKlang"
}
linkoptions
{
IRRKLANG_LINK_RPATH
}
end
if
GLIBC_VERSION
<
((
2
<<
16
)
|
(
34
<<
8
))
then
-- glibc less than 2.34
links
{
"dl"
,
"pthread"
}
end
gframe/replay.cpp
View file @
89118afd
...
...
@@ -126,7 +126,7 @@ void Replay::EndRecord() {
pheader
.
flag
|=
REPLAY_COMPRESSED
;
size_t
propsize
=
5
;
comp_size
=
MAX_COMP_SIZE
;
int
ret
=
LzmaCompress
(
comp_data
,
&
comp_size
,
replay_data
,
replay_size
,
pheader
.
props
,
&
propsize
,
5
,
1
<<
24
,
3
,
0
,
2
,
32
,
1
);
int
ret
=
LzmaCompress
(
comp_data
,
&
comp_size
,
replay_data
,
replay_size
,
pheader
.
props
,
&
propsize
,
5
,
0x1U
<<
24
,
3
,
0
,
2
,
32
,
1
);
if
(
ret
!=
SZ_OK
)
{
std
::
memcpy
(
comp_data
,
&
ret
,
sizeof
ret
);
comp_size
=
sizeof
ret
;
...
...
gframe/sound_manager.cpp
View file @
89118afd
...
...
@@ -254,8 +254,10 @@ void SoundManager::PlaySoundEffect(int sound) {
default:
break
;
}
wchar_t
soundNameW
[
32
];
BufferIO
::
DecodeUTF8
(
soundName
,
soundNameW
);
wchar_t
soundPathW
[
40
];
myswprintf
(
soundPathW
,
L"./sound/%
s.wav"
,
soundName
);
myswprintf
(
soundPathW
,
L"./sound/%
ls.wav"
,
soundNameW
);
PlaySound
(
soundPathW
);
#endif // YGOPRO_USE_AUDIO
}
...
...
ocgcore
@
b5dd9d4a
Subproject commit
15b26798847a8af75b7f1f03a9a7df1583ae96af
Subproject commit
b5dd9d4a3dc82b28d1ffdc8942526ab98b0013d7
premake/event/premake5.lua
View file @
89118afd
project
"event"
kind
"StaticLib"
local
EVENT_VERSION
=
(
io
.
readfile
(
"configure"
)
or
""
):
match
(
"NUMERIC_VERSION%s+0x(%x+)"
)
if
not
EVENT_VERSION
then
print
(
"Warning: Could not determine libevent version from the configure file, assuming 2.1.12."
)
EVENT_VERSION
=
"02010c00"
-- 2.1.12
end
EVENT_VERSION
=
tonumber
(
EVENT_VERSION
,
16
)
if
EVENT_VERSION
>=
0x02020000
then
print
(
"Warning: Using libevent version 2.2.x is not supported, please use 2.1.x, otherwise you may encounter issues."
)
end
if
EVENT_VERSION
>=
0x02010000
and
WINXP_SUPPORT
then
print
(
"Warning: libevent 2.1 uses some new APIs which require Windows Vista or later, so WinXP support will be not valid."
)
end
includedirs
{
"include"
,
"compat"
}
files
{
"event.c"
,
"evthread.c"
,
"buffer.c"
,
"bufferevent.c"
,
"bufferevent_sock.c"
,
...
...
@@ -8,15 +21,20 @@ project "event"
"evmap.c"
,
"log.c"
,
"evutil.c"
,
"evutil_rand.c"
,
"strlcpy.c"
,
"signal.c"
,
"event_tagging.c"
,
"http.c"
,
"evdns.c"
,
"evrpc.c"
}
if
os
.
isfile
(
"evutil_time.c"
)
then
if
EVENT_VERSION
>=
0x02010000
then
files
{
"evutil_time.c"
}
end
filter
"system:windows"
prebuildcommands
{
"xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code $(ProjectDir)..\\event\\include"
,
"xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code\\nmake $(ProjectDir)..\\event\\include"
}
prebuildcommands
{
"xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code $(ProjectDir)..\\event\\include"
}
files
{
"win32select.c"
,
"evthread_win32.c"
,
"buffer_iocp.c"
,
"event_iocp.c"
,
"bufferevent_async.c"
}
defines
{
"UINT32_MAX=0xffffffffui32"
}
-- quirk of libevent 2.1.2
if
EVENT_VERSION
>=
0x02010000
then
prebuildcommands
{
"xcopy /E /Y $(ProjectDir)..\\event\\WIN32-Code\\nmake $(ProjectDir)..\\event\\include"
}
defines
{
"UINT32_MAX=0xffffffffU"
}
-- quirk of libevent 2.1
end
if
EVENT_VERSION
<
0x02010000
then
defines
{
"WIN32"
}
-- quirk of old libevent
end
filter
"system:linux"
files
{
"evthread_pthread.c"
,
"epoll.c"
,
"epoll_sub.c"
,
"poll.c"
,
"select.c"
}
...
...
premake/irrlicht/premake5.lua
View file @
89118afd
...
...
@@ -161,9 +161,6 @@ project "irrlicht"
defines
{
"NO_IRR_COMPILE_WITH_DIRECT3D_9_"
}
end
filter
{
"system:linux"
}
links
{
"X11"
,
"Xxf86vm"
}
filter
{
"system:macosx"
}
cppdialect
"gnu++14"
defines
{
"GL_SILENCE_DEPRECATION"
}
...
...
premake/miniaudio/premake5.lua
View file @
89118afd
...
...
@@ -138,6 +138,3 @@ project "miniaudio"
includedirs
{
OPUS_INCLUDE_DIR
,
OPUSFILE_INCLUDE_DIR
,
VORBIS_INCLUDE_DIR
,
OGG_INCLUDE_DIR
}
end
end
filter
"system:linux"
links
{
"dl"
,
"pthread"
,
"m"
}
premake5.lua
View file @
89118afd
...
...
@@ -10,7 +10,9 @@ BUILD_LUA = true
LUA_LIB_NAME
=
"lua"
-- change this if you don't build Lua
BUILD_EVENT
=
os
.
istarget
(
"windows"
)
BUILD_FREETYPE
=
os
.
istarget
(
"windows"
)
BUILD_SQLITE
=
os
.
istarget
(
"windows"
)
BUILD_IRRLICHT
=
true
-- modified Irrlicht is required, can't use the official one
USE_DXSDK
=
true
...
...
@@ -423,6 +425,30 @@ if os.istarget("macosx") then
end
end
function
getGlibcVersion
()
local
output
=
os
.
outputof
(
"getconf GNU_LIBC_VERSION"
)
local
major
,
minor
,
patch
=
output
:
match
(
"glibc (%d+)%.(%d+)%.?(%d*)"
)
if
major
and
minor
then
major
=
tonumber
(
major
)
minor
=
tonumber
(
minor
)
patch
=
tonumber
(
patch
)
or
0
return
(
major
<<
16
)
|
(
minor
<<
8
)
|
patch
end
return
nil
end
GLIBC_VERSION
=
0
if
os
.
ishost
(
"linux"
)
then
GLIBC_VERSION
=
getGlibcVersion
()
if
GLIBC_VERSION
>
0
then
print
(
"Detected glibc version: "
..
string.format
(
"%d.%d.%d"
,
GLIBC_VERSION
>>
16
,
(
GLIBC_VERSION
>>
8
)
&
0xFF
,
GLIBC_VERSION
&
0xFF
))
else
print
(
"Could not detect glibc version, assuming it is sufficient."
)
end
end
workspace
"YGOPro"
location
"build"
language
"C++"
...
...
@@ -466,9 +492,6 @@ workspace "YGOPro"
if
MAC_ARM
and
MAC_INTEL
then
architecture
"universal"
end
if
not
SERVER_MODE
then
links
{
"OpenGL.framework"
,
"Cocoa.framework"
,
"IOKit.framework"
}
end
filter
"system:linux"
buildoptions
{
"-U_FORTIFY_SOURCE"
}
...
...
@@ -504,7 +527,6 @@ end
disablewarnings
{
"4244"
,
"4267"
,
"4838"
,
"4996"
,
"6011"
,
"6031"
,
"6054"
,
"6262"
}
filter
{
"configurations:Release"
,
"not action:vs*"
}
symbols
"On"
defines
"NDEBUG"
filter
{
"configurations:Debug"
,
"action:vs*"
}
...
...
script
@
5f9b99b0
Subproject commit
100512e7888f819957f60ac40e40d6ebe2c9b631
Subproject commit
5f9b99b0129438630b2451412bdfdc40cba21d2b
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