SDL_mixer can only stream a single music track
SDL_audiolib has unlimited streams.
With this change, we finally have streaming sounds (respecting
sfx_STREAM).
Audio options can now also be set via diablo.ini, which should help us
better diagnose the static noise issues.
Unfortunately, OD Beta has a major regression with SDL joystick support,
as it always reports buttons as keyboard keys instead of actual buttons.
This partially breaks external keyboard support, where e.g. space no
longer acts as expected.
However, on balance, OD Beta is better than the 2014 firmware at this
point.
This option links the tcmalloc and gperf memory profiler.
It can then be used to memory-profile individual sections of the app.
On Ubuntu, the package that provides the profiler is
`libgoogle-perftools-dev`.
This commit serves 2 purposes:
1. Fixes CMake 3.13 compatibility when using
` -DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF` (fixes#1222).
2. Ensures we do not build targets that are not depended on by us,
by passing `EXCLUDE_FROM_ALL` to `add_subdirectory`.
* Adding top-level CPACK option
* Setting CMAKE_BUILD_TYPE should always be Cache variables
This initializes CMAKE_CXX_FLAGS_RELEASE during project() correctly. With out
this, changes to CMakeLists.txt may result in a complete rebuild because
CMAKE_BUILD_TYPE wasn't in the cache before, and wasn't respected by project(),
but now it is.
https://cmake.org/pipermail/cmake/2008-September/023808.html
* Always build deb and rpm packages where possible
* Searching for .ttf instead of hard-coding it's full path
Adds a `REMAP_KEYBOARD_KEYS` CMake option.
This remapping applies wherever Game or Menu controls apply.
Uses it to map the Power button to the menu on RG350.
Generator expressions are the only way to distinguish between build
types in multi-configuration builds (Visual Studio).
This adds generator expressions for some of build type dependent
values as a starting point.
See a more detailed explanation at:
https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#build-specification-with-generator-expressions
Notably:
> Some buildsystems generated by cmake(1) have a predetermined build-configuration set in the CMAKE_BUILD_TYPE variable. The buildsystem for the IDEs such as Visual Studio and Xcode are generated independent of the build-configuration, and the actual build configuration is not known until build-time. Therefore, code such as
>
> string(TOLOWER ${CMAKE_BUILD_TYPE} _type)
> if (_type STREQUAL debug)
> target_compile_definitions(exe1 PRIVATE DEBUG_BUILD)
> endif()
>
> may appear to work for Makefile Generators and Ninja generators, but is not portable to IDE generators.
1. Can't use HWSURFACE, as the code doesn't lock it.
Double-buffering with HWSURFACE would be an alternative but the
current game rendering code doesn't play well with it due to how it
updates the UI
2. RG350 screen is RGB, not BGR (my microscope flipped the image),
16-bit is the correct color depth.
jedisct1/libsodium decided not to maintain this, so rebase on
facebookincubator/fizz as that appears to be the defacto upstream now.
There are still a few differences that we should align and hopfully
upstream.
Start and Select are swapped in this version because Start + D-Pad controls backlight on the GKD350h.
There is nothing to map mouse emulation to in this version because of this but it isn't necessary to play the game.
This version looks uglier than on RG350 because it uses software scaling beacuse the IPU on the GKD350h doesn't work.