mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- sky parser improvements.
This commit is contained in:
parent
82be7db269
commit
f888b1da9c
1 changed files with 17 additions and 4 deletions
|
@ -904,12 +904,25 @@ void parseMultiPsky(FScanner& sc, FScriptPosition& pos)
|
||||||
else if (sc.Compare("lognumtiles")) sc.GetNumber(sky.lognumtiles, true);
|
else if (sc.Compare("lognumtiles")) sc.GetNumber(sky.lognumtiles, true);
|
||||||
else if (sc.Compare("yscale")) { int intscale; sc.GetNumber(intscale, true); sky.scale = intscale * (1. / 65536.); }
|
else if (sc.Compare("yscale")) { int intscale; sc.GetNumber(intscale, true); sky.scale = intscale * (1. / 65536.); }
|
||||||
else if (sc.Compare({ "tile", "panel" }))
|
else if (sc.Compare({ "tile", "panel" }))
|
||||||
|
{
|
||||||
|
if (!sc.CheckString("}"))
|
||||||
{
|
{
|
||||||
int panel = 0, offset = 0;
|
int panel = 0, offset = 0;
|
||||||
sc.GetNumber(panel, true);
|
sc.GetNumber(panel, true);
|
||||||
sc.GetNumber(offset, true);
|
sc.GetNumber(offset, true);
|
||||||
if ((unsigned)panel < MAXPSKYTILES && (unsigned)offset <= PSKYOFF_MAX) sky.offsets[panel] = offset;
|
if ((unsigned)panel < MAXPSKYTILES && (unsigned)offset <= PSKYOFF_MAX) sky.offsets[panel] = offset;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int panel = 0, offset;
|
||||||
|
while (!sc.CheckString("}"))
|
||||||
|
{
|
||||||
|
sc.GetNumber(offset, true);
|
||||||
|
if ((unsigned)panel < MAXPSKYTILES && (unsigned)offset <= PSKYOFF_MAX) sky.offsets[panel] = offset;
|
||||||
|
panel++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (sky.baselineofs == INT_MIN) sky.baselineofs = sky.pmoffset;
|
if (sky.baselineofs == INT_MIN) sky.baselineofs = sky.pmoffset;
|
||||||
if (!crc && sky.tilenum != DEFAULTPSKY && (unsigned)sky.tilenum >= MAXUSERTILES) return;
|
if (!crc && sky.tilenum != DEFAULTPSKY && (unsigned)sky.tilenum >= MAXUSERTILES) return;
|
||||||
|
|
Loading…
Reference in a new issue