Platform SDK: DirectX

Tutorial 4: Blitting to Areas of the Screen

[C++]

This section pertains only to application development in Visual Basic. See DirectDraw C/C++ Tutorials.

[Visual Basic]

The Tutorial 4 application in the SDK is very similar to Tutorial 3: Using Full Screen Features with additional sprite animation. In fact, the only difference between the two applications is that this Tutorial uses a bitmap with many frames of animation. If you open donut.bmp file in an image viewer, you will notice that although it is a single bitmap, there are numerous images of the donut shape from slightly different viewpoints. Animation is accomplished by changing the location of the destination rectangle for the sprite on the back buffer. In addition, the different views of the donut are cycled to be blit, making the sprite rotate.

Since this tutorial is so similar to the previous one, only the step showing how to animate the sprite is discussed: