From c70e6d280a139f7e3f6e6e9fdcc8d17c96c1d6d4 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:50:06 -0400 Subject: [PATCH] spdlog from package managers (#4088) --- .github/workflows/apt-deps.txt | 2 +- .github/workflows/test-builds-on-distros.yml | 1 + CMakeLists.txt | 2 +- OTRExporter | 2 +- libultraship | 2 +- soh/CMakeLists.txt | 3 ++- soh/soh/Enhancements/crowd-control/CrowdControl.cpp | 2 +- soh/soh/OTRGlobals.cpp | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/apt-deps.txt b/.github/workflows/apt-deps.txt index 62eba0386..c06068ab4 100644 --- a/.github/workflows/apt-deps.txt +++ b/.github/workflows/apt-deps.txt @@ -1 +1 @@ -libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev ninja-build +libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev ninja-build diff --git a/.github/workflows/test-builds-on-distros.yml b/.github/workflows/test-builds-on-distros.yml index 683e07b24..36bbc67a9 100644 --- a/.github/workflows/test-builds-on-distros.yml +++ b/.github/workflows/test-builds-on-distros.yml @@ -1,6 +1,7 @@ # todo: # nlohmann # tinyxml2 +# spdlog name: test-builds-on-distros on: diff --git a/CMakeLists.txt b/CMakeLists.txt index 34fe61b65..7c1f3dbed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") set(VCPKG_TARGET_TRIPLET x64-windows-static) vcpkg_bootstrap() - vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3 nlohmann-json tinyxml2) + vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3 nlohmann-json tinyxml2 spdlog) if (CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache|sccache") set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded) diff --git a/OTRExporter b/OTRExporter index 467434c56..ac64c159b 160000 --- a/OTRExporter +++ b/OTRExporter @@ -1 +1 @@ -Subproject commit 467434c5666e11a3a7b756ff04401cd54da5c3f2 +Subproject commit ac64c159b62361301f48f7fd05bfd3db931ebc9c diff --git a/libultraship b/libultraship index 6c375a8b5..5b67a45fc 160000 --- a/libultraship +++ b/libultraship @@ -1 +1 @@ -Subproject commit 6c375a8b5eb8c44088b5bb2b472d40c50ad36d1f +Subproject commit 5b67a45fc47d8d6e86d104651d83d0939d807ae4 diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 4ed9fec72..a32c0ac4f 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -388,7 +388,6 @@ target_include_directories(${PROJECT_NAME} PRIVATE assets ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/extern/tinyxml2 ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/ ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/libjpeg/include/ - ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/spdlog/include/ ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/graphic/Fast3D/U64/PR ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/graphic ${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils @@ -417,6 +416,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "_UNICODE" STORMLIB_NO_AUTO_LINK "_CRT_SECURE_NO_WARNINGS;" + NOMINMAX ) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") target_compile_definitions(${PROJECT_NAME} PRIVATE @@ -434,6 +434,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "UNICODE;" "_UNICODE" STORMLIB_NO_AUTO_LINK + NOMINMAX ) endif() elseif (CMAKE_SYSTEM_NAME STREQUAL "CafeOS") diff --git a/soh/soh/Enhancements/crowd-control/CrowdControl.cpp b/soh/soh/Enhancements/crowd-control/CrowdControl.cpp index 9c0d5cb2d..6443a7ff3 100644 --- a/soh/soh/Enhancements/crowd-control/CrowdControl.cpp +++ b/soh/soh/Enhancements/crowd-control/CrowdControl.cpp @@ -179,7 +179,7 @@ CrowdControl::EffectResult CrowdControl::TranslateGiEnum(GameInteractionEffectQu CrowdControl::Effect* CrowdControl::ParseMessage(nlohmann::json dataReceived) { if (!dataReceived.contains("id") || !dataReceived.contains("type")) { - SPDLOG_ERROR("[CrowdControl] Invalid payload received:\n{}", dataReceived); + SPDLOG_ERROR("[CrowdControl] Invalid payload received:\n{}", dataReceived.dump()); return nullptr; } diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index e796d9f96..a848d9247 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -324,7 +324,7 @@ OTRGlobals::OTRGlobals() { auto overlay = context->GetInstance()->GetWindow()->GetGui()->GetGameOverlay(); overlay->LoadFont("Press Start 2P", "fonts/PressStart2P-Regular.ttf", 12.0f); overlay->LoadFont("Fipps", "fonts/Fipps-Regular.otf", 32.0f); - overlay->SetCurrentFont(CVarGetString(CVAR_GAME_OVERLAY_FONT, "Press Start 2P")); + overlay->SetCurrentFont(CVarGetString("gOverlayFont", "Press Start 2P")); context->InitAudio();