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

Graph

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 11:32, 9 July 2007 (edit)
Sandman (Talk | contribs)
m
← Previous diff
Current revision (18:52, 3 April 2008) (edit) (undo)
Sandman (Talk | contribs)
m
 
(5 intermediate revisions not shown.)
Line 1: Line 1:
 +[[category:variables]]
 +[[category:predefined]]
[[Category:local variables]] [[Category:local variables]]
 +
 +[[Local variables|'''Up to Local Variables''']]
 +
 +----
 +
== Definition == == Definition ==
-'''INT''' graph+'''INT''' graph = 0
-Graph is a predefined local variable which holds the [[GraphID]] of the process. A [[graphic]] can be assigned to the process by assigning the [[GraphID]] of that graphic to graph.+Graph is a predefined local variable which holds the [[GraphID]] of the process. A [[graphic]] can be assigned to the process by assigning the [[GraphID]] of that graphic to graph. Assign 0 to the local variable graph to have the process display no graph. Keep in mind that this doesn't free the memory used by the graphic; to free it, use [[unload_map]]().
== Example == == Example ==
Line 14: Line 21:
x = 100; //Position the graphic 100 pixels x = 100; //Position the graphic 100 pixels
y = 100; //from the top and left of the screen y = 100; //from the top and left of the screen
- Loop+ Repeat
frame; frame;
- End+ Until(key(_ESC))
End End
</pre> </pre>
Used in example: [[new_map]](), [[map_clear]](), [[graphic]], [[x]], [[y]] Used in example: [[new_map]](), [[map_clear]](), [[graphic]], [[x]], [[y]]
 +
 +{{Locals}}

Current revision

Up to Local Variables



[edit] Definition

INT graph = 0

Graph is a predefined local variable which holds the GraphID of the process. A graphic can be assigned to the process by assigning the GraphID of that graphic to graph. Assign 0 to the local variable graph to have the process display no graph. Keep in mind that this doesn't free the memory used by the graphic; to free it, use unload_map().

[edit] Example

Process cyan_graphic()
Begin
    graph = new_map(100,100,8);   // create a new 100x100x8 map.
    map_clear(0,graph,rgb(0,255,255));   // clear it cyan-colored
    x = 100;     //Position the graphic 100 pixels
    y = 100;     //from the top and left of the screen
    Repeat
        frame;
    Until(key(_ESC))
End

Used in example: new_map(), map_clear(), graphic, x, y


Local variables
AngleBigbroFatherFileFlagsGraphIdRegionReservedResolutionSizeSize_xSize_ySmallbroSonXYZ
Personal tools