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 πŸ¦‹


and that's the tea πŸŽ€ this was Allegro version 4.4.3, mwah, go light up some sprites, ily, bye bestie πŸ‘‘πŸ’œ