mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 01:11:15 +00:00
- fixed sky tiling.
This commit is contained in:
parent
0e89bffabd
commit
e3103fff02
1 changed files with 3 additions and 3 deletions
|
@ -101,9 +101,9 @@ SkyDefinition getSky(int tilenum)
|
||||||
int w = tileWidth(tilenum);
|
int w = tileWidth(tilenum);
|
||||||
if (result.lognumtiles == 0 || w >= 256)
|
if (result.lognumtiles == 0 || w >= 256)
|
||||||
{
|
{
|
||||||
int bits = sizeToBits(w);
|
if (w < 512) result.lognumtiles = 2;
|
||||||
result.lognumtiles = 11 - bits;
|
else if (w < 1024) result.lognumtiles = 1;
|
||||||
if ((1 << bits) < w) result.lognumtiles--; // round down if not a power of two
|
else result.lognumtiles = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue