You are free to take a look at the example code as well as download the entire Code::Blocks project.
You'll need the following in order to compile this code:
Allegro 5 working binaries.
See it here: http://www.BuildAndGun.com
Remove ads and support GameDev.net for only $3. Learn more: The New GDNet+: No Ads!