Fix omitted argument
This commit is contained in:
@@ -1138,6 +1138,7 @@ class PushArray : Code
|
|||||||
index[i] = cast(int)v.doubleValue;
|
index[i] = cast(int)v.doubleValue;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
vm.dumpStack(vm.stacki + 1);
|
||||||
throw new TypeMismatch();
|
throw new TypeMismatch();
|
||||||
}
|
}
|
||||||
Value array;
|
Value array;
|
||||||
|
|||||||
@@ -1437,7 +1437,7 @@ class BuiltinFunction
|
|||||||
{
|
{
|
||||||
p.sprite.spshow(id);
|
p.sprite.spshow(id);
|
||||||
}
|
}
|
||||||
static void SPOFS(PetitComputer p, int id, DefaultValue!double x, DefaultValue!double y, DefaultValue!(double, false) z)
|
static void SPOFS(PetitComputer p, int id, DefaultValue!double x, DefaultValue!double y, double z)
|
||||||
{
|
{
|
||||||
if (x.isDefault || y.isDefault)
|
if (x.isDefault || y.isDefault)
|
||||||
{
|
{
|
||||||
@@ -1446,15 +1446,19 @@ class BuiltinFunction
|
|||||||
x.setDefaultValue(x_);
|
x.setDefaultValue(x_);
|
||||||
y.setDefaultValue(y_);
|
y.setDefaultValue(y_);
|
||||||
}
|
}
|
||||||
if(z.isDefault)
|
p.sprite.spofs(id, cast(double)x, cast(double)y, z);
|
||||||
|
}
|
||||||
|
static void SPOFS(PetitComputer p, int id, DefaultValue!double x, DefaultValue!double y)
|
||||||
{
|
{
|
||||||
|
if (x.isDefault || y.isDefault)
|
||||||
|
{
|
||||||
|
double x_, y_, z_;
|
||||||
|
p.sprite.getspofs(id, x_, y_, z_);
|
||||||
|
x.setDefaultValue(x_);
|
||||||
|
y.setDefaultValue(y_);
|
||||||
|
}
|
||||||
p.sprite.spofs(id, cast(double)x, cast(double)y);
|
p.sprite.spofs(id, cast(double)x, cast(double)y);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
p.sprite.spofs(id, cast(double)x, cast(double)y, cast(double)z);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@StartOptional("z")
|
@StartOptional("z")
|
||||||
static void SPOFS(PetitComputer p, int id, out double x, out double y, out double z)
|
static void SPOFS(PetitComputer p, int id, out double x, out double y, out double z)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -486,7 +486,7 @@ class Compiler
|
|||||||
}
|
}
|
||||||
void compileExpression(Expression exp, Scope sc)
|
void compileExpression(Expression exp, Scope sc)
|
||||||
{
|
{
|
||||||
if(!exp)
|
if(!exp || exp.type == NodeType.VoidExpression)
|
||||||
{
|
{
|
||||||
genCodeImm(Value(ValueType.Void));
|
genCodeImm(Value(ValueType.Void));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user