diff --git a/data/images/magic/grass.png b/data/images/magic/grass.png new file mode 100644 index 000000000..c79f5fec9 Binary files /dev/null and b/data/images/magic/grass.png differ diff --git a/data/images/ui/grass.png b/data/images/ui/grass.png new file mode 100644 index 000000000..e0c5051dc Binary files /dev/null and b/data/images/ui/grass.png differ diff --git a/src/tuxpaint.c b/src/tuxpaint.c index ba47479bb..4352d126a 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -4485,15 +4485,17 @@ static void blit_magic(int x, int y, int button_down) } else if (cur_magic == MAGIC_GRASS) { - if ((rand() % 10) < 2) + int rank = ((double)y/canvas->h) * (0.99+(rand()/(double)RAND_MAX)) * 4; + int ah = 1< ah && ((rand() % 10) < 2)) { - src.x = 0; - src.y = (rand() % 4) * 32; - src.w = 32; - src.h = 32; + src.x = (rand() % 4) * 64; + src.y = ah; + src.w = 64; + src.h = ah; - dest.x = x - 16; - dest.y = y - 16; + dest.x = x - 32; + dest.y = y; SDL_BlitSurface(img_grass, &src, canvas, &dest); }