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
32d7bebf
Commit
32d7bebf
authored
Oct 29, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 30, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Implement ID3DXMatrixStack_Push() and ID3DXMatrixStack_Pop().
Based on a patchset by David Adam.
parent
c5da8d4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
4 deletions
+45
-4
math.c
dlls/d3dx8/math.c
+45
-4
No files found.
dlls/d3dx8/math.c
View file @
32d7bebf
...
...
@@ -691,15 +691,56 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrixLocal(ID3DXMatrixStack *ifa
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_Pop
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
E_NOTIMPL
;
TRACE
(
"iface %p
\n
"
,
iface
);
/* Popping the last element on the stack returns D3D_OK, but does nothing. */
if
(
!
This
->
current
)
return
D3D_OK
;
if
(
This
->
current
<=
This
->
stack_size
/
4
&&
This
->
stack_size
>=
INITIAL_STACK_SIZE
*
2
)
{
unsigned
int
new_size
;
D3DXMATRIX
*
new_stack
;
new_size
=
This
->
stack_size
/
2
;
new_stack
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
This
->
stack
,
new_size
*
sizeof
(
D3DXMATRIX
));
if
(
new_stack
)
{
This
->
stack_size
=
new_size
;
This
->
stack
=
new_stack
;
}
}
--
This
->
current
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_Push
(
ID3DXMatrixStack
*
iface
)
{
ID3DXMatrixStackImpl
*
This
=
(
ID3DXMatrixStackImpl
*
)
iface
;
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
E_NOTIMPL
;
TRACE
(
"iface %p
\n
"
,
iface
);
if
(
This
->
current
==
This
->
stack_size
-
1
)
{
unsigned
int
new_size
;
D3DXMATRIX
*
new_stack
;
if
(
This
->
stack_size
>
UINT_MAX
/
2
)
return
E_OUTOFMEMORY
;
new_size
=
This
->
stack_size
*
2
;
new_stack
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
This
->
stack
,
new_size
*
sizeof
(
D3DXMATRIX
));
if
(
!
new_stack
)
return
E_OUTOFMEMORY
;
This
->
stack_size
=
new_size
;
This
->
stack
=
new_stack
;
}
++
This
->
current
;
This
->
stack
[
This
->
current
]
=
This
->
stack
[
This
->
current
-
1
];
return
D3D_OK
;
}
static
HRESULT
WINAPI
ID3DXMatrixStackImpl_RotateAxis
(
ID3DXMatrixStack
*
iface
,
CONST
D3DXVECTOR3
*
pv
,
FLOAT
angle
)
...
...
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