diff --git a/mod.template.json b/mod.template.json index 22f2c38..df5bdc8 100644 --- a/mod.template.json +++ b/mod.template.json @@ -6,7 +6,7 @@ "author": "StackDoubleFlow, Fernthedev", "version": "${version}", "packageId": "com.beatgames.beatsaber", - "packageVersion": "1.40.7_7060", + "packageVersion": "1.40.8_7379", "description": "Funny maps go brrr", "dependencies": [], "modFiles": [], diff --git a/qpm.json b/qpm.json index 66d6d88..87b8fbc 100644 --- a/qpm.json +++ b/qpm.json @@ -6,7 +6,7 @@ "info": { "name": "CustomJSONData", "id": "custom-json-data", - "version": "0.24.3", + "version": "0.24.4", "url": "https://github.com/StackDoubleFlow/CustomJSONData", "additionalData": { "overrideSoName": "libcustom-json-data.so", @@ -36,7 +36,7 @@ "pwsh ./scripts/ndk-stack.ps1" ] }, - "ndk": "^27.2.12479018", + "ndk": "^27.3.13750724", "qmodIncludeDirs": [ "./build", "./extern/libs" @@ -52,19 +52,19 @@ }, { "id": "bs-cordl", - "versionRange": "4007.*", + "versionRange": "4008.*", "additionalData": {} }, { "id": "custom-types", - "versionRange": "^0.18.3", + "versionRange": "^0.18.4", "additionalData": { "includeQmod": true } }, { "id": "songcore", - "versionRange": "^1.1.23", + "versionRange": "^1.1.25", "additionalData": { "includeQmod": true, "private": true diff --git a/qpm.shared.json b/qpm.shared.json index 6429666..03287c0 100644 --- a/qpm.shared.json +++ b/qpm.shared.json @@ -1,5 +1,4 @@ { - "$schema": "https://raw.githubusercontent.com/QuestPackageManager/QPM.Package/refs/heads/main/qpm.shared.schema.json", "config": { "version": "0.4.0", "sharedDir": "shared", @@ -7,7 +6,7 @@ "info": { "name": "CustomJSONData", "id": "custom-json-data", - "version": "0.24.3", + "version": "0.24.4", "url": "https://github.com/StackDoubleFlow/CustomJSONData", "additionalData": { "overrideSoName": "libcustom-json-data.so", @@ -37,6 +36,7 @@ "pwsh ./scripts/ndk-stack.ps1" ] }, + "ndk": "^27.3.13750724", "qmodIncludeDirs": [ "./build", "./extern/libs" @@ -52,7 +52,7 @@ }, { "id": "bs-cordl", - "versionRange": "4007.*", + "versionRange": "4008.*", "additionalData": {} }, { @@ -64,7 +64,7 @@ }, { "id": "songcore", - "versionRange": "^1.1.23", + "versionRange": "^1.1.25", "additionalData": { "includeQmod": true, "private": true @@ -99,16 +99,51 @@ ] }, "restoredDependencies": [ + { + "dependency": { + "id": "paper2_scotland2", + "versionRange": "=4.7.0", + "additionalData": { + "soLink": "https://github.com/Fernthedev/paperlog/releases/download/v4.7.0/libpaper2_scotland2.so", + "overrideSoName": "libpaper2_scotland2.so", + "modLink": "https://github.com/Fernthedev/paperlog/releases/download/v4.7.0/paper2_scotland2.qmod", + "branchName": "version/v4_7_0", + "compileOptions": { + "systemIncludes": [ + "shared/utfcpp/source" + ] + }, + "cmake": false + } + }, + "version": "4.7.0" + }, + { + "dependency": { + "id": "libil2cpp", + "versionRange": "=0.4.0", + "additionalData": { + "headersOnly": true, + "compileOptions": { + "systemIncludes": [ + "il2cpp/external/baselib/Include", + "il2cpp/external/baselib/Platforms/Android/Include" + ] + } + } + }, + "version": "0.4.0" + }, { "dependency": { "id": "custom-types", - "versionRange": "=0.18.3", + "versionRange": "=0.18.4", "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.18.4/libcustom-types.so", + "debugSoLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.18.4/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.18.4/CustomTypes.qmod", + "branchName": "version/v0_18_4", "compileOptions": { "cppFlags": [ "-Wno-invalid-offsetof" @@ -117,7 +152,7 @@ "cmake": true } }, - "version": "0.18.3" + "version": "0.18.4" }, { "dependency": { @@ -133,10 +168,10 @@ { "dependency": { "id": "bs-cordl", - "versionRange": "=4007.0.0", + "versionRange": "=4008.0.0", "additionalData": { "headersOnly": true, - "branchName": "version/v4007_0_0", + "branchName": "version/v4008_0_0", "compileOptions": { "includePaths": [ "include" @@ -152,26 +187,7 @@ } } }, - "version": "4007.0.0" - }, - { - "dependency": { - "id": "paper2_scotland2", - "versionRange": "=4.6.4", - "additionalData": { - "soLink": "https://github.com/Fernthedev/paperlog/releases/download/v4.6.4/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", - "compileOptions": { - "systemIncludes": [ - "shared/utfcpp/source" - ] - }, - "cmake": false - } - }, - "version": "4.6.4" + "version": "4008.0.0" }, { "dependency": { @@ -186,22 +202,18 @@ }, { "dependency": { - "id": "fmt", - "versionRange": "=11.0.2", + "id": "songcore", + "versionRange": "=1.1.25", "additionalData": { - "headersOnly": true, - "branchName": "version/v11_0_2", - "compileOptions": { - "systemIncludes": [ - "fmt/include/" - ], - "cppFlags": [ - "-DFMT_HEADER_ONLY" - ] - } + "soLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.25/libsongcore.so", + "debugSoLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.25/debug_libsongcore.so", + "overrideSoName": "libsongcore.so", + "modLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.25/SongCore.qmod", + "branchName": "version/v1_1_25", + "cmake": true } }, - "version": "11.0.2" + "version": "1.1.25" }, { "dependency": { @@ -223,21 +235,6 @@ }, "version": "6.4.2" }, - { - "dependency": { - "id": "songcore", - "versionRange": "=1.1.23", - "additionalData": { - "soLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.23/libsongcore.so", - "debugSoLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.23/debug_libsongcore.so", - "overrideSoName": "libsongcore.so", - "modLink": "https://github.com/raineaeternal/Quest-SongCore/releases/download/v1.1.23/SongCore.qmod", - "branchName": "version/v1_1_23", - "cmake": true - } - }, - "version": "1.1.23" - }, { "dependency": { "id": "scotland2", @@ -253,19 +250,22 @@ }, { "dependency": { - "id": "libil2cpp", - "versionRange": "=0.4.0", + "id": "fmt", + "versionRange": "=11.0.2", "additionalData": { "headersOnly": true, + "branchName": "version/v11_0_2", "compileOptions": { "systemIncludes": [ - "il2cpp/external/baselib/Include", - "il2cpp/external/baselib/Platforms/Android/Include" + "fmt/include/" + ], + "cppFlags": [ + "-DFMT_HEADER_ONLY" ] } } }, - "version": "0.4.0" + "version": "11.0.2" } ] } \ No newline at end of file diff --git a/shared/JsonUtils.h b/shared/JsonUtils.h index a829585..e11a5f0 100644 --- a/shared/JsonUtils.h +++ b/shared/JsonUtils.h @@ -98,14 +98,16 @@ static OptPair ReadOptionalPair(rapidjson::Value const& object, std::string_view auto itr = object.FindMember(key.data()); if (itr != object.MemberEnd() && itr->value.Size() >= 1) { - float x = itr->value[0].GetFloat(); - float y = 0; + const auto& val = itr->value[0]; + std::optional x = val.IsNull() ? std::nullopt : std::optional{ val.GetFloat() }; + std::optional y = 0; if (itr->value.Size() >= 2) { - y = itr->value[1].GetFloat(); - return { std::optional(x), std::optional(y) }; + const auto& val2 = itr->value[1]; + y = val2.IsNull() ? std::nullopt : std::optional{ val2.GetFloat() }; + return { x, y }; } - return { std::optional(x), std::nullopt }; + return { x, std::nullopt }; } return { std::nullopt, std::nullopt }; } diff --git a/src/CustomBeatmapData.cpp b/src/CustomBeatmapData.cpp index 6b3bdf3..02b73ce 100644 --- a/src/CustomBeatmapData.cpp +++ b/src/CustomBeatmapData.cpp @@ -206,11 +206,11 @@ void CustomJSONData::CustomSliderData::ctor( ::GlobalNamespace::SliderMidAnchorMode midAnchorMode, int sliceCount, float squishAmount) { static auto const* SliderData_Ctor = il2cpp_utils::FindMethodUnsafe(classof(SliderData*), ".ctor", 24); il2cpp_utils::RunMethodRethrow( - this, SliderData_Ctor, time, beat, rotation, sliderType, colorType, hasHeadNote, headTime, headLineIndex, - headLineLayer, headBeforeJumpLineLayer, headControlPointLengthMultiplier, headCutDirection, - headCutDirectionAngleOffset, hasTailNote, tailTime, tailLineIndex, tailLineLayer, tailBeforeJumpLineLayer, - tailControlPointLengthMultiplier, tailCutDirection, tailCutDirectionAngleOffset, midAnchorMode, sliceCount, - squishAmount); + this, SliderData_Ctor, sliderType, colorType, hasHeadNote, headTime, headBeat, headRotation, + headLineIndex, headLineLayer, headBeforeJumpLineLayer, headControlPointLengthMultiplier, headCutDirection, + headCutDirectionAngleOffset, hasTailNote, tailTime, tailRotation, tailLineIndex, tailLineLayer, + tailBeforeJumpLineLayer, tailControlPointLengthMultiplier, tailCutDirection, tailCutDirectionAngleOffset, + midAnchorMode, sliceCount, squishAmount); INVOKE_CTOR(); this->aheadTimeNoodle = std::numeric_limits::infinity(); } diff --git a/src/hooks/CustomJSONDataHooks.cpp b/src/hooks/CustomJSONDataHooks.cpp index f42e24e..776f9df 100644 --- a/src/hooks/CustomJSONDataHooks.cpp +++ b/src/hooks/CustomJSONDataHooks.cpp @@ -28,6 +28,7 @@ #include "GlobalNamespace/BeatmapEventDataLightsExtensions.hpp" #include "System/Action.hpp" +#include "System/Action_1.hpp" #include "System/Collections/Generic/Dictionary_2.hpp" #include "UnityEngine/JsonUtility.hpp" @@ -486,6 +487,10 @@ MAKE_PAPER_HOOK_MATCH(BeatmapCallbacksController_ManualUpdateTranspile, &Beatmap return; } + if(self->willStartProcessingCallbacksThisFrameEvent) { + self->willStartProcessingCallbacksThisFrameEvent->Invoke(songTime); + } + self->_songTime = songTime; self->_processingCallbacks = true; if (songTime > self->_prevSongTime) { @@ -594,5 +599,6 @@ void CustomJSONData::InstallHooks() { v2::InstallHooks(); v3::InstallHooks(); + v4::InstallHooks(); InstallBeatmapHooks(); }