Skip to content

Commit

Permalink
gme: update to cb2c1cc from https://github.com/libgme/game-music-emu.
Browse files Browse the repository at this point in the history
  • Loading branch information
vitamin-caig committed Nov 20, 2024
1 parent aad33b5 commit 849a5e4
Show file tree
Hide file tree
Showing 346 changed files with 31,120 additions and 58,731 deletions.
21 changes: 21 additions & 0 deletions 3rdparty/gme/.github/workflows/CI-Android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI Android

on: [push, pull_request]

jobs:
android:
name: Android
runs-on: ubuntu-latest

strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: nttld/setup-ndk@v1
id: setup_ndk
with:
ndk-version: r21e
- name: Build (Android.mk)
run: |
ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk APP_STL=c++_shared V=1
41 changes: 41 additions & 0 deletions 3rdparty/gme/.github/workflows/CI-Linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI Linux

on: [push, pull_request]

jobs:
build:
name: Linux (${{ matrix.configuration }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
configuration: [Debug, Release]
include:
- generator: Ninja
os: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential g++ cmake ninja-build libsdl2-dev
- name: Build Shared
run: |
mkdir build
cd build
cmake -G ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ..
cmake --build .
cmake --build . --target demo
cmake --build . --target demo_mem
cmake --build . --target demo_multi
cmake --build . --target gme_player
- name: Build Static
run: |
mkdir build-static
cd build-static
cmake -G ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_SHARED_LIBS=OFF ..
cmake --build .
cmake --build . --target demo
cmake --build . --target demo_mem
cmake --build . --target demo_multi
cmake --build . --target gme_player
46 changes: 46 additions & 0 deletions 3rdparty/gme/.github/workflows/CI-MacOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI macOS

on: [push, pull_request]

jobs:
build:
name: macOS (${{ matrix.configuration }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
configuration: [Debug, Release]
include:
- generator: Xcode
os: macos-latest

steps:
- uses: actions/checkout@v3
- name: Install dependencies
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: |
unset HOMEBREW_NO_INSTALL_FROM_API
brew update
brew upgrade || true
brew install sdl2
- name: Build Shared
run: |
mkdir build
cd build
cmake -G ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ..
cmake --build .
cmake --build . --target demo
cmake --build . --target demo_mem
cmake --build . --target demo_multi
cmake --build . --target gme_player
- name: Build Static
run: |
mkdir build-static
cd build-static
cmake -G ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_SHARED_LIBS=OFF ..
cmake --build .
cmake --build . --target demo
cmake --build . --target demo_mem
cmake --build . --target demo_multi
cmake --build . --target gme_player
49 changes: 49 additions & 0 deletions 3rdparty/gme/.github/workflows/CI-MinGW.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI MinGW

on: [push, pull_request]

jobs:
build:
name: MinGW-w64 (${{ matrix.configuration }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
configuration: [Debug, Release]
include:
- generator: MSYS Makefiles
os: windows-latest
defaults:
run:
shell: msys2 {0}

steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
git
base-devel
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
mingw-w64-x86_64-SDL2
- uses: actions/checkout@v3
- name: Build Shared
run: |
mkdir build
cd build
cmake -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} ..
cmake --build .
cmake --build . --target demo
cmake --build . --target demo_mem
cmake --build . --target demo_multi
cmake --build . --target gme_player
- name: Build Static
run: |
mkdir build-static
cd build-static
cmake -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_SHARED_LIBS=OFF ..
cmake --build .
cmake --build . --target demo
cmake --build . --target demo_mem
cmake --build . --target demo_multi
cmake --build . --target gme_player
25 changes: 25 additions & 0 deletions 3rdparty/gme/.github/workflows/CI-Windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI Windows

on: [push, pull_request]

jobs:
build:
name: MSVC (${{ matrix.configuration }})
runs-on: windows-latest
strategy:
matrix:
configuration: [Debug, Release]

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
vcpkg install sdl2 zlib
- name: Build Shared
run: |
cmake -B build -DCMAKE_TOOLCHAIN_FILE=C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
cmake --build build/
- name: Build Static
run: |
cmake -B build-static -DCMAKE_TOOLCHAIN_FILE=C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_SHARED_LIBS=OFF
cmake --build build-static/
18 changes: 18 additions & 0 deletions 3rdparty/gme/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Ignore "build" folder
build/*
build-*/

# Intellij-based IDE local settings
.idea/*

# Qt Creator local user settings files
*.user*

# test data
test/demo
test/demo_mem
test/cur/*
test/curm/*
test/new/*
test/newm/*

101 changes: 101 additions & 0 deletions 3rdparty/gme/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Support for Android-based projects that use ndk-build instead of CMake
#
# (Don't forget to set APP_STL=...)

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := libgme

LOCAL_CPP_FEATURES := exceptions
#LOCAL_SANITIZE := undefined

LOCAL_C_INCLUDES := $(LOCAL_PATH)/gme

# YM2612 emulator to use:
# VGM_YM2612_NUKED: LGPLv2.1+
# VGM_YM2612_MAME: GPLv2+
# VGM_YM2612_GENS: LGPLv2.1+
GME_YM2612_EMU=VGM_YM2612_NUKED

# For zlib compressed formats:
GME_ZLIB=Y

LOCAL_CFLAGS := -O2 -Wall \
-DBLARGG_LITTLE_ENDIAN=1 \
-DBLARGG_BUILD_DLL \
-DLIBGME_VISIBILITY \
-fwrapv \
-fvisibility=hidden \
-D$(GME_YM2612_EMU)

ifeq ($(GME_ZLIB),Y)
LOCAL_CFLAGS += -DHAVE_ZLIB_H
endif

LOCAL_CPPFLAGS := -std=c++11 \
-fvisibility-inlines-hidden

LOCAL_LDFLAGS := -Wl,-no-undefined
ifeq ($(GME_ZLIB),Y)
LOCAL_LDFLAGS += -lz
endif

LOCAL_SRC_FILES := \
gme/Ay_Apu.cpp \
gme/Ay_Cpu.cpp \
gme/Ay_Emu.cpp \
gme/Blip_Buffer.cpp \
gme/Classic_Emu.cpp \
gme/Data_Reader.cpp \
gme/Dual_Resampler.cpp \
gme/Effects_Buffer.cpp \
gme/Fir_Resampler.cpp \
gme/Gb_Apu.cpp \
gme/Gb_Cpu.cpp \
gme/Gb_Oscs.cpp \
gme/Gbs_Emu.cpp \
gme/Gme_File.cpp \
gme/Gym_Emu.cpp \
gme/Hes_Apu.cpp \
gme/Hes_Cpu.cpp \
gme/Hes_Emu.cpp \
gme/Kss_Cpu.cpp \
gme/Kss_Emu.cpp \
gme/Kss_Scc_Apu.cpp \
gme/M3u_Playlist.cpp \
gme/Multi_Buffer.cpp \
gme/Music_Emu.cpp \
gme/Nes_Apu.cpp \
gme/Nes_Cpu.cpp \
gme/Nes_Fme7_Apu.cpp \
gme/Nes_Namco_Apu.cpp \
gme/Nes_Oscs.cpp \
gme/Nes_Vrc6_Apu.cpp \
gme/Nes_Fds_Apu.cpp \
gme/Nes_Vrc7_Apu.cpp \
gme/Nsf_Emu.cpp \
gme/Nsfe_Emu.cpp \
gme/Sap_Apu.cpp \
gme/Sap_Cpu.cpp \
gme/Sap_Emu.cpp \
gme/Sms_Apu.cpp \
gme/Snes_Spc.cpp \
gme/Spc_Cpu.cpp \
gme/Spc_Dsp.cpp \
gme/Spc_Emu.cpp \
gme/Spc_Filter.cpp \
gme/Vgm_Emu.cpp \
gme/Vgm_Emu_Impl.cpp \
gme/Ym2413_Emu.cpp \
gme/Ym2612_Nuked.cpp \
gme/Ym2612_GENS.cpp \
gme/Ym2612_MAME.cpp \
gme/ext/emu2413.c \
gme/ext/panning.c \
gme/gme.cpp

LOCAL_EXPORT_C_INCLUDES = $(LOCAL_PATH)

include $(BUILD_SHARED_LIBRARY)
Loading

0 comments on commit 849a5e4

Please sign in to comment.