Wow, nice work! Was a bit confused what type "direction" is... until I saw it treated like an integer. Do you still work on the docs aswell?
Yes, I work sometimes on the docs when I got the time for it.
Currently there are quite a few libcod functions missing, but first I want to check and remove stock functions from CoD4 and add the missing CoD2 functions.