- This wiki is out of date, use the continuation of this wiki instead
Flags
From FenixWiki
(Difference between revisions)
Revision as of 13:03, 14 November 2007 (edit) Sandman (Talk | contribs) m ← Previous diff |
Revision as of 19:36, 14 November 2007 (edit) (undo) Sandman (Talk | contribs) m Next diff → |
||
Line 2: | Line 2: | ||
[[category:predefined]] | [[category:predefined]] | ||
[[category:local variables]] | [[category:local variables]] | ||
+ | |||
+ | [[Local variables|'''Up to Local Variables''']] | ||
+ | |||
+ | ---- | ||
+ | |||
== Definition == | == Definition == |
Revision as of 19:36, 14 November 2007
Definition
INT flags
Flags is a predefined local variable which is used to manipulate how the graphic of a process, assigned to its local variable graph, is displayed.
To alter the effect, change the value of this local variable by assigning it blit flags. Like most bit flags, constants can be added together to combine effects. A horizontally mirrored translucent graphic would need flags B_TRANSLUCENT (4) and B_HMIRROR (1), so flags = B_TRANSLUCENT|B_HMIRROR (5) will do the trick.
Example
To make the graphic of a process spin:
Program mirror Begin mirror_graphic(); Loop frame; End End Process mirror_graphic() Begin graph = new_map(50,50,8); map_clear(0,graph,rgb(0,255,255)); x = 100; //Position the graphic 100 pixels y = 100; //from the top and left of the screen Loop if (key(_l)) flags = B_HMIRROR; //if you press the L key, your graphic is horizontally mirrored else flags = 0; end frame; End End
The process will mirror its graphic when the key L is held down.
Local variables | |
• Angle • Bigbro • Father • File • Flags • Graph • Id • Region • Reserved • Resolution • Size • Size_x • Size_y • Smallbro • Son • X • Y • Z • |