There is something strange in Pascal

I finished almost all basic functions and then testing started but... everything is working nice when wrapper functions are called from C++, but Pascal code generates division by zero runtime error whenever some mesh is added to scene. I guess there is something wrong with parameter types (size of types are different in Pascal and C++ or something like that) or with precision (Set8087CW...)?

I uploaded mini version of wrapper and C++ and Pascal program that uses it. I can't figure what is wrong... maybe someone else can?

Download: http://www.geocities.com/srki_82/Mini.zip