draw_compiled_sprite(3alleg4)
β¨ NAME β¨
draw_compiled_sprite β bestie, this one draws a compiled sprite π and it lives in the Allegro game programming library π
πΈ SYNOPSIS πΈ
#include <allegro.h>
void draw_compiled_sprite(BITMAP *bmp, const COMPILED_SPRITE *sprite,
int x, int y);
π¦ DESCRIPTION π¦
Okay so draw_compiled_sprite takes your compiled sprite and plops it down onto a bitmap at the exact position you tell it. Slay. β¨
But listen β there's a catch, and it's a real one, not a fake one. The sprite must have been compiled for the correct type of bitmap (linear or planar). Get that mismatch wrong and it's giving π. Also, big disclaimer: this function does not support clipping. Not even a little. Periodt.
Hint: if not being able to clip compiled sprites is a problem for you, a neat trick is to set up a work surface (memory bitmap, mode-X virtual screen, or whatever) a bit bigger than you really need, and use the middle of it as your screen. That way you can draw slightly off the edge without any trouble... π«Ά iconic behaviour honestly
π SEE ALSO π
get_compiled_sprite(3alleg4)draw_sprite(3alleg4)draw_rle_sprite(3alleg4)bitmap_mask_color(3alleg4)
and that's the whole page, bestie!! this one came straight out of the Allegro manual, version 4.4.3 β no cap, go read it, it ate πβ¨π
π¦ 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