From e09b2c5aad212299c6c0188c954a02e33060d684 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 8 Jan 2017 11:02:00 -0500 Subject: Fixed bug in oscillation mode I forgot to shift the sine wave up by the amplitude! The bitmap was sometimes being given negative numbers. --- BallBounce.apk | Bin 1219500 -> 1219531 bytes .../neocities/autoart/ballbounce/CanvasView.java | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/BallBounce.apk b/BallBounce.apk index af66667..14ba99c 100644 Binary files a/BallBounce.apk and b/BallBounce.apk differ diff --git a/java/org/neocities/autoart/ballbounce/CanvasView.java b/java/org/neocities/autoart/ballbounce/CanvasView.java index 7747e80..e0f3653 100644 --- a/java/org/neocities/autoart/ballbounce/CanvasView.java +++ b/java/org/neocities/autoart/ballbounce/CanvasView.java @@ -180,7 +180,7 @@ public class CanvasView extends View } else if (Game.MODE == Game.OSCILLATION_MODE) { - int val = (int)(255*Math.sin(0.001*i)); + int val = (int)(128*Math.sin(0.001*i)+127); paint.setARGB(255, val, val, val); } else if (Game.MODE == Game.BW_MODE) -- cgit v1.2.3