---
name: "fli_bmp_dirty_from"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/fli_bmp_dirty_from"
---

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

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**(3alleg)](/fli_bitmap/3alleg.md), [**reset\_fli\_variables**(3alleg)](/reset_fli_variables/3alleg.md)
