From 4cb6edad7cb3132afd4aac3a8f2963eb4a118ced Mon Sep 17 00:00:00 2001 From: Silent Date: Mon, 28 Oct 2024 19:51:57 +0100 Subject: [PATCH] SA: Also scale the default size of the gamepad crosshair Fixes #29 --- SilentPatchSA/SilentPatchSA.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SilentPatchSA/SilentPatchSA.cpp b/SilentPatchSA/SilentPatchSA.cpp index 76f01a9..d3ceae7 100644 --- a/SilentPatchSA/SilentPatchSA.cpp +++ b/SilentPatchSA/SilentPatchSA.cpp @@ -6255,14 +6255,14 @@ void Patch_SA_10(HINSTANCE hInstance) }; // Triangular gamepad crosshairs - their size needs to scale to screen *height* - std::array triangleSizes = { + std::array triangleSizes = { // Co-op offscreen crosshair (float**)(0x7436F1 + 2), (float**)(0x7436FF + 2), (float**)(0x74370D + 2), (float**)(0x74374B + 2), (float**)(0x743797 + 2), (float**)(0x7437D0 + 2), (float**)(0x7437FB + 2), (float**)(0x743819 + 2), (float**)(0x74386F + 2), // Regular crosshair - (float**)(0x743259 + 2), (float**)(0x743266 + 2), + (float**)(0x743212 + 2), (float**)(0x74321E + 2), (float**)(0x743259 + 2), (float**)(0x743266 + 2), }; HookEach_RenderOneXLUSprite_Rotate_Aspect(renderRotateAspect, InterceptCall); @@ -8460,6 +8460,7 @@ void Patch_SA_NewBinaries_Common(HINSTANCE hInstance) // Triangular gamepad crosshairs - their size needs to scale to screen *height* auto regularCrosshair = pattern("D8 0D ? ? ? ? D9 5D F4 D9 46 08 DC 0D ? ? ? ? D8 45 F4").get_one(); + auto defaultCrosshairSize = pattern("DD 05 ? ? ? ? D8 C9 D9 5D F4 DC 0D ? ? ? ? D9 5D E8").get_one(); std::array triangleSizes = { // Co-op offscreen crosshair get_pattern("D9 5D CC D9 05 ? ? ? ? D9 C0 D9 45 FC", 3 + 2), @@ -8468,8 +8469,10 @@ void Patch_SA_NewBinaries_Common(HINSTANCE hInstance) // Regular crosshair (float) regularCrosshair.get(2), }; - std::array triangleSizesDouble = { + std::array triangleSizesDouble = { regularCrosshair.get(0xC + 2), + defaultCrosshairSize.get(2), + defaultCrosshairSize.get(0xB + 2), }; HookEach_RenderOneXLUSprite_Rotate_Aspect(renderRotateAspect, InterceptCall);