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
edef19f8
Commit
edef19f8
authored
Feb 06, 2009
by
David Adam
Committed by
Alexandre Julliard
Feb 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Move some functions into core.c to match the header file layout.
parent
fb04bcf6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
85 deletions
+78
-85
Makefile.in
dlls/d3dx8/Makefile.in
+1
-1
core.c
dlls/d3dx8/core.c
+63
-8
d3dx8_main.c
dlls/d3dx8/d3dx8_main.c
+0
-75
mesh.c
dlls/d3dx8/mesh.c
+14
-1
No files found.
dlls/d3dx8/Makefile.in
View file @
edef19f8
...
...
@@ -7,8 +7,8 @@ IMPORTLIB = d3dx8
IMPORTS
=
dxguid uuid kernel32
C_SRCS
=
\
core.c
\
d3dx8_main.c
\
d3dxbuffer.c
\
math.c
\
mesh.c
...
...
dlls/d3dx8/
d3dxbuffer
.c
→
dlls/d3dx8/
core
.c
View file @
edef19f8
/*
* ID3DXBuffer implementation
*
* Copyright 2002 Raphael Junqueira
*
...
...
@@ -18,27 +17,23 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "d3d8.h"
#include "d3dx8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
x
);
/* ID3DXBuffer IUnknown parts follow: */
static
HRESULT
WINAPI
ID3DXBufferImpl_QueryInterface
(
LPD3DXBUFFER
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
ID3DXBufferImpl
*
This
=
(
ID3DXBufferImpl
*
)
iface
;
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_ID3DXBuffer
))
{
IUnknown_AddRef
(
iface
);
...
...
@@ -91,3 +86,63 @@ const ID3DXBufferVtbl D3DXBuffer_Vtbl =
ID3DXBufferImpl_GetBufferPointer
,
ID3DXBufferImpl_GetBufferSize
};
HRESULT
WINAPI
D3DXCreateBuffer
(
DWORD
NumBytes
,
LPD3DXBUFFER
*
ppBuffer
)
{
ID3DXBufferImpl
*
object
;
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
ID3DXBufferImpl
));
if
(
NULL
==
object
)
{
*
ppBuffer
=
NULL
;
return
E_OUTOFMEMORY
;
}
object
->
lpVtbl
=
&
D3DXBuffer_Vtbl
;
object
->
ref
=
1
;
object
->
bufferSize
=
NumBytes
;
object
->
buffer
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
NumBytes
);
if
(
NULL
==
object
->
buffer
)
{
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppBuffer
=
NULL
;
return
E_OUTOFMEMORY
;
}
*
ppBuffer
=
(
LPD3DXBUFFER
)
object
;
return
D3D_OK
;
}
HRESULT
WINAPI
D3DXAssembleShader
(
LPCVOID
pSrcData
,
UINT
SrcDataLen
,
DWORD
Flags
,
LPD3DXBUFFER
*
ppConstants
,
LPD3DXBUFFER
*
ppCompiledShader
,
LPD3DXBUFFER
*
ppCompilationErrors
)
{
FIXME
(
"(void): stub
\n
"
);
return
D3D_OK
;
}
HRESULT
WINAPI
D3DXAssembleShaderFromFileA
(
LPCSTR
pSrcFile
,
DWORD
Flags
,
LPD3DXBUFFER
*
ppConstants
,
LPD3DXBUFFER
*
ppCompiledShader
,
LPD3DXBUFFER
*
ppCompilationErrors
)
{
LPWSTR
pSrcFileW
=
NULL
;
DWORD
len
;
HRESULT
ret
;
if
(
!
pSrcFile
)
return
D3DXERR_INVALIDDATA
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pSrcFile
,
-
1
,
NULL
,
0
);
pSrcFileW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pSrcFile
,
-
1
,
pSrcFileW
,
len
);
ret
=
D3DXAssembleShaderFromFileW
(
pSrcFileW
,
Flags
,
ppConstants
,
ppCompiledShader
,
ppCompilationErrors
);
HeapFree
(
GetProcessHeap
(),
0
,
pSrcFileW
);
return
ret
;
}
HRESULT
WINAPI
D3DXAssembleShaderFromFileW
(
LPCWSTR
pSrcFile
,
DWORD
Flags
,
LPD3DXBUFFER
*
ppConstants
,
LPD3DXBUFFER
*
ppCompiledShader
,
LPD3DXBUFFER
*
ppCompilationErrors
)
{
FIXME
(
"(void): stub
\n
"
);
return
D3D_OK
;
}
HRESULT
WINAPI
D3DXCreateFont
(
LPDIRECT3DDEVICE8
pDevice
,
HFONT
hFont
,
LPD3DXFONT
*
ppFont
)
{
FIXME
(
"(void): stub
\n
"
);
return
D3D_OK
;
}
dlls/d3dx8/d3dx8_main.c
View file @
edef19f8
...
...
@@ -19,85 +19,10 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "d3dx8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx
);
HRESULT
WINAPI
D3DXCreateBuffer
(
DWORD
NumBytes
,
LPD3DXBUFFER
*
ppBuffer
)
{
ID3DXBufferImpl
*
object
;
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
ID3DXBufferImpl
));
if
(
NULL
==
object
)
{
*
ppBuffer
=
NULL
;
return
E_OUTOFMEMORY
;
}
object
->
lpVtbl
=
&
D3DXBuffer_Vtbl
;
object
->
ref
=
1
;
object
->
bufferSize
=
NumBytes
;
object
->
buffer
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
NumBytes
);
if
(
NULL
==
object
->
buffer
)
{
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppBuffer
=
NULL
;
return
E_OUTOFMEMORY
;
}
*
ppBuffer
=
(
LPD3DXBUFFER
)
object
;
return
D3D_OK
;
}
HRESULT
WINAPI
D3DXCreateFont
(
LPDIRECT3DDEVICE8
pDevice
,
HFONT
hFont
,
LPD3DXFONT
*
ppFont
)
{
FIXME
(
"(void): stub
\n
"
);
return
D3D_OK
;
}
UINT
WINAPI
D3DXGetFVFVertexSize
(
DWORD
FVF
)
{
FIXME
(
"(void): stub
\n
"
);
return
0
;
}
HRESULT
WINAPI
D3DXAssembleShader
(
LPCVOID
pSrcData
,
UINT
SrcDataLen
,
DWORD
Flags
,
LPD3DXBUFFER
*
ppConstants
,
LPD3DXBUFFER
*
ppCompiledShader
,
LPD3DXBUFFER
*
ppCompilationErrors
)
{
FIXME
(
"(void): stub
\n
"
);
return
D3D_OK
;
}
HRESULT
WINAPI
D3DXAssembleShaderFromFileA
(
LPCSTR
pSrcFile
,
DWORD
Flags
,
LPD3DXBUFFER
*
ppConstants
,
LPD3DXBUFFER
*
ppCompiledShader
,
LPD3DXBUFFER
*
ppCompilationErrors
)
{
LPWSTR
pSrcFileW
=
NULL
;
DWORD
len
;
HRESULT
ret
;
if
(
!
pSrcFile
)
return
D3DXERR_INVALIDDATA
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pSrcFile
,
-
1
,
NULL
,
0
);
pSrcFileW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pSrcFile
,
-
1
,
pSrcFileW
,
len
);
ret
=
D3DXAssembleShaderFromFileW
(
pSrcFileW
,
Flags
,
ppConstants
,
ppCompiledShader
,
ppCompilationErrors
);
HeapFree
(
GetProcessHeap
(),
0
,
pSrcFileW
);
return
ret
;
}
HRESULT
WINAPI
D3DXAssembleShaderFromFileW
(
LPCWSTR
pSrcFile
,
DWORD
Flags
,
LPD3DXBUFFER
*
ppConstants
,
LPD3DXBUFFER
*
ppCompiledShader
,
LPD3DXBUFFER
*
ppCompilationErrors
)
{
FIXME
(
"(void): stub
\n
"
);
return
D3D_OK
;
}
/***********************************************************************
* DllMain.
...
...
dlls/d3dx8/mesh.c
View file @
edef19f8
...
...
@@ -16,9 +16,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "d3dx8.h"
#include "wine/debug.h"
#include "d3dx8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx
);
BOOL
WINAPI
D3DXBoxBoundProbe
(
CONST
D3DXVECTOR3
*
pmin
,
CONST
D3DXVECTOR3
*
pmax
,
CONST
D3DXVECTOR3
*
prayposition
,
CONST
D3DXVECTOR3
*
praydirection
)
...
...
@@ -90,6 +97,12 @@ done we've got an intersection of the ray with the box.
return
TRUE
;
}
UINT
WINAPI
D3DXGetFVFVertexSize
(
DWORD
FVF
)
{
FIXME
(
"(void): stub
\n
"
);
return
0
;
}
BOOL
CDECL
D3DXIntersectTri
(
CONST
D3DXVECTOR3
*
p0
,
CONST
D3DXVECTOR3
*
p1
,
CONST
D3DXVECTOR3
*
p2
,
CONST
D3DXVECTOR3
*
praypos
,
CONST
D3DXVECTOR3
*
praydir
,
FLOAT
*
pu
,
FLOAT
*
pv
,
FLOAT
*
pdist
)
{
D3DXMATRIX
m
;
...
...
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