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

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

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**(3alleg4), **reset\_fli\_variables**(3alleg4)
