From c4ba480b18034ec16875f55789bdbf937b0a13d1 Mon Sep 17 00:00:00 2001 From: intra0 Date: Sun, 22 Dec 2024 15:03:42 -0600 Subject: [PATCH] simplify float functions moves the logic for handling floating point precision into where its relivent --- src/XenobladeChroniclesX/Enhancements/libini/patch_ini.asm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/XenobladeChroniclesX/Enhancements/libini/patch_ini.asm b/src/XenobladeChroniclesX/Enhancements/libini/patch_ini.asm index 32271696..93e54b18 100644 --- a/src/XenobladeChroniclesX/Enhancements/libini/patch_ini.asm +++ b/src/XenobladeChroniclesX/Enhancements/libini/patch_ini.asm @@ -337,6 +337,7 @@ mflr r29 lfsu f1, 4(r24) lis r4, str_floating_precision_INImod@hi ori r4, r4, str_floating_precision_INImod@l +lbzu r3, 1(r21) addi r3, r3, 0x30 bl CheckifPrecisionIsValidINImod stb r3, 2(r4) @@ -396,7 +397,6 @@ b PrintSettingsINImod ;calls sprintf to print the float PrintFloatINImod: mflr r28 -lbzu r3, 1(r21) bl CallsprintfINImod bl PrintNewLineINImod mtlr r28 @@ -413,15 +413,14 @@ PrintAMVPINImod: mflr r28 lis r19, 0x202C ori r19, r19, 0x2000 -lbzu r3, 1(r21) bl CallsprintfINImod stw r19, 0(r30) addi r30, r30, 3 -lbz r3, 0(r21) +addi r21, r21, -1 bl CallsprintfINImod stw r19, 0(r30) addi r30, r30, 3 -lbz r3, 0(r21) +addi r21, r21, -1 bl CallsprintfINImod bl PrintNewLineINImod mtlr r28