mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-05-30 08:31:29 +00:00
- converted the rest of Heretic's actors.
- fixed: Boolean constants were not properly handled.
This commit is contained in:
parent
c13916ea18
commit
552f094ec1
13 changed files with 928 additions and 850 deletions
|
@ -2385,6 +2385,10 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast)
|
|||
{
|
||||
return new FxConstant(cnst->IntVal, *ast);
|
||||
}
|
||||
else if (cnst->Type->IsA(RUNTIME_CLASS(PBool)))
|
||||
{
|
||||
return new FxConstant(!!cnst->IntVal, *ast);
|
||||
}
|
||||
else if (cnst->Type->IsA(RUNTIME_CLASS(PFloat)))
|
||||
{
|
||||
return new FxConstant(cnst->DoubleVal, *ast);
|
||||
|
@ -2396,7 +2400,7 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast)
|
|||
else
|
||||
{
|
||||
// can there be other types?
|
||||
Error(cnst, "Unknown constant type");
|
||||
Error(cnst, "Unknown constant type %s", cnst->Type->DescriptiveName());
|
||||
return new FxConstant(0, *ast);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue