mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- removed some unused functions from m_fixed.h.
- removed the Build license note from r_bsp.cpp. This note was for code in R_AddLine which had been both refactored into several subfunctions and completely replaced with a floating point version. What is left is just some basic common math without any traits that resemble anything in Build.
This commit is contained in:
parent
5536184bee
commit
8748b9ef6d
2 changed files with 0 additions and 63 deletions
|
@ -79,63 +79,6 @@ inline SDWORD SafeDivScale32 (SDWORD a, SDWORD b)
|
|||
#define FixedMul MulScale16
|
||||
#define FixedDiv SafeDivScale16
|
||||
|
||||
inline void qinterpolatedown16 (SDWORD *out, DWORD count, SDWORD val, SDWORD delta)
|
||||
{
|
||||
if (count & 1)
|
||||
{
|
||||
out[0] = val >> 16;
|
||||
val += delta;
|
||||
}
|
||||
count >>= 1;
|
||||
while (count-- != 0)
|
||||
{
|
||||
int temp = val + delta;
|
||||
out[0] = val >> 16;
|
||||
val = temp + delta;
|
||||
out[1] = temp >> 16;
|
||||
out += 2;
|
||||
}
|
||||
}
|
||||
|
||||
inline void qinterpolatedown16short (short *out, DWORD count, SDWORD val, SDWORD delta)
|
||||
{
|
||||
if (count)
|
||||
{
|
||||
if ((size_t)out & 2)
|
||||
{ // align to dword boundary
|
||||
*out++ = (short)(val >> 16);
|
||||
count--;
|
||||
val += delta;
|
||||
}
|
||||
DWORD *o2 = (DWORD *)out;
|
||||
DWORD c2 = count>>1;
|
||||
while (c2-- != 0)
|
||||
{
|
||||
SDWORD temp = val + delta;
|
||||
*o2++ = (temp & 0xffff0000) | ((DWORD)val >> 16);
|
||||
val = temp + delta;
|
||||
}
|
||||
if (count & 1)
|
||||
{
|
||||
*(short *)o2 = (short)(val >> 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//returns num/den, dmval = num%den
|
||||
inline SDWORD DivMod (SDWORD num, SDWORD den, SDWORD *dmval)
|
||||
{
|
||||
*dmval = num % den;
|
||||
return num / den;
|
||||
}
|
||||
|
||||
//returns num%den, dmval = num/den
|
||||
inline SDWORD ModDiv (SDWORD num, SDWORD den, SDWORD *dmval)
|
||||
{
|
||||
*dmval = num / den;
|
||||
return num % den;
|
||||
}
|
||||
|
||||
inline fixed_t FloatToFixed(double f)
|
||||
{
|
||||
return xs_Fix<16>::ToFix(f);
|
||||
|
|
|
@ -17,12 +17,6 @@
|
|||
// DESCRIPTION:
|
||||
// BSP traversal, handling of LineSegs for rendering.
|
||||
//
|
||||
// This file contains some code from the Build Engine.
|
||||
//
|
||||
// "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
|
||||
// Ken Silverman's official web site: "http://www.advsys.net/ken"
|
||||
// See the included license file "BUILDLIC.TXT" for license info.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue