stretch_sprite

Stretches a sprite to the destination bitmap.

Description

void stretch_sprite(BITMAP *bmp, BITMAP *sprite, int x, int y, int w, int h);
Like draw_sprite(), except it can stretch the sprite image to the specified width and height and requires the sprite image and destination bitmap to be of the same color depth. Moreover, the sprite image must be a memory bitmap. Example:
      /* Create tunnel like effect. */
      for (step = 1; step < 16; step++) {
	 int width = SCREEN_W / step;
	 int height = SCREEN_H / step;
	 stretch_sprite(screen, image, SCREEN_W / 2 - width / 2,
			SCREEN_H / 2 - height / 2, width, height);
      }

Related Discussions

The following threads each have code containing this keyword: Note: You can click on the numbers to jump directly to the posts that reference this page.

Related Projects

The following projects include source code containing this keyword: