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

FileID

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 23:20, 3 June 2007 (edit)
Sandman (Talk | contribs)

← Previous diff
Current revision (23:02, 23 July 2007) (edit) (undo)
Rincewind (Talk | contribs)
(file = 0 explanation added)
 
Line 5: Line 5:
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 [[function]]s, 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. 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 [[function]]s, 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.
 +
 +== 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.
== Example == == Example ==

Current revision


[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