Skip to content

Commit

Permalink
Merge pull request #3181 from carstene1ns/wii-mixer-and-output
Browse files Browse the repository at this point in the history
add wii mixer and logging cleanup
  • Loading branch information
Ghabry authored Jan 5, 2024
2 parents 92a0dc4 + 4bc9cfb commit c9ed891
Show file tree
Hide file tree
Showing 31 changed files with 456 additions and 786 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/stable-compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
description: Git Ref (Optional)
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash
Expand All @@ -24,15 +28,14 @@ jobs:
fail-fast: false
matrix:
image:
- debian:10 # oldstable | CMake 3.13.4 | G++ 8.3.0 | SDL 2.0.9
- ubuntu:20.04 # LTS | CMake 3.16.3 | G++ 9.3.0 | SDL 2.0.10
- debian:11 # stable | CMake 3.18.4 | G++ 10.2.1 | SDL 2.0.14
- ubuntu:22.04 # LTS | CMake 3.22.1 | G++ 11.2.0 | SDL 2.0.20
# version of: # CMake | g++ | SDL | support end #
# -------------------------------------------------------------
- ubuntu:20.04 # 3.16.3 | 9.3.0 | 2.0.10 | LTS (4/25) #
- debian:11 # 3.18.4 | 10.2.1 | 2.0.14 | oldstable (8/24) #
- ubuntu:22.04 # 3.22.1 | 11.2.0 | 2.0.20 | LTS (6/27) #
- debian:12 # 3.25.1 | 12.2.0 | 2.26.5 | stable (6/26) #

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]

- name: Install dependencies
run: |
export DEBIAN_FRONTEND="noninteractive"
Expand All @@ -45,10 +48,10 @@ jobs:
libdrm-dev libgbm-dev # only needed for sdl2 on debian 11
- name: Clone Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
if: github.event.inputs.git-ref == ''
- name: Clone Repository (with custom ref)
uses: actions/checkout@v2
uses: actions/checkout@v4
if: github.event.inputs.git-ref != ''
with:
ref: ${{ github.event.inputs.git-ref }}
Expand All @@ -63,8 +66,7 @@ jobs:
- name: Install
run: |
# cmake < 3.16 does not support '--install'
cmake --build build --target install
cmake --install build
- name: Test
run: |
Expand Down
30 changes: 13 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.13...3.24 FATAL_ERROR)
cmake_minimum_required(VERSION 3.16...3.28 FATAL_ERROR)

