---
name: "fli_bmp_dirty_from"
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/fli_bmp_dirty_from/3alleg4"
---

# fli\_bmp\_dirty\_from(3alleg4)

Indicate which parts of the image have changed. Allegro game programming library.

## NAME

fli\_bmp\_dirty\_from, fli\_bmp\_dirty\_to - Indicate which parts of the image have changed. Allegro game programming library.

## SYNOPSIS

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

**extern int fli\_bmp\_dirty\_from;**

**extern int fli\_bmp\_dirty\_to;**

## DESCRIPTION

These variables are set by next\_fli\_frame() to indicate which part of the  fli\_bitmap has changed since the last call to reset\_fli\_variables(). If  fli\_bmp\_dirty\_from is greater than fli\_bmp\_dirty\_to, the bitmap has not  changed, otherwise lines fli\_bmp\_dirty\_from to fli\_bmp\_dirty\_to  (inclusive) have altered. You can use these when copying the fli\_bitmap  onto the screen, to avoid moving data unnecessarily. Example:

```
   if (fli_bmp_dirty_from <= fli_bmp_dirty_to)
      blit(fli_bitmap, screen, 0, fli_bmp_dirty_from,
           0, fli_bmp_dirty_from, fli_bitmap->w,
           fli_bmp_dirty_to - fli_bmp_dirty_from + 1);
```

## SEE ALSO

**fli\_bitmap**(3alleg4), **reset\_fli\_variables**(3alleg4)
