mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 11:40:44 +00:00
- fixed some very noisy warnings in two headers.
This commit is contained in:
parent
03289f5097
commit
7283de0084
2 changed files with 31 additions and 16 deletions
|
@ -79,14 +79,14 @@ struct sectortype
|
|||
int ceilingypan() const { return int(ceilingypan_); }
|
||||
int floorxpan() const { return int(floorxpan_); }
|
||||
int floorypan() const { return int(floorypan_); }
|
||||
void setfloorxpan(float val) { floorxpan_ = fmod(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void setfloorypan(float val) { floorypan_ = fmod(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void setceilingxpan(float val) { ceilingxpan_ = fmod(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void setceilingypan(float val) { ceilingypan_ = fmod(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void addfloorxpan(float add) { floorxpan_ = fmod(floorxpan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addfloorypan(float add) { floorypan_ = fmod(floorypan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addceilingxpan(float add) { ceilingxpan_ = fmod(ceilingxpan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addceilingypan(float add) { ceilingypan_ = fmod(ceilingypan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void setfloorxpan(float val) { floorxpan_ = fmodf(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void setfloorypan(float val) { floorypan_ = fmodf(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void setceilingxpan(float val) { ceilingxpan_ = fmodf(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void setceilingypan(float val) { ceilingypan_ = fmodf(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void addfloorxpan(float add) { floorxpan_ = fmodf(floorxpan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addfloorypan(float add) { floorypan_ = fmodf(floorypan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addceilingxpan(float add) { ceilingxpan_ = fmodf(ceilingxpan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addceilingypan(float add) { ceilingypan_ = fmodf(ceilingypan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
};
|
||||
|
||||
//cstat:
|
||||
|
@ -130,10 +130,10 @@ struct walltype
|
|||
|
||||
int xpan() const { return int(xpan_); }
|
||||
int ypan() const { return int(ypan_); }
|
||||
void setxpan(float add) { xpan_ = fmod(add + 512, 256); } // +512 is for handling negative offsets
|
||||
void setypan(float add) { ypan_ = fmod(add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addxpan(float add) { xpan_ = fmod(xpan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addypan(float add) { ypan_ = fmod(ypan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void setxpan(float add) { xpan_ = fmodf(add + 512, 256); } // +512 is for handling negative offsets
|
||||
void setypan(float add) { ypan_ = fmodf(add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addxpan(float add) { xpan_ = fmodf(xpan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addypan(float add) { ypan_ = fmodf(ypan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
|
||||
#if 0
|
||||
// make sure we do not accidentally copy this
|
||||
|
|
|
@ -362,22 +362,37 @@ inline binangle bvectangbam(int32_t x, int32_t y)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
inline int32_t interpolatedvalue(int32_t oval, int32_t val, double const smoothratio, int const scale = 16)
|
||||
inline constexpr int32_t interpolatedvalue(int32_t oval, int32_t val, double const smoothratio, int const scale = 16)
|
||||
{
|
||||
return oval + MulScale(val - oval, int(smoothratio), scale);
|
||||
}
|
||||
|
||||
inline constexpr int32_t interpolatedvalue(int32_t oval, int32_t val, int const smoothratio, int const scale = 16)
|
||||
{
|
||||
return oval + MulScale(val - oval, smoothratio, scale);
|
||||
}
|
||||
|
||||
inline double interpolatedvaluef(double oval, double val, double const smoothratio, int const scale = 16)
|
||||
inline constexpr double interpolatedvaluef(double oval, double val, double const smoothratio, int const scale = 16)
|
||||
{
|
||||
return oval + MulScaleF(val - oval, smoothratio, scale);
|
||||
}
|
||||
|
||||
inline int32_t interpolatedangle(int32_t oang, int32_t ang, double const smoothratio, int const scale = 16)
|
||||
inline constexpr int32_t interpolatedangle(int32_t oang, int32_t ang, double const smoothratio, int const scale = 16)
|
||||
{
|
||||
return oang + MulScale(((ang + 1024 - oang) & 2047) - 1024, int(smoothratio), scale);
|
||||
}
|
||||
|
||||
inline constexpr int32_t interpolatedangle(int32_t oang, int32_t ang, int const smoothratio, int const scale = 16)
|
||||
{
|
||||
return oang + MulScale(((ang + 1024 - oang) & 2047) - 1024, smoothratio, scale);
|
||||
}
|
||||
|
||||
inline binangle interpolatedangle(binangle oang, binangle ang, double const smoothratio, int const scale = 16)
|
||||
inline constexpr binangle interpolatedangle(binangle oang, binangle ang, double const smoothratio, int const scale = 16)
|
||||
{
|
||||
return bamang(oang.asbam() + MulScale(((ang.asbam() + 0x80000000 - oang.asbam()) & 0xFFFFFFFF) - 0x80000000, int(smoothratio), scale));
|
||||
}
|
||||
|
||||
inline constexpr binangle interpolatedangle(binangle oang, binangle ang, int const smoothratio, int const scale = 16)
|
||||
{
|
||||
return bamang(oang.asbam() + MulScale(((ang.asbam() + 0x80000000 - oang.asbam()) & 0xFFFFFFFF) - 0x80000000, smoothratio, scale));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue