Copies a source surface into a destination surface.
surface_copy(destination, x, y, source);
This function simply takes the image from one surface and copies it onto another one at the specified local position within that surface (where the (0,0) position is the top left corner of the destination surface). If the destination surface already has information this will be over-written by the copy, and the function does not change the source surface in any way.
サーフェースはいつでも破棄される可能性があります。ですのでsurface_exists()関数を使用して常に存在チェックをする必要があります。詳細についてはサーフェース機能についてを参照してください
if view_current == 0 { surface_copy(surf, 0, 0, temp_surf); } else { draw_surface(surf, 0, 0); }
The above code will check the current view being drawn and if it is view[0] it copies the surface indexed in the variable "temp_surf" onto the surface indexed in the variable "surf". If the current view is anything other than view[0] the surface "surf" is drawn to the screen.