1
0

Implement BGROT(2)

This commit is contained in:
otya128
2016-12-31 21:47:00 +09:00
parent 1f2b6578de
commit 3884116185
2 changed files with 14 additions and 2 deletions

View File

@@ -187,10 +187,14 @@ class BG
this.scalex = x;
this.scaley = y;
}
void rot(double rot)
void rot(int rot)
{
this.r = rot;
}
int rot()
{
return cast(int)r;
}
void fill(int x, int y, int x2, int y2, int screendata)
{
import std.algorithm;

View File

@@ -2378,7 +2378,7 @@ class BuiltinFunction
}
p.getBG(layer).scale(x, y);
}
static void BGROT(PetitComputer p, int layer, double rot)
static void BGROT(PetitComputer p, int layer, int rot)
{
if (!p.isValidLayer(layer))
{
@@ -2386,6 +2386,14 @@ class BuiltinFunction
}
p.getBG(layer).rot(rot);
}
static int BGROT(PetitComputer p, int layer)
{
if (!p.isValidLayer(layer))
{
throw new OutOfRange(smilebasicFunctionName, 1);
}
return p.getBG(layer).rot;
}
static void BGFILL(PetitComputer p, int layer, int x, int y, int x2, int y2, int screendata)
{
if (!p.isValidLayer(layer))