---
name: "draw_compiled_sprite"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/draw_compiled_sprite/3alleg4"
---

# draw\_compiled\_sprite(3alleg4)

Draws a compiled sprite. Allegro game programming library.

## NAME

draw\_compiled\_sprite - Draws a compiled sprite. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void draw\_compiled\_sprite(BITMAP \*bmp, const COMPILED\_SPRITE \*sprite,** **int x, int y);**

## DESCRIPTION

Draws a compiled sprite onto a bitmap at the specified position. The  sprite must have been compiled for the correct type of bitmap (linear or  planar). This function does not support clipping.

Hint: if not being able to clip compiled sprites is a problem, 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...

## SEE ALSO

**get\_compiled\_sprite**(3alleg4), **draw\_sprite**(3alleg4), **draw\_rle\_sprite**(3alleg4), **bitmap\_mask\_color**(3alleg4)
