From b5aac8723fdbbf6f5e1ddb59efe782f63a3ff694 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Mon, 4 Jan 2021 22:53:49 +1100 Subject: [PATCH] - Replace `dmulscale()` calls with `DMulScale()` from common. --- source/blood/src/gameutil.cpp | 4 ++-- source/build/include/pragmas.h | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/source/blood/src/gameutil.cpp b/source/blood/src/gameutil.cpp index b01238f5c..70dec3590 100644 --- a/source/blood/src/gameutil.cpp +++ b/source/blood/src/gameutil.cpp @@ -743,8 +743,8 @@ int GetDistToLine(int x1, int y1, int x2, int y2, int x3, int y3) int check2 = (x1-x2)*(y3-y2); if (check2 > check) return -1; - int v8 = dmulscale(x1-x2,x3-x2,y1-y3,y3-y2,4); - int vv = dmulscale(x3-x2,x3-x2,y3-y2,y3-y2,4); + int v8 = DMulScale(x1-x2,x3-x2,y1-y3,y3-y2,4); + int vv = DMulScale(x3-x2,x3-x2,y3-y2,y3-y2,4); int t1, t2; if (v8 <= 0) { diff --git a/source/build/include/pragmas.h b/source/build/include/pragmas.h index 965cc1bda..adecaf4a8 100644 --- a/source/build/include/pragmas.h +++ b/source/build/include/pragmas.h @@ -38,14 +38,6 @@ inline int sgn(int32_t a) { return (a > 0) - (a < 0); } static inline int32_t mulscale(int32_t eax, int32_t edx, int32_t ecx) { return dw((qw(eax) * edx) >> by(ecx)); } static inline double fmulscale(double eax, double edx, int32_t ecx) { return (eax * edx) / (double)(qw(1) << ecx); } -static inline int32_t dmulscale(int32_t eax, int32_t edx, int32_t esi, int32_t edi, int32_t ecx) -{ - return dw(((qw(eax) * edx) + (qw(esi) * edi)) >> by(ecx)); -} -static inline double fdmulscale(double eax, double edx, double esi, double edi, int32_t ecx) -{ - return ((eax * edx) + (esi * edi)) / (double)(qw(1) << ecx); -} static inline int32_t krecipasm(int32_t i) {