1draw_sprite_v_flip(3)           Allegro manual           draw_sprite_v_flip(3)
2
3
4

NAME

6       draw_sprite_v_flip, draw_sprite_h_flip, draw_sprite_vh_flip - Draws the
7       sprite transformed to the destination bitmap. Allegro game  programming
8       library.
9

SYNOPSIS

11       #include <allegro.h>
12
13
14       void draw_sprite_v_flip(BITMAP *bmp, BITMAP *sprite, int x, int y);
15
16       void draw_sprite_h_flip(BITMAP *bmp, BITMAP *sprite, int x, int y);
17
18       void draw_sprite_vh_flip(BITMAP *bmp, BITMAP *sprite, int x, int y);
19

DESCRIPTION

21       These are like draw_sprite(), but they additionally flip the image ver‐
22       tically, horizontally, or both, respectively. Flipping vertically means
23       that the y-axis is reversed, while flipping horizontally means that the
24       x-axis is reversed, between the source and the destination.  This  pro‐
25       duces exact mirror images, which is not the same as rotating the sprite
26       (and it is a lot faster than the rotation routine). The sprite must  be
27       a memory bitmap. Example:
28
29          if (key[KEY_RIGHT])
30             draw_sprite(screen, hero_right, pos_x, pos_y);
31          else if (key[KEY_LEFT])
32             draw_sprite_h_flip(screen, hero_right, pos_x, pos_y);
33          else
34             draw_sprite(screen, hero_idle, pos_x, pos_y);
35
36

SEE ALSO

38       draw_sprite(3), bitmap_mask_color(3), exsprite(3)
39
40
41
42Allegro                          version 4.4.3           draw_sprite_v_flip(3)
Impressum