- streamlined font handling for scripts a bit.

- moved the two 'you raised the alarm' messages for Strife to the string table
This commit is contained in:
Christoph Oelckers 2017-02-05 13:14:22 +01:00
commit b570d0819b
14 changed files with 144 additions and 35 deletions

View file

@ -294,6 +294,7 @@ enum EFxType
EFX_StrLen,
EFX_ColorLiteral,
EFX_GetDefaultByType,
EFX_FontCast,
EFX_COUNT
};
@ -488,6 +489,13 @@ public:
isresolved = true;
}
FxConstant(FFont *state, const FScriptPosition &pos) : FxExpression(EFX_Constant, pos)
{
value.pointer = state;
ValueType = value.Type = TypeFont;
isresolved = true;
}
FxConstant(const FScriptPosition &pos) : FxExpression(EFX_Constant, pos)
{
value.pointer = nullptr;
@ -664,6 +672,18 @@ public:
ExpEmit Emit(VMFunctionBuilder *build);
};
class FxFontCast : public FxExpression
{
FxExpression *basex;
public:
FxFontCast(FxExpression *x);
~FxFontCast();
FxExpression *Resolve(FCompileContext&);
};
//==========================================================================
//
// FxTypeCast