From f888b1da9cdfa99afeca9b43c63e4c5c682a6268 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 13 Jan 2022 16:01:26 +0100 Subject: [PATCH] - sky parser improvements. --- source/core/defparser.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/source/core/defparser.cpp b/source/core/defparser.cpp index 5cfd1a7eb..e1148b861 100644 --- a/source/core/defparser.cpp +++ b/source/core/defparser.cpp @@ -905,10 +905,23 @@ void parseMultiPsky(FScanner& sc, FScriptPosition& pos) else if (sc.Compare("yscale")) { int intscale; sc.GetNumber(intscale, true); sky.scale = intscale * (1. / 65536.); } else if (sc.Compare({ "tile", "panel" })) { - int panel = 0, offset = 0; - sc.GetNumber(panel, true); - sc.GetNumber(offset, true); - if ((unsigned)panel < MAXPSKYTILES && (unsigned)offset <= PSKYOFF_MAX) sky.offsets[panel] = offset; + if (!sc.CheckString("}")) + { + int panel = 0, offset = 0; + sc.GetNumber(panel, true); + sc.GetNumber(offset, true); + 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;