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

FileID

From FenixWiki

Revision as of 23:02, 23 July 2007 by Rincewind (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search


[edit] Definition

FileID

A FileID is an identifier associated with a certain file (FPG). It is returned by load_fpg(), when a file is loaded to memory and can be used in many functions, wanting a FileID, for example map_put() or start_scroll(). A FileID can also be assigned to the local variable file of a process or function, which will make the process in question look in that file (FPG) for the graphic, associated with the GraphID specified by the process' graph local variable.

[edit] Notes

You can fill out 0 for the FileID if the graph you want to use only exist in memory and not in a file.

[edit] Example

Program files;
Global
    int file_id;
Begin

    // Load FPG
    file_id = load_fpg("example.fpg");

    // Set locals for display of graph
    file = file_id;
    graph = 1;
    x = y = 50;

    Repeat
        frame;
    Until(key(_frame))

End

Used in example: load_fpg(), key(), file, graph

Personal tools