From be665de2a6346569299e3ad2b4deddd6107cf60e Mon Sep 17 00:00:00 2001 From: Death Killer <884052+deathkiller@users.noreply.github.com> Date: Fri, 24 Jan 2025 01:21:19 +0100 Subject: [PATCH] Refactoring --- Docs/Building.dox | 73 +++++++++++-------- Docs/Namespaces.dox | 43 +++++++---- Sources/Jazz2/UI/Cinematics.cpp | 2 +- Sources/Jazz2/UI/ControlScheme.cpp | 2 +- Sources/Jazz2/UI/ControlScheme.h | 2 +- Sources/Jazz2/UI/Menu/InGameMenu.cpp | 2 +- Sources/Jazz2/UI/Menu/MainMenu.cpp | 2 +- Sources/Main.h | 3 +- Sources/Shared/Base/TypeInfo.h | 4 +- Sources/Shared/Common.h | 8 +- Sources/Shared/CommonWindows.h | 7 ++ Sources/Shared/Containers/Array.h | 5 +- Sources/Shared/Containers/DateTime.h | 26 +++---- Sources/Shared/Containers/Reference.h | 1 + Sources/Shared/Containers/SequenceHelpers.h | 6 +- .../Shared/IO/Compression/DeflateStream.cpp | 56 ++++++++------ Sources/Shared/IO/Compression/DeflateStream.h | 2 + Sources/Shared/IO/EmscriptenFileStream.cpp | 10 +-- Sources/Shared/IO/EmscriptenFileStream.h | 2 +- Sources/Shared/IO/FileStream.cpp | 14 ++-- Sources/Shared/IO/FileStream.h | 2 +- Sources/Shared/IO/FileSystem.cpp | 1 - Sources/Shared/IO/Stream.h | 12 +++ Sources/nCine/Graphics/IGfxDevice.h | 2 +- cmake/ncine_options.cmake | 4 +- 25 files changed, 176 insertions(+), 115 deletions(-) diff --git a/Docs/Building.dox b/Docs/Building.dox index 6af41790..4ece359b 100644 --- a/Docs/Building.dox +++ b/Docs/Building.dox @@ -11,8 +11,8 @@ namespace Death { The project requires following tools and libraries to build it successfully: - **CMake** 3.15 or newer -- C++ compiler with C++17 support --- any newer version of **GCC**, **Clang** - and **MSVC** should work, **MinGW** and **Clang-CL** should be also supported +- C++ compiler with C++17 support --- any newer version of **GCC**, **Clang** and **MSVC** + should work, **MinGW** and **clang-cl** toolchains should be also supported - **OpenGL** 3.0, **OpenGL|ES** 3.0 or **WebGL** 2.0 library (alternatively **ANGLE** or **Mesa** translation library) - **GLEW** (required only on Windows) @@ -120,7 +120,7 @@ See @ref building-config-params-windows for more details. To build it for 32-bit use `Win32` instead of `x64`. To change version of VS toolset, use `-D CMAKE_GENERATOR_TOOLSET=…` parameter. By default CMake creates a new Visual Studio `.sln` solution and project files in @cpp "build" @ce directory that can be opened easily afterwards. Building -with Clang-CL is also possible specifying `-T ClangCL` parameter. +with **clang-cl** compiler is also possible specifying `-T ClangCL` parameter. @subsection building-uwp Building for Xbox (Universal Windows Platform) @@ -148,46 +148,49 @@ libraries. **GLFW** is usually preferred over **SDL2**, because it's more lightw On the other hand, **SDL2** usually has better gamepad support and better support in general. The following parameters can be used to customize the build: -- `CMAKE_BUILD_TYPE` --- Specify build configuration: `Debug`, `Release` -- `CMAKE_INSTALL_PREFIX` (default @cpp "/usr/local" @ce) --- Install prefix on Unix systems +- `CMAKE_BUILD_TYPE` --- Build configuration + - Possible values: `Debug`, `Release` +- `CMAKE_INSTALL_PREFIX` (default @cpp "/usr/local" @ce) --- Install prefix on **Unix** systems - `NCINE_DOWNLOAD_DEPENDENCIES` (default @cpp ON @ce) --- Download all missing dependencies automatically -- `NCINE_PREFERRED_BACKEND` (default @cpp "GLFW" @ce) --- Specify preferred backend on desktop: `GLFW`, `SDL2` -- `NCINE_VERSION_FROM_GIT` (default @cpp ON @ce) --- Try to set current game version from Git repository +- `NCINE_PREFERRED_BACKEND` (default @cpp "GLFW" @ce) --- Preferred backend on desktop + - Possible values: `GLFW`, `SDL2` + - Ignored on **Android** and **UWP** platforms +- `NCINE_VERSION_FROM_GIT` (default @cpp ON @ce) --- Set current game version from Git repository automatically - `NCINE_EMBED_SHADERS` (default @cpp ON @ce) --- Embed shader files inside executable -- `NCINE_PROFILING` (default @cpp OFF @ce) --- Enable profiling -- `NCINE_WITH_THREADS` (default @cpp ON @ce except on Emscripten) --- Use multiple threads for better performance -- `NCINE_WITH_OPENGLES` (default @cpp OFF @ce) --- Use **OpenGL|ES** instead of **OpenGL** -- `NCINE_WITH_ANGLE` (default @cpp OFF @ce except on UWP) --- Enable Google **ANGLE** libraries support +- `NCINE_WITH_THREADS` (default @cpp ON @ce except on Emscripten) --- Allow to use multiple threads for better performance +- `NCINE_WITH_OPENGLES` (default @cpp OFF @ce) --- Use **OpenGL|ES** library instead of **OpenGL** +- `NCINE_WITH_ANGLE` (default @cpp OFF @ce except on UWP) --- Enable Google **ANGLE** library support - `NCINE_WITH_GLEW` (default @cpp ON @ce) --- Use **GLEW** library -- `NCINE_WITH_BACKWARD` (default @cpp ON @ce) --- Enable integration with Backward for exception handling -- `NCINE_WITH_WEBP` (default @cpp OFF @ce) --- Enable `.webp` image file support -- `NCINE_WITH_AUDIO` (default @cpp ON @ce) --- Enable audio support, requires [OpenAL](https://www.openal.org/) -- `NCINE_WITH_VORBIS` (default @cpp ON @ce) -- Enable `.ogg` audio file support -- `NCINE_WITH_OPENMPT` (default @cpp ON @ce) -- Enable module music (`libopenmpt`) audio file support -- `NCINE_COMPILE_OPENMPT` (default @cpp ON @ce) -- Download and compile `libopenmpt` from source automatically +- `NCINE_WITH_BACKWARD` (default @cpp ON @ce) --- Enable better exception handling +- `NCINE_WITH_WEBP` (default @cpp OFF @ce) --- Enable `.webp` image file support, requires **libwebp** library +- `NCINE_WITH_AUDIO` (default @cpp ON @ce) --- Enable audio support, requires **OpenAL** library +- `NCINE_WITH_VORBIS` (default @cpp ON @ce) -- Enable `.ogg` audio file support, requires **libvorbis** library +- `NCINE_WITH_OPENMPT` (default @cpp ON @ce) -- Enable module music audio file support, requires **libopenmpt** library +- `NCINE_COMPILE_OPENMPT` (default @cpp ON @ce) -- Download and compile **libopenmpt** from source automatically - `NCINE_WITH_ANGELSCRIPT` (default @cpp OFF @ce) --- Enable [AngelScript](https://www.angelcode.com/angelscript/) scripting support -- `NCINE_WITH_IMGUI` (default @cpp OFF @ce) --- Enable integration with [Dear ImGui](https://github.com/ocornut/imgui) +- `NCINE_WITH_LUA` @m_class{m-label m-danger m-flat} **deprecated** --- Enable [Lua](https://www.lua.org/) scripting support +- `NCINE_WITH_IMGUI` (default @cpp OFF @ce) --- Enable integration with [Dear ImGui](https://github.com/ocornut/imgui) library - `IMGUI_VERSION_TAG` allows to specify version - `NCINE_WITH_TRACY` (default @cpp OFF @ce) --- Enable integration with [Tracy](https://github.com/wolfpld/tracy) frame profiler - `TRACY_VERSION_TAG` allows to specify version -- `NCINE_WITH_RENDERDOC` (default @cpp OFF @ce) --- Enable integration with [RenderDoc](https://renderdoc.org/) +- `NCINE_WITH_RENDERDOC` @m_class{m-label m-danger m-flat} **deprecated** --- Enable integration with [RenderDoc](https://renderdoc.org/) - `NCINE_DATA_DIR` (default @cpp "./Content" @ce) --- Path to @cpp "Content" @ce game data directory - Some build targets include @cpp "Content" @ce directory directly inside the executable package @subsubsection building-config-params-android Platform-specific parameters for Android -- `NCINE_BUILD_ANDROID` (default @cpp OFF @ce) --- Enable building for Android +- `NCINE_BUILD_ANDROID` (default @cpp OFF @ce) --- Enable building for **Android** platform - `NCINE_ASSEMBLE_APK` (default @cpp ON @ce) --- Assemble Android APK file, requires with **Gradle** -- `NCINE_UNIVERSAL_APK` (default @cpp OFF @ce) --- Create universal APK containing all specified CPU architectures - `NCINE_NDK_ARCHITECTURES` (default @cpp "arm64-v8a" @ce) --- Semicolon-separated list of target CPU architectures - Possible values: `arm64-v8a` (for 64-bit ARM), `armeabi-v7a` (for 32-bit ARM), `x86`, `x86_64` +- `NCINE_UNIVERSAL_APK` (default @cpp OFF @ce) --- Create universal APK containing all specified CPU architectures - `NDK_DIR` --- Android NDK directory, usually detected automatically @subsubsection building-config-params-linux Platform-specific parameters for Linux -- `NCINE_BUILD_FLATPAK` (default @cpp OFF @ce) --- Build Flatpak version of the game - `NCINE_ASSEMBLE_DEB` (default @cpp OFF @ce) --- Assemble DEB package of the game - `NCINE_ASSEMBLE_RPM` (default @cpp OFF @ce) --- Assemble RPM package of the game +- `NCINE_BUILD_FLATPAK` (default @cpp OFF @ce) --- Build Flatpak version of the game - `NCINE_LINUX_PACKAGE` --- Override Linux package name, otherwise @cpp "Jazz² Resurrection" @ce will be used - `NCINE_OVERRIDE_CONTENT_PATH` --- Override @cpp "Content" @ce directory path - If not specified, following path will be used: @cpp CMAKE_INSTALL_PREFIX "/share/" NCINE_LINUX_PACKAGE "/Content/" @ce @@ -199,7 +202,7 @@ The following parameters can be used to customize the build: - `DEATH_WITH_VC_LTL` (default @cpp ON @ce) --- Build with **VC-LTL** for lighter binaries, requires [VC-LTL](https://github.com/Chuyu-Team/VC-LTL5) -- `NCINE_COPY_DEPENDENCIES` (default @cpp OFF @ce) --- Copy all required libraries to build target directory +- `NCINE_COPY_DEPENDENCIES` (default @cpp OFF @ce) --- Copy all required libraries to build target directory automatically @subsubsection building-config-params-uwp Platform-specific parameters for Universal Windows Platform @@ -213,24 +216,30 @@ The following parameters can be used to customize the build: - `DEATH_CPU_USE_RUNTIME_DISPATCH` (default @cpp ON @ce if `DEATH_CPU_USE_IFUNC`) --- Build with runtime dispatch for CPU-dependent functionality, see @ref Death::Cpu - `DEATH_CPU_USE_IFUNC` (default @cpp ON @ce if supported) --- Allow using **GNU IFUNC** for runtime CPU dispatch -- `DEATH_RUNTIME_CAST` (default @cpp ON @ce) --- Enable @cpp runtime_cast() @ce optimization -- `DEATH_TRACE` (default @cpp ON @ce) --- Enable runtime event tracing +- `DEATH_RUNTIME_CAST` (default @cpp ON @ce) --- Enable @ref Death::runtime_cast() optimization +- `DEATH_TRACE` (default @cpp ON @ce) --- Enable runtime event tracing, see @ref Asserts.h - `DEATH_TRACE_ASYNC` (default @cpp ON @ce if `NCINE_WITH_THREADS`) --- Enable asynchronous processing of event tracing for better performance +- `NCINE_ADDRESS_SANITIZER` (default @cpp OFF @ce) --- Enable `AddressSanitizer` memory error detector - `NCINE_ARCH_EXTENSIONS` --- Target CPU architecture extensions (instruction sets) - - See documentation of [`/arch` (MSVC)](https://learn.microsoft.com/en-us/cpp/build/reference/arch-minimum-cpu-architecture?view=msvc-170) and [`-m` (GCC)](https://gcc.gnu.org/onlinedocs/gcc-8.4.0/gcc/Submodel-Options.html) for more details. -- `NCINE_INPUT_DEBUGGING` (default @cpp OFF @ce) --- Enable (gamepad) input debugging and logging -- `NCINE_LINKTIME_OPTIMIZATION` (default @cpp ON @ce) --- Compile with link time optimization -- `NCINE_ADDRESS_SANITIZER` (default @cpp OFF @ce) --- Enable AddressSanitizer memory error detector -- `NCINE_UNDEFINED_SANITIZER` (default @cpp OFF @ce) --- Enable UndefinedBehaviorSanitizer detector -- `NCINE_CODE_COVERAGE` (default @cpp OFF @ce) --- Enable gcov instrumentation for testing code coverage + - Depends on target CPU and compiler support + - See documentation of `/arch` ([MSVC](https://learn.microsoft.com/en-us/cpp/build/reference/arch-minimum-cpu-architecture?view=msvc-170)) and `-m` ([GCC](https://gcc.gnu.org/onlinedocs/gcc-8.4.0/gcc/Submodel-Options.html)) for more details. +- `NCINE_CODE_COVERAGE` (default @cpp OFF @ce) --- Enable `gcov` instrumentation for testing code coverage - `NCINE_GCC_HARDENING` (default @cpp OFF @ce) --- Enable memory corruption mitigation methods of GCC +- `NCINE_LINKTIME_OPTIMIZATION` (default @cpp ON @ce) --- Compile with link-time optimization +- `NCINE_UNDEFINED_SANITIZER` (default @cpp OFF @ce) --- Enable `UndefinedBehaviorSanitizer` detector + +@subsubsection building-config-params-debug Debugging parameters + - `NCINE_AUTOVECTORIZATION_REPORT` (default @cpp OFF @ce) --- Enable report generation from compiler auto-vectorization +- `NCINE_INPUT_DEBUGGING` (default @cpp OFF @ce) --- Enable extensive (gamepad) input debugging and logging +- `NCINE_PROFILING` (default @cpp OFF @ce) --- Enable profiling - `NCINE_STRIP_BINARIES` (default @cpp OFF @ce) --- Strip debug symbols from binaries for smaller size +- `NCINE_WITH_FIXED_BATCH_SIZE` (default @cpp OFF @ce) --- Enable fixed batch size for rendering @subsubsection building-config-params-game Game-specific parameters -- `SHAREWARE_DEMO_ONLY` (default @cpp OFF @ce) --- Shareware Demo only, usually used with **Emscripten** - `DISABLE_RESCALE_SHADERS` (default @cpp OFF @ce) --- Disable rescale shaders and use only nearest neighbor for resizing +- `SHAREWARE_DEMO_ONLY` (default @cpp OFF @ce) --- Shareware Demo only, usually used on **Emscripten** platform - `WITH_MULTIPLAYER` (default @cpp OFF @ce) --- Enable experimental multiplayer support */ diff --git a/Docs/Namespaces.dox b/Docs/Namespaces.dox index 1d4ff856..19e7f9cf 100644 --- a/Docs/Namespaces.dox +++ b/Docs/Namespaces.dox @@ -6,18 +6,20 @@ namespace Death { This is an API documentation for Jazz² Resurrection. For user documentation, please visit [project homepage](https://deat.tk/jazz2/). Additionaly, the project is hosted on https://github.com/deathkiller/jazz2-native/. -Jazz² Resurrection is reimplementation of the game Jazz Jackrabbit 2 released in 1998. Supports various versions of the game -(Shareware Demo, Holiday Hare '98, The Secret Files and Christmas Chronicles). Also, it partially supports some features -of JJ2+ extension and MLLE. **Online multiplayer** and **scripting support** (AngelScript) is currently in development, -everything else is already fully implemented. +Jazz² Resurrection is reimplementation of the game Jazz Jackrabbit 2 released in 1998. Supports +various versions of the game (Shareware Demo, Holiday Hare '98, The Secret Files and Christmas +Chronicles). Also, it partially supports some features of JJ2+ extension and MLLE. **Online multiplayer** +and **scripting support** (AngelScript) is currently in development, everything else, including +story episodes fully playable in cooperation, is already implemented. To get in touch with the developers and the community, you can use the official [Discord server](https://discord.gg/Y7SBvkD). -For getting started guide, see @ref building. For game-specific API documentation, see @ref Jazz2 namespace. -For common utility functions and generic containers, see @ref Death "the shared root namespace". -In addition, @ref CommonBase.h contains common configuration-specific and platform-specific definitions. -For **nCine** game engine documentation, see @ref nCine namespace. The **nCine** game engine used in this game has -been extensively modified, so the original documentation no longer matches the current implementation. +For getting started guide, see @ref building. For game-specific API documentation, see @ref Jazz2 +namespace. For common utility functions and generic containers, see @ref Death "the shared root namespace". +In addition, @ref CommonBase.h contains common configuration-specific and platform-specific +definitions. For **nCine** game engine documentation, see @ref nCine namespace. The **nCine** game +engine used in this game has been extensively modified, so the original documentation no longer +matches the current implementation. @section mainpage-platforms Supported platforms @@ -30,10 +32,11 @@ been extensively modified, so the original documentation no longer matches the c - **Xbox** (Universal Windows Platform) using ANGLE/Mesa - **Web** (WebAssembly) using [Emscripten](https://kripken.github.io/emscripten-site/) -The code is mainly optimized to run on 64-bit **x86** and **ARM** processors including advanced instruction -sets. Additionally, **OpenGL** 3.0, **OpenGL|ES** 3.0 or **WebGL** 2.0 is required to run the application. -However, Google ANGLE or Mesa can be used to translate OpenGL calls to the native graphics API. See also -@ref death-partialsupport "the list of partially supported features" that depend on specific platforms. +The code is mainly optimized to run on 64-bit **x86** and **ARM** processors including advanced +instruction sets. Additionally, **OpenGL** 3.0, **OpenGL|ES** 3.0 or **WebGL** 2.0 is required +to run the application. However, Google ANGLE or Mesa can be used to translate OpenGL calls to +the native graphics API. See also @ref death-partialsupport "the list of partially supported features" +that depend on specific platforms. @section mainpage-license License @@ -56,12 +59,17 @@ See also @ref third-party for the licenses of the libraries used. */ /** @file Shared/Asserts.h @brief Assertions and event tracing + + Most functions and macros for event tracing require `DEATH_TRACE` to be defined. Otherwise, no operation is performed. + In addition, assert statements can be suppressed with `DEATH_NO_ASSERT` define. See also @ref Death::ITraceSink + companion interface. */ /** @file Shared/CommonBase.h @brief Basic definitions - Some configuration-specific and platform-specific definitions, including `DEATH_TARGET_*`, are @ref Death.dox "listed separately". - Some of them are supplied via a compiler flag by CMake, the rest of them also requires this header file to work properly. + Some configuration-specific and platform-specific definitions, including `DEATH_TARGET_*`, are + @ref Death.dox "listed separately". Some of them are supplied via a compiler flag by CMake, + the rest of them also requires this header file to work properly. */ /** @file Shared/Common.h @brief Common header file, includes also @ref CommonBase.h, `` and `` @@ -94,6 +102,11 @@ See also @ref third-party for the licenses of the libraries used. Literals for easy construction of string views. */ +/** @file Shared/Containers/GrowableArray.h + @brief Class @ref Death::Containers::ArrayAllocator, @ref Death::Containers::ArrayNewAllocator, @ref Death::Containers::ArrayMallocAllocator, function @ref Death::Containers::arrayAllocatorCast(), @ref Death::Containers::arrayIsGrowable(), @ref Death::Containers::arrayCapacity(), @ref Death::Containers::arrayReserve(), @ref Death::Containers::arrayResize(), @ref Death::Containers::arrayAppend(), @ref Death::Containers::arrayInsert(), @ref Death::Containers::arrayRemove(), @ref Death::Containers::arrayRemoveUnordered(), @ref Death::Containers::arrayRemoveSuffix(), @ref Death::Containers::arrayClear(), @ref Death::Containers::arrayShrink() + + See @ref Containers-Array-growable for more information. + */ /** @file Shared/Containers/StringUtils.h @brief Namespace @ref Death::Containers::StringUtils */ diff --git a/Sources/Jazz2/UI/Cinematics.cpp b/Sources/Jazz2/UI/Cinematics.cpp index 69e2a9e7..758f9bde 100644 --- a/Sources/Jazz2/UI/Cinematics.cpp +++ b/Sources/Jazz2/UI/Cinematics.cpp @@ -331,7 +331,7 @@ namespace Jazz2::UI } } - _pressedActions |= ControlScheme::FetchNativation(_pressedKeys, ArrayView(joyStates, joyStatesCount)); + _pressedActions |= ControlScheme::FetchNavigation(_pressedKeys, ArrayView(joyStates, joyStatesCount)); // Also allow Menu action as skip key if (_pressedActions & (1 << (std::uint32_t)PlayerActions::Menu)) { diff --git a/Sources/Jazz2/UI/ControlScheme.cpp b/Sources/Jazz2/UI/ControlScheme.cpp index 5c33bcfd..0cbd3493 100644 --- a/Sources/Jazz2/UI/ControlScheme.cpp +++ b/Sources/Jazz2/UI/ControlScheme.cpp @@ -197,7 +197,7 @@ namespace Jazz2::UI return result; } - std::uint32_t ControlScheme::FetchNativation(const BitArray& pressedKeys, const ArrayView joyStates, NavigationFlags flags) + std::uint32_t ControlScheme::FetchNavigation(const BitArray& pressedKeys, const ArrayView joyStates, NavigationFlags flags) { std::uint32_t pressedActions = 0; std::size_t joyStateCount = joyStates.size(); diff --git a/Sources/Jazz2/UI/ControlScheme.h b/Sources/Jazz2/UI/ControlScheme.h index 6801ee9d..4bac9c9b 100644 --- a/Sources/Jazz2/UI/ControlScheme.h +++ b/Sources/Jazz2/UI/ControlScheme.h @@ -80,7 +80,7 @@ namespace Jazz2::UI /** @brief Fetches processed standard input for specified player according to the current bindings */ static ProcessedInput FetchProcessedInput(std::int32_t playerIndex, const BitArray& pressedKeys, const ArrayView joyStates, bool analogAsButtons = true); /** @brief Fetches navigation input according to the current bindings */ - static std::uint32_t FetchNativation(const BitArray& pressedKeys, const ArrayView joyStates, NavigationFlags flags = NavigationFlags::AllowAll); + static std::uint32_t FetchNavigation(const BitArray& pressedKeys, const ArrayView joyStates, NavigationFlags flags = NavigationFlags::AllowAll); /** @brief Returns the entire mapping configuration */ static ArrayView GetAllMappings(); diff --git a/Sources/Jazz2/UI/Menu/InGameMenu.cpp b/Sources/Jazz2/UI/Menu/InGameMenu.cpp index 6e188514..ae3fcbf0 100644 --- a/Sources/Jazz2/UI/Menu/InGameMenu.cpp +++ b/Sources/Jazz2/UI/Menu/InGameMenu.cpp @@ -520,7 +520,7 @@ namespace Jazz2::UI::Menu flags = lastSection->GetNavigationFlags(); } - _pressedActions |= ControlScheme::FetchNativation(_root->_pressedKeys, ArrayView(joyStates, joyStatesCount), flags); + _pressedActions |= ControlScheme::FetchNavigation(_root->_pressedKeys, ArrayView(joyStates, joyStatesCount), flags); if (_lastNavigationFlags != flags) { _lastNavigationFlags = flags; _pressedActions &= 0xffff; diff --git a/Sources/Jazz2/UI/Menu/MainMenu.cpp b/Sources/Jazz2/UI/Menu/MainMenu.cpp index ce5fe7a5..00d9c0d0 100644 --- a/Sources/Jazz2/UI/Menu/MainMenu.cpp +++ b/Sources/Jazz2/UI/Menu/MainMenu.cpp @@ -624,7 +624,7 @@ namespace Jazz2::UI::Menu flags = lastSection->GetNavigationFlags(); } - _pressedActions |= ControlScheme::FetchNativation(_pressedKeys, ArrayView(joyStates, joyStatesCount), flags); + _pressedActions |= ControlScheme::FetchNavigation(_pressedKeys, ArrayView(joyStates, joyStatesCount), flags); if (_lastNavigationFlags != flags) { _lastNavigationFlags = flags; _pressedActions &= 0xffff; diff --git a/Sources/Main.h b/Sources/Main.h index 68a918b1..f989e553 100644 --- a/Sources/Main.h +++ b/Sources/Main.h @@ -44,7 +44,7 @@ #endif // Check platform-specific capabilities -/** @brief Whether the current platform supports a gamepad rumble (see @relativeref{nCine,IInputManager::joystickRumble()}) */ +/** @brief Whether the current platform supports a gamepad rumble, see @relativeref{nCine,IInputManager::joystickRumble()} */ #if defined(WITH_SDL) || defined(DEATH_TARGET_WINDOWS_RT) || defined(DOXYGEN_GENERATING_OUTPUT) # define NCINE_HAS_GAMEPAD_RUMBLE #endif @@ -57,6 +57,7 @@ # define NCINE_HAS_WINDOWS #endif +/** @brief Function name */ #if defined(__DEATH_CURRENT_FUNCTION) # define NCINE_CURRENT_FUNCTION __DEATH_CURRENT_FUNCTION #else diff --git a/Sources/Shared/Base/TypeInfo.h b/Sources/Shared/Base/TypeInfo.h index 695c5e9c..10dfd3a0 100644 --- a/Sources/Shared/Base/TypeInfo.h +++ b/Sources/Shared/Base/TypeInfo.h @@ -270,7 +270,7 @@ namespace Death { Safely converts pointers to classes up, down, and sideways along the inheritance hierarchy of classes annotated by `DEATH_RUNTIME_OBJECT()` in an optimized way. Additionally, it can perform downcast at no performance cost. It also pulls the - actual pointer from @ref std::shared_ptr and @ref std::unique_ptr **without** + actual pointer from @ref std::shared_ptr and @ref std::unique_ptr without taking ownership. */ template @@ -316,7 +316,7 @@ namespace Death { Safely converts pointers to classes up, down, and sideways along the inheritance hierarchy of classes annotated by `DEATH_RUNTIME_OBJECT()` in an optimized way. Additionally, it can perform downcast at no performance cost. It also pulls the - actual pointer from @ref std::shared_ptr and @ref std::unique_ptr **without** + actual pointer from @ref std::shared_ptr and @ref std::unique_ptr without taking ownership. */ template diff --git a/Sources/Shared/Common.h b/Sources/Shared/Common.h index 2a320b14..a16ff02d 100644 --- a/Sources/Shared/Common.h +++ b/Sources/Shared/Common.h @@ -43,10 +43,12 @@ namespace Death { namespace Implementation { friend inline type& operator^=(type& a, type b) { return (type&)(((Death::Implementation::__EnumSizedInteger::Type&)a) ^= ((Death::Implementation::__EnumSizedInteger::Type)b)); } #endif -/** @brief Workaround for MSVC not being able to expand `__VA_ARGS__` correctly, would work with `/Zc:preprocessor`. Source: https://stackoverflow.com/a/5134656 */ +/** @brief Workaround for MSVC not being able to expand `__VA_ARGS__` correctly */ +// Source: https://stackoverflow.com/a/5134656, would work with `/Zc:preprocessor` #define DEATH_HELPER_EXPAND(...) __VA_ARGS__ -/** @brief Pick a macro implementation based on how many arguments were passed. Source: https://stackoverflow.com/a/11763277 */ +/** @brief Pick a macro implementation based on how many arguments were passed */ +// Source: https://stackoverflow.com/a/11763277 #ifdef DOXYGEN_GENERATING_OUTPUT #define DEATH_HELPER_PICK(...) #else @@ -62,7 +64,7 @@ namespace Death { namespace Implementation { #define __DEATH_REMOVE_PARENS_PASTE(x, ...) x ## __VA_ARGS__ #define __DEATH_REMOVE_PARENS_EVALUATE(x, ...) __DEATH_REMOVE_PARENS_PASTE(x, __VA_ARGS__) #endif -/** @brief Remove optional parentheses from argument */ +/** @brief Remove optional parentheses from the specified argument */ #define DEATH_REMOVE_PARENS(x) __DEATH_REMOVE_PARENS_EVALUATE(__DEATH_NOOP, __DEATH_REMOVE_PARENS_EXTRACT x) #ifndef DOXYGEN_GENERATING_OUTPUT diff --git a/Sources/Shared/CommonWindows.h b/Sources/Shared/CommonWindows.h index eda0de99..00f12739 100644 --- a/Sources/Shared/CommonWindows.h +++ b/Sources/Shared/CommonWindows.h @@ -234,6 +234,13 @@ DEATH_ALWAYS_INLINE HMENU WINAPI LoadMenu(HINSTANCE hInstance, LPCTSTR lpMenuNam } #endif +#if defined(MoveFile) +# undef MoveFile +DEATH_ALWAYS_INLINE BOOL WINAPI MoveFile(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName) { + return ::MoveFileW(lpExistingFileName, lpNewFileName); +} +#endif + #if defined(PlaySound) # undef PlaySound DEATH_ALWAYS_INLINE BOOL WINAPI PlaySound(LPCWSTR pszSound, HMODULE hMod, DWORD fdwSound) { diff --git a/Sources/Shared/Containers/Array.h b/Sources/Shared/Containers/Array.h index 3c9b241e..454f99a7 100644 --- a/Sources/Shared/Containers/Array.h +++ b/Sources/Shared/Containers/Array.h @@ -123,9 +123,8 @@ namespace Death { namespace Containers { - @ref Array(DirectInitT, std::size_t, Args&&... args) constructs all elements of the array using provided arguments. In other words, @cpp new T[size]{T{args...}, T{args...}, …} @ce. - - @ref Array(InPlaceInitT, ArrayView) - @ref Array(InPlaceInitT, std::initializer_list) or the - @ref array(ArrayView) / @ref array(std::initializer_list) + - @ref Array(InPlaceInitT, ArrayView) / @ref Array(InPlaceInitT, std::initializer_list) + or the @ref array(ArrayView) / @ref array(std::initializer_list) shorthand allocates unitialized memory and then copy-constructs all elements from the list. In other words, @cpp new T[size]{args...} @ce. The class deliberately *doesn't* provide an implicit @ref std::initializer_list diff --git a/Sources/Shared/Containers/DateTime.h b/Sources/Shared/Containers/DateTime.h index 6cfc10c7..d334d8c5 100644 --- a/Sources/Shared/Containers/DateTime.h +++ b/Sources/Shared/Containers/DateTime.h @@ -371,13 +371,13 @@ namespace Death { namespace Containers { */ constexpr TimeSpan(std::int32_t hours, std::int32_t minutes, std::int64_t seconds = 0, std::int64_t millisecs = 0) noexcept; - constexpr std::int32_t GetWeeks() const noexcept; - constexpr std::int32_t GetDays() const noexcept; - constexpr std::int32_t GetHours() const noexcept; - constexpr std::int32_t GetMinutes() const noexcept; - constexpr std::int64_t GetSeconds() const noexcept; + constexpr std::int32_t GetTotalWeeks() const noexcept; + constexpr std::int32_t GetTotalDays() const noexcept; + constexpr std::int64_t GetTotalHours() const noexcept; + constexpr std::int64_t GetTotalMinutes() const noexcept; + constexpr std::int64_t GetTotalSeconds() const noexcept; - constexpr std::int64_t GetMilliseconds() const noexcept { return _value; } + constexpr std::int64_t GetTotalMilliseconds() const noexcept { return _value; } constexpr std::int64_t GetValue() const noexcept { return _value; } constexpr TimeSpan& operator+=(const TimeSpan& ts) noexcept @@ -549,27 +549,27 @@ namespace Death { namespace Containers { _value += millisecs; } - constexpr std::int64_t TimeSpan::GetSeconds() const noexcept + constexpr std::int64_t TimeSpan::GetTotalSeconds() const noexcept { return _value / 1000; } - constexpr std::int32_t TimeSpan::GetMinutes() const noexcept + constexpr std::int64_t TimeSpan::GetTotalMinutes() const noexcept { - return static_cast(_value / (60 * 1000LL)); + return _value / (60 * 1000LL); } - constexpr std::int32_t TimeSpan::GetHours() const noexcept + constexpr std::int64_t TimeSpan::GetTotalHours() const noexcept { - return static_cast(_value / (60 * 60 * 1000LL)); + return _value / (60 * 60 * 1000LL); } - constexpr std::int32_t TimeSpan::GetDays() const noexcept + constexpr std::int32_t TimeSpan::GetTotalDays() const noexcept { return static_cast(_value / (24 * 60 * 60 * 1000LL)); } - constexpr std::int32_t TimeSpan::GetWeeks() const noexcept + constexpr std::int32_t TimeSpan::GetTotalWeeks() const noexcept { return static_cast(_value / (7 * 24 * 60 * 60 * 1000LL)); } diff --git a/Sources/Shared/Containers/Reference.h b/Sources/Shared/Containers/Reference.h index 52d606b1..87dbb8d5 100644 --- a/Sources/Shared/Containers/Reference.h +++ b/Sources/Shared/Containers/Reference.h @@ -48,6 +48,7 @@ namespace Death { namespace Containers { template class Reference { public: + /** @brief Constructor */ constexpr /*implicit*/ Reference(T& reference) noexcept : _reference{&reference} {} /** diff --git a/Sources/Shared/Containers/SequenceHelpers.h b/Sources/Shared/Containers/SequenceHelpers.h index b7682887..973f8f2f 100644 --- a/Sources/Shared/Containers/SequenceHelpers.h +++ b/Sources/Shared/Containers/SequenceHelpers.h @@ -25,6 +25,8 @@ #include "../Common.h" +#ifndef DOXYGEN_GENERATING_OUTPUT + namespace Death { namespace Containers { namespace Implementation { //###==##====#=====--==~--~=~- --- -- - - - - @@ -41,4 +43,6 @@ namespace Death { namespace Containers { namespace Implementation { template<> struct GenerateSequence<1> { typedef Sequence<0> Type; }; template<> struct GenerateSequence<0> { typedef Sequence<> Type; }; -}}} \ No newline at end of file +}}} + +#endif \ No newline at end of file diff --git a/Sources/Shared/IO/Compression/DeflateStream.cpp b/Sources/Shared/IO/Compression/DeflateStream.cpp index 560da4dd..288c59fb 100644 --- a/Sources/Shared/IO/Compression/DeflateStream.cpp +++ b/Sources/Shared/IO/Compression/DeflateStream.cpp @@ -47,7 +47,7 @@ namespace Death { namespace IO { namespace Compression { std::memcpy(_buffer, other._buffer, sizeof(_buffer)); // Original instance will be disabled - if (other._state == State::Created || other._state == State::Initialized) { + if (other._state == State::Created || other._state == State::Initialized || other._state == State::Read) { other._state = State::Failed; } } @@ -64,7 +64,7 @@ namespace Death { namespace IO { namespace Compression { std::memcpy(_buffer, other._buffer, sizeof(_buffer)); // Original instance will be disabled - if (other._state == State::Created || other._state == State::Initialized) { + if (other._state == State::Created || other._state == State::Initialized || other._state == State::Read) { other._state = State::Failed; } @@ -142,7 +142,7 @@ namespace Death { namespace IO { namespace Compression { if (_state == State::Created) { InitializeInternal(); } - return (_state == State::Initialized || _state == State::Finished); + return (_state == State::Initialized || _state == State::Read || _state == State::Finished); } std::int64_t DeflateStream::GetSize() const @@ -199,30 +199,20 @@ namespace Death { namespace IO { namespace Compression { if (_state == State::Unknown || _state >= State::Failed) { return Stream::Invalid; } - - if (_strm.avail_in == 0) { - std::int32_t bytesRead = _inputSize; - if (bytesRead < 0 || bytesRead > sizeof(_buffer)) { - bytesRead = sizeof(_buffer); - } - - bytesRead = (std::int32_t)_inputStream->Read(_buffer, bytesRead); - if (bytesRead <= 0) { - return 0; - } - - if (_inputSize > 0) { - _inputSize -= bytesRead; - } - - _strm.next_in = _buffer; - _strm.avail_in = static_cast(bytesRead); + if (_state == State::Initialized && !FillInputBuffer()) { + return 0; } _strm.next_out = static_cast(ptr); _strm.avail_out = size; std::int32_t res = inflate(&_strm, Z_SYNC_FLUSH); + + // If input buffer is empty, fill it and try it again + if (res == Z_BUF_ERROR && _strm.avail_in == 0 && FillInputBuffer()) { + res = inflate(&_strm, Z_SYNC_FLUSH); + } + if (res != Z_OK && res != Z_STREAM_END) { CeaseReading(); _state = State::Failed; @@ -238,9 +228,31 @@ namespace Death { namespace IO { namespace Compression { return size; } + bool DeflateStream::FillInputBuffer() + { + std::int32_t bytesRead = _inputSize; + if (bytesRead < 0 || bytesRead > sizeof(_buffer)) { + bytesRead = sizeof(_buffer); + } + + bytesRead = (std::int32_t)_inputStream->Read(_buffer, bytesRead); + if (bytesRead <= 0) { + return false; + } + + if (_inputSize > 0) { + _inputSize -= bytesRead; + } + + _strm.next_in = _buffer; + _strm.avail_in = static_cast(bytesRead); + _state = State::Read; + return true; + } + bool DeflateStream::CeaseReading() { - if (_state != State::Initialized) { + if (_state != State::Initialized && _state != State::Read) { return true; } diff --git a/Sources/Shared/IO/Compression/DeflateStream.h b/Sources/Shared/IO/Compression/DeflateStream.h index 8424d2eb..d174004f 100644 --- a/Sources/Shared/IO/Compression/DeflateStream.h +++ b/Sources/Shared/IO/Compression/DeflateStream.h @@ -65,6 +65,7 @@ namespace Death { namespace IO { namespace Compression { Unknown, Created, Initialized, + Read, Finished, Failed }; @@ -85,6 +86,7 @@ namespace Death { namespace IO { namespace Compression { void InitializeInternal(); std::int32_t ReadInternal(void* ptr, std::int32_t size); + bool FillInputBuffer(); }; /** diff --git a/Sources/Shared/IO/EmscriptenFileStream.cpp b/Sources/Shared/IO/EmscriptenFileStream.cpp index 71dcc964..f727fd09 100644 --- a/Sources/Shared/IO/EmscriptenFileStream.cpp +++ b/Sources/Shared/IO/EmscriptenFileStream.cpp @@ -11,7 +11,7 @@ namespace Death { namespace IO { //###==##====#=====--==~--~=~- --- -- - - - - EmscriptenFileStream::EmscriptenFileStream(emscripten::val handle, std::int32_t bufferSize) - : _handle(handle), _size(-1), _filePos(0), _readPos(0), _readLength(0), _bufferLength(bufferSize) + : _handle(handle), _size(-1), _filePos(0), _readPos(0), _readLength(0), _bufferSize(bufferSize) { } @@ -75,7 +75,7 @@ namespace Death { namespace IO { bool isBlocked = false; std::int64_t n = (_readLength - _readPos); if (n == 0) { - if (bytesToRead >= _bufferLength) { + if (bytesToRead >= _bufferSize) { _readPos = 0; _readLength = 0; @@ -95,11 +95,11 @@ namespace Death { namespace IO { } InitializeBuffer(); - n = ReadInternal(&_buffer[0], _bufferLength); + n = ReadInternal(&_buffer[0], _bufferSize); if (n == 0) { return 0; } - isBlocked = (n < _bufferLength); + isBlocked = (n < _bufferSize); _readPos = 0; _readLength = (std::int32_t)n; } @@ -167,7 +167,7 @@ namespace Death { namespace IO { void EmscriptenFileStream::InitializeBuffer() { if DEATH_UNLIKELY(_buffer == nullptr) { - _buffer = std::make_unique(_bufferLength); + _buffer = std::make_unique(_bufferSize); } } diff --git a/Sources/Shared/IO/EmscriptenFileStream.h b/Sources/Shared/IO/EmscriptenFileStream.h index 09474238..e241fb40 100644 --- a/Sources/Shared/IO/EmscriptenFileStream.h +++ b/Sources/Shared/IO/EmscriptenFileStream.h @@ -42,7 +42,7 @@ namespace Death { namespace IO { std::int32_t _filePos; std::int32_t _readPos; std::int32_t _readLength; - std::int32_t _bufferLength; + std::int32_t _bufferSize; std::unique_ptr _buffer; void InitializeBuffer(); diff --git a/Sources/Shared/IO/FileStream.cpp b/Sources/Shared/IO/FileStream.cpp index 6f8b2ad3..4f425906 100644 --- a/Sources/Shared/IO/FileStream.cpp +++ b/Sources/Shared/IO/FileStream.cpp @@ -43,7 +43,7 @@ namespace Death { namespace IO { } FileStream::FileStream(Containers::String&& path, FileAccess mode, std::int32_t bufferSize) - : _path(std::move(path)), _size(Stream::Invalid), _filePos(0), _readPos(0), _readLength(0), _writePos(0), _bufferLength(bufferSize), + : _path(std::move(path)), _size(Stream::Invalid), _filePos(0), _readPos(0), _readLength(0), _writePos(0), _bufferSize(bufferSize), #if defined(DEATH_TARGET_WINDOWS) _fileHandle(INVALID_HANDLE_VALUE) @@ -146,7 +146,7 @@ namespace Death { namespace IO { if (_writePos > 0) { FlushWriteBuffer(); } - if (bytesToRead >= _bufferLength) { + if (bytesToRead >= _bufferSize) { _readPos = 0; _readLength = 0; @@ -166,11 +166,11 @@ namespace Death { namespace IO { } InitializeBuffer(); - n = ReadInternal(&_buffer[0], _bufferLength); + n = ReadInternal(&_buffer[0], _bufferSize); if (n == 0) { return 0; } - isBlocked = (n < _bufferLength); + isBlocked = (n < _bufferSize); _readPos = 0; _readLength = (std::int32_t)n; } @@ -223,7 +223,7 @@ namespace Death { namespace IO { } if (_writePos > 0) { - std::int32_t bufferBytesLeft = (_bufferLength - _writePos); + std::int32_t bufferBytesLeft = (_bufferSize - _writePos); if (bufferBytesLeft > 0) { if (bytesToWrite <= bufferBytesLeft) { std::memcpy(&_buffer[_writePos], typedBuffer, bytesToWrite); @@ -242,7 +242,7 @@ namespace Death { namespace IO { _writePos = 0; } - if (bytesToWrite >= _bufferLength) { + if (bytesToWrite >= _bufferSize) { while DEATH_UNLIKELY(bytesToWrite > INT32_MAX) { std::int32_t moreBytesRead = WriteInternal(typedBuffer, INT32_MAX); if DEATH_UNLIKELY(moreBytesRead <= 0) { @@ -310,7 +310,7 @@ namespace Death { namespace IO { void FileStream::InitializeBuffer() { if DEATH_UNLIKELY(_buffer == nullptr) { - _buffer = std::make_unique(_bufferLength); + _buffer = std::make_unique(_bufferSize); } } diff --git a/Sources/Shared/IO/FileStream.h b/Sources/Shared/IO/FileStream.h index 168940d7..fe2e4fd8 100644 --- a/Sources/Shared/IO/FileStream.h +++ b/Sources/Shared/IO/FileStream.h @@ -56,7 +56,7 @@ namespace Death { namespace IO { std::int32_t _readPos; std::int32_t _readLength; std::int32_t _writePos; - std::int32_t _bufferLength; + std::int32_t _bufferSize; std::unique_ptr _buffer; void InitializeBuffer(); diff --git a/Sources/Shared/IO/FileSystem.cpp b/Sources/Shared/IO/FileSystem.cpp index 3bc1e122..a7331ace 100644 --- a/Sources/Shared/IO/FileSystem.cpp +++ b/Sources/Shared/IO/FileSystem.cpp @@ -618,7 +618,6 @@ namespace Death { namespace IO { } private: - EnumerationOptions _options; char _path[MaxPathLength]; char* _fileNamePart; diff --git a/Sources/Shared/IO/Stream.h b/Sources/Shared/IO/Stream.h index 1842af3e..1b881b46 100644 --- a/Sources/Shared/IO/Stream.h +++ b/Sources/Shared/IO/Stream.h @@ -107,8 +107,10 @@ namespace Death { namespace IO { std::int64_t WriteVariableUint64(std::uint64_t value); #if defined(DEATH_TARGET_BIG_ENDIAN) + /** @brief Converts a 16-bit value from big-endian to native */ DEATH_ALWAYS_INLINE static std::uint16_t Uint16FromBE(std::uint16_t value) #else + /** @brief Converts a 16-bit value from little-endian to native */ DEATH_ALWAYS_INLINE static std::uint16_t Uint16FromLE(std::uint16_t value) #endif { @@ -116,8 +118,10 @@ namespace Death { namespace IO { } #if defined(DEATH_TARGET_BIG_ENDIAN) + /** @brief Converts a 32-bit value from big-endian to native */ DEATH_ALWAYS_INLINE static std::uint32_t Uint32FromBE(std::uint32_t value) #else + /** @brief Converts a 32-bit value from little-endian to native */ DEATH_ALWAYS_INLINE static std::uint32_t Uint32FromLE(std::uint32_t value) #endif { @@ -125,8 +129,10 @@ namespace Death { namespace IO { } #if defined(DEATH_TARGET_BIG_ENDIAN) + /** @brief Converts a 64-bit value from big-endian to native */ DEATH_ALWAYS_INLINE static std::uint64_t Uint64FromBE(std::uint64_t value) #else + /** @brief Converts a 64-bit value from little-endian to native */ DEATH_ALWAYS_INLINE static std::uint64_t Uint64FromLE(std::uint64_t value) #endif { @@ -134,8 +140,10 @@ namespace Death { namespace IO { } #if defined(DEATH_TARGET_BIG_ENDIAN) + /** @brief Converts a 16-bit value from little-endian to native */ DEATH_ALWAYS_INLINE static std::uint16_t Uint16FromLE(std::uint16_t value) #else + /** @brief Converts a 16-bit value from big-endian to native */ DEATH_ALWAYS_INLINE static std::uint16_t Uint16FromBE(std::uint16_t value) #endif { @@ -143,8 +151,10 @@ namespace Death { namespace IO { } #if defined(DEATH_TARGET_BIG_ENDIAN) + /** @brief Converts a 32-bit value from little-endian to native */ DEATH_ALWAYS_INLINE static std::uint32_t Uint32FromLE(std::uint32_t value) #else + /** @brief Converts a 32-bit value from big-endian to native */ DEATH_ALWAYS_INLINE static std::uint32_t Uint32FromBE(std::uint32_t value) #endif { @@ -152,8 +162,10 @@ namespace Death { namespace IO { } #if defined(DEATH_TARGET_BIG_ENDIAN) + /** @brief Converts a 64-bit value from little-endian to native */ DEATH_ALWAYS_INLINE static std::uint64_t Uint64FromLE(std::uint64_t value) #else + /** @brief Converts a 64-bit value from big-endian to native */ DEATH_ALWAYS_INLINE static std::uint64_t Uint64FromBE(std::uint64_t value) #endif { diff --git a/Sources/nCine/Graphics/IGfxDevice.h b/Sources/nCine/Graphics/IGfxDevice.h index d4facfc3..3c1073b6 100644 --- a/Sources/nCine/Graphics/IGfxDevice.h +++ b/Sources/nCine/Graphics/IGfxDevice.h @@ -182,7 +182,7 @@ namespace nCine /// Returns the current video mode for the monitor that hosts the window inline const VideoMode& currentVideoMode() const { return currentVideoMode(windowMonitorIndex()); } /// Sets the video mode that will be used in full screen by the monitor that hosts the window - /*! \note Call this method before>/b> enabling full screen */ + /*! \note Call this method before enabling full screen */ inline virtual bool setVideoMode(unsigned int modeIndex) { return false; } /// Returns the scaling factor for application window diff --git a/cmake/ncine_options.cmake b/cmake/ncine_options.cmake index 6b7c4f4a..f84e6aaa 100644 --- a/cmake/ncine_options.cmake +++ b/cmake/ncine_options.cmake @@ -42,7 +42,7 @@ else() option(NCINE_COPY_DEPENDENCIES "Copy all build dependencies to target directory" OFF) set(_NCINE_WITH_ANGLE_DEFAULT OFF) endif() - option(NCINE_WITH_ANGLE "Enable Google ANGLE libraries support" ${_NCINE_WITH_ANGLE_DEFAULT}) + option(NCINE_WITH_ANGLE "Enable Google ANGLE library support" ${_NCINE_WITH_ANGLE_DEFAULT}) elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT NINTENDO_SWITCH) set(NCINE_ARCH_EXTENSIONS "" CACHE STRING "Specifies architecture for code generation (or \"native\" for current CPU)") option(NCINE_BUILD_FLATPAK "Build Flatpak version of the game" OFF) @@ -69,7 +69,7 @@ cmake_dependent_option(NCINE_WITH_OPENMPT "Enable module (libopenmpt) audio file option(NCINE_WITH_ANGELSCRIPT "Enable AngelScript scripting support" OFF) option(NCINE_WITH_IMGUI "Enable integration with Dear ImGui" OFF) option(NCINE_WITH_TRACY "Enable integration with Tracy frame profiler" OFF) -option(NCINE_WITH_RENDERDOC "Enable integration with RenderDoc" OFF) +#option(NCINE_WITH_RENDERDOC "Enable integration with RenderDoc" OFF) cmake_dependent_option(NCINE_COMPILE_OPENMPT "Compile libopenmpt from sources instead of using library" OFF "NCINE_WITH_OPENMPT" OFF)