project(EasyRPG_Player VERSION 0.8
DESCRIPTION "Interpreter for RPG Maker 2000/2003 games"
Expand All @@ -22,9 +22,7 @@ set(CMAKE_CXX_EXTENSIONS ON)
# Must be at global scope, otherwise breaks -DPLAYER_BUILD_LIBLCF (see CMP0077)
option(BUILD_SHARED_LIBS "Build shared easyrpg_libretro core" ON)

if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.15.0")
option(CMAKE_FIND_PACKAGE_PREFER_CONFIG "Prefer config files over bundled FindXXX files. Set this to OFF when configuration fails and report a bug." ON)
endif()
option(CMAKE_FIND_PACKAGE_PREFER_CONFIG "Prefer config files over bundled FindXXX files. Set this to OFF when configuration fails and report a bug." ON)

# Source Files
add_library(${PROJECT_NAME} OBJECT
Expand Down Expand Up @@ -458,7 +456,6 @@ add_library(${PROJECT_NAME} OBJECT
src/window_teleport.h
src/window_varlist.cpp
src/window_varlist.h
src/external/rang.hpp
)

# These are actually unused when building in CMake
Expand Down Expand Up @@ -671,11 +668,11 @@ elseif(${PLAYER_TARGET_PLATFORM} STREQUAL "wii")
target_compile_definitions(${PROJECT_NAME} PUBLIC USE_SDL=1 PLAYER_NINTENDO)
target_include_directories(${PROJECT_NAME} PUBLIC ${SDL_INCLUDE_DIR})
target_sources(${PROJECT_NAME} PRIVATE
src/platform/wii/audio.cpp
src/platform/wii/audio.h
src/platform/wii/clock.cpp
src/platform/wii/clock.h
src/platform/wii/input_buttons.cpp
src/platform/sdl/sdl_audio.cpp
src/platform/sdl/sdl_audio.h
src/platform/sdl/axis.h
src/platform/sdl/sdl_ui.cpp
src/platform/sdl/sdl_ui.h)
Expand Down Expand Up @@ -741,8 +738,10 @@ endif()

if(NOT PLAYER_BUILD_EXECUTABLE AND BUILD_SHARED_LIBS)
# Need fPIC when compiling a shared library (e.g. libretro.so)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
include(CheckPIESupported)
check_pie_supported()
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE TRUE)
endif()

if(ANDROID)
Expand All @@ -759,6 +758,7 @@ if(WIN32)
endif()

if(APPLE)
enable_language(OBJCXX)
target_sources(${PROJECT_NAME} PRIVATE
src/platform/macos/macos_utils.mm
src/platform/macos/macos_utils.h
Expand Down Expand Up @@ -912,11 +912,9 @@ if(${PLAYER_AUDIO_BACKEND} MATCHES "^(SDL2|SDL1|libretro|psvita|3ds|switch|wii|a
if(WIN32 OR APPLE)
set(SUPPORT_NATIVE_MIDI ON)
elseif(UNIX)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.12)
find_package(ALSA)
if(ALSA_FOUND)
set(SUPPORT_NATIVE_MIDI ON)
endif()
find_package(ALSA)
if(ALSA_FOUND)
set(SUPPORT_NATIVE_MIDI ON)
endif()
endif()

Expand Down Expand Up @@ -1212,9 +1210,7 @@ elseif(${PLAYER_TARGET_PLATFORM} MATCHES "^(psvita|3ds|switch|wii)$" OR NINTENDO
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/easyrpg-player.nro
DESTINATION easyrpg-player COMPONENT switch)
elseif(NINTENDO_WII)
add_executable(easyrpg-player
src/platform/wii/main.h
src/platform/wii/main.cpp)
add_executable(easyrpg-player src/platform/wii/main.cpp)
target_link_libraries(easyrpg-player
${PROJECT_NAME}
${SDL_LIBRARIES}
Expand Down
4 changes: 1 addition & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,7 @@ libeasyrpg_player_a_SOURCES = \
src/window_teleport.cpp \
src/window_teleport.h \
src/window_varlist.cpp \
src/window_varlist.h \
src/external/rang.hpp
src/window_varlist.h

SOURCEFILES_SDL2 = \
src/platform/sdl/sdl2_ui.cpp \
Expand Down Expand Up @@ -567,7 +566,6 @@ EXTRA_DIST += \
src/platform/wii/clock.h \
src/platform/wii/input_buttons.cpp \
src/platform/wii/main.cpp \
src/platform/wii/main.h \
src/platform/windows/midiout_device_win32.cpp \
src/platform/windows/midiout_device_win32.h \
src/platform/windows/utils.cpp \
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Documentation is available at the documentation wiki: https://wiki.easyrpg.org
### minimal / required

- [liblcf] for RPG Maker data reading.
- SDL2 for screen backend support.
- SDL2 >= 2.0.5 for screen backend support.
- Pixman for low level pixel manipulation.
- libpng for PNG image support.
- zlib for XYZ image and ZIP archive support.
- fmtlib for text formatting and interal logging.
- fmtlib >= 6 for text formatting/coloring and interal logging.

### extended / recommended

Expand All @@ -36,7 +36,8 @@ Documentation is available at the documentation wiki: https://wiki.easyrpg.org
- SpeexDSP or libsamplerate for proper audio resampling.
- lhasa for LHA (.lzh) archive support.

SDL 1.2 is still supported, but deprecated.
The older SDL version 1.2 is still supported, but deprecated.
Please do not add new platform code for this library.


## Daily builds
Expand Down Expand Up @@ -97,7 +98,6 @@ EasyRPG Player makes use of the following 3rd party software:
under public domain or MIT-0
* [PicoJSON] JSON parser/serializer - Copyright (c) 2009-2010 Cybozu Labs, Inc.
Copyright (c) 2011-2015 Kazuho Oku, provided under the (2-clause) BSD license
* [rang] terminal color library - by Abhinav Gauniyal, provided under Unlicense

### 3rd party resources

Expand All @@ -123,7 +123,6 @@ EasyRPG Player makes use of the following 3rd party software:
[FMMidi]: http://unhaut.epizy.com/fmmidi
[dr_wav]: https://github.com/mackron/dr_libs
[PicoJSON]: https://github.com/kazuho/picojson
[rang]: https://github.com/agauniyal/rang
[baekmuk]: https://kldp.net/baekmuk
[Shinonome]: http://openlab.ring.gr.jp/efont/shinonome
[ttyp0]: https://people.mpi-inf.mpg.de/~uwe/misc/uw-ttyp0
Expand Down
Empty file modified src/audio_decoder_midi.cpp
100755 → 100644
Empty file.
Empty file modified src/audio_generic.cpp
100755 → 100644
Empty file.
Empty file modified src/audio_generic.h
100755 → 100644
Empty file.
8 changes: 0 additions & 8 deletions src/baseui.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,6 @@ class BaseUi {
*/
virtual bool ShowCursor(bool /* flag */) { return true; };

/**
* Outputs a debug message over custom logger. Useful for emulators.
*
* @param message message string.
* @return wether message has been logged
*/
virtual bool LogMessage(const std::string & /* message */) { return false; }

/**
* Gets if fullscreen mode is active.
*
Expand Down
Loading

0 comments on commit c9ed891

Please sign in to comment.