There are some parts of the d2x-xl source that are incompatible with FreeBSD. Some are a simple case of patching, others I think need some discussion so as to benefit more than just FreeBSD.
Firstly, I've attached a small patch that fixes some OpenGL defines for FreeBSD.
In include/pstypes.h, ushort, uint, and ulong get defined for non-Unix platforms. To my knowledge these types are non-standard and so won't be defined on any standards compliant system. For certain they're not defined in FreeBSD and so pstypes.h should define them itself. In your experience, which Unix systems define these types internally? I'm thinking it would be better to exclude those specific systems rather than blanketing the whole of __unix__.
In a few places malloc.h is #included conditionally for non-macosx systems. To my knowledge malloc.h has been deprecated for years on all standards compliant systems, including FreeBSD, and replaced with stdlib.h. Can references to malloc.h be changed to stdlib.h unconditionally? What has been your experience?