From ea5e51e4508157abca39361625c266b85748d178 Mon Sep 17 00:00:00 2001 From: Daniel <790119+DanTheMan827@users.noreply.github.com> Date: Tue, 20 Oct 2026 16:25:51 -0500 Subject: [PATCH] Bump for 1.45.3_30054 --- CMakeLists.txt | 4 +- build.ps1 | 14 ---- mod.template.json | 2 +- qpm.json | 23 +++++-- qpm.shared.json | 162 +++++++++++++++++++++++++++------------------- src/main.cpp | 41 ++++++++---- 6 files changed, 147 insertions(+), 99 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0afeb31..65f337b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,8 +13,8 @@ cmake_minimum_required(VERSION 3.21) project(${COMPILE_ID}) # c++ standard -set(CMAKE_CXX_STANDARD 20) -set(CMAKE_CXX_STANDARD_REQUIRED 20) +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD_REQUIRED 23) # define that stores the actual source directory set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src) diff --git a/build.ps1 b/build.ps1 index 2987795..34a94f3 100644 --- a/build.ps1 +++ b/build.ps1 @@ -44,20 +44,6 @@ if ($actions -eq $true) { #$cmakeFilePath = "./extern.cmake"; $externcmake = Get-Content $cmakeFilePath -Raw; $externcmake -replace [regex]::Escape('add_library(${COMPILE_ID} SHARED ${EXTERN_DIR}/includes/bs-cordl/version.txt)'), '' | Set-Content $cmakeFilePath } -if ((Test-Path "./extern/includes/beatsaber-hook/shared/inline-hook/And64InlineHook.cpp", "./extern/includes/beatsaber-hook/shared/inline-hook/inlineHook.c", "./extern/includes/beatsaber-hook/shared/inline-hook/relocate.c") -contains $false) { - Write-Host "Critical: Missing inline-hook" - if (!(Test-Path "./extern/includes/beatsaber-hook/shared/inline-hook/And64InlineHook.cpp")) { - Write-Host "./extern/includes/beatsaber-hook/shared/inline-hook/And64InlineHook.cpp" - } - if (!(Test-Path "./extern/includes/beatsaber-hook/shared/inline-hook/inlineHook.c")) { - Write-Host "./extern/includes/beatsaber-hook/shared/inline-hook/inlineHook.c" - } - if (!(Test-Path "./extern/includes/beatsaber-hook/inline-hook/shared/relocate.c")) { - Write-Host "./extern/includes/beatsaber-hook/shared/inline-hook/relocate.c" - } - Write-Host "Task Failed" - exit 1; -} Write-Output "Building mod with ModID: $ModID version: $VERSION" if ($clean.IsPresent) diff --git a/mod.template.json b/mod.template.json index f065efc..697ec8a 100644 --- a/mod.template.json +++ b/mod.template.json @@ -7,7 +7,7 @@ "modloader": "Scotland2", "version": "${version}", "packageId": "com.beatgames.beatsaber", - "packageVersion": "1.40.8_7379", + "packageVersion": "1.45.3_30054", "description": "Displays the time in game. Alternatively also the Battery Percentage", "coverImage": "Cover.jpg", "dependencies": [], diff --git a/qpm.json b/qpm.json index 85b17e5..f895eab 100644 --- a/qpm.json +++ b/qpm.json @@ -1,4 +1,5 @@ { + "$schema": "https://raw.githubusercontent.com/QuestPackageManager/QPM.Package/refs/heads/main/qpm.schema.json", "version": "0.4.0", "sharedDir": "shared", "dependenciesDir": "extern", @@ -21,7 +22,7 @@ "pwsh build.ps1 -clean" ] }, - "ndk": "^27.2.12479018", + "ndk": "^29.0.14206865", "qmodIncludeDirs": [ "build", "extern/libs" @@ -32,17 +33,17 @@ "dependencies": [ { "id": "beatsaber-hook", - "versionRange": "^6.4.2", + "versionRange": "^9.3.0", "additionalData": {} }, { "id": "bs-cordl", - "versionRange": "4008.*", + "versionRange": "4503.*", "additionalData": {} }, { "id": "bsml", - "versionRange": "^0.4.55", + "versionRange": "^0.6.0", "additionalData": {} }, { @@ -52,12 +53,17 @@ }, { "id": "config-utils", - "versionRange": "^2.0.3", + "versionRange": "^3.0.0", "additionalData": {} }, { "id": "custom-types", - "versionRange": "^0.18.3", + "versionRange": "^0.21.2", + "additionalData": {} + }, + { + "id": "flamingo", + "versionRange": "^1.2.1", "additionalData": {} }, { @@ -72,6 +78,11 @@ "includeQmod": false, "private": true } + }, + { + "id": "reflectcpp", + "versionRange": "^0.25.0", + "additionalData": {} } ] } \ No newline at end of file diff --git a/qpm.shared.json b/qpm.shared.json index ec006aa..96be8ca 100644 --- a/qpm.shared.json +++ b/qpm.shared.json @@ -1,4 +1,5 @@ { + "$schema": "https://raw.githubusercontent.com/QuestPackageManager/QPM.Package/refs/heads/main/qpm.shared.schema.json", "config": { "version": "0.4.0", "sharedDir": "shared", @@ -22,7 +23,7 @@ "pwsh build.ps1 -clean" ] }, - "ndk": "^27.2.12479018", + "ndk": "^29.0.14206865", "qmodIncludeDirs": [ "build", "extern/libs" @@ -33,17 +34,17 @@ "dependencies": [ { "id": "beatsaber-hook", - "versionRange": "^6.4.2", + "versionRange": "^9.3.0", "additionalData": {} }, { "id": "bs-cordl", - "versionRange": "4008.*", + "versionRange": "4503.*", "additionalData": {} }, { "id": "bsml", - "versionRange": "^0.4.55", + "versionRange": "^0.6.0", "additionalData": {} }, { @@ -53,12 +54,17 @@ }, { "id": "config-utils", - "versionRange": "^2.0.3", + "versionRange": "^3.0.0", "additionalData": {} }, { "id": "custom-types", - "versionRange": "^0.18.3", + "versionRange": "^0.21.2", + "additionalData": {} + }, + { + "id": "flamingo", + "versionRange": "^1.2.1", "additionalData": {} }, { @@ -73,6 +79,11 @@ "includeQmod": false, "private": true } + }, + { + "id": "reflectcpp", + "versionRange": "^0.25.0", + "additionalData": {} } ] }, @@ -80,13 +91,13 @@ { "dependency": { "id": "custom-types", - "versionRange": "=0.18.3", + "versionRange": "=0.21.2", "additionalData": { - "soLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.18.3/libcustom-types.so", - "debugSoLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.18.3/debug_libcustom-types.so", + "soLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.21.2/libcustom-types.so", + "debugSoLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.21.2/debug_libcustom-types.so", "overrideSoName": "libcustom-types.so", - "modLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.18.3/CustomTypes.qmod", - "branchName": "version/v0_18_3", + "modLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.21.2/CustomTypes.qmod", + "branchName": "version/v0_21_2", "compileOptions": { "cppFlags": [ "-Wno-invalid-offsetof" @@ -95,53 +106,41 @@ "cmake": true } }, - "version": "0.18.3" - }, - { - "dependency": { - "id": "rapidjson-macros", - "versionRange": "=2.1.0", - "additionalData": { - "headersOnly": true, - "branchName": "version/v2_1_0", - "cmake": false - } - }, - "version": "2.1.0" + "version": "0.21.2" }, { "dependency": { "id": "bs-cordl", - "versionRange": "=4008.0.0", + "versionRange": "=4503.0.0", "additionalData": { "headersOnly": true, - "branchName": "version/v4008_0_0", + "branchName": "version/v4503_0_0", "compileOptions": { "includePaths": [ "include" ], "cppFeatures": [], "cppFlags": [ - "-DNEED_UNSAFE_CSHARP", "-fdeclspec", - "-DUNITY_2021", + "-DUNITY_6", + "-DUNITY_6_3", "-DHAS_CODEGEN", "-Wno-invalid-offsetof" ] } } }, - "version": "4008.0.0" + "version": "4503.0.0" }, { "dependency": { "id": "paper2_scotland2", - "versionRange": "=4.6.4", + "versionRange": "=4.8.0", "additionalData": { - "soLink": "https://github.com/Fernthedev/paperlog/releases/download/v4.6.4/libpaper2_scotland2.so", + "soLink": "https://github.com/Fernthedev/paperlog/releases/download/v4.8.0/libpaper2_scotland2.so", "overrideSoName": "libpaper2_scotland2.so", - "modLink": "https://github.com/Fernthedev/paperlog/releases/download/v4.6.4/paper2_scotland2.qmod", - "branchName": "version/v4_6_4", + "modLink": "https://github.com/Fernthedev/paperlog/releases/download/v4.8.0/paper2_scotland2.qmod", + "branchName": "version/v4_8_0", "compileOptions": { "systemIncludes": [ "shared/utfcpp/source" @@ -150,7 +149,7 @@ "cmake": false } }, - "version": "4.6.4" + "version": "4.8.0" }, { "dependency": { @@ -179,19 +178,38 @@ }, "version": "10.0.0" }, + { + "dependency": { + "id": "reflectcpp", + "versionRange": "=0.25.0", + "additionalData": { + "soLink": "https://github.com/kodenamekrak/reflectcpp-qpm/releases/download/v0.25.0/libreflectcpp.so", + "debugSoLink": "https://github.com/kodenamekrak/reflectcpp-qpm/releases/download/v0.25.0/debug_libreflectcpp.so", + "overrideSoName": "libreflectcpp.so", + "modLink": "https://github.com/kodenamekrak/reflectcpp-qpm/releases/download/v0.25.0/reflectcpp.qmod", + "branchName": "version/v0_25_0" + } + }, + "version": "0.25.0" + }, { "dependency": { "id": "config-utils", - "versionRange": "=2.0.3", + "versionRange": "=3.0.0", "additionalData": { "headersOnly": true, - "soLink": "https://github.com/darknight1050/config-utils/releases/download/v2.0.3/libconfig-utils_test.so", + "soLink": "https://github.com/darknight1050/config-utils/releases/download/v3.0.0/libconfig-utils_test.so", "overrideSoName": "libconfig-utils_test.so", - "branchName": "version/v2_0_3", + "branchName": "version/v3_0_0", + "compileOptions": { + "cppFlags": [ + "-DREFLECT_CPP_C_ARRAYS_OR_INHERITANCE" + ] + }, "cmake": true } }, - "version": "2.0.3" + "version": "3.0.0" }, { "dependency": { @@ -215,13 +233,13 @@ { "dependency": { "id": "beatsaber-hook", - "versionRange": "=6.4.2", + "versionRange": "=9.3.0", "additionalData": { - "soLink": "https://github.com/QuestPackageManager/beatsaber-hook/releases/download/v6.4.2/libbeatsaber-hook.so", - "debugSoLink": "https://github.com/QuestPackageManager/beatsaber-hook/releases/download/v6.4.2/debug_libbeatsaber-hook.so", + "soLink": "https://github.com/QuestPackageManager/beatsaber-hook/releases/download/v9.3.0/libbeatsaber-hook.so", + "debugSoLink": "https://github.com/QuestPackageManager/beatsaber-hook/releases/download/v9.3.0/debug_libbeatsaber-hook.so", "overrideSoName": "libbeatsaber-hook.so", - "modLink": "https://github.com/QuestPackageManager/beatsaber-hook/releases/download/v6.4.2/beatsaber-hook.qmod", - "branchName": "version/v6_4_2", + "modLink": "https://github.com/QuestPackageManager/beatsaber-hook/releases/download/v9.3.0/beatsaber-hook.qmod", + "branchName": "version/v9_3_0", "compileOptions": { "cppFlags": [ "-Wno-extra-qualification" @@ -230,40 +248,27 @@ "cmake": true } }, - "version": "6.4.2" + "version": "9.3.0" }, { "dependency": { "id": "bsml", - "versionRange": "=0.4.55", + "versionRange": "=0.6.5", "additionalData": { - "soLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.4.55/libbsml.so", - "debugSoLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.4.55/debug_libbsml.so", + "soLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.6.5/libbsml.so", + "debugSoLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.6.5/debug_libbsml.so", "overrideSoName": "libbsml.so", - "modLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.4.55/BSML.qmod", - "branchName": "version/v0_4_55", + "modLink": "https://github.com/bsq-ports/Quest-BSML/releases/download/v0.6.5/BSML.qmod", + "branchName": "version/v0_6_5", "cmake": true } }, - "version": "0.4.55" - }, - { - "dependency": { - "id": "scotland2", - "versionRange": "=0.1.6", - "additionalData": { - "soLink": "https://github.com/sc2ad/scotland2/releases/download/v0.1.6/libsl2.so", - "debugSoLink": "https://github.com/sc2ad/scotland2/releases/download/v0.1.6/debug_libsl2.so", - "overrideSoName": "libsl2.so", - "branchName": "version/v0_1_6" - } - }, - "version": "0.1.6" + "version": "0.6.5" }, { "dependency": { "id": "libil2cpp", - "versionRange": "=0.4.0", + "versionRange": "=0.5.0", "additionalData": { "headersOnly": true, "compileOptions": { @@ -274,7 +279,34 @@ } } }, - "version": "0.4.0" + "version": "0.5.0" + }, + { + "dependency": { + "id": "flamingo", + "versionRange": "=1.2.1", + "additionalData": { + "soLink": "https://github.com/QuestPackageManager/Flamingo/releases/download/v1.2.1/libflamingo.so", + "debugSoLink": "https://github.com/QuestPackageManager/Flamingo/releases/download/v1.2.1/debug_libflamingo.so", + "overrideSoName": "libflamingo.so", + "modLink": "https://github.com/QuestPackageManager/Flamingo/releases/download/v1.2.1/flamingo.qmod", + "branchName": "version/v1_2_1" + } + }, + "version": "1.2.1" + }, + { + "dependency": { + "id": "scotland2", + "versionRange": "=0.1.7", + "additionalData": { + "soLink": "https://github.com/sc2ad/scotland2/releases/download/v0.1.7/libsl2.so", + "debugSoLink": "https://github.com/sc2ad/scotland2/releases/download/v0.1.7/debug_libsl2.so", + "overrideSoName": "libsl2.so", + "branchName": "version/v0_1_7" + } + }, + "version": "0.1.7" } ] } \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 28fbbfa..7b375c2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,11 +1,9 @@ #include "GlobalNamespace/AudioTimeSyncController.hpp" -#include "GlobalNamespace/BeatmapCharacteristicSO.hpp" // --------------------- For checking the characteristic 360/90. #include "GlobalNamespace/BeatmapKey.hpp" #include "GlobalNamespace/CampaignFlowCoordinator.hpp" // --------------------- For setting clock in Campaign back to normal #include "GlobalNamespace/FlyingGameHUDRotation.hpp" // ----------------------- Take rotation from this instead lol #include "GlobalNamespace/LobbySetupViewController.hpp" // -------------------- NEW: For 1.16.4 #include "GlobalNamespace/MainMenuViewController.hpp" -#include "GlobalNamespace/MultiplayerLevelScenesTransitionSetupDataSO.hpp" // - For checking it it's an MP Song #include "GlobalNamespace/MultiplayerLobbyController.hpp" #include "GlobalNamespace/MultiplayerResultsViewController.hpp" #include "GlobalNamespace/OVRPlugin.hpp" @@ -16,7 +14,7 @@ #include "GlobalNamespace/PlayerSpecificSettings.hpp" #include "GlobalNamespace/PlayerSpecificSettings.hpp" // ---------------------- For checking if noTextandHUDs is enabled #include "GlobalNamespace/SoloFreePlayFlowCoordinator.hpp" -#include "GlobalNamespace/StandardLevelScenesTransitionSetupDataSO.hpp" // ---- For checking if it's a 360/90 Map +#include "GlobalNamespace/StandardLevelScenesTransitionSetupData.hpp" // For checking if it's a 360/90 Map using namespace GlobalNamespace; #include "TMPro/FontStyles.hpp" @@ -45,8 +43,7 @@ using namespace UnityEngine::UI; #include "HMUI/CurvedCanvasSettings.hpp" using namespace HMUI; -#include "beatsaber-hook/shared/utils/hooking.hpp" -#include "beatsaber-hook/shared/utils/il2cpp-functions.hpp" +#include "beatsaber-hook/shared/hooking.hpp" #include "bsml/shared/BSML-Lite/Creation/Layout.hpp" #include "bsml/shared/BSML-Lite/Creation/Text.hpp" #include "bsml/shared/BSML.hpp" @@ -403,10 +400,33 @@ MAKE_HOOK_MATCH(PauseMenuManager_StartResumeAnimation, &PauseMenuManager::StartR // TODO: Use the below information wisely // Check the beatmap characteristic and set the Config.InRotationMap to true if it requires 360 Movement. -MAKE_HOOK_MATCH(StandardLevelScenesTransitionSetupDataSO_InitAndSetupScenes, &StandardLevelScenesTransitionSetupDataSO::InitAndSetupScenes, void, StandardLevelScenesTransitionSetupDataSO* self, PlayerSpecificSettings* playerSpecificSettings, StringW backButtonText, bool startPaused) { - StandardLevelScenesTransitionSetupDataSO_InitAndSetupScenes(self, playerSpecificSettings, backButtonText, startPaused); - - if (self->beatmapKey.beatmapCharacteristic->containsRotationEvents) { +MAKE_HOOK_MATCH(StandardLevelScenesTransitionSetupData_Init, &StandardLevelScenesTransitionSetupData::Init, void, + StandardLevelScenesTransitionSetupData* self, + GameMode gameMode, + by_ref beatmapKey, + BeatmapLevel* beatmapLevel, + OverrideEnvironmentSettings* overrideEnvironmentSettings, + ColorScheme* playerOverrideColorScheme, + bool playerOverrideLightshowColors, + GameplayModifiers* gameplayModifiers, + PlayerSpecificSettings* playerSpecificSettings, + PracticeSettings* practiceSettings, + EnvironmentsListModel* environmentsListModel, + AudioClipAsyncLoader* audioClipAsyncLoader, + SettingsManager* settingsManager, + GameplayAdditionalInformation* gameplayAdditionalInformation, + BeatmapDataLoader* beatmapDataLoader, + BeatmapLevelsEntitlementModel* beatmapLevelsEntitlementModel, + BeatmapLevelsModel* beatmapLevelsModel, + IBeatmapLevelData* beatmapLevelData) { + StandardLevelScenesTransitionSetupData_Init(self, gameMode, beatmapKey, beatmapLevel, overrideEnvironmentSettings, + playerOverrideColorScheme, playerOverrideLightshowColors, gameplayModifiers, playerSpecificSettings, + practiceSettings, environmentsListModel, audioClipAsyncLoader, settingsManager, gameplayAdditionalInformation, + beatmapDataLoader, beatmapLevelsEntitlementModel, beatmapLevelsModel, beatmapLevelData); + + const auto characteristic = static_cast(beatmapKey->characteristic); + if (characteristic == static_cast(BeatmapCharacteristic::Degree360) || + characteristic == static_cast(BeatmapCharacteristic::Degree90)) { logger().debug("Loaded 360/90 Map"); Config.InRotationMap = true; } @@ -523,7 +543,6 @@ MOD_EXPORT void setup(CModInfo *info) { // Called later on in the game loading - a good time to install function hooks MOD_EXPORT void late_load() { - il2cpp_functions::Init(); BSML::Init(); logger().debug("Init ModConfig..."); @@ -564,7 +583,7 @@ MOD_EXPORT void late_load() { INSTALL_HOOK(hkLog, PartyFreePlayFlowCoordinator_SinglePlayerLevelSelectionFlowCoordinatorDidActivate); INSTALL_HOOK(hkLog, PauseMenuManager_ShowMenu); INSTALL_HOOK(hkLog, PauseMenuManager_StartResumeAnimation); - INSTALL_HOOK(hkLog, StandardLevelScenesTransitionSetupDataSO_InitAndSetupScenes); + INSTALL_HOOK(hkLog, StandardLevelScenesTransitionSetupData_Init); INSTALL_HOOK(hkLog, LobbySetupViewController_DidActivate); INSTALL_HOOK(hkLog, MultiplayerLobbyController_DeactivateMultiplayerLobby); INSTALL_HOOK(hkLog, MultiplayerResultsViewController_DidActivate);