mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- Replace tmulscale##()
calls with TMulScale()
from common.
This commit is contained in:
parent
b5caf2fd97
commit
8f75f06efd
3 changed files with 2 additions and 9 deletions
|
@ -2631,7 +2631,7 @@ int actFloorBounceVector(int *x, int *y, int *z, int nSector, int a5)
|
|||
int t5 = divscale16(t2, t3);
|
||||
int t6 = mulscale30(t5, Cos(angle));
|
||||
int t7 = mulscale30(t5, Sin(angle));
|
||||
int t8 = tmulscale16(*x, t6, *y, t7, *z, t4);
|
||||
int t8 = TMulScale(*x, t6, *y, t7, *z, t4, 16);
|
||||
int t9 = mulscale16(t8, 0x10000+a5);
|
||||
*x -= mulscale16(t6, t9);
|
||||
*y -= mulscale16(t7, t9);
|
||||
|
|
|
@ -65,14 +65,6 @@ static inline int32_t scale(int32_t eax, int32_t edx, int32_t ecx)
|
|||
{ \
|
||||
return ((eax * edx) + (esi * edi)) / (double)(qw(1) << a); \
|
||||
} \
|
||||
static FORCE_INLINE int32_t tmulscale##a(int32_t eax, int32_t edx, int32_t ebx, int32_t ecx, int32_t esi, int32_t edi) \
|
||||
{ \
|
||||
return dw(((qw(eax) * edx) + (qw(ebx) * ecx) + (qw(esi) * edi)) >> by(a)); \
|
||||
} \
|
||||
static FORCE_INLINE double ftmulscale##a(double eax, double edx, double ebx, double ecx, double esi, double edi) \
|
||||
{ \
|
||||
return ((eax * edx) + (ebx * ecx) + (esi * edi)) / (double)(qw(1) << a); \
|
||||
}
|
||||
|
||||
EDUKE32_GENERATE_PRAGMAS
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
__forceinline constexpr int32_t MulScale(int32_t a, int32_t b, int32_t shift) { return (int32_t)(((int64_t)a * b) >> shift); }
|
||||
__forceinline constexpr int32_t DMulScale(int32_t a, int32_t b, int32_t c, int32_t d, int32_t shift) { return (int32_t)(((int64_t)a * b + (int64_t)c * d) >> shift); }
|
||||
__forceinline constexpr int32_t TMulScale(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e, int32_t f, int32_t shift) { return (int32_t)(((int64_t)a * b + (int64_t)c * d + (int64_t)e * f) >> shift); }
|
||||
__forceinline constexpr int32_t DivScale(int32_t a, int32_t b, int shift) { return (int32_t)(((int64_t)a << shift) / b); }
|
||||
|
||||
#include "xs_Float.h"
|
||||
|
|
Loading…
Reference in a new issue