.\" Generated by the Allegro makedoc utility .TH draw_sprite_v_flip 3alleg4 "version 4.4.3" "Allegro" "Allegro manual" .SH NAME draw_sprite_v_flip, draw_sprite_h_flip, draw_sprite_vh_flip \- Draws the sprite transformed to the destination bitmap. Allegro game programming library.\& .SH SYNOPSIS .B #include .sp .B void draw_sprite_v_flip(BITMAP *bmp, BITMAP *sprite, int x, int y); .B void draw_sprite_h_flip(BITMAP *bmp, BITMAP *sprite, int x, int y); .B void draw_sprite_vh_flip(BITMAP *bmp, BITMAP *sprite, int x, int y); .SH DESCRIPTION These are like draw_sprite(), but they additionally flip the image vertically, horizontally, or both, respectively. Flipping vertically means that the y-axis is reversed, while flipping horizontally means that the x-axis is reversed, between the source and the destination. This produces exact mirror images, which is not the same as rotating the sprite (and it is a lot faster than the rotation routine). The sprite must be a memory bitmap. Example: .nf if (key[KEY_RIGHT]) draw_sprite(screen, hero_right, pos_x, pos_y); else if (key[KEY_LEFT]) draw_sprite_h_flip(screen, hero_right, pos_x, pos_y); else draw_sprite(screen, hero_idle, pos_x, pos_y); .fi .SH SEE ALSO .BR draw_sprite (3alleg4), .BR bitmap_mask_color (3alleg4), .BR exsprite (3alleg4)