mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- moved widthBits and heightBits into engine.
These functions will go away with the rest of the renderer when the time comes, so this is the right place.
This commit is contained in:
parent
51115e75df
commit
601680d08e
2 changed files with 21 additions and 20 deletions
|
@ -245,4 +245,25 @@ static inline void get_floorspr_points(T const * const spr, int32_t px, int32_t
|
|||
*y3 = *y2 + ofs.y, *y4 = *y1 + ofs.y;
|
||||
}
|
||||
|
||||
inline int widthBits(int num)
|
||||
{
|
||||
int w = tileWidth(num);
|
||||
int j = 15;
|
||||
|
||||
while ((j > 1) && ((1 << j) > w))
|
||||
j--;
|
||||
return j;
|
||||
}
|
||||
|
||||
inline int heightBits(int num)
|
||||
{
|
||||
int w = tileHeight(num);
|
||||
int j = 15;
|
||||
|
||||
while ((j > 1) && ((1 << j) > w))
|
||||
j--;
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
#endif /* ENGINE_PRIV_H */
|
||||
|
|
|
@ -481,26 +481,6 @@ inline int tileTopOffset(int num)
|
|||
return (int)TileFiles.tiledata[num].texture->GetDisplayTopOffset();
|
||||
}
|
||||
|
||||
inline int widthBits(int num)
|
||||
{
|
||||
int w = tileWidth(num);
|
||||
int j = 15;
|
||||
|
||||
while ((j > 1) && ((1 << j) > w))
|
||||
j--;
|
||||
return j;
|
||||
}
|
||||
|
||||
inline int heightBits(int num)
|
||||
{
|
||||
int w = tileHeight(num);
|
||||
int j = 15;
|
||||
|
||||
while ((j > 1) && ((1 << j) > w))
|
||||
j--;
|
||||
return j;
|
||||
}
|
||||
|
||||
inline rottile_t& RotTile(int tile)
|
||||
{
|
||||
assert(tile < MAXTILES);
|
||||
|
|
Loading…
Reference in a new issue