Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
43c4c4b1
Commit
43c4c4b1
authored
May 08, 2012
by
Christian Costa
Committed by
Alexandre Julliard
May 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Implement IDirect3DRMFrameX_GetTransform.
parent
447c97cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
5 deletions
+50
-5
frame.c
dlls/d3drm/frame.c
+21
-4
d3drm.c
dlls/d3drm/tests/d3drm.c
+29
-1
No files found.
dlls/d3drm/frame.c
View file @
43c4c4b1
...
...
@@ -30,6 +30,13 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3drm
);
static
D3DRMMATRIX4D
identity
=
{
{
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
}
};
typedef
struct
IDirect3DRMFrameImpl
IDirect3DRMFrameImpl
;
struct
IDirect3DRMFrameImpl
{
...
...
@@ -46,6 +53,7 @@ struct IDirect3DRMFrameImpl {
ULONG
nb_lights
;
ULONG
lights_capacity
;
IDirect3DRMLight
**
lights
;
D3DRMMATRIX4D
transform
;
};
typedef
struct
{
...
...
@@ -420,9 +428,11 @@ static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTransform(IDirect3DRMFrame2* ifac
{
IDirect3DRMFrameImpl
*
This
=
impl_from_IDirect3DRMFrame2
(
iface
);
FIXME
(
"(%p/%p)->(%p): stub
\n
"
,
iface
,
This
,
return_matrix
);
TRACE
(
"(%p/%p)->(%p)
\n
"
,
iface
,
This
,
return_matrix
);
return
E_NOTIMPL
;
memcpy
(
&
return_matrix
[
0
][
0
],
&
This
->
transform
[
0
][
0
],
sizeof
(
D3DRMMATRIX4D
));
return
D3DRM_OK
;
}
static
HRESULT
WINAPI
IDirect3DRMFrame2Impl_GetVelocity
(
IDirect3DRMFrame2
*
iface
,
...
...
@@ -1430,9 +1440,14 @@ static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3* ifac
{
IDirect3DRMFrameImpl
*
This
=
impl_from_IDirect3DRMFrame3
(
iface
);
FIXME
(
"(%p/%p)->(%p,%p): stub
\n
"
,
iface
,
This
,
reference
,
return_matrix
);
TRACE
(
"(%p/%p)->(%p,%p)
\n
"
,
iface
,
This
,
reference
,
return_matrix
);
return
E_NOTIMPL
;
if
(
reference
)
FIXME
(
"Specifying a frame as the root of the scene different from the current root frame is not supported yet
\n
"
);
memcpy
(
&
return_matrix
[
0
][
0
],
&
This
->
transform
[
0
][
0
],
sizeof
(
D3DRMMATRIX4D
));
return
D3DRM_OK
;
}
static
HRESULT
WINAPI
IDirect3DRMFrame3Impl_GetVelocity
(
IDirect3DRMFrame3
*
iface
,
...
...
@@ -2220,6 +2235,8 @@ HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown** ppObj)
object
->
IDirect3DRMFrame3_iface
.
lpVtbl
=
&
Direct3DRMFrame3_Vtbl
;
object
->
ref
=
1
;
memcpy
(
&
object
->
transform
[
0
][
0
],
&
identity
[
0
][
0
],
sizeof
(
D3DRMMATRIX4D
));
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3DRMFrame3
))
*
ppObj
=
(
IUnknown
*
)
&
object
->
IDirect3DRMFrame3_iface
;
else
...
...
dlls/d3drm/tests/d3drm.c
View file @
43c4c4b1
/*
* Copyright 2010 Christian Costa
* Copyright 2010
, 2012
Christian Costa
* Copyright 2012 André Hentschel
*
* This library is free software; you can redistribute it and/or
...
...
@@ -63,6 +63,13 @@ static int get_refcount(IUnknown *object)
return
IUnknown_Release
(
object
);
}
static
D3DRMMATRIX4D
identity
=
{
{
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
},
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
}
};
static
char
data_bad_version
[]
=
"xof 0302txt 0064
\n
"
"Header Object
\n
"
...
...
@@ -741,6 +748,26 @@ static void test_Light(void)
IDirect3DRM_Release
(
pD3DRM
);
}
static
void
test_frame_transform
(
void
)
{
HRESULT
hr
;
LPDIRECT3DRM
d3drm
;
LPDIRECT3DRMFRAME
frame
;
D3DRMMATRIX4D
matrix
;
hr
=
pDirect3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRM_CreateFrame
(
d3drm
,
NULL
,
&
frame
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRMFrame interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRMFrame_GetTransform
(
frame
,
matrix
);
ok
(
hr
==
D3DRM_OK
,
"IDirect3DRMFrame_GetTransform returned hr = %x
\n
"
,
hr
);
ok
(
!
memcmp
(
matrix
,
identity
,
sizeof
(
D3DRMMATRIX4D
)),
"Returned matrix is not identity
\n
"
);
IDirect3DRM_Release
(
d3drm
);
}
static
int
nb_objects
=
0
;
static
const
GUID
*
refiids
[]
=
{
...
...
@@ -785,6 +812,7 @@ START_TEST(d3drm)
test_MeshBuilder3
();
test_Frame
();
test_Light
();
test_frame_transform
();
test_d3drm_load
();
FreeLibrary
(
d3drm_handle
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment