- This wiki is out of date, use the continuation of this wiki instead
 
Flags
From FenixWiki
(Difference between revisions)
												
			
Revision as of 07:31, 25 June 2007
Definition
INT flags
Flags is a predefined local variable which is used to manipulate graphics in a process.
List
| Value | - What it does | 
| 0 | - Nothing happens | 
| 1 | - Graphic is horizontally mirrored | 
| 2 | - Graphic is vertically mirrored | 
| 4 | - Graphic is translucent | 
You can add up the numbers to combine the effects. A horizontally mirrored translucent graphic would need flags 4 and 1, so flags = 5 will do the trick!
Example
To make the graphic of a process spin:
Process mirror_graphic()
Begin
    graph = load_png("image.png");   //load the graphic and assign it to the graph variable
    x = 100;     //Position the graphic 100 pixels
    y = 100;     //from the top and left of the screen
    Loop
        if (key(_l))
            flags = 1; //if you press the L key, your graphic is horizontally mirrored
        end       
        frame;
    End
End
This process will mirror its graphic as soon as you press L.
