(Formerly known as RawSaveScreen, which is now obsolete)
DrawingSurface* DrawingSurface.CreateCopy()
Makes a backup copy of the current surface, in order that it can be
restored later. This could be useful to back up a background scene before
writing over it, or to save a certain state of your drawing to restore
later.
Unlike the obsolete RawSaveScreen command in previous versions of AGS, backup
surfaces created with this command are not lost when the player changes room or
restores a game. However, surfaces containing a copy of room backgrounds can
be very large, using up a large amount of memory and can increase the
save game sizes significantly. Therefore, it is strongly recommended that
you Release any backup copy surfaces as soon as you are done with them.
Example:
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
DrawingSurface *backup = surface.CreateCopy();
surface.DrawTriangle(0,0,160,100,0,200);
Wait(80);
surface.DrawSurface(backup);
backup.Release();
surface.Release();
will save a copy of the room background, draw a triangle onto it, wait for
a while and then restore the original background.
See Also: DrawingSurface.DrawSurface
|