Commit 8e548735 authored by nanahira's avatar nanahira

Merge branch 'develop'

parents c57bd2cc 598639e2
#!/bin/sh
set -x
set -o errexit
cd miniaudio
external_built_dir="$PWD/external-built"
is_macos=false
if [ "$(uname)" = "Darwin" ]; then
is_macos=true
fi
maybe_patch_configure() {
if $is_macos; then
sed -i.bak 's/-force_cpusubtype_ALL//g' configure*
fi
}
build_single_thing() {
lib_name="$1"
cd "external/$lib_name"
shift
maybe_patch_configure
PKG_CONFIG_PATH="$external_built_dir/lib/pkgconfig" ./configure --prefix="$external_built_dir" --enable-static=yes --enable-shared=no "$@"
make -j$(nproc)
make install
cd ../..
}
build_single_thing ogg
build_single_thing opus
build_single_thing opusfile --disable-examples --disable-http
build_single_thing vorbis --with-ogg="$external_built_dir"
cd ..
...@@ -8,13 +8,20 @@ export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include ...@@ -8,13 +8,20 @@ export EVENT_INCLUDE_DIR=$PWD/libevent-stable/include
export EVENT_LIB_DIR=$PWD/libevent-stable/lib export EVENT_LIB_DIR=$PWD/libevent-stable/lib
export IRRLICHT_INCLUDE_DIR=$PWD/irrlicht/include export IRRLICHT_INCLUDE_DIR=$PWD/irrlicht/include
export IRRLICHT_LIB_DIR=$PWD/irrlicht/lib/$(arch) export IRRLICHT_LIB_DIR=$PWD/irrlicht/lib/$(arch)
export OPUS_INCLUDE_DIR=$PWD/miniaudio/external-built/include/opus
export OPUS_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
export OGG_LIB_DIR=$PWD/miniaudio/external-built/lib
./.ci/libevent-prebuild.sh ./.ci/libevent-prebuild.sh
./.ci/build-opus.sh
./premake5 gmake --cc=clang --build-freetype --build-sqlite ./premake5 gmake --cc=clang --build-freetype --build-sqlite
cd build cd build
make config=release -j4 make config=release -j$(nproc)
cd .. cd ..
mkdir ygopro-platforms mkdir ygopro-platforms
......
#!/bin/bash #!/bin/sh
set -x set -x
set -o errexit set -o errexit
# PROCESSOR_COUNT=4 # PROCESSOR_COUNT=4
wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx - if [ -d "libevent-stable" ]; then
rm -rf libevent-stable
fi
if [ ! -d "libevent-2.0.22-stable" ]; then
wget -O - https://cdn01.moecube.com/ygopro-build-materials/libevent-2.0.22-stable.tar.gz | tar zfx -
fi
install_path="$PWD/libevent-stable"
cd libevent-2.0.22-stable cd libevent-2.0.22-stable
./configure --prefix=$PWD/libevent-stable --disable-openssl --enable-static=yes --enable-shared=no ./configure "--prefix=$install_path" --disable-openssl --enable-static=yes --enable-shared=no "$@"
make -j$PROCESSOR_COUNT make -j$(nproc)
make install make install
cd .. cd ..
mv libevent-2.0.22-stable/libevent-stable .
rm -rf libevent-2.0.22-stable
...@@ -8,6 +8,10 @@ if [[ -z "$TARGET_PLATFORM" ]]; then ...@@ -8,6 +8,10 @@ if [[ -z "$TARGET_PLATFORM" ]]; then
TARGET_PLATFORM=linux TARGET_PLATFORM=linux
fi fi
if [[ "$TARGET_PLATFORM" != "linuxarm" ]]; then
ARCHIVE_FILES+=(sound)
fi
apt update && apt -y install tar zstd apt update && apt -y install tar zstd
mkdir dist replay mkdir dist replay
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
set -x set -x
set -o errexit set -o errexit
ARCHIVE_FILES=(ygopro LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf locales fonts pack) ARCHIVE_FILES=(ygopro LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay windbot bot bot.conf locales fonts pack)
# TARGET_LOCALE # TARGET_LOCALE
# ARCHIVE_SUFFIX # ARCHIVE_SUFFIX
...@@ -10,6 +10,10 @@ if [[ -z "$TARGET_PLATFORM" ]]; then ...@@ -10,6 +10,10 @@ if [[ -z "$TARGET_PLATFORM" ]]; then
TARGET_PLATFORM=linux TARGET_PLATFORM=linux
fi fi
if [[ "$TARGET_PLATFORM" != "linuxarm" ]]; then
ARCHIVE_FILES+=(sound)
fi
apt update && apt -y install tar git zstd apt update && apt -y install tar git zstd
mkdir dist replay mkdir dist replay
......
#!/bin/sh
set -x
set -o errexit
if [ ! -d "miniaudio" ]; then
git clone --depth=1 --branch 0.11.22 https://github.com/mackron/miniaudio
fi
mkdir -p miniaudio/external
install_external() {
dir="$1"
url="$2"
if [ ! -d "miniaudio/external/$dir" ]; then
mkdir -p "miniaudio/external/$dir"
# Download the external library and strip one level of directories from the archive
wget -O - "$url" | tar --strip-components=1 -C "miniaudio/external/$dir" -zxf -
fi
}
install_external "ogg" "https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz"
install_external "opus" "https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz"
install_external "opusfile" "https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz"
install_external "vorbis" "https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz"
...@@ -12,6 +12,7 @@ jobs: ...@@ -12,6 +12,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [windows-2019, windows-2022] os: [windows-2019, windows-2022]
audiolib: [miniaudio, irrklang]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
...@@ -90,6 +91,76 @@ jobs: ...@@ -90,6 +91,76 @@ jobs:
7z x ${{ steps.sqlite.outputs.filepath }} 7z x ${{ steps.sqlite.outputs.filepath }}
move sqlite-amalgamation-3490100 sqlite3 move sqlite-amalgamation-3490100 sqlite3
- name: Download miniaudio
if: matrix.audiolib == 'miniaudio'
run: |
git clone --depth=1 --branch 0.11.22 https://github.com/mackron/miniaudio
- name: Download ogg
if: matrix.audiolib == 'miniaudio'
id: ogg
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz
- name: Extract ogg
if: matrix.audiolib == 'miniaudio'
run: |
tar xf ${{ steps.ogg.outputs.filepath }}
move libogg-1.3.5 miniaudio/external/ogg
- name: Download opus
if: matrix.audiolib == 'miniaudio'
id: opus
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/opus/releases/download/v1.5.2/opus-1.5.2.tar.gz
- name: Extract opus
if: matrix.audiolib == 'miniaudio'
run: |
tar xf ${{ steps.opus.outputs.filepath }}
move opus-1.5.2 miniaudio/external/opus
- name: Download opusfile
if: matrix.audiolib == 'miniaudio'
id: opusfile
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/opusfile/releases/download/v0.12/opusfile-0.12.tar.gz
- name: Extract opusfile
if: matrix.audiolib == 'miniaudio'
run: |
tar xf ${{ steps.opusfile.outputs.filepath }}
move opusfile-0.12 miniaudio/external/opusfile
- name: Download vorbis
if: matrix.audiolib == 'miniaudio'
id: vorbis
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz
- name: Extract vorbis
if: matrix.audiolib == 'miniaudio'
run: |
tar xf ${{ steps.vorbis.outputs.filepath }}
move libvorbis-1.3.7 miniaudio/external/vorbis
- name: Download irrKlang
if: matrix.audiolib == 'irrklang'
id: irrKlang
uses: mercury233/action-cache-download-file@v1.0.0
with:
url: https://www.ambiera.at/downloads/irrKlang-32bit-1.6.0.zip
- name: Extract irrKlang
if: matrix.audiolib == 'irrklang'
run: |
7z x ${{ steps.irrKlang.outputs.filepath }}
move irrKlang-1.6.0 irrKlang
- name: Download irrlicht - name: Download irrlicht
run: | run: |
git clone --depth=1 https://github.com/mercury233/irrlicht git clone --depth=1 https://github.com/mercury233/irrlicht
...@@ -121,17 +192,28 @@ jobs: ...@@ -121,17 +192,28 @@ jobs:
- name: Copy premake files - name: Copy premake files
run: | run: |
xcopy /E premake\* . xcopy /E premake\* .
xcopy /E resource\* .
- name: Use premake to generate Visual Studio solution (2019) - name: Use premake to generate Visual Studio solution (2019, miniaudio)
if: matrix.os == 'windows-2019' if: matrix.os == 'windows-2019' && matrix.audiolib == 'miniaudio'
run: | run: |
.\premake5.exe vs2019 --winxp-support .\premake5.exe vs2019 --winxp-support
- name: Use premake to generate Visual Studio solution (2022) - name: Use premake to generate Visual Studio solution (2022, miniaudio)
if: matrix.os == 'windows-2022' if: matrix.os == 'windows-2022' && matrix.audiolib == 'miniaudio'
run: | run: |
.\premake5.exe vs2022 .\premake5.exe vs2022
- name: Use premake to generate Visual Studio solution (2019, irrKlang)
if: matrix.os == 'windows-2019' && matrix.audiolib == 'irrklang'
run: |
.\premake5.exe vs2019 --winxp-support --audio-lib=irrklang
- name: Use premake to generate Visual Studio solution (2022, irrKlang)
if: matrix.os == 'windows-2022' && matrix.audiolib == 'irrklang'
run: |
.\premake5.exe vs2022 --audio-lib=irrklang
- name: Add msbuild to PATH - name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2 uses: microsoft/setup-msbuild@v2
...@@ -142,7 +224,7 @@ jobs: ...@@ -142,7 +224,7 @@ jobs:
- name: Upload build artifacts - name: Upload build artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: YGOPro-${{ matrix.os }} name: YGOPro-${{ matrix.os }}-${{ matrix.audiolib }}
path: | path: |
bin/release/YGOPro.exe bin/release/YGOPro.exe
...@@ -185,7 +267,7 @@ jobs: ...@@ -185,7 +267,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update 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 libopusfile-dev libvorbis-dev
- name: Download premake - name: Download premake
id: premake id: premake
...@@ -210,6 +292,10 @@ jobs: ...@@ -210,6 +292,10 @@ jobs:
tar xf ${{ steps.lua.outputs.filepath }} tar xf ${{ steps.lua.outputs.filepath }}
mv lua-5.4.7 lua mv lua-5.4.7 lua
- name: Download miniaudio
run: |
git clone --depth=1 --branch 0.11.22 https://github.com/mackron/miniaudio
- name: Download irrlicht - name: Download irrlicht
run: | run: |
git clone --depth=1 https://github.com/mercury233/irrlicht git clone --depth=1 https://github.com/mercury233/irrlicht
...@@ -217,11 +303,13 @@ jobs: ...@@ -217,11 +303,13 @@ jobs:
- name: Copy premake files - name: Copy premake files
run: | run: |
cp -r premake/* . cp -r premake/* .
cp -r resource/* .
- name: Use premake to generate make files - name: Use premake to generate make files
run: | run: |
./premake5 gmake \ ./premake5 gmake \
--freetype-include-dir="/usr/include/freetype2" --freetype-include-dir="/usr/include/freetype2" \
--opus-include-dir="/usr/include/opus"
- name: Make - name: Make
run: | run: |
...@@ -269,9 +357,9 @@ jobs: ...@@ -269,9 +357,9 @@ jobs:
# git pull origin master # git pull origin master
# cd .. # cd ..
# - name: Install dependencies - name: Install dependencies
# run: | run: |
# brew install freetype libevent libx11 sqlite zlib brew install freetype libevent libx11 sqlite opus opusfile libvorbis
- name: Download premake - name: Download premake
id: premake id: premake
...@@ -296,6 +384,10 @@ jobs: ...@@ -296,6 +384,10 @@ jobs:
tar xf ${{ steps.lua.outputs.filepath }} tar xf ${{ steps.lua.outputs.filepath }}
mv lua-5.4.7 lua mv lua-5.4.7 lua
- name: Download miniaudio
run: |
git clone --depth=1 --branch 0.11.22 https://github.com/mackron/miniaudio
- name: Download irrlicht - name: Download irrlicht
run: | run: |
git clone --depth=1 https://github.com/mercury233/irrlicht git clone --depth=1 https://github.com/mercury233/irrlicht
...@@ -309,6 +401,7 @@ jobs: ...@@ -309,6 +401,7 @@ jobs:
- name: Copy premake files - name: Copy premake files
run: | run: |
cp -r premake/* . cp -r premake/* .
cp -r resource/* .
- name: Use premake to generate make files (Intel) - name: Use premake to generate make files (Intel)
if: runner.arch == 'X64' if: runner.arch == 'X64'
...@@ -316,6 +409,7 @@ jobs: ...@@ -316,6 +409,7 @@ jobs:
./premake5 gmake \ ./premake5 gmake \
--cc=clang \ --cc=clang \
--freetype-include-dir="/usr/local/include/freetype2" \ --freetype-include-dir="/usr/local/include/freetype2" \
--opus-include-dir="/usr/local/include/opus" \
--irrlicht-include-dir="../irrlicht/include" \ --irrlicht-include-dir="../irrlicht/include" \
--irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release" --irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release"
...@@ -330,6 +424,12 @@ jobs: ...@@ -330,6 +424,12 @@ jobs:
--freetype-lib-dir="/opt/homebrew/lib" \ --freetype-lib-dir="/opt/homebrew/lib" \
--sqlite-include-dir="/opt/homebrew/opt/sqlite/include" \ --sqlite-include-dir="/opt/homebrew/opt/sqlite/include" \
--sqlite-lib-dir="/opt/homebrew/opt/sqlite/lib" \ --sqlite-lib-dir="/opt/homebrew/opt/sqlite/lib" \
--miniaudio-include-dir="/opt/homebrew/include" \
--miniaudio-lib-dir="/opt/homebrew/lib" \
--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-include-dir="../irrlicht/include" \
--irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release" --irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release"
......
...@@ -16,6 +16,7 @@ build ...@@ -16,6 +16,7 @@ build
/irrklang /irrklang
/irrlicht* /irrlicht*
/lua /lua
/miniaudio
# gframe additionals # gframe additionals
/gframe/ygopro.ico /gframe/ygopro.ico
......
...@@ -22,6 +22,8 @@ mat_common: ...@@ -22,6 +22,8 @@ mat_common:
# freetype # freetype
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.11.1.tar.gz | tar zfx - - wget -O - https://cdn01.moecube.com/ygopro-build-materials/freetype-2.11.1.tar.gz | tar zfx -
- mv freetype-2.11.1 freetype - mv freetype-2.11.1 freetype
# miniaudio
- ./.ci/prepare-miniaudio.sh
# premake # premake
- cp -rf premake/* .; - cp -rf premake/* .;
artifacts: artifacts:
...@@ -29,6 +31,7 @@ mat_common: ...@@ -29,6 +31,7 @@ mat_common:
- lua - lua
- freetype - freetype
- sqlite3 - sqlite3
- miniaudio
mat_submodules: mat_submodules:
stage: prepare stage: prepare
...@@ -112,7 +115,7 @@ exec_windows: ...@@ -112,7 +115,7 @@ exec_windows:
- mat_windows - mat_windows
- mat_submodules - mat_submodules
script: script:
- bash -c 'cp -rf premake/* .' - bash -c 'cp -rf premake/* . ; cp -rf resource/* .'
- '.\premake5.exe vs2019' - '.\premake5.exe vs2019'
- cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\YGOPro.sln /m /p:Configuration=Release' - cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\YGOPro.sln /m /p:Configuration=Release'
- copy bin\release\ygopro.exe . - copy bin\release\ygopro.exe .
...@@ -132,7 +135,14 @@ exec_windows: ...@@ -132,7 +135,14 @@ exec_windows:
variables: variables:
EVENT_INCLUDE_DIR: /usr/share/libevent-stable/include EVENT_INCLUDE_DIR: /usr/share/libevent-stable/include
EVENT_LIB_DIR: /usr/share/libevent-stable/lib EVENT_LIB_DIR: /usr/share/libevent-stable/lib
OPUS_INCLUDE_DIR: $CI_PROJECT_DIR/miniaudio/external-built/include/opus
OPUS_LIB_DIR: $CI_PROJECT_DIR/miniaudio/external-built/lib
VORBIS_INCLUDE_DIR: $CI_PROJECT_DIR/miniaudio/external-built/include
VORBIS_LIB_DIR: $CI_PROJECT_DIR/miniaudio/external-built/lib
OGG_INCLUDE_DIR: $CI_PROJECT_DIR/miniaudio/external-built/include
OGG_LIB_DIR: $CI_PROJECT_DIR/miniaudio/external-built/lib
script: script:
- ./.ci/build-opus.sh
- premake5 gmake --build-freetype --build-sqlite --build-irrlicht - premake5 gmake --build-freetype --build-sqlite --build-irrlicht
- cd build - cd build
- make config=release -j$(nproc) - make config=release -j$(nproc)
...@@ -187,7 +197,7 @@ exec_macos: ...@@ -187,7 +197,7 @@ exec_macos:
- mkdir -p ygopro.app/Contents/MacOS ygopro.app/Contents/Frameworks; - mkdir -p ygopro.app/Contents/MacOS ygopro.app/Contents/Frameworks;
- lipo -create -output ygopro.app/Contents/MacOS/ygopro $(ls -1 ygopro-platforms/ygopro-platform-*); - lipo -create -output ygopro.app/Contents/MacOS/ygopro $(ls -1 ygopro-platforms/ygopro-platform-*);
- mkdir ygopro.app/Contents/Resources; - mkdir ygopro.app/Contents/Resources;
- mv premake/gframe/ygopro.icns ygopro.app/Contents/Resources/Icon.icns; - mv resource/gframe/ygopro.icns ygopro.app/Contents/Resources/Icon.icns;
- defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIconFile" "Icon.icns"; - defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIconFile" "Icon.icns";
- defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIdentifier" "moe.mycard.ygopro"; - defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIdentifier" "moe.mycard.ygopro";
......
...@@ -78,7 +78,7 @@ static unsigned int checkAvail(unsigned int ot, unsigned int avail) { ...@@ -78,7 +78,7 @@ static unsigned int checkAvail(unsigned int ot, unsigned int avail) {
return DECKERROR_TCGONLY; return DECKERROR_TCGONLY;
return DECKERROR_NOTAVAIL; return DECKERROR_NOTAVAIL;
} }
unsigned int DeckManager::CheckDeck(Deck& deck, int lfhash, int rule) { unsigned int DeckManager::CheckDeck(const Deck& deck, unsigned int lfhash, int rule) {
std::unordered_map<int, int> ccount; std::unordered_map<int, int> ccount;
// rule // rule
if(deck.main.size() < DECK_MIN_SIZE || deck.main.size() > DECK_MAX_SIZE) if(deck.main.size() < DECK_MIN_SIZE || deck.main.size() > DECK_MAX_SIZE)
......
...@@ -62,7 +62,7 @@ public: ...@@ -62,7 +62,7 @@ public:
void LoadLFList(); void LoadLFList();
const wchar_t* GetLFListName(unsigned int lfhash); const wchar_t* GetLFListName(unsigned int lfhash);
const LFList* GetLFList(unsigned int lfhash); const LFList* GetLFList(unsigned int lfhash);
unsigned int CheckDeck(Deck& deck, int lfhash, int rule); unsigned int CheckDeck(const Deck& deck, unsigned int lfhash, int rule);
int LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec, bool is_packlist = false); int LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec, bool is_packlist = false);
int LoadDeck(Deck& deck, std::istringstream& deckStream, bool is_packlist = false); int LoadDeck(Deck& deck, std::istringstream& deckStream, bool is_packlist = false);
bool LoadSide(Deck& deck, int* dbuf, int mainc, int sidec); bool LoadSide(Deck& deck, int* dbuf, int mainc, int sidec);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
project "cminiaudio"
kind "StaticLib"
files { "*.c", "*.h" }
filter "action:vs*"
forceincludes { "stb_vorbis.h" }
filter "not action:vs*"
forceincludes { "./stb_vorbis.h" }
filter "system:linux"
links { "dl", "pthread", "m" }
This source diff could not be displayed because it is too large. You can view the blob instead.
//////////////////////////////////////////////////////////////////////////////
//
// HEADER BEGINS HERE
//
#ifndef STB_VORBIS_INCLUDE_STB_VORBIS_H
#define STB_VORBIS_INCLUDE_STB_VORBIS_H
#if defined(STB_VORBIS_NO_CRT) && !defined(STB_VORBIS_NO_STDIO)
#define STB_VORBIS_NO_STDIO 1
#endif
#ifndef STB_VORBIS_NO_STDIO
#include <stdio.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/////////// THREAD SAFETY
// Individual stb_vorbis* handles are not thread-safe; you cannot decode from
// them from multiple threads at the same time. However, you can have multiple
// stb_vorbis* handles and decode from them independently in multiple thrads.
/////////// MEMORY ALLOCATION
// normally stb_vorbis uses malloc() to allocate memory at startup,
// and alloca() to allocate temporary memory during a frame on the
// stack. (Memory consumption will depend on the amount of setup
// data in the file and how you set the compile flags for speed
// vs. size. In my test files the maximal-size usage is ~150KB.)
//
// You can modify the wrapper functions in the source (setup_malloc,
// setup_temp_malloc, temp_malloc) to change this behavior, or you
// can use a simpler allocation model: you pass in a buffer from
// which stb_vorbis will allocate _all_ its memory (including the
// temp memory). "open" may fail with a VORBIS_outofmem if you
// do not pass in enough data; there is no way to determine how
// much you do need except to succeed (at which point you can
// query get_info to find the exact amount required. yes I know
// this is lame).
//
// If you pass in a non-NULL buffer of the type below, allocation
// will occur from it as described above. Otherwise just pass NULL
// to use malloc()/alloca()
typedef struct
{
char *alloc_buffer;
int alloc_buffer_length_in_bytes;
} stb_vorbis_alloc;
/////////// FUNCTIONS USEABLE WITH ALL INPUT MODES
typedef struct stb_vorbis stb_vorbis;
typedef struct
{
unsigned int sample_rate;
int channels;
unsigned int setup_memory_required;
unsigned int setup_temp_memory_required;
unsigned int temp_memory_required;
int max_frame_size;
} stb_vorbis_info;
// get general information about the file
extern stb_vorbis_info stb_vorbis_get_info(stb_vorbis *f);
// get the last error detected (clears it, too)
extern int stb_vorbis_get_error(stb_vorbis *f);
// close an ogg vorbis file and free all memory in use
extern void stb_vorbis_close(stb_vorbis *f);
// this function returns the offset (in samples) from the beginning of the
// file that will be returned by the next decode, if it is known, or -1
// otherwise. after a flush_pushdata() call, this may take a while before
// it becomes valid again.
// NOT WORKING YET after a seek with PULLDATA API
extern int stb_vorbis_get_sample_offset(stb_vorbis *f);
// returns the current seek point within the file, or offset from the beginning
// of the memory buffer. In pushdata mode it returns 0.
extern unsigned int stb_vorbis_get_file_offset(stb_vorbis *f);
/////////// PUSHDATA API
#ifndef STB_VORBIS_NO_PUSHDATA_API
// this API allows you to get blocks of data from any source and hand
// them to stb_vorbis. you have to buffer them; stb_vorbis will tell
// you how much it used, and you have to give it the rest next time;
// and stb_vorbis may not have enough data to work with and you will
// need to give it the same data again PLUS more. Note that the Vorbis
// specification does not bound the size of an individual frame.
extern stb_vorbis *stb_vorbis_open_pushdata(
unsigned char *datablock, int datablock_length_in_bytes,
int *datablock_memory_consumed_in_bytes,
int *error,
stb_vorbis_alloc *alloc_buffer);
// create a vorbis decoder by passing in the initial data block containing
// the ogg&vorbis headers (you don't need to do parse them, just provide
// the first N bytes of the file--you're told if it's not enough, see below)
// on success, returns an stb_vorbis *, does not set error, returns the amount of
// data parsed/consumed on this call in *datablock_memory_consumed_in_bytes;
// on failure, returns NULL on error and sets *error, does not change *datablock_memory_consumed
// if returns NULL and *error is VORBIS_need_more_data, then the input block was
// incomplete and you need to pass in a larger block from the start of the file
extern int stb_vorbis_decode_frame_pushdata(
stb_vorbis *f, unsigned char *datablock, int datablock_length_in_bytes,
int *channels, // place to write number of float * buffers
float ***output, // place to write float ** array of float * buffers
int *samples // place to write number of output samples
);
// decode a frame of audio sample data if possible from the passed-in data block
//
// return value: number of bytes we used from datablock
//
// possible cases:
// 0 bytes used, 0 samples output (need more data)
// N bytes used, 0 samples output (resynching the stream, keep going)
// N bytes used, M samples output (one frame of data)
// note that after opening a file, you will ALWAYS get one N-bytes,0-sample
// frame, because Vorbis always "discards" the first frame.
//
// Note that on resynch, stb_vorbis will rarely consume all of the buffer,
// instead only datablock_length_in_bytes-3 or less. This is because it wants
// to avoid missing parts of a page header if they cross a datablock boundary,
// without writing state-machiney code to record a partial detection.
//
// The number of channels returned are stored in *channels (which can be
// NULL--it is always the same as the number of channels reported by
// get_info). *output will contain an array of float* buffers, one per
// channel. In other words, (*output)[0][0] contains the first sample from
// the first channel, and (*output)[1][0] contains the first sample from
// the second channel.
extern void stb_vorbis_flush_pushdata(stb_vorbis *f);
// inform stb_vorbis that your next datablock will not be contiguous with
// previous ones (e.g. you've seeked in the data); future attempts to decode
// frames will cause stb_vorbis to resynchronize (as noted above), and
// once it sees a valid Ogg page (typically 4-8KB, as large as 64KB), it
// will begin decoding the _next_ frame.
//
// if you want to seek using pushdata, you need to seek in your file, then
// call stb_vorbis_flush_pushdata(), then start calling decoding, then once
// decoding is returning you data, call stb_vorbis_get_sample_offset, and
// if you don't like the result, seek your file again and repeat.
#endif
////////// PULLING INPUT API
#ifndef STB_VORBIS_NO_PULLDATA_API
// This API assumes stb_vorbis is allowed to pull data from a source--
// either a block of memory containing the _entire_ vorbis stream, or a
// FILE * that you or it create, or possibly some other reading mechanism
// if you go modify the source to replace the FILE * case with some kind
// of callback to your code. (But if you don't support seeking, you may
// just want to go ahead and use pushdata.)
#if !defined(STB_VORBIS_NO_STDIO) && !defined(STB_VORBIS_NO_INTEGER_CONVERSION)
extern int stb_vorbis_decode_filename(const char *filename, int *channels, int *sample_rate, short **output);
#endif
#if !defined(STB_VORBIS_NO_INTEGER_CONVERSION)
extern int stb_vorbis_decode_memory(const unsigned char *mem, int len, int *channels, int *sample_rate, short **output);
#endif
// decode an entire file and output the data interleaved into a malloc()ed
// buffer stored in *output. The return value is the number of samples
// decoded, or -1 if the file could not be opened or was not an ogg vorbis file.
// When you're done with it, just free() the pointer returned in *output.
extern stb_vorbis * stb_vorbis_open_memory(const unsigned char *data, int len,
int *error, stb_vorbis_alloc *alloc_buffer);
// create an ogg vorbis decoder from an ogg vorbis stream in memory (note
// this must be the entire stream!). on failure, returns NULL and sets *error
#ifndef STB_VORBIS_NO_STDIO
extern stb_vorbis * stb_vorbis_open_filename(const char *filename,
int *error, stb_vorbis_alloc *alloc_buffer);
// create an ogg vorbis decoder from a filename via fopen(). on failure,
// returns NULL and sets *error (possibly to VORBIS_file_open_failure).
extern stb_vorbis * stb_vorbis_open_file(FILE *f, int close_handle_on_close,
int *error, stb_vorbis_alloc *alloc_buffer);
// create an ogg vorbis decoder from an open FILE *, looking for a stream at
// the _current_ seek point (ftell). on failure, returns NULL and sets *error.
// note that stb_vorbis must "own" this stream; if you seek it in between
// calls to stb_vorbis, it will become confused. Morever, if you attempt to
// perform stb_vorbis_seek_*() operations on this file, it will assume it
// owns the _entire_ rest of the file after the start point. Use the next
// function, stb_vorbis_open_file_section(), to limit it.
extern stb_vorbis * stb_vorbis_open_file_section(FILE *f, int close_handle_on_close,
int *error, stb_vorbis_alloc *alloc_buffer, unsigned int len);
// create an ogg vorbis decoder from an open FILE *, looking for a stream at
// the _current_ seek point (ftell); the stream will be of length 'len' bytes.
// on failure, returns NULL and sets *error. note that stb_vorbis must "own"
// this stream; if you seek it in between calls to stb_vorbis, it will become
// confused.
#endif
extern int stb_vorbis_seek_frame(stb_vorbis *f, unsigned int sample_number);
extern int stb_vorbis_seek(stb_vorbis *f, unsigned int sample_number);
// NOT WORKING YET
// these functions seek in the Vorbis file to (approximately) 'sample_number'.
// after calling seek_frame(), the next call to get_frame_*() will include
// the specified sample. after calling stb_vorbis_seek(), the next call to
// stb_vorbis_get_samples_* will start with the specified sample. If you
// do not need to seek to EXACTLY the target sample when using get_samples_*,
// you can also use seek_frame().
extern void stb_vorbis_seek_start(stb_vorbis *f);
// this function is equivalent to stb_vorbis_seek(f,0), but it
// actually works
extern unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f);
extern float stb_vorbis_stream_length_in_seconds(stb_vorbis *f);
// these functions return the total length of the vorbis stream
extern int stb_vorbis_get_frame_float(stb_vorbis *f, int *channels, float ***output);
// decode the next frame and return the number of samples. the number of
// channels returned are stored in *channels (which can be NULL--it is always
// the same as the number of channels reported by get_info). *output will
// contain an array of float* buffers, one per channel. These outputs will
// be overwritten on the next call to stb_vorbis_get_frame_*.
//
// You generally should not intermix calls to stb_vorbis_get_frame_*()
// and stb_vorbis_get_samples_*(), since the latter calls the former.
#ifndef STB_VORBIS_NO_INTEGER_CONVERSION
extern int stb_vorbis_get_frame_short_interleaved(stb_vorbis *f, int num_c, short *buffer, int num_shorts);
extern int stb_vorbis_get_frame_short (stb_vorbis *f, int num_c, short **buffer, int num_samples);
#endif
// decode the next frame and return the number of samples per channel. the
// data is coerced to the number of channels you request according to the
// channel coercion rules (see below). You must pass in the size of your
// buffer(s) so that stb_vorbis will not overwrite the end of the buffer.
// The maximum buffer size needed can be gotten from get_info(); however,
// the Vorbis I specification implies an absolute maximum of 4096 samples
// per channel. Note that for interleaved data, you pass in the number of
// shorts (the size of your array), but the return value is the number of
// samples per channel, not the total number of samples.
// Channel coercion rules:
// Let M be the number of channels requested, and N the number of channels present,
// and Cn be the nth channel; let stereo L be the sum of all L and center channels,
// and stereo R be the sum of all R and center channels (channel assignment from the
// vorbis spec).
// M N output
// 1 k sum(Ck) for all k
// 2 * stereo L, stereo R
// k l k > l, the first l channels, then 0s
// k l k <= l, the first k channels
// Note that this is not _good_ surround etc. mixing at all! It's just so
// you get something useful.
extern int stb_vorbis_get_samples_float_interleaved(stb_vorbis *f, int channels, float *buffer, int num_floats);
extern int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, int num_samples);
// gets num_samples samples, not necessarily on a frame boundary--this requires
// buffering so you have to supply the buffers. DOES NOT APPLY THE COERCION RULES.
// Returns the number of samples stored per channel; it may be less than requested
// at the end of the file. If there are no more samples in the file, returns 0.
#ifndef STB_VORBIS_NO_INTEGER_CONVERSION
extern int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts);
extern int stb_vorbis_get_samples_short(stb_vorbis *f, int channels, short **buffer, int num_samples);
#endif
// gets num_samples samples, not necessarily on a frame boundary--this requires
// buffering so you have to supply the buffers. Applies the coercion rules above
// to produce 'channels' channels. Returns the number of samples stored per channel;
// it may be less than requested at the end of the file. If there are no more
// samples in the file, returns 0.
#endif
//////// ERROR CODES
enum STBVorbisError
{
VORBIS__no_error,
VORBIS_need_more_data=1, // not a real error
VORBIS_invalid_api_mixing, // can't mix API modes
VORBIS_outofmem, // not enough memory
VORBIS_feature_not_supported, // uses floor 0
VORBIS_too_many_channels, // STB_VORBIS_MAX_CHANNELS is too small
VORBIS_file_open_failure, // fopen() failed
VORBIS_seek_without_length, // can't seek in unknown-length file
VORBIS_unexpected_eof=10, // file is truncated?
VORBIS_seek_invalid, // seek past EOF
// decoding errors (corrupt/invalid stream) -- you probably
// don't care about the exact details of these
// vorbis errors:
VORBIS_invalid_setup=20,
VORBIS_invalid_stream,
// ogg errors:
VORBIS_missing_capture_pattern=30,
VORBIS_invalid_stream_structure_version,
VORBIS_continued_packet_flag_invalid,
VORBIS_incorrect_stream_serial_number,
VORBIS_invalid_first_page,
VORBIS_bad_packet_type,
VORBIS_cant_find_last_page,
VORBIS_seek_failed,
};
#ifdef __cplusplus
}
#endif
#endif // STB_VORBIS_INCLUDE_STB_VORBIS_H
//
// HEADER ENDS HERE
//
//////////////////////////////////////////////////////////////////////////////
\ No newline at end of file
include "lzma/." include "lzma/."
include "spmemvfs/." include "spmemvfs/."
if USE_AUDIO then
include "miniaudio/."
end
project "YGOPro" project "YGOPro"
kind "WindowedApp" kind "WindowedApp"
cppdialect "C++14" cppdialect "C++14"
rtti "Off"
files { "*.cpp", "*.h", "CGUISkinSystem/*.cpp", "CGUISkinSystem/*.h", "CXMLRegistry/*.cpp", "CXMLRegistry/*.h" } files { "*.cpp", "*.h", "CGUISkinSystem/*.cpp", "CGUISkinSystem/*.h", "CXMLRegistry/*.cpp", "CXMLRegistry/*.h" }
includedirs { "../ocgcore" } includedirs { "../ocgcore" }
...@@ -42,7 +40,29 @@ project "YGOPro" ...@@ -42,7 +40,29 @@ project "YGOPro"
if USE_AUDIO then if USE_AUDIO then
defines { "YGOPRO_USE_AUDIO" } defines { "YGOPRO_USE_AUDIO" }
links { "cminiaudio" } if AUDIO_LIB == "miniaudio" then
defines { "YGOPRO_USE_MINIAUDIO" }
includedirs { "../miniaudio/extras/miniaudio_split" }
links { "miniaudio" }
if MINIAUDIO_SUPPORT_OPUS_VORBIS then
defines { "YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS" }
includedirs { "../miniaudio/extras/decoders/libopus", "../miniaudio/extras/decoders/libvorbis" }
if not MINIAUDIO_BUILD_OPUS_VORBIS then
links { "opusfile", "vorbisfile", "opus", "vorbis", "ogg" }
libdirs { OPUS_LIB_DIR, VORBIS_LIB_DIR, OGG_LIBDIR }
end
end
end
if AUDIO_LIB == "irrklang" then
defines { "YGOPRO_USE_IRRKLANG" }
includedirs { IRRKLANG_INCLUDE_DIR }
if not IRRKLANG_PRO then
libdirs { IRRKLANG_LIB_DIR }
end
if IRRKLANG_PRO_BUILD_IKPMP3 then
links { "ikpmp3" }
end
end
end end
filter "system:windows" filter "system:windows"
...@@ -50,8 +70,17 @@ project "YGOPro" ...@@ -50,8 +70,17 @@ project "YGOPro"
files "ygopro.rc" files "ygopro.rc"
libdirs { "$(DXSDK_DIR)Lib/x86" } libdirs { "$(DXSDK_DIR)Lib/x86" }
links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32", "Dnsapi" } links { "opengl32", "ws2_32", "winmm", "gdi32", "kernel32", "user32", "imm32", "Dnsapi" }
filter "not action:vs*" if USE_AUDIO and AUDIO_LIB == "irrklang" then
buildoptions { "-fno-rtti" } links { "irrKlang" }
if IRRKLANG_PRO then
defines { "IRRKLANG_STATIC" }
filter { "not configurations:Debug" }
libdirs { IRRKLANG_PRO_RELEASE_LIB_DIR }
filter { "configurations:Debug" }
libdirs { IRRKLANG_PRO_DEBUG_LIB_DIR }
filter {}
end
end
filter "not system:windows" filter "not system:windows"
links { "event_pthreads", "dl", "pthread", "resolv" } links { "event_pthreads", "dl", "pthread", "resolv" }
filter "system:macosx" filter "system:macosx"
...@@ -61,6 +90,13 @@ project "YGOPro" ...@@ -61,6 +90,13 @@ project "YGOPro"
buildoptions { "--target=arm64-apple-macos12" } buildoptions { "--target=arm64-apple-macos12" }
linkoptions { "-arch arm64" } linkoptions { "-arch arm64" }
end end
if USE_AUDIO and AUDIO_LIB == "irrklang" then
links { "irrklang" }
end
filter "system:linux" filter "system:linux"
linkoptions { "-static-libstdc++", "-static-libgcc" } linkoptions { "-static-libstdc++", "-static-libgcc" }
links { "GL", "X11", "Xxf86vm" } links { "GL", "X11", "Xxf86vm" }
if USE_AUDIO and AUDIO_LIB == "irrklang" then
links { "IrrKlang" }
linkoptions{ IRRKLANG_LINK_RPATH }
end
#include "sound_manager.h" #include "sound_manager.h"
#include "myfilesystem.h" #include "myfilesystem.h"
#if defined(YGOPRO_USE_MINIAUDIO) && defined(YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS)
#include <miniaudio_libopus.h>
#include <miniaudio_libvorbis.h>
#endif
#ifdef IRRKLANG_STATIC
#include "../ikpmp3/ikpMP3.h"
#endif
namespace ygo { namespace ygo {
...@@ -12,11 +19,41 @@ bool SoundManager::Init() { ...@@ -12,11 +19,41 @@ bool SoundManager::Init() {
RefreshBGMList(); RefreshBGMList();
bgm_process = false; bgm_process = false;
rnd.reset((unsigned int)std::time(nullptr)); rnd.reset((unsigned int)std::time(nullptr));
if(ma_engine_init(nullptr, &engineSound) || ma_engine_init(nullptr, &engineMusic)) { #ifdef YGOPRO_USE_MINIAUDIO
engineConfig = ma_engine_config_init();
#ifdef YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS
ma_decoding_backend_vtable* pCustomBackendVTables[] =
{
ma_decoding_backend_libvorbis,
ma_decoding_backend_libopus
};
resourceManagerConfig = ma_resource_manager_config_init();
resourceManagerConfig.ppCustomDecodingBackendVTables = pCustomBackendVTables;
resourceManagerConfig.customDecodingBackendCount = sizeof(pCustomBackendVTables) / sizeof(pCustomBackendVTables[0]);
resourceManagerConfig.pCustomDecodingBackendUserData = NULL;
if(ma_resource_manager_init(&resourceManagerConfig, &resourceManager) != MA_SUCCESS) {
return false;
}
engineConfig.pResourceManager = &resourceManager;
#endif
if(ma_engine_init(&engineConfig, &engineSound) != MA_SUCCESS || ma_engine_init(&engineConfig, &engineMusic) != MA_SUCCESS) {
return false;
} else {
return true;
}
#endif // YGOPRO_USE_MINIAUDIO
#ifdef YGOPRO_USE_IRRKLANG
engineSound = irrklang::createIrrKlangDevice();
engineMusic = irrklang::createIrrKlangDevice();
if(!engineSound || !engineMusic) {
return false; return false;
} else { } else {
#ifdef IRRKLANG_STATIC
irrklang::ikpMP3Init(engineMusic);
#endif
return true; return true;
} }
#endif // YGOPRO_USE_IRRKLANG
#endif // YGOPRO_USE_AUDIO #endif // YGOPRO_USE_AUDIO
return false; return false;
} }
...@@ -36,7 +73,12 @@ void SoundManager::RefreshBGMList() { ...@@ -36,7 +73,12 @@ void SoundManager::RefreshBGMList() {
void SoundManager::RefershBGMDir(std::wstring path, int scene) { void SoundManager::RefershBGMDir(std::wstring path, int scene) {
std::wstring search = L"./sound/BGM/" + path; std::wstring search = L"./sound/BGM/" + path;
FileSystem::TraversalDir(search.c_str(), [this, &path, scene](const wchar_t* name, bool isdir) { FileSystem::TraversalDir(search.c_str(), [this, &path, scene](const wchar_t* name, bool isdir) {
if(!isdir && (IsExtension(name, L".mp3") || IsExtension(name, L".ogg"))) { if(!isdir && (
IsExtension(name, L".mp3")
#if defined(YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS) || defined(YGOPRO_USE_IRRKLANG)
|| IsExtension(name, L".ogg")
#endif
)) {
std::wstring filename = path + L"/" + name; std::wstring filename = path + L"/" + name;
BGMList[BGM_ALL].push_back(filename); BGMList[BGM_ALL].push_back(filename);
BGMList[scene].push_back(filename); BGMList[scene].push_back(filename);
...@@ -44,6 +86,7 @@ void SoundManager::RefershBGMDir(std::wstring path, int scene) { ...@@ -44,6 +86,7 @@ void SoundManager::RefershBGMDir(std::wstring path, int scene) {
}); });
} }
void SoundManager::PlaySoundEffect(int sound) { void SoundManager::PlaySoundEffect(int sound) {
#ifdef YGOPRO_USE_AUDIO
if(!mainGame->chkEnableSound->isChecked()) if(!mainGame->chkEnableSound->isChecked())
return; return;
char soundName[32]; char soundName[32];
...@@ -113,7 +156,7 @@ void SoundManager::PlaySoundEffect(int sound) { ...@@ -113,7 +156,7 @@ void SoundManager::PlaySoundEffect(int sound) {
break; break;
} }
case SOUND_RECOVER: { case SOUND_RECOVER: {
strcpy(soundName, "recover"); strcpy(soundName, "gainlp");
break; break;
} }
case SOUND_COUNTER_ADD: { case SOUND_COUNTER_ADD: {
...@@ -125,11 +168,11 @@ void SoundManager::PlaySoundEffect(int sound) { ...@@ -125,11 +168,11 @@ void SoundManager::PlaySoundEffect(int sound) {
break; break;
} }
case SOUND_COIN: { case SOUND_COIN: {
strcpy(soundName, "coin"); strcpy(soundName, "coinflip");
break; break;
} }
case SOUND_DICE: { case SOUND_DICE: {
strcpy(soundName, "dice"); strcpy(soundName, "diceroll");
break; break;
} }
case SOUND_NEXT_TURN: { case SOUND_NEXT_TURN: {
...@@ -169,7 +212,7 @@ void SoundManager::PlaySoundEffect(int sound) { ...@@ -169,7 +212,7 @@ void SoundManager::PlaySoundEffect(int sound) {
break; break;
} }
case SOUND_CHAT: { case SOUND_CHAT: {
strcpy(soundName, "chat"); strcpy(soundName, "chatmessage");
break; break;
} }
default: default:
...@@ -177,10 +220,15 @@ void SoundManager::PlaySoundEffect(int sound) { ...@@ -177,10 +220,15 @@ void SoundManager::PlaySoundEffect(int sound) {
} }
char soundPath[40]; char soundPath[40];
std::snprintf(soundPath, 40, "./sound/%s.wav", soundName); std::snprintf(soundPath, 40, "./sound/%s.wav", soundName);
#ifdef YGOPRO_USE_AUDIO #ifdef YGOPRO_USE_MINIAUDIO
ma_engine_set_volume(&engineSound, mainGame->gameConf.sound_volume); ma_engine_set_volume(&engineSound, mainGame->gameConf.sound_volume);
auto res = ma_engine_play_sound(&engineSound, soundPath, nullptr); ma_engine_play_sound(&engineSound, soundPath, nullptr);
#endif
#ifdef YGOPRO_USE_IRRKLANG
engineSound->setSoundVolume(mainGame->gameConf.sound_volume);
engineSound->play2D(soundPath);
#endif #endif
#endif // YGOPRO_USE_AUDIO
} }
void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) { void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) {
if(element == mainGame->wMessage) { if(element == mainGame->wMessage) {
...@@ -206,8 +254,11 @@ void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) { ...@@ -206,8 +254,11 @@ void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) {
} }
} }
bool SoundManager::IsCurrentlyPlaying(char* song) { bool SoundManager::IsCurrentlyPlaying(char* song) {
#ifdef YGOPRO_USE_AUDIO #ifdef YGOPRO_USE_MINIAUDIO
return currentPlayingMusic[0] && strcmp(currentPlayingMusic, song) == 0 && ma_sound_is_playing(&soundBGM); return currentPlayingMusic[0] && strcmp(currentPlayingMusic, song) == 0 && ma_sound_is_playing(&soundBGM);
#endif
#ifdef YGOPRO_USE_IRRKLANG
return engineMusic->isCurrentlyPlaying(song);
#endif #endif
return false; return false;
} }
...@@ -217,16 +268,23 @@ void SoundManager::PlayMusic(char* song, bool loop) { ...@@ -217,16 +268,23 @@ void SoundManager::PlayMusic(char* song, bool loop) {
return; return;
if(!IsCurrentlyPlaying(song)) { if(!IsCurrentlyPlaying(song)) {
StopBGM(); StopBGM();
#ifdef YGOPRO_USE_MINIAUDIO
strcpy(currentPlayingMusic, song); strcpy(currentPlayingMusic, song);
#ifdef _WIN32 #ifdef _WIN32
wchar_t song_w[1024]; wchar_t song_w[1024];
BufferIO::DecodeUTF8(song, song_w); BufferIO::DecodeUTF8(song, song_w);
ma_sound_init_from_file_w(&engineMusic, song_w, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM); ma_sound_init_from_file_w(&engineMusic, song_w, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM);
#else #else
auto res = ma_sound_init_from_file(&engineMusic, song, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM); ma_sound_init_from_file(&engineMusic, song, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM);
#endif #endif
ma_sound_set_looping(&soundBGM, loop); ma_sound_set_looping(&soundBGM, loop);
ma_sound_start(&soundBGM); ma_sound_start(&soundBGM);
#endif
#ifdef YGOPRO_USE_IRRKLANG
engineMusic->stopAllSounds();
engineMusic->setSoundVolume(mainGame->gameConf.music_volume);
soundBGM = engineMusic->play2D(song, loop, false, true);
#endif
} }
#endif #endif
} }
...@@ -237,7 +295,11 @@ void SoundManager::PlayBGM(int scene) { ...@@ -237,7 +295,11 @@ void SoundManager::PlayBGM(int scene) {
if(!mainGame->chkMusicMode->isChecked()) if(!mainGame->chkMusicMode->isChecked())
scene = BGM_ALL; scene = BGM_ALL;
char BGMName[1024]; char BGMName[1024];
if ((scene != bgm_scene) && (bgm_scene != BGM_CUSTOM) || (scene != previous_bgm_scene) && (bgm_scene == BGM_CUSTOM) || !IsCurrentlyPlaying(currentPlayingMusic)) { #if defined(YGOPRO_USE_MINIAUDIO)
if((scene != bgm_scene) && (bgm_scene != BGM_CUSTOM) || (scene != previous_bgm_scene) && (bgm_scene == BGM_CUSTOM) || !IsCurrentlyPlaying(currentPlayingMusic)) {
#elif defined(YGOPRO_USE_IRRKLANG)
if((scene != bgm_scene) && (bgm_scene != BGM_CUSTOM) || (scene != previous_bgm_scene) && (bgm_scene == BGM_CUSTOM) || (soundBGM && soundBGM->isFinished())) {
#endif
int count = BGMList[scene].size(); int count = BGMList[scene].size();
if(count <= 0) if(count <= 0)
return; return;
...@@ -268,29 +330,44 @@ void SoundManager::PlayCustomSound(char* SoundName) { ...@@ -268,29 +330,44 @@ void SoundManager::PlayCustomSound(char* SoundName) {
#ifdef YGOPRO_USE_AUDIO #ifdef YGOPRO_USE_AUDIO
if(!mainGame->chkEnableSound->isChecked()) if(!mainGame->chkEnableSound->isChecked())
return; return;
#ifdef YGOPRO_USE_MINIAUDIO
ma_engine_set_volume(&engineSound, mainGame->gameConf.sound_volume); ma_engine_set_volume(&engineSound, mainGame->gameConf.sound_volume);
ma_engine_play_sound(&engineSound, SoundName, nullptr); ma_engine_play_sound(&engineSound, SoundName, nullptr);
#endif #endif
#ifdef YGOPRO_USE_IRRKLANG
engineSound->setSoundVolume(mainGame->gameConf.sound_volume);
engineSound->play2D(SoundName);
#endif
#endif
} }
void SoundManager::StopBGM() { void SoundManager::StopBGM() {
#ifdef YGOPRO_USE_AUDIO #ifdef YGOPRO_USE_MINIAUDIO
if(!currentPlayingMusic[0]) if(!currentPlayingMusic[0])
return; return;
memset(currentPlayingMusic, 0, sizeof(currentPlayingMusic)); memset(currentPlayingMusic, 0, sizeof(currentPlayingMusic));
ma_sound_uninit(&soundBGM); ma_sound_uninit(&soundBGM);
#endif #endif
#ifdef YGOPRO_USE_IRRKLANG
engineMusic->stopAllSounds();
#endif
} }
void SoundManager::StopSound() { void SoundManager::StopSound() {
// TODO: stop all sounds // TODO: stop all sounds
} }
void SoundManager::SetSoundVolume(double volume) { void SoundManager::SetSoundVolume(double volume) {
#ifdef YGOPRO_USE_AUDIO #ifdef YGOPRO_USE_MINIAUDIO
ma_engine_set_volume(&engineSound, volume); ma_engine_set_volume(&engineSound, volume);
#endif #endif
#ifdef YGOPRO_USE_IRRKLANG
engineSound->setSoundVolume(volume);
#endif
} }
void SoundManager::SetMusicVolume(double volume) { void SoundManager::SetMusicVolume(double volume) {
#ifdef YGOPRO_USE_AUDIO #ifdef YGOPRO_USE_MINIAUDIO
ma_engine_set_volume(&engineMusic, volume); ma_engine_set_volume(&engineMusic, volume);
#endif #endif
#ifdef YGOPRO_USE_IRRKLANG
engineMusic->setSoundVolume(volume);
#endif
} }
} }
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
#include "game.h" #include "game.h"
#include "../ocgcore/mtrandom.h" #include "../ocgcore/mtrandom.h"
#ifdef YGOPRO_USE_AUDIO #ifdef YGOPRO_USE_MINIAUDIO
#include "miniaudio/miniaudio.h" #include <miniaudio.h>
#endif
#ifdef YGOPRO_USE_IRRKLANG
#include <irrKlang.h>
#endif #endif
namespace ygo { namespace ygo {
...@@ -16,11 +19,21 @@ private: ...@@ -16,11 +19,21 @@ private:
int previous_bgm_scene; int previous_bgm_scene;
bool bgm_process; bool bgm_process;
mt19937 rnd; mt19937 rnd;
#ifdef YGOPRO_USE_AUDIO #ifdef YGOPRO_USE_MINIAUDIO
ma_engine_config engineConfig;
#ifdef YGOPRO_MINIAUDIO_SUPPORT_OPUS_VORBIS
ma_resource_manager_config resourceManagerConfig;
ma_resource_manager resourceManager;
#endif
ma_engine engineSound; ma_engine engineSound;
ma_engine engineMusic; ma_engine engineMusic;
ma_sound soundBGM; ma_sound soundBGM;
char currentPlayingMusic[1024]{}; char currentPlayingMusic[1024]{};
#endif
#ifdef YGOPRO_USE_IRRKLANG
irrklang::ISoundEngine* engineSound;
irrklang::ISoundEngine* engineMusic;
irrklang::ISound* soundBGM;
#endif #endif
void RefershBGMDir(std::wstring path, int scene); void RefershBGMDir(std::wstring path, int scene);
......
#[2025.1][2024.12 TCG][2024.10][2024.7][2024.4][2024.1][2023.10][2023.7][2023.4][2023.1][2022.10][2022.7][2022.4][2022.1][2021.10][2021.7][2021.4][2021.1][2020.10][2020.7][2020.4][2020.1][2019.10][2019.7][2019.4][2019.1][2018.10][2018.7][2018.4][2018.1][2017.10][2017.7][2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2024.9 TCG][2024.4 TCG][2024.1 TCG][2023.9 TCG][2023.6 TCG][2023.2 TCG][2022.12 TCG][2022.10 TCG][2022.5 TCG][2022.2 TCG][2021.10 TCG][2021.7 TCG][2021.3 TCG][2020.12 TCG][2020.9 TCG][2020.6 TCG][2020.4 TCG][2020.1 TCG][2019.10 TCG][2019.7 TCG][2019.4 TCG][2019.1 TCG][2018.12 TCG][2018.9 TCG][2018.5 TCG][2018.2 TCG][2017.11 TCG][2017.9 TCG][2017.6 TCG][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1] #[2025.4][2024.12 TCG][2025.1][2024.10][2024.7][2024.4][2024.1][2023.10][2023.7][2023.4][2023.1][2022.10][2022.7][2022.4][2022.1][2021.10][2021.7][2021.4][2021.1][2020.10][2020.7][2020.4][2020.1][2019.10][2019.7][2019.4][2019.1][2018.10][2018.7][2018.4][2018.1][2017.10][2017.7][2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2024.9 TCG][2024.4 TCG][2024.1 TCG][2023.9 TCG][2023.6 TCG][2023.2 TCG][2022.12 TCG][2022.10 TCG][2022.5 TCG][2022.2 TCG][2021.10 TCG][2021.7 TCG][2021.3 TCG][2020.12 TCG][2020.9 TCG][2020.6 TCG][2020.4 TCG][2020.1 TCG][2019.10 TCG][2019.7 TCG][2019.4 TCG][2019.1 TCG][2018.12 TCG][2018.9 TCG][2018.5 TCG][2018.2 TCG][2017.11 TCG][2017.9 TCG][2017.6 TCG][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
!2025.1 !2025.4
#forbidden #forbidden
20292186 0 --アーティファクト-デスサイズ
91869203 0 --アマゾネスの射手 91869203 0 --アマゾネスの射手
20663556 0 --イレカエル 20663556 0 --イレカエル
44910027 0 --ヴィクトリー・ドラゴン 44910027 0 --ヴィクトリー・ドラゴン
...@@ -79,6 +80,7 @@ ...@@ -79,6 +80,7 @@
05851097 0 --虚無空間 05851097 0 --虚無空間
93016201 0 --王宮の弾圧 93016201 0 --王宮の弾圧
61740673 0 --王宮の勅命 61740673 0 --王宮の勅命
23516703 0 --サモンリミッター
03280747 0 --第六感 03280747 0 --第六感
64697231 0 --ダスト・シュート 64697231 0 --ダスト・シュート
80604091 0 --血の代償 80604091 0 --血の代償
...@@ -86,14 +88,12 @@ ...@@ -86,14 +88,12 @@
17178486 0 --ライフチェンジャー 17178486 0 --ライフチェンジャー
28566710 0 --ラストバトル! 28566710 0 --ラストバトル!
#limit #limit
20292186 1 --アーティファクト-デスサイズ
76794549 1 --アストログラフ・マジシャン 76794549 1 --アストログラフ・マジシャン
34022970 1 --エクス・ライゼオル 34022970 1 --エクス・ライゼオル
29301450 1 --SPリトルナイト 29301450 1 --SPリトルナイト
68304193 1 --クシャトリラ・ユニコーン 68304193 1 --クシャトリラ・ユニコーン
72270339 1 --黒魔女ディアベルスター 72270339 1 --黒魔女ディアベルスター
99937011 1 --剣神官ムドラ 99937011 1 --剣神官ムドラ
34124316 1 --サイバーポッド
38814750 1 --PSYフレームギア・γ 38814750 1 --PSYフレームギア・γ
74586817 1 --PSYフレームロード・Ω 74586817 1 --PSYフレームロード・Ω
32731036 1 --深淵の獣ルベリオン 32731036 1 --深淵の獣ルベリオン
...@@ -106,6 +106,7 @@ ...@@ -106,6 +106,7 @@
90241276 1 --蛇眼の炎燐 90241276 1 --蛇眼の炎燐
13533678 1 --スプライト・ジェット 13533678 1 --スプライト・ジェット
76145933 1 --スプライト・ブルー 76145933 1 --スプライト・ブルー
35844557 1 --ソード・ライゼオル
90361010 1 --超重武者装留イワトオシ 90361010 1 --超重武者装留イワトオシ
37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ 37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ
04928565 1 --ティアラメンツ・クシャトリラ 04928565 1 --ティアラメンツ・クシャトリラ
...@@ -113,6 +114,7 @@ ...@@ -113,6 +114,7 @@
37961969 1 --ティアラメンツ・ハゥフニス 37961969 1 --ティアラメンツ・ハゥフニス
74078255 1 --ティアラメンツ・メイルゥ 74078255 1 --ティアラメンツ・メイルゥ
73956664 1 --ティアラメンツ・レイノハート 73956664 1 --ティアラメンツ・レイノハート
91800273 1 --ディメンション・アトラクター
90953320 1 --TG ハイパー・ライブラリアン 90953320 1 --TG ハイパー・ライブラリアン
91810826 1 --天盃龍チュンドラ 91810826 1 --天盃龍チュンドラ
75433814 1 --No.40 ギミック・パペット-ヘブンズ・ストリングス 75433814 1 --No.40 ギミック・パペット-ヘブンズ・ストリングス
...@@ -128,6 +130,7 @@ ...@@ -128,6 +130,7 @@
70903634 1 --封印されし者の右腕 70903634 1 --封印されし者の右腕
94689206 1 --ブロックドラゴン 94689206 1 --ブロックドラゴン
24094258 1 --ヘビーメタルフォーゼ・エレクトラム 24094258 1 --ヘビーメタルフォーゼ・エレクトラム
32061192 1 --MLICEPDormouse
60764609 1 --魔を刻むデモンスミス 60764609 1 --魔を刻むデモンスミス
77103950 1 --壱世壊=ペルレイノ 77103950 1 --壱世壊=ペルレイノ
33782437 1 --一時休戦 33782437 1 --一時休戦
...@@ -142,13 +145,14 @@ ...@@ -142,13 +145,14 @@
30336082 1 --盃満ちる燦幻荘 30336082 1 --盃満ちる燦幻荘
83764718 1 --死者蘇生 83764718 1 --死者蘇生
15443125 1 --スプライト・スターター 15443125 1 --スプライト・スターター
07477101 1 --時空の七皇
52340444 1 --閃刀機-ホーネットビット 52340444 1 --閃刀機-ホーネットビット
32807846 1 --増援 32807846 1 --増援
72892473 1 --手札抹殺 72892473 1 --手札抹殺
98567237 1 --刻まれし魔の詠聖 98567237 1 --刻まれし魔の詠聖
73628505 1 --テラ・フォーミング 73628505 1 --テラ・フォーミング
11110587 1 --隣の芝刈り
18144506 1 --ハーピィの羽根帚 18144506 1 --ハーピィの羽根帚
21347668 1 --ピュアリィ・スリーピィメモリー
75500286 1 --封印の黄金櫃 75500286 1 --封印の黄金櫃
07394770 1 --ブリリアント・フュージョン 07394770 1 --ブリリアント・フュージョン
73468603 1 --盆回し 73468603 1 --盆回し
...@@ -162,32 +166,23 @@ ...@@ -162,32 +166,23 @@
02295440 1 --ワン・フォー・ワン 02295440 1 --ワン・フォー・ワン
90846359 1 --群雄割拠 90846359 1 --群雄割拠
53334471 1 --御前試合 53334471 1 --御前試合
23516703 1 --サモンリミッター
82732705 1 --スキルドレイン 82732705 1 --スキルドレイン
24207889 1 --センサー万別 24207889 1 --センサー万別
21076084 1 --トリックスター・リンカーネイション 21076084 1 --トリックスター・リンカーネイション
23002292 1 --レッド・リブート 23002292 1 --レッド・リブート
#semi limit #semi limit
02526224 2 --炎王神獣 キリン 34124316 2 --サイバーポッド
17330916 2 --EMモンキーボード
12289247 2 --クロノグラフ・マジシャン
21377582 2 --真竜剣皇マスターP
81275020 2 --SRベイゴマックス 81275020 2 --SRベイゴマックス
23434538 2 --増殖するG 23434538 2 --増殖するG
91800273 2 --ディメンション・アトラクター
33508719 2 --メタモルポット
65734501 2 --RACEエアホイスター 65734501 2 --RACEエアホイスター
35726888 2 --おろかな副葬 35726888 2 --おろかな副葬
67723438 2 --緊急テレポート 67723438 2 --緊急テレポート
45986603 2 --強奪
49238328 2 --強欲で金満な壺 49238328 2 --強欲で金満な壺
35261759 2 --強欲で貪欲な壺 35261759 2 --強欲で貪欲な壺
46060017 2 --十二獣の会局
07477101 2 --時空の七皇
48130397 2 --超融合 48130397 2 --超融合
11110587 2 --隣の芝刈り
93729896 2 --ナイトメア・スローン 93729896 2 --ナイトメア・スローン
24224830 2 --墓穴の指名者 24224830 2 --墓穴の指名者
21347668 2 --ピュアリィ・スリーピィメモリー
52947044 2 --フュージョン・デステニー 52947044 2 --フュージョン・デステニー
92714517 2 --ビッグウェルカム・ラビュリンス 92714517 2 --ビッグウェルカム・ラビュリンス
...@@ -392,6 +387,198 @@ ...@@ -392,6 +387,198 @@
21347668 2 --Purrely Sleepy Memory 21347668 2 --Purrely Sleepy Memory
92107604 2 --Runick Fountain 92107604 2 --Runick Fountain
!2025.1
#forbidden
91869203 0 --アマゾネスの射手
20663556 0 --イレカエル
44910027 0 --ヴィクトリー・ドラゴン
27552504 0 --永遠の淑女 ベアトリーチェ
51858306 0 --エクリプス・ワイバーン
62242678 0 --琰魔竜王 レッド・デーモン・カラミティ
34945480 0 --外神アザトート
95727991 0 --カタパルト・タートル
08903700 0 --儀式魔人リリーサー
11384280 0 --キャノン・ソルジャー
17412721 0 --旧神ノーデン
32909498 0 --クシャトリラ・フェンリル
50588353 0 --水晶機巧-ハリファイバー
62320425 0 --古衛兵アギド
25926710 0 --古尖兵ケルベク
03040496 0 --混沌魔龍 カオス・ルーラー
02563463 0 --流離のグリフォンライダー
88071625 0 --The tyrant NEPTUNE
52653092 0 --SNo.0 ホープ・ゼアル
85115440 0 --十二獣ブルホーン
59537380 0 --守護竜アガーペイン
86148577 0 --守護竜エルピィ
21044178 0 --深淵に潜む者
88581108 0 --真竜皇V.F.D.
27381364 0 --スプライト・エルフ
16923472 0 --ゼンマイハンター
15341821 0 --ダンディライオン
77679716 0 --超重武者装留ブレイク・アーマー
92731385 0 --ティアラメンツ・キトカロス
69015963 0 --デビル・フランケン
79875176 0 --トゥーン・キャノン・ソルジャー
75732622 0 --トーチ・ゴーレム
22593417 0 --トポロジック・ガンブラー・ドラゴン
39064822 0 --トロイメア・ゴブリン
03679218 0 --トロイメア・マーメイド
54719828 0 --No.16 色の支配者ショック・ルーラー
63504681 0 --No.86 HC ロンゴミアント
58820923 0 --No.95 ギャラクシーアイズ・ダークマター・ドラゴン
78706415 0 --ファイバーポッド
93369354 0 --フィッシュボーグ-ガンナー
23558733 0 --フェニキシアン・クラスター・アマリリス
09929398 0 --BF-朧影のゴウフウ
70369116 0 --捕食植物ヴェルテ・アナコンダ
63101919 0 --マジックテンペスター
34206604 0 --魔導サイエンティスト
14702066 0 --メガキャノン・ソルジャー
96782886 0 --メンタルマスター
90809975 0 --餅カエル
83152482 0 --ユニオン・キャリアー
34086406 0 --ラヴァルバル・チェイン
85243784 0 --リンクロス
73356503 0 --烈風の結界像
57421866 0 --レベル・スティーラー
41482598 0 --悪夢の蜃気楼
44763025 0 --いたずら好きな双子悪魔
17375316 0 --押収
35059553 0 --カイザーコロシアム
74191942 0 --苦渋の選択
42829885 0 --強引な番兵
55144522 0 --強欲な壺
23557835 0 --次元融合
31423101 0 --神剣-フェニックスブレード
57953380 0 --生還の宝札
54447022 0 --ソウル・チャージ
60682203 0 --大寒波
69243953 0 --蝶の短剣-エルマ
79571449 0 --天使の施し
63789924 0 --盗人の煙玉
70828912 0 --早すぎた埋葬
42703248 0 --ハリケーン
76375976 0 --魔鍾洞
34906152 0 --マスドライバー
46411259 0 --突然変異
85602018 0 --遺言状
27174286 0 --異次元からの帰還
05851097 0 --虚無空間
93016201 0 --王宮の弾圧
61740673 0 --王宮の勅命
03280747 0 --第六感
64697231 0 --ダスト・シュート
80604091 0 --血の代償
32723153 0 --マジカル・エクスプロージョン
17178486 0 --ライフチェンジャー
28566710 0 --ラストバトル!
#limit
20292186 1 --アーティファクト-デスサイズ
76794549 1 --アストログラフ・マジシャン
34022970 1 --エクス・ライゼオル
29301450 1 --SPリトルナイト
68304193 1 --クシャトリラ・ユニコーン
72270339 1 --黒魔女ディアベルスター
99937011 1 --剣神官ムドラ
34124316 1 --サイバーポッド
38814750 1 --PSYフレームギア・γ
74586817 1 --PSYフレームロード・Ω
32731036 1 --深淵の獣ルベリオン
36521307 1 --斬機サーキュラー
48905153 1 --十二獣ドランシア
78872731 1 --十二獣モルモラット
06602300 1 --重爆撃禽 ボム・フェネクス
63542003 1 --宿神像ケルドウ
09674034 1 --スネークアイ・エクセル
90241276 1 --蛇眼の炎燐
13533678 1 --スプライト・ジェット
76145933 1 --スプライト・ブルー
90361010 1 --超重武者装留イワトオシ
37818794 1 --超魔導竜騎士-ドラグーン・オブ・レッドアイズ
04928565 1 --ティアラメンツ・クシャトリラ
00572850 1 --ティアラメンツ・シェイレーン
37961969 1 --ティアラメンツ・ハゥフニス
74078255 1 --ティアラメンツ・メイルゥ
73956664 1 --ティアラメンツ・レイノハート
90953320 1 --TG ハイパー・ライブラリアン
91810826 1 --天盃龍チュンドラ
75433814 1 --No.40 ギミック・パペット-ヘブンズ・ストリングス
17266660 1 --朱光の宣告者
06637331 1 --深淵の獣ドルイドヴルム
72656408 1 --深淵の獣バルドレイク
33854624 1 --深淵の獣マグナムート
80453041 1 --ファントム・オブ・ユベル
33396948 1 --封印されしエクゾディア
44519536 1 --封印されし者の左足
07902349 1 --封印されし者の左腕
08124921 1 --封印されし者の右足
70903634 1 --封印されし者の右腕
94689206 1 --ブロックドラゴン
24094258 1 --ヘビーメタルフォーゼ・エレクトラム
60764609 1 --魔を刻むデモンスミス
77103950 1 --壱世壊=ペルレイノ
33782437 1 --一時休戦
01845204 1 --簡易融合
61292243 1 --EMERGENCY
19613556 1 --大嵐
81439173 1 --おろかな埋葬
85106525 1 --篝火
84211599 1 --金満で謙虚な壺
23701465 1 --原初の種
80845034 1 --“罪宝狩りの悪魔”
30336082 1 --盃満ちる燦幻荘
83764718 1 --死者蘇生
15443125 1 --スプライト・スターター
52340444 1 --閃刀機-ホーネットビット
32807846 1 --増援
72892473 1 --手札抹殺
98567237 1 --刻まれし魔の詠聖
73628505 1 --テラ・フォーミング
18144506 1 --ハーピィの羽根帚
21347668 1 --ピュアリィ・スリーピィメモリー
75500286 1 --封印の黄金櫃
07394770 1 --ブリリアント・フュージョン
73468603 1 --盆回し
93600443 1 --マスク・チェンジ・セカンド
65681983 1 --抹殺の指名者
71832012 1 --六世壊=パライゾス
01475311 1 --闇の誘惑
44362883 1 --烙印融合
92107604 1 --神碑の泉
27970830 1 --六武の門
02295440 1 --ワン・フォー・ワン
90846359 1 --群雄割拠
53334471 1 --御前試合
23516703 1 --サモンリミッター
82732705 1 --スキルドレイン
24207889 1 --センサー万別
21076084 1 --トリックスター・リンカーネイション
23002292 1 --レッド・リブート
#semi limit
02526224 2 --炎王神獣 キリン
17330916 2 --EMモンキーボード
12289247 2 --クロノグラフ・マジシャン
21377582 2 --真竜剣皇マスターP
81275020 2 --SRベイゴマックス
23434538 2 --増殖するG
91800273 2 --ディメンション・アトラクター
33508719 2 --メタモルポット
65734501 2 --RACEエアホイスター
35726888 2 --おろかな副葬
67723438 2 --緊急テレポート
45986603 2 --強奪
49238328 2 --強欲で金満な壺
35261759 2 --強欲で貪欲な壺
46060017 2 --十二獣の会局
07477101 2 --時空の七皇
48130397 2 --超融合
11110587 2 --隣の芝刈り
93729896 2 --ナイトメア・スローン
24224830 2 --墓穴の指名者
52947044 2 --フュージョン・デステニー
92714517 2 --ビッグウェルカム・ラビュリンス
!2024.10 !2024.10
#forbidden #forbidden
91869203 0 --アマゾネスの射手 91869203 0 --アマゾネスの射手
......
Subproject commit b2d1a11ded55b3efca59065a63ef55133200a6fc Subproject commit 59563d732ecd7edf8a83d5547a3fbbf1dde2b44a
project "event" project "event"
kind "StaticLib" kind "StaticLib"
cdialect "C11"
includedirs { "include", "compat" } includedirs { "include", "compat" }
......
project "freetype" project "freetype"
kind "StaticLib" kind "StaticLib"
cdialect "C11"
includedirs { "include" } includedirs { "include" }
defines { "FT2_BUILD_LIBRARY" } defines { "FT2_BUILD_LIBRARY" }
......
defines {
"_IRR_STATIC_LIB_",
"NO_IRR_USE_NON_SYSTEM_BZLIB_",
"NO_IRR_COMPILE_WITH_BZIP2_",
"NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_",
"NO_IRR_COMPILE_WITH_DIRECT3D_8_",
"NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_",
"NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_",
"NO_IRR_COMPILE_WITH_SOFTWARE_",
"NO_IRR_COMPILE_WITH_BURNINGSVIDEO_",
"NO_IRR_COMPILE_WITH_IRR_SCENE_LOADER_",
"NO_IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_",
"NO_IRR_COMPILE_WITH_IRR_MESH_LOADER_",
"NO_IRR_COMPILE_WITH_HALFLIFE_LOADER_",
"NO_IRR_COMPILE_WITH_MD2_LOADER_",
"NO_IRR_COMPILE_WITH_MD3_LOADER_",
"NO_IRR_COMPILE_WITH_3DS_LOADER_",
"NO_IRR_COMPILE_WITH_COLLADA_LOADER_",
"NO_IRR_COMPILE_WITH_CSM_LOADER_",
"NO_IRR_COMPILE_WITH_BSP_LOADER_",
"NO_IRR_COMPILE_WITH_DMF_LOADER_",
"NO_IRR_COMPILE_WITH_LMTS_LOADER_",
"NO_IRR_COMPILE_WITH_MY3D_LOADER_",
"NO_IRR_COMPILE_WITH_OBJ_LOADER_",
"NO_IRR_COMPILE_WITH_OCT_LOADER_",
"NO_IRR_COMPILE_WITH_LWO_LOADER_",
"NO_IRR_COMPILE_WITH_STL_LOADER_",
"NO_IRR_COMPILE_WITH_PLY_LOADER_",
"NO_IRR_COMPILE_WITH_SMF_LOADER_",
"NO_IRR_COMPILE_WITH_IRR_WRITER_",
"NO_IRR_COMPILE_WITH_COLLADA_WRITER_",
"NO_IRR_COMPILE_WITH_STL_WRITER_",
"NO_IRR_COMPILE_WITH_OBJ_WRITER_",
"NO_IRR_COMPILE_WITH_PLY_WRITER_",
"NO_IRR_COMPILE_WITH_PCX_LOADER_",
"NO_IRR_COMPILE_WITH_PPM_LOADER_",
"NO_IRR_COMPILE_WITH_PSD_LOADER_",
"NO_IRR_COMPILE_WITH_TGA_LOADER_",
"NO_IRR_COMPILE_WITH_WAL_LOADER_",
"NO_IRR_COMPILE_WITH_LMP_LOADER_",
"NO_IRR_COMPILE_WITH_RGB_LOADER_",
"NO_IRR_COMPILE_WITH_PCX_WRITER_",
"NO_IRR_COMPILE_WITH_PPM_WRITER_",
"NO_IRR_COMPILE_WITH_PSD_WRITER_",
"NO_IRR_COMPILE_WITH_TGA_WRITER_",
"NO__IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_",
"NO__IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_",
"NO__IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_",
}
project "irrlicht" project "irrlicht"
kind "StaticLib" kind "StaticLib"
cdialect "C11"
includedirs { "include", "source/Irrlicht", "source/Irrlicht/jpeglib", "source/Irrlicht/libpng", "source/Irrlicht/zlib" } includedirs { "include", "source/Irrlicht", "source/Irrlicht/jpeglib", "source/Irrlicht/libpng", "source/Irrlicht/zlib" }
defines { "_IRR_STATIC_LIB_" } dofile("defines.lua")
exceptionhandling "Off" exceptionhandling "Off"
rtti "Off" rtti "Off"
files { "source/Irrlicht/CCgMaterialRenderer.cpp", files { "include/*.h",
"source/Irrlicht/CD3D9CgMaterialRenderer.cpp", "source/Irrlicht/*.cpp",
"source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp", "source/Irrlicht/lzma/*.h",
"source/Irrlicht/CDefaultSceneNodeFactory.cpp", "source/Irrlicht/lzma/*.c",
"source/Irrlicht/CGeometryCreator.cpp", "source/Irrlicht/zlib/zlib.h",
"source/Irrlicht/CMeshCache.cpp",
"source/Irrlicht/CMeshManipulator.cpp",
"source/Irrlicht/COpenGLCgMaterialRenderer.cpp",
"source/Irrlicht/CSceneManager.cpp",
"source/Irrlicht/C3DSMeshFileLoader.cpp",
"source/Irrlicht/CSMFMeshFileLoader.cpp",
"source/Irrlicht/CAnimatedMeshHalfLife.cpp",
"source/Irrlicht/CAnimatedMeshMD2.cpp",
"source/Irrlicht/CAnimatedMeshMD3.cpp",
"source/Irrlicht/CB3DMeshFileLoader.cpp",
"source/Irrlicht/CBSPMeshFileLoader.cpp",
"source/Irrlicht/CColladaFileLoader.cpp",
"source/Irrlicht/CCSMLoader.cpp",
"source/Irrlicht/CDMFLoader.cpp",
"source/Irrlicht/CIrrMeshFileLoader.cpp",
"source/Irrlicht/CLMTSMeshFileLoader.cpp",
"source/Irrlicht/CLWOMeshFileLoader.cpp",
"source/Irrlicht/CMD2MeshFileLoader.cpp",
"source/Irrlicht/CMD3MeshFileLoader.cpp",
"source/Irrlicht/CMS3DMeshFileLoader.cpp",
"source/Irrlicht/CMY3DMeshFileLoader.cpp",
"source/Irrlicht/COBJMeshFileLoader.cpp",
"source/Irrlicht/COCTLoader.cpp",
"source/Irrlicht/COgreMeshFileLoader.cpp",
"source/Irrlicht/CPLYMeshFileLoader.cpp",
"source/Irrlicht/CQ3LevelMesh.cpp",
"source/Irrlicht/CSkinnedMesh.cpp",
"source/Irrlicht/CSTLMeshFileLoader.cpp",
"source/Irrlicht/CXMeshFileLoader.cpp",
"source/Irrlicht/CAnimatedMeshSceneNode.cpp",
"source/Irrlicht/CBillboardSceneNode.cpp",
"source/Irrlicht/CBoneSceneNode.cpp",
"source/Irrlicht/CCameraSceneNode.cpp",
"source/Irrlicht/CCubeSceneNode.cpp",
"source/Irrlicht/CDummyTransformationSceneNode.cpp",
"source/Irrlicht/CEmptySceneNode.cpp",
"source/Irrlicht/CLightSceneNode.cpp",
"source/Irrlicht/CMeshSceneNode.cpp",
"source/Irrlicht/COctreeSceneNode.cpp",
"source/Irrlicht/CQuake3ShaderSceneNode.cpp",
"source/Irrlicht/CShadowVolumeSceneNode.cpp",
"source/Irrlicht/CSkyBoxSceneNode.cpp",
"source/Irrlicht/CSkyDomeSceneNode.cpp",
"source/Irrlicht/CSphereSceneNode.cpp",
"source/Irrlicht/CTerrainSceneNode.cpp",
"source/Irrlicht/CTextSceneNode.cpp",
"source/Irrlicht/CVolumeLightSceneNode.cpp",
"source/Irrlicht/CWaterSurfaceSceneNode.cpp",
"source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp",
"source/Irrlicht/CParticleAttractionAffector.cpp",
"source/Irrlicht/CParticleBoxEmitter.cpp",
"source/Irrlicht/CParticleCylinderEmitter.cpp",
"source/Irrlicht/CParticleFadeOutAffector.cpp",
"source/Irrlicht/CParticleGravityAffector.cpp",
"source/Irrlicht/CParticleMeshEmitter.cpp",
"source/Irrlicht/CParticlePointEmitter.cpp",
"source/Irrlicht/CParticleRingEmitter.cpp",
"source/Irrlicht/CParticleRotationAffector.cpp",
"source/Irrlicht/CParticleScaleAffector.cpp",
"source/Irrlicht/CParticleSphereEmitter.cpp",
"source/Irrlicht/CParticleSystemSceneNode.cpp",
"source/Irrlicht/CMetaTriangleSelector.cpp",
"source/Irrlicht/COctreeTriangleSelector.cpp",
"source/Irrlicht/CSceneCollisionManager.cpp",
"source/Irrlicht/CTerrainTriangleSelector.cpp",
"source/Irrlicht/CTriangleBBSelector.cpp",
"source/Irrlicht/CTriangleSelector.cpp",
"source/Irrlicht/CSceneLoaderIrr.cpp",
"source/Irrlicht/CSceneNodeAnimatorCameraFPS.cpp",
"source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp",
"source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp",
"source/Irrlicht/CSceneNodeAnimatorDelete.cpp",
"source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp",
"source/Irrlicht/CSceneNodeAnimatorFlyStraight.cpp",
"source/Irrlicht/CSceneNodeAnimatorFollowSpline.cpp",
"source/Irrlicht/CSceneNodeAnimatorRotation.cpp",
"source/Irrlicht/CSceneNodeAnimatorTexture.cpp",
"source/Irrlicht/CColladaMeshWriter.cpp",
"source/Irrlicht/CIrrMeshWriter.cpp",
"source/Irrlicht/COBJMeshWriter.cpp",
"source/Irrlicht/CPLYMeshWriter.cpp",
"source/Irrlicht/CSTLMeshWriter.cpp",
"source/Irrlicht/CVideoModeList.cpp",
"source/Irrlicht/CSoftwareDriver.cpp",
"source/Irrlicht/CSoftwareTexture.cpp",
"source/Irrlicht/CTRFlat.cpp",
"source/Irrlicht/CTRFlatWire.cpp",
"source/Irrlicht/CTRGouraud.cpp",
"source/Irrlicht/CTRGouraudWire.cpp",
"source/Irrlicht/CTRTextureFlat.cpp",
"source/Irrlicht/CTRTextureFlatWire.cpp",
"source/Irrlicht/CTRTextureGouraud.cpp",
"source/Irrlicht/CTRTextureGouraudAdd.cpp",
"source/Irrlicht/CTRTextureGouraudNoZ.cpp",
"source/Irrlicht/CTRTextureGouraudWire.cpp",
"source/Irrlicht/CZBuffer.cpp",
"source/Irrlicht/COpenGLDriver.cpp",
"source/Irrlicht/COpenGLExtensionHandler.cpp",
"source/Irrlicht/COpenGLNormalMapRenderer.cpp",
"source/Irrlicht/COpenGLParallaxMapRenderer.cpp",
"source/Irrlicht/COpenGLShaderMaterialRenderer.cpp",
"source/Irrlicht/COpenGLSLMaterialRenderer.cpp",
"source/Irrlicht/COpenGLTexture.cpp",
"source/Irrlicht/CD3D8Driver.cpp",
"source/Irrlicht/CD3D8NormalMapRenderer.cpp",
"source/Irrlicht/CD3D8ParallaxMapRenderer.cpp",
"source/Irrlicht/CD3D8ShaderMaterialRenderer.cpp",
"source/Irrlicht/CD3D8Texture.cpp",
"source/Irrlicht/CColorConverter.cpp",
"source/Irrlicht/CFPSCounter.cpp",
"source/Irrlicht/CImage.cpp",
"source/Irrlicht/CNullDriver.cpp",
"source/Irrlicht/CImageWriterBMP.cpp",
"source/Irrlicht/CImageWriterJPG.cpp",
"source/Irrlicht/CImageWriterPCX.cpp",
"source/Irrlicht/CImageWriterPNG.cpp",
"source/Irrlicht/CImageWriterPPM.cpp",
"source/Irrlicht/CImageWriterPSD.cpp",
"source/Irrlicht/CImageWriterTGA.cpp",
"source/Irrlicht/CImageLoaderBMP.cpp",
"source/Irrlicht/CImageLoaderDDS.cpp",
"source/Irrlicht/CImageLoaderJPG.cpp",
"source/Irrlicht/CImageLoaderPCX.cpp",
"source/Irrlicht/CImageLoaderPNG.cpp",
"source/Irrlicht/CImageLoaderPPM.cpp",
"source/Irrlicht/CImageLoaderPSD.cpp",
"source/Irrlicht/CImageLoaderRGB.cpp",
"source/Irrlicht/CImageLoaderTGA.cpp",
"source/Irrlicht/CImageLoaderWAL.cpp",
"source/Irrlicht/CD3D9Driver.cpp",
"source/Irrlicht/CD3D9HLSLMaterialRenderer.cpp",
"source/Irrlicht/CD3D9NormalMapRenderer.cpp",
"source/Irrlicht/CD3D9ParallaxMapRenderer.cpp",
"source/Irrlicht/CD3D9ShaderMaterialRenderer.cpp",
"source/Irrlicht/CD3D9Texture.cpp",
"source/Irrlicht/CBurningShader_Raster_Reference.cpp",
"source/Irrlicht/CDepthBuffer.cpp",
"source/Irrlicht/CSoftwareDriver2.cpp",
"source/Irrlicht/CSoftwareTexture2.cpp",
"source/Irrlicht/CTRGouraud2.cpp",
"source/Irrlicht/CTRGouraudAlpha2.cpp",
"source/Irrlicht/CTRGouraudAlphaNoZ2.cpp",
"source/Irrlicht/CTRNormalMap.cpp",
"source/Irrlicht/CTRStencilShadow.cpp",
"source/Irrlicht/CTRTextureBlend.cpp",
"source/Irrlicht/CTRTextureDetailMap2.cpp",
"source/Irrlicht/CTRTextureGouraud2.cpp",
"source/Irrlicht/CTRTextureGouraudAdd2.cpp",
"source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp",
"source/Irrlicht/CTRTextureGouraudAlpha.cpp",
"source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp",
"source/Irrlicht/CTRTextureGouraudNoZ2.cpp",
"source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp",
"source/Irrlicht/CTRTextureLightMap2_Add.cpp",
"source/Irrlicht/CTRTextureLightMap2_M1.cpp",
"source/Irrlicht/CTRTextureLightMap2_M2.cpp",
"source/Irrlicht/CTRTextureLightMap2_M4.cpp",
"source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp",
"source/Irrlicht/CTRTextureWire2.cpp",
"source/Irrlicht/IBurningShader.cpp",
"source/Irrlicht/CLogger.cpp",
"source/Irrlicht/COSOperator.cpp",
"source/Irrlicht/Irrlicht.cpp",
"source/Irrlicht/os.cpp",
"source/Irrlicht/lzma/LzmaDec.c",
"source/Irrlicht/zlib/adler32.c", "source/Irrlicht/zlib/adler32.c",
"source/Irrlicht/zlib/compress.c", "source/Irrlicht/zlib/compress.c",
"source/Irrlicht/zlib/crc32.h",
"source/Irrlicht/zlib/crc32.c", "source/Irrlicht/zlib/crc32.c",
"source/Irrlicht/zlib/deflate.h",
"source/Irrlicht/zlib/deflate.c", "source/Irrlicht/zlib/deflate.c",
"source/Irrlicht/zlib/inffast.h",
"source/Irrlicht/zlib/inffast.c", "source/Irrlicht/zlib/inffast.c",
"source/Irrlicht/zlib/inflate.h",
"source/Irrlicht/zlib/inflate.c", "source/Irrlicht/zlib/inflate.c",
"source/Irrlicht/zlib/inftrees.h",
"source/Irrlicht/zlib/inftrees.c", "source/Irrlicht/zlib/inftrees.c",
"source/Irrlicht/zlib/trees.h",
"source/Irrlicht/zlib/trees.c", "source/Irrlicht/zlib/trees.c",
"source/Irrlicht/zlib/uncompr.c", "source/Irrlicht/zlib/uncompr.c",
"source/Irrlicht/zlib/zutil.h",
"source/Irrlicht/zlib/zutil.c", "source/Irrlicht/zlib/zutil.c",
"source/Irrlicht/jpeglib/jaricom.c", "source/Irrlicht/jpeglib/jaricom.c",
"source/Irrlicht/jpeglib/jcapimin.c", "source/Irrlicht/jpeglib/jcapimin.c",
...@@ -249,73 +90,8 @@ project "irrlicht" ...@@ -249,73 +90,8 @@ project "irrlicht"
"source/Irrlicht/libpng/pngwrite.c", "source/Irrlicht/libpng/pngwrite.c",
"source/Irrlicht/libpng/pngwtran.c", "source/Irrlicht/libpng/pngwtran.c",
"source/Irrlicht/libpng/pngwutil.c", "source/Irrlicht/libpng/pngwutil.c",
"source/Irrlicht/aesGladman/aescrypt.cpp", "source/Irrlicht/aesGladman/*.h",
"source/Irrlicht/aesGladman/aeskey.cpp", "source/Irrlicht/aesGladman/*.cpp" }
"source/Irrlicht/aesGladman/aestab.cpp",
"source/Irrlicht/aesGladman/fileenc.cpp",
"source/Irrlicht/aesGladman/hmac.cpp",
"source/Irrlicht/aesGladman/prng.cpp",
"source/Irrlicht/aesGladman/pwd2key.cpp",
"source/Irrlicht/aesGladman/sha1.cpp",
"source/Irrlicht/aesGladman/sha2.cpp",
"source/Irrlicht/bzip2/blocksort.c",
"source/Irrlicht/bzip2/bzcompress.c",
"source/Irrlicht/bzip2/bzlib.c",
"source/Irrlicht/bzip2/crctable.c",
"source/Irrlicht/bzip2/decompress.c",
"source/Irrlicht/bzip2/huffman.c",
"source/Irrlicht/bzip2/randtable.c",
"source/Irrlicht/CIrrDeviceConsole.cpp",
"source/Irrlicht/CIrrDeviceFB.cpp",
"source/Irrlicht/CIrrDeviceLinux.cpp",
"source/Irrlicht/CIrrDeviceSDL.cpp",
"source/Irrlicht/CIrrDeviceStub.cpp",
"source/Irrlicht/CIrrDeviceWin32.cpp",
"source/Irrlicht/CIrrDeviceWinCE.cpp",
"source/Irrlicht/CAttributes.cpp",
"source/Irrlicht/CFileList.cpp",
"source/Irrlicht/CFileSystem.cpp",
"source/Irrlicht/CLimitReadFile.cpp",
"source/Irrlicht/CMemoryFile.cpp",
"source/Irrlicht/CMountPointReader.cpp",
"source/Irrlicht/CNPKReader.cpp",
"source/Irrlicht/CPakReader.cpp",
"source/Irrlicht/CReadFile.cpp",
"source/Irrlicht/CTarReader.cpp",
"source/Irrlicht/CWADReader.cpp",
"source/Irrlicht/CWriteFile.cpp",
"source/Irrlicht/CXMLReader.cpp",
"source/Irrlicht/CXMLWriter.cpp",
"source/Irrlicht/CZipReader.cpp",
"source/Irrlicht/irrXML.cpp",
"source/Irrlicht/CDefaultGUIElementFactory.cpp",
"source/Irrlicht/CGUIButton.cpp",
"source/Irrlicht/CGUICheckBox.cpp",
"source/Irrlicht/CGUIColorSelectDialog.cpp",
"source/Irrlicht/CGUIComboBox.cpp",
"source/Irrlicht/CGUIContextMenu.cpp",
"source/Irrlicht/CGUIEditBox.cpp",
"source/Irrlicht/CGUIEnvironment.cpp",
"source/Irrlicht/CGUIFileOpenDialog.cpp",
"source/Irrlicht/CGUIFont.cpp",
"source/Irrlicht/CGUIImage.cpp",
"source/Irrlicht/CGUIImageList.cpp",
"source/Irrlicht/CGUIInOutFader.cpp",
"source/Irrlicht/CGUIListBox.cpp",
"source/Irrlicht/CGUIMenu.cpp",
"source/Irrlicht/CGUIMeshViewer.cpp",
"source/Irrlicht/CGUIMessageBox.cpp",
"source/Irrlicht/CGUIModalScreen.cpp",
"source/Irrlicht/CGUIScrollBar.cpp",
"source/Irrlicht/CGUISkin.cpp",
"source/Irrlicht/CGUISpinBox.cpp",
"source/Irrlicht/CGUISpriteBank.cpp",
"source/Irrlicht/CGUIStaticText.cpp",
"source/Irrlicht/CGUITabControl.cpp",
"source/Irrlicht/CGUITable.cpp",
"source/Irrlicht/CGUIToolBar.cpp",
"source/Irrlicht/CGUITreeView.cpp",
"source/Irrlicht/CGUIWindow.cpp" }
filter { "system:windows" } filter { "system:windows" }
defines { "_IRR_WCHAR_FILESYSTEM" } defines { "_IRR_WCHAR_FILESYSTEM" }
......
project "miniaudio"
kind "StaticLib"
files { "extras/miniaudio_split/miniaudio.*" }
defines { "MA_NO_ENCODING", "MA_NO_GENERATION", "MA_NO_NEON" }
if MINIAUDIO_SUPPORT_OPUS_VORBIS then
files { "extras/decoders/libopus/*", "extras/decoders/libvorbis/*" }
if MINIAUDIO_BUILD_OPUS_VORBIS then
files {
"external/ogg/src/bitwise.c",
"external/ogg/src/framing.c",
"external/opus/src/opus.c",
"external/opus/src/opus_decoder.c",
"external/opus/src/opus_multistream.c",
"external/opus/src/opus_multistream_decoder.c",
"external/opus/celt/bands.c",
"external/opus/celt/celt.c",
"external/opus/celt/celt_decoder.c",
"external/opus/celt/celt_lpc.c",
"external/opus/celt/cwrs.c",
"external/opus/celt/entcode.c",
"external/opus/celt/entdec.c",
"external/opus/celt/entenc.c",
"external/opus/celt/kiss_fft.c",
"external/opus/celt/laplace.c",
"external/opus/celt/mathops.c",
"external/opus/celt/mdct.c",
"external/opus/celt/modes.c",
"external/opus/celt/pitch.c",
"external/opus/celt/quant_bands.c",
"external/opus/celt/rate.c",
"external/opus/celt/vq.c",
"external/opus/celt/x86/pitch_avx.c",
"external/opus/celt/x86/pitch_sse.c",
"external/opus/celt/x86/vq_sse2.c",
"external/opus/celt/x86/x86_celt_map.c",
"external/opus/celt/x86/x86cpu.c",
"external/opus/silk/bwexpander.c",
"external/opus/silk/bwexpander_32.c",
"external/opus/silk/CNG.c",
"external/opus/silk/code_signs.c",
"external/opus/silk/dec_API.c",
"external/opus/silk/decode_core.c",
"external/opus/silk/decode_frame.c",
"external/opus/silk/decode_indices.c",
"external/opus/silk/decode_parameters.c",
"external/opus/silk/decode_pitch.c",
"external/opus/silk/decode_pulses.c",
"external/opus/silk/decoder_set_fs.c",
"external/opus/silk/gain_quant.c",
"external/opus/silk/init_decoder.c",
"external/opus/silk/lin2log.c",
"external/opus/silk/log2lin.c",
"external/opus/silk/LPC_analysis_filter.c",
"external/opus/silk/LPC_fit.c",
"external/opus/silk/LPC_inv_pred_gain.c",
"external/opus/silk/NLSF_decode.c",
"external/opus/silk/NLSF_stabilize.c",
"external/opus/silk/NLSF_unpack.c",
"external/opus/silk/NLSF2A.c",
"external/opus/silk/pitch_est_tables.c",
"external/opus/silk/PLC.c",
"external/opus/silk/resampler.c",
"external/opus/silk/resampler_private_AR2.c",
"external/opus/silk/resampler_private_down_FIR.c",
"external/opus/silk/resampler_private_IIR_FIR.c",
"external/opus/silk/resampler_private_up2_HQ.c",
"external/opus/silk/resampler_rom.c",
"external/opus/silk/shell_coder.c",
"external/opus/silk/sort.c",
"external/opus/silk/stereo_decode_pred.c",
"external/opus/silk/stereo_MS_to_LR.c",
"external/opus/silk/sum_sqr_shift.c",
"external/opus/silk/table_LSF_cos.c",
"external/opus/silk/tables_gain.c",
"external/opus/silk/tables_LTP.c",
"external/opus/silk/tables_NLSF_CB_NB_MB.c",
"external/opus/silk/tables_NLSF_CB_WB.c",
"external/opus/silk/tables_other.c",
"external/opus/silk/tables_pitch_lag.c",
"external/opus/silk/tables_pulses_per_block.c",
"external/opusfile/src/info.c",
"external/opusfile/src/internal.c",
"external/opusfile/src/opusfile.c",
"external/opusfile/src/stream.c",
"external/vorbis/lib/bitrate.c",
"external/vorbis/lib/block.c",
"external/vorbis/lib/codebook.c",
"external/vorbis/lib/envelope.c",
"external/vorbis/lib/floor0.c",
"external/vorbis/lib/floor1.c",
"external/vorbis/lib/info.c",
"external/vorbis/lib/lpc.c",
"external/vorbis/lib/lsp.c",
"external/vorbis/lib/mapping0.c",
"external/vorbis/lib/mdct.c",
"external/vorbis/lib/psy.c",
"external/vorbis/lib/registry.c",
"external/vorbis/lib/res0.c",
"external/vorbis/lib/sharedbook.c",
"external/vorbis/lib/smallft.c",
"external/vorbis/lib/synthesis.c",
"external/vorbis/lib/vorbisfile.c",
"external/vorbis/lib/window.c",
}
includedirs {
"external/ogg/include",
"external/opus/include",
"external/opus/celt",
"external/opus/silk",
"external/opusfile/include",
"external/vorbis/include",
}
defines {
"OPUS_BUILD", "USE_ALLOCA",
"OPUS_X86_PRESUME_SSE", "OPUS_X86_PRESUME_SSE2",
"OPUS_HAVE_RTCD", "OPUS_X86_MAY_HAVE_SSE", "OPUS_X86_MAY_HAVE_SSE4_1", "OPUS_X86_MAY_HAVE_AVX2",
}
else
includedirs { OPUS_INCLUDE_DIR, VORBIS_INCLUDE_DIR, OGG_INCLUDE_DIR }
end
end
filter "system:linux"
links { "dl", "pthread", "m" }
project "sqlite3" project "sqlite3"
kind "StaticLib" kind "StaticLib"
cdialect "C11"
files { "sqlite3.c", "sqlite3.h" } files { "sqlite3.c", "sqlite3.h" }
-- default global settings -- default global settings
BUILD_LUA = true BUILD_LUA = true
LUA_LIB_NAME = "lua"
BUILD_EVENT = os.istarget("windows") BUILD_EVENT = os.istarget("windows")
BUILD_FREETYPE = os.istarget("windows") BUILD_FREETYPE = os.istarget("windows")
BUILD_SQLITE = os.istarget("windows") BUILD_SQLITE = os.istarget("windows")
BUILD_IRRLICHT = not os.istarget("macosx") BUILD_IRRLICHT = not os.istarget("macosx")
LUA_LIB_NAME = "lua"
USE_AUDIO = true
AUDIO_LIB = "miniaudio"
MINIAUDIO_SUPPORT_OPUS_VORBIS = true
MINIAUDIO_BUILD_OPUS_VORBIS = os.istarget("windows")
IRRKLANG_PRO_BUILD_IKPMP3 = false
-- read settings from command line or environment variables -- read settings from command line or environment variables
...@@ -13,7 +20,7 @@ newoption { trigger = "build-lua", category = "YGOPro - lua", description = "" } ...@@ -13,7 +20,7 @@ newoption { trigger = "build-lua", category = "YGOPro - lua", description = "" }
newoption { trigger = "no-build-lua", category = "YGOPro - lua", description = "" } newoption { trigger = "no-build-lua", category = "YGOPro - lua", description = "" }
newoption { trigger = "lua-include-dir", category = "YGOPro - lua", description = "", value = "PATH" } newoption { trigger = "lua-include-dir", category = "YGOPro - lua", description = "", value = "PATH" }
newoption { trigger = "lua-lib-dir", category = "YGOPro - lua", description = "", value = "PATH" } newoption { trigger = "lua-lib-dir", category = "YGOPro - lua", description = "", value = "PATH" }
newoption { trigger = "lua-lib-name", category = "YGOPro - lua", description = "", value = "NAME", default = "lua" } newoption { trigger = "lua-lib-name", category = "YGOPro - lua", description = "", value = "NAME", default = LUA_LIB_NAME }
newoption { trigger = "lua-deb", category = "YGOPro - lua", description = "" } newoption { trigger = "lua-deb", category = "YGOPro - lua", description = "" }
newoption { trigger = "build-event", category = "YGOPro - event", description = "" } newoption { trigger = "build-event", category = "YGOPro - event", description = "" }
...@@ -35,6 +42,53 @@ newoption { trigger = "build-irrlicht", category = "YGOPro - irrlicht", descript ...@@ -35,6 +42,53 @@ newoption { trigger = "build-irrlicht", category = "YGOPro - irrlicht", descript
newoption { trigger = "no-build-irrlicht", category = "YGOPro - irrlicht", description = "" } newoption { trigger = "no-build-irrlicht", category = "YGOPro - irrlicht", description = "" }
newoption { trigger = "irrlicht-include-dir", category = "YGOPro - irrlicht", description = "", value = "PATH" } newoption { trigger = "irrlicht-include-dir", category = "YGOPro - irrlicht", description = "", value = "PATH" }
newoption { trigger = "irrlicht-lib-dir", category = "YGOPro - irrlicht", description = "", value = "PATH" } newoption { trigger = "irrlicht-lib-dir", category = "YGOPro - irrlicht", description = "", value = "PATH" }
newoption { trigger = "no-audio", category = "YGOPro", description = "" }
newoption { trigger = "audio-lib", category = "YGOPro", description = "", value = "miniaudio, irrklang", default = AUDIO_LIB }
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 = "", value = "PATH" }
newoption { trigger = "opus-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "vorbis-include-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "vorbis-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "ogg-include-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "ogg-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "use-irrklang", category = "YGOPro - irrklang", description = "Deprecated, use audio-lib=irrklang" }
newoption { trigger = "no-use-irrklang", category = "YGOPro - irrklang", description = "Deprecated, use no-audio" }
newoption { trigger = "irrklang-include-dir", category = "YGOPro - irrklang", description = "", value = "PATH" }
newoption { trigger = "irrklang-lib-dir", category = "YGOPro - irrklang", description = "", value = "PATH" }
newoption { trigger = "no-audio", category = "YGOPro", description = "" }
newoption { trigger = "audio-lib", category = "YGOPro", description = "", value = "miniaudio, irrklang", default = AUDIO_LIB }
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 = "", value = "PATH" }
newoption { trigger = "opus-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "vorbis-include-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "vorbis-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "ogg-include-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "ogg-lib-dir", category = "YGOPro - miniaudio", description = "", value = "PATH" }
newoption { trigger = "use-irrklang", category = "YGOPro - irrklang", description = "Deprecated, use audio-lib=irrklang" }
newoption { trigger = "no-use-irrklang", category = "YGOPro - irrklang", description = "Deprecated, use no-audio" }
newoption { trigger = "irrklang-include-dir", category = "YGOPro - irrklang", description = "", value = "PATH" }
newoption { trigger = "irrklang-lib-dir", category = "YGOPro - irrklang", description = "", value = "PATH" }
newoption { trigger = "irrklang-pro", category = "YGOPro - irrklang - pro", description = "" }
newoption { trigger = "no-irrklang-pro", category = "YGOPro - irrklang - pro", description = "" }
newoption { trigger = "irrklang-pro-release-lib-dir", category = "YGOPro - irrklang - pro", description = "", value = "PATH" }
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 = "winxp-support", category = "YGOPro", description = "" } newoption { trigger = "winxp-support", category = "YGOPro", description = "" }
newoption { trigger = "mac-arm", category = "YGOPro", description = "Cross compile for Apple Silicon" } newoption { trigger = "mac-arm", category = "YGOPro", description = "Cross compile for Apple Silicon" }
...@@ -143,7 +197,74 @@ if not BUILD_IRRLICHT then ...@@ -143,7 +197,74 @@ if not BUILD_IRRLICHT then
IRRLICHT_LIB_DIR = GetParam("irrlicht-lib-dir") or os.findlib("irrlicht") IRRLICHT_LIB_DIR = GetParam("irrlicht-lib-dir") or os.findlib("irrlicht")
end end
USE_AUDIO = not GetParam("no-audio") if GetParam("no-audio") then
USE_AUDIO = false
elseif GetParam("no-use-miniaudio") then
print("Warning: --no-use-miniaudio is deprecated, use --no-audio")
USE_AUDIO = false
elseif GetParam("use-miniaudio") then
print("Warning: --use-miniaudio is deprecated, use --audio-lib=miniaudio")
USE_AUDIO = true
AUDIO_LIB = "miniaudio"
elseif GetParam("no-use-irrklang") then
print("Warning: --no-use-irrklang is deprecated, use --no-audio")
USE_AUDIO = false
elseif GetParam("use-irrklang") then
print("Warning: --use-irrklang is deprecated, use --audio-lib=irrklang")
USE_AUDIO = true
AUDIO_LIB = "irrklang"
end
if USE_AUDIO then
AUDIO_LIB = GetParam("audio-lib") or AUDIO_LIB
if AUDIO_LIB == "miniaudio" then
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("no-build-opus-vorbis") then
MINIAUDIO_BUILD_OPUS_VORBIS = false
elseif GetParam("build-opus-vorbis") 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_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")
OGG_INCLUDE_DIR = GetParam("ogg-include-dir") or os.findheader("ogg")
OCG_LIB_DIR = GetParam("ogg-lib-dir") or os.findlib("ogg")
end
end
elseif AUDIO_LIB == "irrklang" then
print("Warning: irrKlang is deprecated and may be removed in future, please consider switching to miniaudio")
IRRKLANG_INCLUDE_DIR = GetParam("irrklang-include-dir") or "../irrklang/include"
if os.istarget("windows") then
IRRKLANG_LIB_DIR = "../irrklang/lib/Win32-visualStudio"
elseif os.istarget("linux") then
IRRKLANG_LIB_DIR = "../irrklang/bin/linux-gcc-64"
IRRKLANG_LINK_RPATH = "-Wl,-rpath=./irrklang/bin/linux-gcc-64/"
elseif os.istarget("macosx") then
IRRKLANG_LIB_DIR = "../irrklang/bin/macosx-gcc"
end
IRRKLANG_LIB_DIR = GetParam("irrklang-lib-dir") or IRRKLANG_LIB_DIR
if GetParam("irrklang-pro") and os.istarget("windows") then
IRRKLANG_PRO = true
elseif GetParam("no-irrklang-pro") then
IRRKLANG_PRO = false
end
if IRRKLANG_PRO then
-- irrklang pro can't use the pro lib to debug
IRRKLANG_PRO_RELEASE_LIB_DIR = GetParam("irrklang-pro-release-lib-dir") or "../irrklang/lib/Win32-vs2019"
IRRKLANG_PRO_DEBUG_LIB_DIR = GetParam("irrklang-pro-debug-lib-dir") or "../irrklang/lib/Win32-visualStudio-debug"
end
IRRKLANG_PRO_BUILD_IKPMP3 = GetParam("build-ikpmp3") or IRRKLANG_PRO
else
error("Unknown audio library: " .. AUDIO_LIB)
end
end
if GetParam("winxp-support") and os.istarget("windows") then if GetParam("winxp-support") and os.istarget("windows") then
WINXP_SUPPORT = true WINXP_SUPPORT = true
...@@ -211,7 +332,7 @@ workspace "YGOPro" ...@@ -211,7 +332,7 @@ workspace "YGOPro"
flags { "LinkTimeOptimization" } flags { "LinkTimeOptimization" }
end end
staticruntime "On" staticruntime "On"
disablewarnings { "4244", "4267", "4838", "4577", "4018", "4996", "4477", "4091", "4800", "6011", "6031", "6054", "6262" } disablewarnings { "4244", "4267", "4838", "4996", "6011", "6031", "6054", "6262" }
filter { "configurations:Release", "not action:vs*" } filter { "configurations:Release", "not action:vs*" }
symbols "On" symbols "On"
...@@ -224,6 +345,10 @@ workspace "YGOPro" ...@@ -224,6 +345,10 @@ workspace "YGOPro"
disablewarnings { "6011", "6031", "6054", "6262" } disablewarnings { "6011", "6031", "6054", "6262" }
filter "action:vs*" filter "action:vs*"
cdialect "C11"
if not WINXP_SUPPORT then
conformancemode "On"
end
vectorextensions "SSE2" vectorextensions "SSE2"
buildoptions { "/utf-8" } buildoptions { "/utf-8" }
defines { "_CRT_SECURE_NO_WARNINGS" } defines { "_CRT_SECURE_NO_WARNINGS" }
...@@ -250,3 +375,11 @@ workspace "YGOPro" ...@@ -250,3 +375,11 @@ workspace "YGOPro"
if BUILD_SQLITE then if BUILD_SQLITE then
include "sqlite3" include "sqlite3"
end end
if USE_AUDIO then
if AUDIO_LIB=="miniaudio" then
include "miniaudio"
end
if IRRKLANG_PRO_BUILD_IKPMP3 then
include "ikpmp3"
end
end
Subproject commit 12e42e616bfef3a3e4309df389540e71c8a688d9 Subproject commit 28782ebd949a70081a9f3c5c867d12cba80e756d
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment