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

Map clear

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 02:03, 1 May 2007 (edit)
Sandman (Talk | contribs)

← Previous diff
Revision as of 15:24, 13 November 2007 (edit) (undo)
Sandman (Talk | contribs)
m
Next diff →
Line 9: Line 9:
== Parameters == == Parameters ==
{| {|
-| '''INT''' fileID || - The [[file]] that holds the graph.+| '''INT''' fileID || - The [[file]] that holds the graphic.
|- |-
-| '''INT''' graphID || - The [[graph]] to clear.+| '''INT''' graphID || - The [[graphic]] to clear.
|- |-
| '''WORD''' color || - The [[color]] used to clear. | '''WORD''' color || - The [[color]] used to clear.

Revision as of 15:24, 13 November 2007


Contents

Definition

INT map_clear ( <INT fileID> , <INT graphID> , <WORD color> )

Clears a certain graph to a certain color.

Parameters

INT fileID - The file that holds the graphic.
INT graphID - The graphic to clear.
WORD color - The color used to clear.

Returns

INT : true

Errors

Unsupported color depth - The specified graph has a not supported color depth.

Example

Program a_map_is_born;
Private
    int map;
Begin

    // Create a new graph of size 100x100 and color depth of 8bit
    map = new_map(100,100,8);
    
    // Clear the map red
    map_clear(0,map,rgb(255,0,0));

    // Put it in the center of the screen
    put(0,map,160,100);

    Loop
        frame;
    End

End

Used in example: new_map(), put()

This will result in something like:
new_map.PNG

Personal tools