Great thanks for the quick reply

I have inserted your carmack_func, there where 2 problems, delphi didn't like the inline; nor the int(X), but removing the inline; and changing int(x) to Round(x) seems to compile

I shall try using the pointers now, i noticed that pointers where being used in the C++ version, but since im not too good with pointers i tried it using records instead.

I shall post back with the results

Thanks again
Nic