copy of bitbucket_jice_libtcod