draw_lit_rle_sprite(3alleg4)
πΈ NAME πΈ
draw_lit_rle_sprite β draws a tinted RLE sprite, bestie. It lives in the Allegro game programming library π
β¨ SYNOPSIS β¨
#include <allegro.h>
void draw_lit_rle_sprite(BITMAP *bmp, const RLE_SPRITE *sprite, int x,
y, color);
π DESCRIPTION π
okay so. draw_lit_rle_sprite() is literally the tinted version of draw_rle_sprite(), no cap. Same energy, but it lights your sprite up with a colour. And for the full lore, go read the description of draw_lit_sprite() β it's the same vibe, that's the sister function π«Ά
MAJOR WARNING: you can only call this after you've set up your color mapping table (that's for 256-color modes) or your blender functions (that's for truecolor modes). Not before. Do not skip this step. The vibe check will fail π
Example time, periodt:
/* Some one time initialisation code. */
COLOR_MAP global_light_table;
create_light_table(&global_trans_table, my_palette,
10, 10, 60, NULL);
...
if (get_color_depth() == 8)
color_map = &global_light_table;
else
set_trans_blender(40, 40, 255, 255);
/* Lit the cape with a blueish light. */
draw_lit_rle_sprite(buffer, rle_colored_cape, x, y, 64);
likeβ¦ lit the cape with a blueish light?? iconic. that's the whole serve πβ¨
π¦ SEE ALSO π¦
draw_rle_sprite(3alleg4)β the untinted originaldraw_trans_rle_sprite(3alleg4)β the transparent onedraw_lit_sprite(3alleg4)β same lighting energy, non-RLE editioncolor_map(3alleg4)β the 256-color setup you NEEDset_trans_blender(3alleg4)β the truecolor setup you NEEDbitmap_mask_color(3alleg4)β mask colour things
and that's the tea π this was Allegro version 4.4.3, mwah, go light up some sprites, ily, bye bestie ππ
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms