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
3175d58f
Commit
3175d58f
authored
Dec 18, 2007
by
David Adam
Committed by
Alexandre Julliard
Dec 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Add basic functions and stubs for MatrixStack.
parent
303b1a11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
183 additions
and
1 deletion
+183
-1
d3dx8_private.h
dlls/d3dx8/d3dx8_private.h
+20
-0
math.c
dlls/d3dx8/math.c
+163
-1
No files found.
dlls/d3dx8/d3dx8_private.h
View file @
3175d58f
...
...
@@ -2,6 +2,7 @@
* Direct3D X 8 private include file
*
* Copyright 2002 Raphael Junqueira
* Copyright 2007 David Adam
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -30,6 +31,7 @@
/* Interfaces */
typedef
struct
ID3DXBufferImpl
ID3DXBufferImpl
;
typedef
struct
ID3DXFontImpl
ID3DXFontImpl
;
typedef
struct
ID3DXMatrixStackImpl
ID3DXMatrixStackImpl
;
/* ----------- */
/* ID3DXBuffer */
...
...
@@ -70,4 +72,22 @@ struct ID3DXFontImpl
/* ID3DXFont fields */
};
/* ----------- */
/* ID3DXMatrix */
/* ----------- */
/*****************************************************************************
* ID3DXMatrixStackImpl implementation structure
*/
struct
ID3DXMatrixStackImpl
{
/* IUnknown fields */
const
ID3DXMatrixStackVtbl
*
lpVtbl
;
LONG
ref
;
/* ID3DXMatrixStack fields */
int
current
;
D3DXMATRIX
*
stack
;
};
#endif
/*__WINE_D3DX8_PRIVATE_H */
dlls/d3dx8/math.c
View file @
3175d58f
...
...
@@ -26,12 +26,14 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "d3dx8.h"
#include "d3dx8
_private
.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx8
);
static
const
ID3DXMatrixStackVtbl
ID3DXMatrixStack_Vtbl
;
/*_________________D3DXColor____________________*/
D3DXCOLOR
*
WINAPI
D3DXColorAdjustContrast
(
D3DXCOLOR
*
pout
,
CONST
D3DXCOLOR
*
pc
,
FLOAT
s
)
...
...
@@ -583,6 +585,166 @@ D3DXMATRIX* WINAPI D3DXMatrixTranspose(D3DXMATRIX *pout, CONST D3DXMATRIX *pm)
return
pout
;
}
/*_________________D3DXMatrixStack____________________*/
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_QueryInterface
(
ID3DXMatrixStack
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_ID3DXMatrixStack
))
{
ID3DXMatrixStack_AddRef
(
iface
);
*
ppobj
=
This
;
return
S_OK
;
}
*
ppobj
=
NULL
;
ERR
(
"(%p)->(%s,%p),not found
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
ID3DXMatrixStackImpl_AddRef
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) : AddRef from %d
\n
"
,
This
,
ref
-
1
);
return
ref
;
}
static
ULONG
WINAPI
ID3DXMatrixStackImpl_Release
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
ref
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
TRACE
(
"(%p) : ReleaseRef to %d
\n
"
,
This
,
ref
);
return
ref
;
}
static
D3DXMATRIX
*
WINAPI
ID3DXMatrixStackImpl_GetTop
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
NULL
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_LoadIdentity
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_LoadMatrix
(
ID3DXMatrixStack
*
iface
,
LPD3DXMATRIX
pm
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_MultMatrix
(
ID3DXMatrixStack
*
iface
,
LPD3DXMATRIX
pm
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_MultMatrixLocal
(
ID3DXMatrixStack
*
iface
,
LPD3DXMATRIX
pm
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_Pop
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_Push
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_RotateAxis
(
ID3DXMatrixStack
*
iface
,
LPD3DXVECTOR3
pv
,
FLOAT
angle
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_RotateAxisLocal
(
ID3DXMatrixStack
*
iface
,
LPD3DXVECTOR3
pv
,
FLOAT
angle
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_RotateYawPitchRoll
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_RotateYawPitchRollLocal
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_Scale
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_ScaleLocal
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_Translate
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_TranslateLocal
(
ID3DXMatrixStack
*
iface
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
}
static
const
ID3DXMatrixStackVtbl
ID3DXMatrixStack_Vtbl
=
{
ID3DXMatrixStackImpl_QueryInterface
,
ID3DXMatrixStackImpl_AddRef
,
ID3DXMatrixStackImpl_Release
,
ID3DXMatrixStackImpl_Pop
,
ID3DXMatrixStackImpl_Push
,
ID3DXMatrixStackImpl_LoadIdentity
,
ID3DXMatrixStackImpl_LoadMatrix
,
ID3DXMatrixStackImpl_MultMatrix
,
ID3DXMatrixStackImpl_MultMatrixLocal
,
ID3DXMatrixStackImpl_RotateAxis
,
ID3DXMatrixStackImpl_RotateAxisLocal
,
ID3DXMatrixStackImpl_RotateYawPitchRoll
,
ID3DXMatrixStackImpl_RotateYawPitchRollLocal
,
ID3DXMatrixStackImpl_Scale
,
ID3DXMatrixStackImpl_ScaleLocal
,
ID3DXMatrixStackImpl_Translate
,
ID3DXMatrixStackImpl_TranslateLocal
,
ID3DXMatrixStackImpl_GetTop
};
/*_________________D3DXPLANE________________*/
D3DXPLANE
*
WINAPI
D3DXPlaneFromPointNormal
(
D3DXPLANE
*
pout
,
CONST
D3DXVECTOR3
*
pvpoint
,
CONST
D3DXVECTOR3
*
pvnormal
)
...
...
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