downloadsstill.blogg.se

Free pascal crt unit
Free pascal crt unit











After that the picture should be displayed at the physical screen. Eventually the picture should get copied onto the display surface. Furthermore we need a surface that contains a picture. So our task is to create a display surface.

#FREE PASCAL CRT UNIT CODE#

If you think carefully about this or check the source code you will notice that between every blitting process the ball and paddle of the previous frame have to be overdrawn by black rectangles erasing them (left), otherwise the result would look like the right example.

free pascal crt unit

The ball and the paddle are copied(=blitted) onto the black screen surface again and again slightly moved up. Everything that got blit to this surface gets displayed on the physical screen (monitor) after refreshing (SDL_FLIP(…), SDL_UPDATERECT(…))!įor example in demo03.pas / demo03.exe from a modified SDL4Free Pascal demo file the ball, the paddle and the black background (display surface background color) are surfaces. There is a special surface: the display surface. This is the second very important concept and is called blitting You can copy(=blit) a part or the whole surface to any other surface. with or without alpha channel for transparency effects).

free pascal crt unit

Every surface can have its own size (pixels x pixels, e.g. Surfaces are parts of the memory (RAM) where an image is saved.

free pascal crt unit

Working with the video subsystem assumes that you understand the concept behind. Unless you have good reasons to stay here you may prefer to go for the modern SDL 2.0 :-). SDL 1.2 is obsolete since it has been replaced by SDL 2.0.











Free pascal crt unit