Animating Your Sprites
Most applications that render 2D sprites will not simply render a static image continuously. The majority of times, they will render a series of consecutive images that form what appears to be animation. Since the basic principle of this rendering is the same as the static image written earlier, that code will be used as the starting point. Go ahead and make a copy of that code for this new application.
The major differences between this application and the last will be in the helper class being used to render the sprites. The initialization will be mostly the same, although the filename that the source code included with the CD uses has been changed to sprites.tga to emphasize the fact that there are multiple sprites stored ...
Get Managed DirectX® 9 Kick Start: Graphics and Game Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.