##### Ninja Library - Texture Function

# njLoadPaletteFile

Loads palette data file

### FORMAT

`

  Sint32 njLoadPaletteFile( *filename, *pl )
  const char *filename
  NJS_TEXPALETTE *pl

`

### PARAMETER

  `*filename` | Palette file name (.pvp file)
  `*pl` | Pointer to NJS_TEXPALETTE structure

### RETURN

  1 | Successful |
  -1 | Failed |

### DESCRIPTION

  Loads the PVP palette data file and sets the data to the NJS_TEXPALETTE structure. Because palette data are loaded in "palette", a sufficient area for loading must be set.

### EXAMPLE

      The following loads palette data.

      Uint16 palette[256];
      /* Set array pointer for palette data loading */
      /* Other members are set after executing njLoadPaletteFile() function */
      NJS_TEXPALETTE pl={palette,0,0,0,0};
      njLoadPaletteFile("palette.pvp",&pl);
      /* Set mode set in palette.pvp */
      njSetPaletteMode(pl.mode);
      /* Load palette data */
      njSetPaletteData(pl.offset,pl.count,pl.palette);

### NOTE

  Before executing `njLoadPaletteFile()` function, the palette color mode must be set.

### REFERENCE

  `njSetPaletteMode()
  njSetPaletteData()
  `

njLoadPaletteFile

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999