Add implementation of D3DRMVector* functions

H. Verbeet hverbeet at
Mon Mar 12 06:45:42 CDT 2007

On 12/03/07, Vijay Kiran Kamuju <infyquest at> wrote:
> Hi,
> This is a patch by David Adams, implementing D3DRMVector* functions in d3drm.dll
> I am sending the patch to this mailing list as this was posted on
> bugzilla and awaiting review.

A few comments:

>- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
>+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
0;2110;-130;1, USA
I don't think that change should be there.

>+    LPD3DVECTOR result=(LPD3DVECTOR)(malloc(sizeof(LPD3DVECTOR)));
That and other places in that patch should be using HeapAlloc/HeapFree

>+    srand(time(NULL));
>+    d->x=(float)(rand());
>+    d->y=(float)(rand());
>+    d->z=(float)(rand());
>+    TRACE("Random vector=(%f,%f,%f)\n",d->x,d->y,d->z);
>+    return d;
I'm not sure about this, but I'm thinking it might be better to
generate a normalized vector there.

- The indentation in D3DRMVectorRotate is a bit of a mess
- Writing test cases doesn't hurt, and in this case should be pretty easy

More information about the wine-devel mailing list