summaryrefslogtreecommitdiff
path: root/src/d/d_spline_path.cpp
diff options
context:
space:
mode:
authorCaroline Madsen <69010899+randomsalience@users.noreply.github.com>2024-04-28 22:33:32 -0400
committerGitHub <noreply@github.com>2024-04-28 19:33:32 -0700
commit7339a87bd9f6160c99c129af4f26288fa7fcd223 (patch)
tree0e31d19baf3dfbc5838b48af58e31b920386100f /src/d/d_spline_path.cpp
parent669c7d920b196d8f1b998420014bcc9397abaa32 (diff)
fix some nonmatching functions (#2141)
Diffstat (limited to 'src/d/d_spline_path.cpp')
-rw-r--r--src/d/d_spline_path.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/d/d_spline_path.cpp b/src/d/d_spline_path.cpp
index 8d2a8399b2..919bb73501 100644
--- a/src/d/d_spline_path.cpp
+++ b/src/d/d_spline_path.cpp
@@ -28,7 +28,7 @@ SECTION_SDATA2 static f64 lit_3632 = 4503601774854144.0 /* cast s32 to float */;
/* 80097878-80097904 0921B8 008C+00 0/0 7/7 0/0 .text Init__14d2DBSplinePathFll */
#ifdef NONMATCHING
-// regalloc
+// matches with literals
void d2DBSplinePath::Init(s32 param_0, s32 param_1) {
s32 tmp;
s32 tmp2;
@@ -38,11 +38,8 @@ void d2DBSplinePath::Init(s32 param_0, s32 param_1) {
field_0x08 = 1;
field_0x0c = param_1;
- if (field_0x0c != 0) {
- tmp2 = field_0x0c - 1;
- }
-
- field_0x04 < 2 ? tmp = 1 : tmp = field_0x04 - 2;
+ tmp2 = field_0x0c != 0 ? field_0x0c - 1 : 1;
+ tmp = field_0x04 < 2 ? 1 : field_0x04 - 2;
field_0x10 = (f32)tmp / (f32)tmp2;
field_0x2c = 0;