summaryrefslogtreecommitdiffstats
path: root/apps/plugins/snow.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-02-09 00:33:23 +0000
committerJens Arnold <amiconn@rockbox.org>2005-02-09 00:33:23 +0000
commit485a9cfbc9d924286f8b7566e7bd78f4b8f95c99 (patch)
tree062137a3f9f4fe0996309e20de202a2c7b037584 /apps/plugins/snow.c
parentf24bd466f28d08098244843172d743864c3f1723 (diff)
downloadrockbox-485a9cfbc9d924286f8b7566e7bd78f4b8f95c99.tar.gz
rockbox-485a9cfbc9d924286f8b7566e7bd78f4b8f95c99.tar.bz2
rockbox-485a9cfbc9d924286f8b7566e7bd78f4b8f95c99.zip
Variable screen resolution.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5860 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/snow.c')
-rw-r--r--apps/plugins/snow.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index 3ef34bb8b8..b9fc340e3f 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -20,7 +20,7 @@
#ifdef HAVE_LCD_BITMAP
-#define NUM_PARTICLES 100
+#define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72)
static short particles[NUM_PARTICLES][2];
static struct plugin_api* rb;
@@ -28,7 +28,7 @@ static struct plugin_api* rb;
static bool particle_exists(int particle)
{
if (particles[particle][0]>=0 && particles[particle][1]>=0 &&
- particles[particle][0]<112 && particles[particle][1]<64)
+ particles[particle][0]<LCD_WIDTH && particles[particle][1]<LCD_HEIGHT)
return true;
else
return false;
@@ -40,7 +40,7 @@ static int create_particle(void)
for (i=0; i<NUM_PARTICLES; i++) {
if (!particle_exists(i)) {
- particles[i][0]=(rb->rand()%112);
+ particles[i][0]=(rb->rand()%LCD_WIDTH);
particles[i][1]=0;
return i;
}