summaryrefslogtreecommitdiff
path: root/apps/plugins/fractals/fractal_sets.h
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2010-01-17 15:32:17 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2010-01-17 15:32:17 +0000
commit55240a2e8587f09d33a2594d90fde7f17b4a9266 (patch)
treee88820e1dca358bd3df5864560aad53b47deb906 /apps/plugins/fractals/fractal_sets.h
parent51cb7eb5f27d773db949d3491b544fdf42ff625c (diff)
Fractals: Use constants for screen panning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24258 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/fractals/fractal_sets.h')
-rw-r--r--apps/plugins/fractals/fractal_sets.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/plugins/fractals/fractal_sets.h b/apps/plugins/fractals/fractal_sets.h
index 2d0ff7d930..a41de45c14 100644
--- a/apps/plugins/fractals/fractal_sets.h
+++ b/apps/plugins/fractals/fractal_sets.h
@@ -24,6 +24,14 @@
#include "lib/grey.h"
#include "lib/xlcd.h"
+#define DELTA 8 /* Panning moves 1/DELTA of screen */
+
+#define LCD_SHIFT_X (LCD_WIDTH / DELTA)
+#define LCD_SHIFT_Y (LCD_HEIGHT / DELTA)
+
+#define X_DELTA(x) (((x) * LCD_WIDTH) / DELTA)
+#define Y_DELTA(y) (((y) * LCD_HEIGHT) / DELTA)
+
struct fractal_rect
{
int px_min;