---
name: "fli_pal_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_pal_dirty_from"
---

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

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

## NAME

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

## SYNOPSIS

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

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

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

## DESCRIPTION

These variables are set by next\_fli\_frame() to indicate which part of the  fli\_palette has changed since the last call to reset\_fli\_variables(). If  fli\_pal\_dirty\_from is greater than fli\_pal\_dirty\_to, the palette has not  changed, otherwise colors fli\_pal\_dirty\_from to fli\_pal\_dirty\_to  (inclusive) have altered. You can use these when updating the hardware  palette, to avoid unnecessary calls to set\_palette(). Example:

```
   if (fli_pal_dirty_from <= fli_pal_dirty_to)
      set_palette_range(fli_palette, fli_pal_dirty_from,
                        fli_pal_dirty_to, 1);
```

## SEE ALSO

[**fli\_palette**(3alleg)](/fli_palette/3alleg.md), [**reset\_fli\_variables**(3alleg)](/reset_fli_variables/3alleg.md)
