fix warnings
switch to SDL2
use getopt for command line options parsing