SetBGImage routine

TURBU

SetBGImage routine

 

Changes the current background image.

 

Syntax

 

procedure setBGImage(name: string; scrollX, scrollY: shortint; autoX, autoY: boolean);

 

Description

 

This routine sets a new background image, which is loaded from the file named in the name parameter.  No path or file extension is necessary; the engine will automatically search in the appropriate folders for background images, and check all valid image extensions.

If the scrollX and scrollY parameters are not 0, the background image will continually be in motion.  A positive scrollX causes it to scroll to the right; negative scrollX makes it scroll to the left.  Likewise, positive scrollY causes downward movement, and negative scrollY will make the image scroll upwards.

If true is passed to the autoX or autoY parameters, their scrolling in the corresponding direction will automatically be 1/2 of the camera's movement distance.  This overrides the values of scrollX and scrollY.  Auto-scrolling can be used to create a "parallax" effect.

This help file was created with the free trial version of HelpScribble.