Might be simple in the first place to just use a patched binary, but... libcod exists