mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- Renamed RClamp to Pick.
This commit is contained in:
parent
8c5a8c54f0
commit
785f72d6eb
6 changed files with 12 additions and 12 deletions
|
@ -300,7 +300,7 @@ xx(CallACS)
|
|||
xx(Sqrt)
|
||||
xx(CheckClass)
|
||||
xx(IsPointerEqual)
|
||||
xx(RClamp)
|
||||
xx(Pick)
|
||||
|
||||
// Various actor names which are used internally
|
||||
xx(MapSpot)
|
||||
|
|
|
@ -158,7 +158,7 @@ std2:
|
|||
'random' { RET(TK_Random); }
|
||||
'random2' { RET(TK_Random2); }
|
||||
'frandom' { RET(TK_FRandom); }
|
||||
'rclamp' { RET(TK_RClamp); }
|
||||
'pick' { RET(TK_Pick); }
|
||||
|
||||
L (L|D)* { RET(TK_Identifier); }
|
||||
|
||||
|
|
|
@ -122,5 +122,5 @@ xx(TK_Array, "'array'")
|
|||
xx(TK_In, "'in'")
|
||||
xx(TK_SizeOf, "'sizeof'")
|
||||
xx(TK_AlignOf, "'alignof'")
|
||||
xx(TK_RClamp, "'rclamp'")
|
||||
xx(TK_Pick, "'pick'")
|
||||
#undef xx
|
||||
|
|
|
@ -371,7 +371,7 @@ static FxExpression *ParseExpression0 (FScanner &sc, const PClass *cls)
|
|||
|
||||
return new FxRandom(rng, min, max, sc);
|
||||
}
|
||||
else if (sc.CheckToken(TK_RClamp))
|
||||
else if (sc.CheckToken(TK_Pick))
|
||||
{
|
||||
FRandom *rng;
|
||||
|
||||
|
@ -392,7 +392,7 @@ static FxExpression *ParseExpression0 (FScanner &sc, const PClass *cls)
|
|||
FxExpression *max = ParseExpressionM(sc, cls);
|
||||
sc.MustGetToken(')');
|
||||
|
||||
return new FxRClamp(rng, min, max, sc);
|
||||
return new FxPick(rng, min, max, sc);
|
||||
}
|
||||
else if (sc.CheckToken(TK_FRandom))
|
||||
{
|
||||
|
|
|
@ -559,7 +559,7 @@ public:
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
class FxRClamp : public FxExpression
|
||||
class FxPick : public FxExpression
|
||||
{
|
||||
protected:
|
||||
FRandom * rng;
|
||||
|
@ -567,8 +567,8 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
FxRClamp(FRandom *, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos);
|
||||
~FxRClamp();
|
||||
FxPick(FRandom *, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos);
|
||||
~FxPick();
|
||||
FxExpression *Resolve(FCompileContext&);
|
||||
|
||||
ExpVal EvalExpression(AActor *self);
|
||||
|
|
|
@ -1696,7 +1696,7 @@ ExpVal FxRandom::EvalExpression (AActor *self)
|
|||
//
|
||||
//
|
||||
//==========================================================================
|
||||
FxRClamp::FxRClamp(FRandom * r, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos)
|
||||
FxPick::FxPick(FRandom * r, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos)
|
||||
: FxExpression(pos)
|
||||
{
|
||||
if (mi != NULL && ma != NULL)
|
||||
|
@ -1715,7 +1715,7 @@ FxRClamp::FxRClamp(FRandom * r, FxExpression *mi, FxExpression *ma, const FScrip
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FxRClamp::~FxRClamp()
|
||||
FxPick::~FxPick()
|
||||
{
|
||||
SAFE_DELETE(min);
|
||||
SAFE_DELETE(max);
|
||||
|
@ -1727,7 +1727,7 @@ FxRClamp::~FxRClamp()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FxExpression *FxRClamp::Resolve(FCompileContext &ctx)
|
||||
FxExpression *FxPick::Resolve(FCompileContext &ctx)
|
||||
{
|
||||
CHECKRESOLVED();
|
||||
if (min && max)
|
||||
|
@ -1746,7 +1746,7 @@ FxExpression *FxRClamp::Resolve(FCompileContext &ctx)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
ExpVal FxRClamp::EvalExpression(AActor *self)
|
||||
ExpVal FxPick::EvalExpression(AActor *self)
|
||||
{
|
||||
ExpVal val;
|
||||
val.Type = VAL_Int;
|
||||
|
|
Loading…
Reference in a new issue