- consolidated the 'music' parsing in Defs (pending a refactor of the MAPINFO system.)

- removed the remaining parts of the game Defs parser because we do not want anything EDuke in here.
This commit is contained in:
Christoph Oelckers 2020-06-24 00:40:22 +02:00
parent 4b743b4063
commit e146e73345
14 changed files with 207 additions and 629 deletions

View file

@ -953,12 +953,22 @@ bool FScanner::ScanValue(bool allowfloat)
return false;
}
}
if (TokenType != TK_IntConst && (TokenType != TK_FloatConst || !allowfloat))
{
if (TokenType == TK_FloatConst && !allowfloat)
return false;
if (TokenType != TK_IntConst && TokenType != TK_FloatConst)
{
auto d = constants.CheckKey(String);
if (!d) return false;
if (!allowfloat && int64_t(*d) != *d) return false;
BigNumber = *d;
Number = *d;
Float = *d;
}
if (neg)
{
BigNumber = -BigNumber;
Number = -Number;
Float = -Float;
}