Linux Game Programming for PC & Embedded Systems using SDL
Presented by
Fore June
Author of Windows Fan, Linux Fan

Games and SDL
SDL Installation
SDL for Embedded
SDL API
SDL Events
 SDL Graphics
SDL Threads
Thread Example
SDL Animation
SDL Sound
 Raw Video Player
Video Formats
Video Compression
 Game Trees
About The Author

An Introduction to Video Compression in C/C++ now available at Amazon

@Copyright by Fore June, 2006
SDL Animation
1 2
  1. The Animation Demo Program
  2. We have discussed in the previous sections how to do simple animations with a pre-created image that contains sequences of bitmaps; a few simple classes and a thread are used to achieve the effects. Here, we show you the complete code which is ready to compile and execute. The program "jewels.cpp" shown below is the complete code you need. You can copy-and-paste it into a file named "jewels.cpp" and compile it by the command:

    To run it, you can simply execute

    However, before you run the program, you have to create a subdirectory "images" and put the image files "jboard.jpg" and "jewels.png" in it.