Started modifying the old C code, using SDL 1.2