Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
3175d58f
Commit
3175d58f
authored
17 years ago
by
David Adam
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
d3dx8: Add basic functions and stubs for MatrixStack.
parent
303b1a11
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/d3dx8/d3dx8_private.h
+20
-0
20 additions, 0 deletions
dlls/d3dx8/d3dx8_private.h
dlls/d3dx8/math.c
+163
-1
163 additions, 1 deletion
dlls/d3dx8/math.c
with
183 additions
and
1 deletion
dlls/d3dx8/d3dx8_private.h
+
20
−
0
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 */
This diff is collapsed.
Click to expand it.
dlls/d3dx8/math.c
+
163
−
1
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment