Implement SPSCALE ID OUT X,Y
This commit is contained in:
@@ -1932,6 +1932,18 @@ class BuiltinFunction
|
|||||||
}
|
}
|
||||||
p.sprite.spscale(i, x, y);
|
p.sprite.spscale(i, x, y);
|
||||||
}
|
}
|
||||||
|
static void SPSCALE(PetitComputer p, int i, out double x, out double y)
|
||||||
|
{
|
||||||
|
if (!p.sprite.isValidSpriteId(i))
|
||||||
|
{
|
||||||
|
throw new OutOfRange(smilebasicFunctionName, 1);
|
||||||
|
}
|
||||||
|
if (!p.sprite.isSpriteDefined(i))
|
||||||
|
{
|
||||||
|
throw new IllegalFunctionCall("SPSCALE", 1);
|
||||||
|
}
|
||||||
|
p.sprite.getspscale(i, x, y);
|
||||||
|
}
|
||||||
static void SPROT(PetitComputer p, int i, double rot)
|
static void SPROT(PetitComputer p, int i, double rot)
|
||||||
{
|
{
|
||||||
if (!p.sprite.isValidSpriteId(i))
|
if (!p.sprite.isValidSpriteId(i))
|
||||||
|
|||||||
@@ -1030,6 +1030,15 @@ class Sprite
|
|||||||
sprites[i].scaley = y;
|
sprites[i].scaley = y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void getspscale(int i, out double x, out double y)
|
||||||
|
{
|
||||||
|
i = spid(i);
|
||||||
|
synchronized (this)
|
||||||
|
{
|
||||||
|
x = sprites[i].scalex;
|
||||||
|
y = sprites[i].scaley;
|
||||||
|
}
|
||||||
|
}
|
||||||
void sprot(int i, double rot)
|
void sprot(int i, double rot)
|
||||||
{
|
{
|
||||||
i = spid(i);
|
i = spid(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user