Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a9065082
Commit
a9065082
authored
Jan 27, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: COM cleanup for the ID3DXMatrixStack iface.
parent
7342f34e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
33 deletions
+36
-33
d3dx9_36_private.h
dlls/d3dx9_36/d3dx9_36_private.h
+0
-13
math.c
dlls/d3dx9_36/math.c
+36
-20
No files found.
dlls/d3dx9_36/d3dx9_36_private.h
View file @
a9065082
...
...
@@ -50,19 +50,6 @@ HRESULT load_resource_into_memory(HMODULE module, HRSRC resinfo, LPVOID *buffer,
const
PixelFormatDesc
*
get_format_info
(
D3DFORMAT
format
);
const
PixelFormatDesc
*
get_format_info_idx
(
int
idx
);
/* ID3DXMatrixStack */
typedef
struct
ID3DXMatrixStackImpl
{
/* IUnknown fields */
const
ID3DXMatrixStackVtbl
*
lpVtbl
;
LONG
ref
;
/* ID3DXMatrixStack fields */
unsigned
int
current
;
unsigned
int
stack_size
;
D3DXMATRIX
*
stack
;
}
ID3DXMatrixStackImpl
;
/* ID3DXMesh */
typedef
struct
ID3DXMeshImpl
{
...
...
dlls/d3dx9_36/math.c
View file @
a9065082
...
...
@@ -35,6 +35,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
static
const
ID3DXMatrixStackVtbl
ID3DXMatrixStack_Vtbl
;
typedef
struct
ID3DXMatrixStackImpl
{
ID3DXMatrixStack
ID3DXMatrixStack_iface
;
LONG
ref
;
unsigned
int
current
;
unsigned
int
stack_size
;
D3DXMATRIX
*
stack
;
}
ID3DXMatrixStackImpl
;
/*_________________D3DXColor____________________*/
D3DXCOLOR
*
WINAPI
D3DXColorAdjustContrast
(
D3DXCOLOR
*
pout
,
CONST
D3DXCOLOR
*
pc
,
FLOAT
s
)
...
...
@@ -762,7 +773,7 @@ HRESULT WINAPI D3DXCreateMatrixStack(DWORD flags, LPD3DXMATRIXSTACK* ppstack)
*
ppstack
=
NULL
;
return
E_OUTOFMEMORY
;
}
object
->
lpVtbl
=
&
ID3DXMatrixStack_Vtbl
;
object
->
ID3DXMatrixStack_iface
.
lpVtbl
=
&
ID3DXMatrixStack_Vtbl
;
object
->
ref
=
1
;
object
->
stack
=
HeapAlloc
(
GetProcessHeap
(),
0
,
INITIAL_STACK_SIZE
*
sizeof
(
D3DXMATRIX
));
...
...
@@ -779,13 +790,18 @@ HRESULT WINAPI D3DXCreateMatrixStack(DWORD flags, LPD3DXMATRIXSTACK* ppstack)
TRACE
(
"Created matrix stack %p
\n
"
,
object
);
*
ppstack
=
(
LPD3DXMATRIXSTACK
)
object
;
*
ppstack
=
&
object
->
ID3DXMatrixStack_iface
;
return
D3D_OK
;
}
static
inline
ID3DXMatrixStackImpl
*
impl_from_ID3DXMatrixStack
(
ID3DXMatrixStack
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ID3DXMatrixStackImpl
,
ID3DXMatrixStack_iface
);
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_QueryInterface
(
ID3DXMatrixStack
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_ID3DXMatrixStack
))
{
ID3DXMatrixStack_AddRef
(
iface
);
...
...
@@ -799,7 +815,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_QueryInterface(ID3DXMatrixStack *ifac
static
ULONG
WINAPI
ID3DXMatrixStackImpl_AddRef
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) : AddRef from %d
\n
"
,
This
,
ref
-
1
);
return
ref
;
...
...
@@ -807,7 +823,7 @@ static ULONG WINAPI ID3DXMatrixStackImpl_AddRef(ID3DXMatrixStack *iface)
static
ULONG
WINAPI
ID3DXMatrixStackImpl_Release
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
ref
)
{
...
...
@@ -820,7 +836,7 @@ static ULONG WINAPI ID3DXMatrixStackImpl_Release(ID3DXMatrixStack* iface)
static
D3DXMATRIX
*
WINAPI
ID3DXMatrixStackImpl_GetTop
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -829,7 +845,7 @@ static D3DXMATRIX* WINAPI ID3DXMatrixStackImpl_GetTop(ID3DXMatrixStack *iface)
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_LoadIdentity
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -840,7 +856,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_LoadIdentity(ID3DXMatrixStack *iface)
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_LoadMatrix
(
ID3DXMatrixStack
*
iface
,
CONST
D3DXMATRIX
*
pm
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -851,7 +867,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_LoadMatrix(ID3DXMatrixStack *iface, C
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_MultMatrix
(
ID3DXMatrixStack
*
iface
,
CONST
D3DXMATRIX
*
pm
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -862,7 +878,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrix(ID3DXMatrixStack *iface, C
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_MultMatrixLocal
(
ID3DXMatrixStack
*
iface
,
CONST
D3DXMATRIX
*
pm
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -873,7 +889,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrixLocal(ID3DXMatrixStack *ifa
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_Pop
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -901,7 +917,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Pop(ID3DXMatrixStack *iface)
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_Push
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -929,7 +945,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Push(ID3DXMatrixStack *iface)
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_RotateAxis
(
ID3DXMatrixStack
*
iface
,
CONST
D3DXVECTOR3
*
pv
,
FLOAT
angle
)
{
D3DXMATRIX
temp
;
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -942,7 +958,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxis(ID3DXMatrixStack *iface, C
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_RotateAxisLocal
(
ID3DXMatrixStack
*
iface
,
CONST
D3DXVECTOR3
*
pv
,
FLOAT
angle
)
{
D3DXMATRIX
temp
;
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -955,7 +971,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxisLocal(ID3DXMatrixStack *ifa
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_RotateYawPitchRoll
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
D3DXMATRIX
temp
;
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -968,7 +984,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateYawPitchRoll(ID3DXMatrixStack *
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_RotateYawPitchRollLocal
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
D3DXMATRIX
temp
;
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -981,7 +997,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateYawPitchRollLocal(ID3DXMatrixSt
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_Scale
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
D3DXMATRIX
temp
;
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -994,7 +1010,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Scale(ID3DXMatrixStack *iface, FLOAT
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_ScaleLocal
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
D3DXMATRIX
temp
;
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -1007,7 +1023,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_ScaleLocal(ID3DXMatrixStack *iface, F
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_Translate
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
D3DXMATRIX
temp
;
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -1020,7 +1036,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Translate(ID3DXMatrixStack *iface, FL
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_TranslateLocal
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
D3DXMATRIX
temp
;
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ID3DXMatrixStackImpl
*
This
=
impl_from_ID3DXMatrixStack
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
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