This wiki is out of date, use the continuation of this wiki instead

Load pal

From FenixWiki

Jump to: navigation, search


Contents

[edit] Definition

INT load_pal ( <STRING filename>)

Loads a color palette from a file.

The current palette is switched to the loaded one. Note that one can load a palette from an 8bit FPG or MAP file (the remaining graphic data will not be loaded) or a PAL file. Since Fenix 0.85 the following filetypes can also be used to obtain the palette: FGC, FBM and FPL. (Need confirmation)

[edit] Parameters

STRING filename - The filename of the file that you wish to load the palette from (including extension and possible path).

[edit] Returns

INT : Error.

-1 - Error: could not open file; corrupt or truncated file; file doesn't contain palette information.
0 - Error: could not obtain filename; some FPL error.
1 - No error: palette was loaded with success.

[edit] Example

Program example;
Begin

    load_pal("example.pal");

    Loop
        frame;
    End

End
Personal tools