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
a37006c5
Commit
a37006c5
authored
Mar 27, 2025
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
c7c157c2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
9 deletions
+73
-9
.github/workflows/build.yml
.github/workflows/build.yml
+10
-4
gframe/premake5.lua
gframe/premake5.lua
+8
-0
gframe/sound_manager.cpp
gframe/sound_manager.cpp
+2
-2
gframe/sound_manager.h
gframe/sound_manager.h
+1
-1
premake5.lua
premake5.lua
+52
-2
No files found.
.github/workflows/build.yml
View file @
a37006c5
...
...
@@ -236,7 +236,7 @@ jobs:
-
name
:
Install dependencies
run
:
|
sudo apt-get update
sudo apt-get install -y libevent-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev libsqlite3-dev libxxf86vm-dev
sudo apt-get install -y libevent-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev libsqlite3-dev libxxf86vm-dev
libminiaudio-dev libopusfile-dev libvorbis-dev
-
name
:
Download premake
id
:
premake
...
...
@@ -321,9 +321,9 @@ jobs:
# git pull origin master
# cd ..
#
- name: Install dependencies
#
run: |
# brew install freetype libevent libx11 sqlite zlib
-
name
:
Install dependencies
run
:
|
brew install freetype libevent libx11 sqlite zlib opus opusfile libvorbis
-
name
:
Download premake
id
:
premake
...
...
@@ -383,6 +383,12 @@ jobs:
--freetype-lib-dir="/opt/homebrew/lib" \
--sqlite-include-dir="/opt/homebrew/opt/sqlite/include" \
--sqlite-lib-dir="/opt/homebrew/opt/sqlite/lib" \
--miniaudio-include-dir="/opt/homebrew/include" \
--miniaudio-lib-dir="/opt/homebrew/lib" \
--opusfile-include-dir="/opt/homebrew/include" \
--opusfile-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"
...
...
gframe/premake5.lua
View file @
a37006c5
...
...
@@ -42,6 +42,14 @@ project "YGOPro"
defines
{
"YGOPRO_USE_AUDIO"
}
includedirs
{
"../miniaudio"
}
links
{
"miniaudio"
}
if
not
BUILD_MINIAUDIO
then
includedirs
{
MINIAUDIO_INCLUDE_DIR
}
libdirs
{
MINIAUDIO_LIB_DIR
}
links
{
"miniaudio"
}
if
MINIAUDIO_SUPPORT_OPUS_VORBIS
then
links
{
"opusfile"
,
"vorbis"
}
end
end
end
filter
"system:windows"
...
...
gframe/sound_manager.cpp
View file @
a37006c5
#include "sound_manager.h"
#ifdef YGOPRO_USE_AUDIO
#include
"../miniaudio/miniaudio_libvorbis.h"
#include
"../miniaudio/miniaudio_libopus.h"
#include
<miniaudio_libvorbis.h>
#include
<miniaudio_libopus.h>
#endif
#include "myfilesystem.h"
...
...
gframe/sound_manager.h
View file @
a37006c5
...
...
@@ -4,7 +4,7 @@
#include "game.h"
#include "../ocgcore/mtrandom.h"
#ifdef YGOPRO_USE_AUDIO
#include
"../miniaudio/miniaudio.h"
#include
<miniaudio.h>
#endif
namespace
ygo
{
...
...
premake5.lua
View file @
a37006c5
-- default global settings
USE_AUDIO
=
true
BUILD_LUA
=
true
BUILD_EVENT
=
os
.
istarget
(
"windows"
)
BUILD_FREETYPE
=
os
.
istarget
(
"windows"
)
BUILD_SQLITE
=
os
.
istarget
(
"windows"
)
BUILD_IRRLICHT
=
not
os
.
istarget
(
"macosx"
)
BUILD_MINIAUDIO
=
os
.
istarget
(
"windows"
)
BUILD_OPUS_VORBIS
=
os
.
istarget
(
"windows"
)
MINIAUDIO_SUPPORT_OPUS_VORBIS
=
true
LUA_LIB_NAME
=
"lua"
-- read settings from command line or environment variables
...
...
@@ -41,6 +45,21 @@ newoption { trigger = "irrklang-pro-release-lib-dir", category = "YGOPro - irrkl
newoption
{
trigger
=
"irrklang-pro-debug-lib-dir"
,
category
=
"YGOPro - irrklang - pro"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
'build-ikpmp3'
,
category
=
"YGOPro - irrklang - ikpmp3"
,
description
=
""
}
newoption
{
trigger
=
"no-audio"
,
category
=
"YGOPro"
,
description
=
""
}
newoption
{
trigger
=
"build-miniaudio"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"no-build-miniaudio"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"miniaudio-include-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"miniaudio-lib-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
,
value
=
"PATH"
}
newoption
{
trigger
=
"miniaudio-support-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"no-miniaudio-support-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"build-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"no-build-opus-vorbis"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"opus-include-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"opus-lib-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"vorbis-include-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"vorbis-lib-dir"
,
category
=
"YGOPro - miniaudio"
,
description
=
""
}
newoption
{
trigger
=
"winxp-support"
,
category
=
"YGOPro"
,
description
=
""
}
newoption
{
trigger
=
"mac-arm"
,
category
=
"YGOPro"
,
description
=
"Cross compile for Apple Silicon"
}
...
...
@@ -101,7 +120,38 @@ if not BUILD_IRRLICHT then
IRRLICHT_LIB_DIR
=
GetParam
(
"irrlicht-lib-dir"
)
or
os
.
findlib
(
"irrlicht"
)
end
USE_AUDIO
=
not
GetParam
(
"no-audio"
)
if
GetParam
(
"no-audio"
)
then
USE_AUDIO
=
false
end
if
GetParam
(
"build-miniaudio"
)
then
BUILD_MINIAUDIO
=
true
elseif
GetParam
(
"nobuild-miniaudio"
)
then
BUILD_MINIAUDIO
=
false
end
if
not
BUILD_MINIAUDIO
then
MINIAUDIO_SUPPORT_OPUS_VORBIS
=
false
MINIAUDIO_INCLUDE_DIR
=
GetParam
(
"miniaudio-include-dir"
)
or
os
.
findheader
(
"miniaudio"
)
MINIAUDIO_LIB_DIR
=
GetParam
(
"miniaudio-lib-dir"
)
or
os
.
findlib
(
"miniaudio"
)
end
if
GetParam
(
"miniaudio-support-opus-vorbis"
)
then
MINIAUDIO_SUPPORT_OPUS_VORBIS
=
true
elseif
GetParam
(
"no-miniaudio-support-opus-vorbis"
)
then
MINIAUDIO_SUPPORT_OPUS_VORBIS
=
false
end
if
MINIAUDIO_SUPPORT_OPUS_VORBIS
then
if
GetParam
(
"build-opus-vorbis"
)
then
BUILD_OPUS_VORBIS
=
true
elseif
GetParam
(
"no-build-opus-vorbis"
)
then
BUILD_OPUS_VORBIS
=
false
end
if
not
BUILD_OPUS_VORBIS
then
OPUS_INCLUDE_DIR
=
GetParam
(
"opus-include-dir"
)
or
os
.
findheader
(
"opusfile"
)
OPUS_LIB_DIR
=
GetParam
(
"opus-lib-dir"
)
or
os
.
findlib
(
"opusfile"
)
VORBIS_INCLUDE_DIR
=
GetParam
(
"vorbis-include-dir"
)
or
os
.
findheader
(
"vorbis"
)
VORBIS_LIB_DIR
=
GetParam
(
"vorbis-lib-dir"
)
or
os
.
findlib
(
"vorbis"
)
end
end
if
GetParam
(
"winxp-support"
)
and
os
.
istarget
(
"windows"
)
then
WINXP_SUPPORT
=
true
...
...
@@ -199,6 +249,6 @@ workspace "YGOPro"
if
BUILD_SQLITE
then
include
"sqlite3"
end
if
USE_AUDIO
then
if
USE_AUDIO
and
BUILD_MINIAUDIO
then
include
"miniaudio"
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