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
90bb84f0
Commit
90bb84f0
authored
May 06, 2025
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fh' into patch-miniaudio-v2
parents
f4d23d09
478e674c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
31 deletions
+39
-31
.github/workflows/build.yml
.github/workflows/build.yml
+2
-12
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+4
-4
gframe/deck_manager.h
gframe/deck_manager.h
+1
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+6
-2
gframe/game.cpp
gframe/game.cpp
+12
-7
gframe/gframe.cpp
gframe/gframe.cpp
+1
-1
premake/irrlicht/premake5.lua
premake/irrlicht/premake5.lua
+12
-2
premake5.lua
premake5.lua
+1
-2
No files found.
.github/workflows/build.yml
View file @
90bb84f0
...
...
@@ -401,12 +401,6 @@ jobs:
run
:
|
git clone --depth=1 https://github.com/mercury233/irrlicht
-
name
:
Build irrlicht
run
:
|
cd irrlicht/source/Irrlicht/MacOSX
xcodebuild -project MacOSX.xcodeproj
cd ../../../..
-
name
:
Copy premake files
run
:
|
cp -r premake/* .
...
...
@@ -418,9 +412,7 @@ jobs:
./premake5 gmake \
--cc=clang \
--freetype-include-dir="/usr/local/include/freetype2" \
--opus-include-dir="/usr/local/include/opus" \
--irrlicht-include-dir="../irrlicht/include" \
--irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release"
--opus-include-dir="/usr/local/include/opus"
-
name
:
Use premake to generate make files (ARM64)
if
:
runner.arch == 'ARM64'
...
...
@@ -438,9 +430,7 @@ jobs:
--opus-include-dir="/opt/homebrew/include/opus" \
--opus-lib-dir="/opt/homebrew/lib" \
--vorbis-include-dir="/opt/homebrew/include" \
--vorbis-lib-dir="/opt/homebrew/lib" \
--irrlicht-include-dir="../irrlicht/include" \
--irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release"
--vorbis-lib-dir="/opt/homebrew/lib"
-
name
:
Make
run
:
|
...
...
gframe/deck_manager.cpp
View file @
90bb84f0
...
...
@@ -311,7 +311,7 @@ bool DeckManager::LoadCurrentDeck(int category_index, const wchar_t* category_na
mainGame
->
deckBuilder
.
RefreshPackListScroll
();
return
res
;
}
bool
DeckManager
::
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
file
)
{
bool
DeckManager
::
SaveDeck
(
const
Deck
&
deck
,
const
wchar_t
*
file
)
{
if
(
!
FileSystem
::
IsDirExists
(
L"./deck"
)
&&
!
FileSystem
::
MakeDir
(
L"./deck"
))
return
false
;
FILE
*
fp
=
OpenDeckFile
(
file
,
"w"
);
...
...
@@ -319,13 +319,13 @@ bool DeckManager::SaveDeck(Deck& deck, const wchar_t* file) {
return
false
;
std
::
fprintf
(
fp
,
"#created by ...
\n
#main
\n
"
);
for
(
size_t
i
=
0
;
i
<
deck
.
main
.
size
();
++
i
)
std
::
fprintf
(
fp
,
"%
d
\n
"
,
deck
.
main
[
i
]
->
first
);
std
::
fprintf
(
fp
,
"%
u
\n
"
,
deck
.
main
[
i
]
->
first
);
std
::
fprintf
(
fp
,
"#extra
\n
"
);
for
(
size_t
i
=
0
;
i
<
deck
.
extra
.
size
();
++
i
)
std
::
fprintf
(
fp
,
"%
d
\n
"
,
deck
.
extra
[
i
]
->
first
);
std
::
fprintf
(
fp
,
"%
u
\n
"
,
deck
.
extra
[
i
]
->
first
);
std
::
fprintf
(
fp
,
"!side
\n
"
);
for
(
size_t
i
=
0
;
i
<
deck
.
side
.
size
();
++
i
)
std
::
fprintf
(
fp
,
"%
d
\n
"
,
deck
.
side
[
i
]
->
first
);
std
::
fprintf
(
fp
,
"%
u
\n
"
,
deck
.
side
[
i
]
->
first
);
std
::
fclose
(
fp
);
return
true
;
}
...
...
gframe/deck_manager.h
View file @
90bb84f0
...
...
@@ -58,7 +58,7 @@ public:
static
void
GetDeckFile
(
wchar_t
*
ret
,
int
category_index
,
const
wchar_t
*
category_name
,
const
wchar_t
*
deckname
);
static
FILE
*
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
);
static
irr
::
io
::
IReadFile
*
OpenDeckReader
(
const
wchar_t
*
file
);
static
bool
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
file
);
static
bool
SaveDeck
(
const
Deck
&
deck
,
const
wchar_t
*
file
);
static
bool
DeleteDeck
(
const
wchar_t
*
file
);
static
bool
CreateCategory
(
const
wchar_t
*
name
);
static
bool
RenameCategory
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
);
...
...
gframe/duelclient.cpp
View file @
90bb84f0
...
...
@@ -3869,7 +3869,9 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
break
;
}
case
MSG_RELOAD_FIELD
:
{
mainGame
->
gMutex
.
lock
();
if
(
!
mainGame
->
dInfo
.
isReplay
||
!
mainGame
->
dInfo
.
isReplaySkiping
)
{
mainGame
->
gMutex
.
lock
();
}
mainGame
->
dField
.
Clear
();
mainGame
->
dInfo
.
duel_rule
=
BufferIO
::
ReadUInt8
(
pbuf
);
int
val
=
0
;
...
...
@@ -3975,7 +3977,9 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
myswprintf
(
event_string
,
dataManager
.
GetSysString
(
1609
),
dataManager
.
GetName
(
mainGame
->
dField
.
current_chain
.
code
));
mainGame
->
dField
.
last_chain
=
true
;
}
mainGame
->
gMutex
.
unlock
();
if
(
!
mainGame
->
dInfo
.
isReplay
||
!
mainGame
->
dInfo
.
isReplaySkiping
)
{
mainGame
->
gMutex
.
unlock
();
}
break
;
}
}
...
...
gframe/game.cpp
View file @
90bb84f0
...
...
@@ -106,6 +106,9 @@ bool Game::Initialize() {
numFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
16
);
if
(
!
numFont
)
{
const
wchar_t
*
numFontPaths
[]
=
{
L"./fonts/numFont.ttf"
,
L"./fonts/numFont.ttc"
,
L"./fonts/numFont.otf"
,
L"C:/Windows/Fonts/arialbd.ttf"
,
L"/usr/share/fonts/truetype/DroidSansFallbackFull.ttf"
,
L"/usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc"
,
...
...
@@ -113,9 +116,6 @@ bool Game::Initialize() {
L"/usr/share/fonts/noto-cjk/NotoSansCJK-Bold.ttc"
,
L"/System/Library/Fonts/SFNSTextCondensed-Bold.otf"
,
L"/System/Library/Fonts/SFNS.ttf"
,
L"./fonts/numFont.ttf"
,
L"./fonts/numFont.ttc"
,
L"./fonts/numFont.otf"
};
for
(
const
wchar_t
*
path
:
numFontPaths
)
{
BufferIO
::
CopyWideString
(
path
,
gameConf
.
numfont
);
...
...
@@ -127,6 +127,9 @@ bool Game::Initialize() {
textFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
gameConf
.
textfontsize
);
if
(
!
textFont
)
{
const
wchar_t
*
textFontPaths
[]
=
{
L"./fonts/textFont.ttf"
,
L"./fonts/textFont.ttc"
,
L"./fonts/textFont.otf"
,
L"C:/Windows/Fonts/msyh.ttc"
,
L"C:/Windows/Fonts/msyh.ttf"
,
L"C:/Windows/Fonts/simsun.ttc"
,
...
...
@@ -139,9 +142,6 @@ bool Game::Initialize() {
L"/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc"
,
L"/System/Library/Fonts/PingFang.ttc"
,
L"/System/Library/Fonts/STHeiti Medium.ttc"
,
L"./fonts/textFont.ttf"
,
L"./fonts/textFont.ttc"
,
L"./fonts/textFont.otf"
};
for
(
const
wchar_t
*
path
:
textFontPaths
)
{
BufferIO
::
CopyWideString
(
path
,
gameConf
.
textfont
);
...
...
@@ -159,7 +159,7 @@ bool Game::Initialize() {
}
});
if
(
fpath
[
0
]
==
0
)
{
ErrorLog
(
"No fonts found! Please
manually edit system.conf or place appropriate font file in the fonts director
y."
);
ErrorLog
(
"No fonts found! Please
place appropriate font file in the fonts directory, or edit system.conf manuall
y."
);
return
false
;
}
if
(
!
numFont
)
{
...
...
@@ -1719,6 +1719,11 @@ void Game::AddDebugMsg(const char* msg) {
}
}
void
Game
::
ErrorLog
(
const
char
*
msg
)
{
#ifdef _WIN32
OutputDebugStringA
(
msg
);
#else
std
::
fprintf
(
stderr
,
"%s
\n
"
,
msg
);
#endif
FILE
*
fp
=
myfopen
(
"error.log"
,
"a"
);
if
(
!
fp
)
return
;
...
...
gframe/gframe.cpp
View file @
90bb84f0
...
...
@@ -26,7 +26,7 @@ int main(int argc, char* argv[]) {
#if defined(FOPEN_WINDOWS_SUPPORT_UTF8)
std
::
setlocale
(
LC_CTYPE
,
".UTF-8"
);
#elif defined(__APPLE__)
std
::
setlocale
(
LC_CTYPE
,
"
C.
UTF-8"
);
std
::
setlocale
(
LC_CTYPE
,
"UTF-8"
);
#elif !defined(_WIN32)
std
::
setlocale
(
LC_CTYPE
,
""
);
#endif
...
...
premake/irrlicht/premake5.lua
View file @
90bb84f0
...
...
@@ -67,8 +67,6 @@ project "irrlicht"
files
{
"include/*.h"
,
"source/Irrlicht/*.cpp"
,
"source/Irrlicht/lzma/*.h"
,
"source/Irrlicht/lzma/*.c"
,
"source/Irrlicht/zlib/zlib.h"
,
"source/Irrlicht/zlib/adler32.c"
,
"source/Irrlicht/zlib/compress.c"
,
...
...
@@ -158,3 +156,15 @@ project "irrlicht"
filter
{
"system:linux"
}
links
{
"X11"
,
"Xxf86vm"
}
filter
{
"system:macosx"
}
cppdialect
"gnu++14"
defines
{
"GL_SILENCE_DEPRECATION"
,
"PNG_ARM_NEON_OPT=0"
,
"PNG_ARM_NEON_IMPLEMENTATION=0"
}
undefines
{
"NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_"
}
files
{
"source/Irrlicht/MacOSX/*.mm"
,
"source/Irrlicht/MacOSX/*.h"
,
}
filter
{
"system:macosx"
,
"files:source/Irrlicht/Irrlicht.cpp or source/Irrlicht/COpenGLDriver.cpp"
}
compileas
"Objective-C++"
premake5.lua
View file @
90bb84f0
...
...
@@ -6,7 +6,7 @@ LUA_LIB_NAME = "lua"
BUILD_EVENT
=
os
.
istarget
(
"windows"
)
BUILD_FREETYPE
=
os
.
istarget
(
"windows"
)
BUILD_SQLITE
=
os
.
istarget
(
"windows"
)
BUILD_IRRLICHT
=
not
os
.
istarget
(
"macosx"
)
BUILD_IRRLICHT
=
true
USE_AUDIO
=
true
AUDIO_LIB
=
"miniaudio"
...
...
@@ -226,7 +226,6 @@ workspace "YGOPro"
filter
"system:macosx"
libdirs
{
"/usr/local/lib"
}
buildoptions
{
"-stdlib=libc++"
}
if
MAC_ARM
then
buildoptions
{
"--target=arm64-apple-macos12"
}
end
...
...
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