CodeBase - Fullscreen Image Fade

Return to the CodeBase listing

Category: 2D Effects

Version: 1.0

0
0

Information

Uploaded: 2nd Mar 2005 01:48

Modified: 2nd Mar 2005 01:57

Author:  preyx

Summary

Allows you to load and fade in or out any fullscreen-sized image to or from the previous screen. The function automatically determines the fade direction by your start and stop alpha values. (Takes advantage of SYNC function)

Full Description

This function takes four arguments, and returns none.<br /> It makes use of the SYNC function, so it comes in really handy with framerate-controlled applications.<br /> <br /> I used extremely high sprite and image numbers in order to avoid conflict with any of your own graphics. The high priority number is to ensure that it fades out all objects on the screen.<br /> <br /> * NOTE: alpha=255 is opaque and alpha=0 is transparent.<br /> * WARNING: THERE IS NO ERROR CHECKING! Always double-check your inputs.<br /> <br /> Example code:<br /> ...<br /> `Fade black -&gt; title 1 -&gt; title 2<br /> LOAD IMAGE &quot;media\title1.png&quot;, 1, 1<br /> PASTE IMAGE 1, 0, 0<br /> Fade(&quot;media\fader\black.png&quot;, 255, 0, 4)<br /> WAIT 500<br /> LOAD IMAGE &quot;media\title2.png&quot;, 1, 1<br /> PASTE IMAGE 1, 0, 0<br /> Fade(&quot;media\title1.png&quot;, 255, 0, 8)<br /> ...

Comments

No comments yet.