1
0

Implement SPSCALE ID OUT X,Y

This commit is contained in:
otya128
2017-07-03 19:22:55 +09:00
parent f0d6057f14
commit 5f69126a35
2 changed files with 21 additions and 0 deletions

View File

@@ -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))

View File

@@ -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);