1
0

Implement BGSCALE(2)

This commit is contained in:
otya128
2016-12-31 21:49:20 +09:00
parent 3884116185
commit 166193764b
2 changed files with 13 additions and 0 deletions

View File

@@ -187,6 +187,11 @@ class BG
this.scalex = x; this.scalex = x;
this.scaley = y; this.scaley = y;
} }
void getScale(out double x, out double y)
{
x = this.scalex;
y = this.scaley;
}
void rot(int rot) void rot(int rot)
{ {
this.r = rot; this.r = rot;

View File

@@ -2378,6 +2378,14 @@ class BuiltinFunction
} }
p.getBG(layer).scale(x, y); p.getBG(layer).scale(x, y);
} }
static void BGSCALE(PetitComputer p, int layer, out double x, out double y)
{
if (!p.isValidLayer(layer))
{
throw new OutOfRange("BGSCALE", 1);
}
p.getBG(layer).getScale(x, y);
}
static void BGROT(PetitComputer p, int layer, int rot) static void BGROT(PetitComputer p, int layer, int rot)
{ {
if (!p.isValidLayer(layer)) if (!p.isValidLayer(layer))