Manual/addOverlay

From Hungrysoftware

Contents

Syntax

 addOverlay (thisFile, atX, atY);

Purpose

Loads an image from the file handle thisFile and overlays it onto the screen. Bright magenta (255, 0, 255 or #FF00FF) is used as the transparency colour, making is possible to add irregular shapes.

The values atX and atY define the top left corner of the area into which the image will be added. If the value of atX is CENTRE (or CENTER) the image will be added halfway across the window. If the value of atY is CENTRE (or CENTER) the image will be added halfway down the window.

NB: Should any parallax layers exist, they will be visible "through" any areas of the background image filled in with bright cyan (0, 255, 255 or #00FFFF). You can add parallax layers using the parallaxAdd function.

Return value

No return value.

Example

 sub init () {
    addOverlay ('someImage.tga', CENTER, CENTER);
 }

See also

File Handling

The Background Image

darkBackground

mixOverlay

Personal tools