NewForeground
NewForeground

Creates a new foreground in the window.

bSuccess = myJAM.NewForeground( Image_Index, X_Scroll_Speed, Y_Scroll_Speed, Transparency )
bSuccess = myJAM.NewForeground( Image_Name, X_Scroll_Speed, Y_Scroll_Speed, Transparency )
bSuccess = myJAM.NewForeground( Surface, X_Scroll_Speed, Y_Scroll_Speed, Transparency )

Return value
TRUE if the background was created successfully, otherwise FALSE.

Parameters
  • Image_Index
    The index number of a picture in the Pictures bank to use as the foreground
  • Image_Name
    The name of a picture in the Pictures bank to use as the foreground
  • Surface
    A surface object to use as the foreground
  • X_Scroll_Speed
    The rate at which the foreground should scroll horizontally (1.0 if ommited)
  • Y_Scroll_Speed
    The rate at which the foreground should scroll vertically (Same as X_Scroll_Speed if ommited)
  • Transparency
    The semi-transparency of the layer. 0 (default) is solid, 255 is invisible
Comments

Foregrounds appear above the main game layer, but below the GUI layer.
If the foreground is smaller than the window, it will tile to fit. It will also tile when the frame scrolls.
Foregrounds are rendered in the order they are created. Currently there is no way to re-order backgrounds or foregrounds.

See also
JAM:NewBackground



JAM © 2005 no one in partiular
Project started by David Evans in 2005