logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

draw_character_ex - Draws non transparent pixels of the sprite with a color. Allegro game programming

Description

       Draws a copy of the sprite bitmap  onto  the  destination  bitmap  at  the  specified  position,  drawing
       transparent  pixels  in the background color (or skipping them if the background color is -1) and setting
       all other pixels to the specified color. Transparent pixels are marked by a zero in  256-color  modes  or
       bright  pink  for  truecolor  data (maximum red and blue, zero green). The sprite must be an 8-bit image,
       even if the destination is a truecolor bitmap. Example:

          BITMAP *logo;
          ...
          /* Draw the logo silhouette in red. */
          draw_character_ex(screen, logo, SCREEN_W / 2, SCREEN_H / 2,
                            makecol(255, 0, 0), -1);

Name

       draw_character_ex  -  Draws  non  transparent pixels of the sprite with a color. Allegro game programming
       library.

See Also

draw_sprite(3alleg4), bitmap_mask_color(3alleg4)

Allegro                                           version 4.4.3                       draw_character_ex(3alleg4)

Synopsis

#include<allegro.h>voiddraw_character_ex(BITMAP*bmp,BITMAP*sprite,intx,inty,color,bg);

See Also