(Formerly known as RawDrawFrameTransparent, which is now obsolete)
(Formerly known as RawRestoreScreen, which is now obsolete)
DrawingSurface.DrawSurface(DrawingSurface *source, optional int transparency)
Draws the specified surface on top of this surface, optionally using transparency
percent transparency.
This allows you to perform day-to-night fading and other special effects.
NOTE: You cannot use the transparency parameter with 256-colour surfaces.
NOTE: This command can be a bit on the slow side, so don't call it from repeatedly_execute.
TIP: If you want to gradually fade in a second background, create a copy of
the original surface and then restore it after each iteration, otherwise the backgrounds
will converge too quickly.
Example:
DrawingSurface *mainBackground = Room.GetDrawingSurfaceForBackground(0);
DrawingSurface *nightBackground = Room.GetDrawingSurfaceForBackground(1);
mainBackground.DrawSurface(nightBackground, 50);
mainBackground.Release();
nightBackground.Release();
this will draw background frame 1 onto frame 0 at 50% opacity.
See Also: DrawingSurface.DrawImage,
SetAmbientTint
|