diff --git a/SMILEBASIC/bg.d b/SMILEBASIC/bg.d index be4c56e..a572111 100644 --- a/SMILEBASIC/bg.d +++ b/SMILEBASIC/bg.d @@ -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; diff --git a/SMILEBASIC/builtinfunctions.d b/SMILEBASIC/builtinfunctions.d index cfe67d1..3acbd85 100644 --- a/SMILEBASIC/builtinfunctions.d +++ b/SMILEBASIC/builtinfunctions.d @@ -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))