Function RestoreScreen

RestoreScreen(name)
The function should be used together with SaveScreen to remember graphics on the screen and then restore it at another moment. A name is assigned to the current screen, and it can be used to restore the content later. It can be use for example to draw a game level once and then only drawing characters. Example:
function DrawLevel()
	DrawImage (0, 0, #"background.jpg")
	DrawImage (0, 0, #"trees.png")
	DrawImage (0, 0, #"grass.png")
	SaveScreen("background")
end function

function DrawCharacterAt(x, y)
	RestoreScreen("background")
	DrawImage(x, y, #"character.png")
end function

function OnMouseUp(x, y)
	DrawCharacterAt(x, y)
end function

DrawLevel()
DrawCharacterAt(100, 100)

See also: