diff --git a/Orchestrion/BGMSystem/BGMAddressResolver.cs b/Orchestrion/BGMSystem/BGMAddressResolver.cs index 705daf2..88f62ad 100644 --- a/Orchestrion/BGMSystem/BGMAddressResolver.cs +++ b/Orchestrion/BGMSystem/BGMAddressResolver.cs @@ -15,7 +15,7 @@ public static unsafe void Init() { _baseAddress = DalamudApi.SigScanner.GetStaticAddressFromSig("48 8B 05 ?? ?? ?? ?? 48 85 C0 74 51 83 78 08 0B"); AddRestartId = DalamudApi.SigScanner.ScanText("E8 ?? ?? ?? ?? 88 9D ?? ?? ?? ?? 84 DB"); - GetSpecialMode = DalamudApi.SigScanner.ScanText("48 89 5C 24 ?? 57 48 83 EC 20 44 8B 41 10"); + GetSpecialMode = DalamudApi.SigScanner.ScanText("40 57 48 83 EC 20 48 83 79 ?? ?? 48 8B F9 0F 84 ?? ?? ?? ?? 0F B6 51 4D"); DalamudApi.PluginLog.Debug($"[BGMAddressResolver] init: base address at {_baseAddress.ToInt64():X}"); diff --git a/Orchestrion/BGMSystem/BGMController.cs b/Orchestrion/BGMSystem/BGMController.cs index 26ee303..8385a8b 100644 --- a/Orchestrion/BGMSystem/BGMController.cs +++ b/Orchestrion/BGMSystem/BGMController.cs @@ -52,7 +52,7 @@ public class BGMController private unsafe delegate DisableRestart* AddDisableRestartIdPrototype(BGMScene* scene, ushort songId); private readonly AddDisableRestartIdPrototype _addDisableRestartId; - private unsafe delegate int GetSpecialModeByScenePrototype(BGMPlayer* bgmPlayer, byte specialModeType); + private unsafe delegate int GetSpecialModeByScenePrototype(BGMPlayer* bgmPlayer); private readonly Hook _getSpecialModeForSceneHook; public unsafe BGMController() @@ -196,15 +196,15 @@ public void SetSong(ushort songId, int priority = 0) } } - private unsafe int GetSpecialModeBySceneDetour(BGMPlayer* player, byte specialModeType) + private unsafe int GetSpecialModeBySceneDetour(BGMPlayer* player) { // Let the game do what it needs to do if (player->BgmScene != PlayingScene || player->BgmId != PlayingSongId - || specialModeType == 0) - return _getSpecialModeForSceneHook.Original(player, specialModeType); + || player->SpecialModeType == 0) + return _getSpecialModeForSceneHook.Original(player); - if (!SongList.Instance.TryGetSong(player->BgmId, out var song)) return _getSpecialModeForSceneHook.Original(player, specialModeType); + if (!SongList.Instance.TryGetSong(player->BgmId, out var song)) return _getSpecialModeForSceneHook.Original(player); // Default to scene 10 behavior, but if the mode is mount mode, use the mount scene uint newScene = 10; @@ -214,7 +214,7 @@ private unsafe int GetSpecialModeBySceneDetour(BGMPlayer* player, byte specialMo // Trick the game into giving us the result we want for the scene our song should actually be playing on var tempScene = player->BgmScene; player->BgmScene = newScene; - var result = _getSpecialModeForSceneHook.Original(player, specialModeType); + var result = _getSpecialModeForSceneHook.Original(player); player->BgmScene = tempScene; return result; } diff --git a/Orchestrion/Orchestrion.csproj b/Orchestrion/Orchestrion.csproj index aafebab..be140f0 100644 --- a/Orchestrion/Orchestrion.csproj +++ b/Orchestrion/Orchestrion.csproj @@ -1,7 +1,7 @@ $(appdata)\XIVLauncher\addon\Hooks\dev\ - 2.2.0.6 + 2.2.0.7