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

Fade

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 17:13, 28 December 2007 (edit)
Sandman (Talk | contribs)
(New page: Category:functions Category:palettes ==Definition== '''INT''' fade ( <'''INT''' red> , <'''INT''' green> , <'''INT''' blue> , <'''INT''' speed> ) Fades the screen from the curre...)
← Previous diff
Revision as of 17:19, 28 December 2007 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 10: Line 10:
== Parameters == == Parameters ==
{| {|
-| '''BYTE''' red || - Amount of red shown from 0 to 200. 100 is normal.+| '''INT''' red || - Amount of red shown from 0 to 200. 100 is normal.
|- |-
-| '''BYTE''' green || - Amount of red shown from 0 to 200. 100 is normal.+| '''INT''' green || - Amount of red shown from 0 to 200. 100 is normal.
|- |-
-| '''BYTE''' blue || - Amount of red shown from 0 to 200. 100 is normal.+| '''INT''' blue || - Amount of red shown from 0 to 200. 100 is normal.
|- |-
| '''INT''' speed || - The speed of the fade from 1 to 64. | '''INT''' speed || - The speed of the fade from 1 to 64.
Line 35: Line 35:
|} |}
-A speed of 0 is pointless, 1 takes 64 frames, 64 takes 1 frame, etc.+The number of frames the fading will take can be calculated like this:
 +:frames = roundup( 64 / speed )
 +:speed = roundup( 64 / frames )
 +So:
 +{|
 +| ''Speed'' || - ''Description''
 +|-
 +| 0 || - Pointless.
 +|-
 +| 1 || - Takes 64 frames.
 +|-
 +| 2 || - Takes 32 frames.
 +|-
 +| 3 || - Takes 22 frames.
 +|-
 +| 64 || - Takes 1 frame.
 +|}
See also [[fade_on]]() and [[fade_off]](). See also [[fade_on]]() and [[fade_off]]().

Revision as of 17:19, 28 December 2007


Contents

Definition

INT fade ( <INT red> , <INT green> , <INT blue> , <INT speed> )

Fades the screen from the current setting to the specified setting (red,green,blue) at the specified speed.

Parameters

INT red - Amount of red shown from 0 to 200. 100 is normal.
INT green - Amount of red shown from 0 to 200. 100 is normal.
INT blue - Amount of red shown from 0 to 200. 100 is normal.
INT speed - The speed of the fade from 1 to 64.

Returns

INT : true

Notes

Standard RGB combinations:

(R,G,B) - Description
(0,0,0) - Black out.
(100,100,100) - Normal.
(200,200,200) - White out.

The number of frames the fading will take can be calculated like this:

frames = roundup( 64 / speed )
speed = roundup( 64 / frames )

So:

Speed - Description
0 - Pointless.
1 - Takes 64 frames.
2 - Takes 32 frames.
3 - Takes 22 frames.
64 - Takes 1 frame.

See also fade_on() and fade_off().

Personal tools