- removed most inline assembly. Integer multiplication gets handled fine by all current compilers and fixed point division is too infrequently used to justify this mess.
That only leaves the Scale function which is still being used in a few places and which would create considerably worse code without assembly on 32 bit platforms. This is also far too primitive (2 or 3 assembly instructions) to claim any copyright on it, so I think m_fixed.h can now be considered free of Build-related issues. The deficated inline headers have been removed because that sole remaining function could be easily moved into m_fixed.h.
This commit is contained in:
parent
3563718049
commit
7d4a5898ac
5 changed files with 71 additions and 249 deletions
|
|
@ -2001,8 +2001,8 @@ int P_VanillaPointOnLineSide(double x, double y, const line_t* line)
|
|||
auto dx = FloatToFixed(x - line->v1->fX());
|
||||
auto dy = FloatToFixed(y - line->v1->fY());
|
||||
|
||||
auto left = MulScale16( int(delta.Y * 256) , dx );
|
||||
auto right = MulScale16( dy , int(delta.X * 256) );
|
||||
auto left = FixedMul( int(delta.Y * 256) , dx );
|
||||
auto right = FixedMul( dy , int(delta.X * 256) );
|
||||
|
||||
if (right < left)
|
||||
return 0; // front side
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue