mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- fixed a few parsing errors.
This commit is contained in:
parent
aaad546729
commit
6fb09f36c7
2 changed files with 16 additions and 0 deletions
|
@ -342,6 +342,8 @@ static int32_t defsparser(scriptfile *script)
|
|||
break;
|
||||
case T_CUTSCENE:
|
||||
case T_ANIMSOUNDS:
|
||||
parseEmptyBlockWithParm(*script, pos);;
|
||||
break;
|
||||
case T_NEWGAMECHOICES: // stub
|
||||
parseEmptyBlock(*script, pos);
|
||||
break;
|
||||
|
|
|
@ -873,8 +873,20 @@ void parseEmptyBlock(FScanner& sc, FScriptPosition& pos)
|
|||
|
||||
if (sc.StartBraces(&blockend)) return;
|
||||
sc.RestorePos(blockend);
|
||||
sc.CheckString("}");
|
||||
}
|
||||
|
||||
void parseEmptyBlockWithParm(FScanner& sc, FScriptPosition& pos)
|
||||
{
|
||||
FScanner::SavedPos blockend;
|
||||
|
||||
sc.MustGetString();
|
||||
if (sc.StartBraces(&blockend)) return;
|
||||
sc.RestorePos(blockend);
|
||||
sc.CheckString("}");
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
|
@ -978,6 +990,7 @@ static void parseBlendTableGlBlend(FScanner& sc, FScriptPosition& pos, int id)
|
|||
{
|
||||
int whichb = 0;
|
||||
sc.MustGetString();
|
||||
if (sc.Compare("}")) break;
|
||||
if (sc.Compare({ "src", "sfactor", "top" })) whichb = 0;
|
||||
else if (sc.Compare({ "dst", "dfactor", "bottom" })) whichb = 1;
|
||||
else if (sc.Compare("alpha"))
|
||||
|
@ -987,6 +1000,7 @@ static void parseBlendTableGlBlend(FScanner& sc, FScriptPosition& pos, int id)
|
|||
continue;
|
||||
}
|
||||
uint8_t* const factor = whichb == 0 ? &bdef.src : &bdef.dst;
|
||||
sc.MustGetString();
|
||||
if (sc.Compare("ZERO")) *factor = STYLEALPHA_Zero;
|
||||
else if (sc.Compare("ONE")) *factor = STYLEALPHA_One;
|
||||
else if (sc.Compare("SRC_COLOR")) *factor = STYLEALPHA_SrcCol;
|
||||
|
|
Loading…
Reference in a new issue