mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-05-30 08:31:29 +00:00
- optionally allow passing a script position object to V_GetColor and subfunctions for better error output. Implemented this for all occurences where this info was available.
This commit is contained in:
parent
1fc90b1ba9
commit
21e3aba1c7
15 changed files with 51 additions and 54 deletions
|
@ -1256,7 +1256,7 @@ FxExpression *FxColorCast::Resolve(FCompileContext &ctx)
|
|||
}
|
||||
else
|
||||
{
|
||||
FxExpression *x = new FxConstant(V_GetColor(nullptr, constval.GetString()), ScriptPosition);
|
||||
FxExpression *x = new FxConstant(V_GetColor(nullptr, constval.GetString(), &ScriptPosition), ScriptPosition);
|
||||
delete this;
|
||||
return x;
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ FxExpression *ParseParameter(FScanner &sc, PClassActor *cls, PType *type, bool c
|
|||
}
|
||||
else
|
||||
{
|
||||
int c = V_GetColor (NULL, sc.String);
|
||||
int c = V_GetColor (NULL, sc);
|
||||
// 0 needs to be the default so we have to mark the color.
|
||||
v = MAKEARGB(1, RPART(c), GPART(c), BPART(c));
|
||||
}
|
||||
|
|
|
@ -2305,8 +2305,7 @@ DEFINE_CLASS_PROPERTY_PREFIX(powerup, color, C_f, Inventory)
|
|||
*pBlendColor = MakeSpecialColormap(65535);
|
||||
return;
|
||||
}
|
||||
|
||||
color = V_GetColor(NULL, name);
|
||||
color = V_GetColor(NULL, name, &bag.ScriptPosition);
|
||||
}
|
||||
if (PROP_PARM_COUNT > 2)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue