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
GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.Sign me up!