Added TGA loading and painting code