end callback before "nextstate" check to avoid callback not being called
added safety checks and sanitized values
added ability to draw a sprite with a scale
added facility function GetFrameDimension
Merge pull request #2 from FlorianBT/master

Retro Game Jam 2014 changes