mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-19 07:00:52 +00:00
- fixed FxFRandom setup which used a path in FxRandom that is no longer supported.
This commit is contained in:
parent
f99bba48dc
commit
e643582957
2 changed files with 15 additions and 6 deletions
|
@ -5441,14 +5441,23 @@ ExpEmit FxMinMax::Emit(VMFunctionBuilder *build)
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
FxRandom::FxRandom(FRandom * r, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos, bool nowarn)
|
FxRandom::FxRandom(EFxType type, FRandom * r, const FScriptPosition &pos)
|
||||||
: FxExpression(EFX_Random, pos)
|
: FxExpression(EFX_Random, pos)
|
||||||
{
|
{
|
||||||
EmitTail = false;
|
rng = r;
|
||||||
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
FxRandom::FxRandom(FRandom * r, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos, bool nowarn)
|
||||||
|
: FxRandom(EFX_Random, rng, pos)
|
||||||
|
{
|
||||||
assert(mi && ma);
|
assert(mi && ma);
|
||||||
min = new FxIntCast(mi, nowarn);
|
min = new FxIntCast(mi, nowarn);
|
||||||
max = new FxIntCast(ma, nowarn);
|
max = new FxIntCast(ma, nowarn);
|
||||||
rng = r;
|
|
||||||
ValueType = TypeSInt32;
|
ValueType = TypeSInt32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5721,13 +5730,12 @@ ExpEmit FxRandomPick::Emit(VMFunctionBuilder *build)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
FxFRandom::FxFRandom(FRandom *r, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos)
|
FxFRandom::FxFRandom(FRandom *r, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos)
|
||||||
: FxRandom(r, nullptr, nullptr, pos, true)
|
: FxRandom(EFX_FRandom, r, pos)
|
||||||
{
|
{
|
||||||
assert(mi && ma);
|
assert(mi && ma);
|
||||||
min = new FxFloatCast(mi);
|
min = new FxFloatCast(mi);
|
||||||
max = new FxFloatCast(ma);
|
max = new FxFloatCast(ma);
|
||||||
ValueType = TypeFloat64;
|
ValueType = TypeFloat64;
|
||||||
ExprType = EFX_FRandom;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -1257,10 +1257,11 @@ public:
|
||||||
class FxRandom : public FxExpression
|
class FxRandom : public FxExpression
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
bool EmitTail;
|
bool EmitTail = false;
|
||||||
FRandom *rng;
|
FRandom *rng;
|
||||||
FxExpression *min, *max;
|
FxExpression *min, *max;
|
||||||
|
|
||||||
|
FxRandom(EFxType type, FRandom * r, const FScriptPosition &pos);
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FxRandom(FRandom *, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos, bool nowarn);
|
FxRandom(FRandom *, FxExpression *mi, FxExpression *ma, const FScriptPosition &pos, bool nowarn);
|
||||||
|
|
Loading…
Reference in a new issue