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
de5090c5
Commit
de5090c5
authored
Jul 11, 2009
by
David Adam
Committed by
Alexandre Julliard
Jul 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Merge d3dx8 core into d3dx9.
parent
3871fb34
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
137 additions
and
1 deletion
+137
-1
Makefile.in
dlls/d3dx9_36/Makefile.in
+1
-0
core.c
dlls/d3dx9_36/core.c
+120
-0
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+1
-1
d3dx9_36_private.h
dlls/d3dx9_36/d3dx9_36_private.h
+15
-0
No files found.
dlls/d3dx9_36/Makefile.in
View file @
de5090c5
...
...
@@ -7,6 +7,7 @@ IMPORTLIB = d3dx9
IMPORTS
=
d3d9 d3dx8 gdi32 user32 kernel32
C_SRCS
=
\
core.c
\
d3dx9_36_main.c
\
font.c
\
math.c
\
...
...
dlls/d3dx9_36/core.c
0 → 100644
View file @
de5090c5
/*
*
* Copyright 2002 Raphael Junqueira
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "d3dx9_36_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx
);
/* 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
);
*
ppobj
=
This
;
return
D3D_OK
;
}
WARN
(
"(%p)->(%s,%p),not found
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
ID3DXBufferImpl_AddRef
(
LPD3DXBUFFER
iface
)
{
ID3DXBufferImpl
*
This
=
(
ID3DXBufferImpl
*
)
iface
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) : AddRef from %d
\n
"
,
This
,
ref
-
1
);
return
ref
;
}
static
ULONG
WINAPI
ID3DXBufferImpl_Release
(
LPD3DXBUFFER
iface
)
{
ID3DXBufferImpl
*
This
=
(
ID3DXBufferImpl
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) : ReleaseRef to %d
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
/* ID3DXBuffer Interface follow: */
static
LPVOID
WINAPI
ID3DXBufferImpl_GetBufferPointer
(
LPD3DXBUFFER
iface
)
{
ID3DXBufferImpl
*
This
=
(
ID3DXBufferImpl
*
)
iface
;
return
This
->
buffer
;
}
static
DWORD
WINAPI
ID3DXBufferImpl_GetBufferSize
(
LPD3DXBUFFER
iface
)
{
ID3DXBufferImpl
*
This
=
(
ID3DXBufferImpl
*
)
iface
;
return
This
->
bufferSize
;
}
const
ID3DXBufferVtbl
D3DXBuffer_Vtbl
=
{
ID3DXBufferImpl_QueryInterface
,
ID3DXBufferImpl_AddRef
,
ID3DXBufferImpl_Release
,
ID3DXBufferImpl_GetBufferPointer
,
ID3DXBufferImpl_GetBufferSize
};
HRESULT
WINAPI
D3DXCreateBuffer
(
DWORD
NumBytes
,
LPD3DXBUFFER
*
ppBuffer
)
{
ID3DXBufferImpl
*
object
;
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
ID3DXBufferImpl
));
if
(
object
==
NULL
)
{
*
ppBuffer
=
NULL
;
return
E_OUTOFMEMORY
;
}
object
->
lpVtbl
=
&
D3DXBuffer_Vtbl
;
object
->
ref
=
1
;
object
->
bufferSize
=
NumBytes
;
object
->
buffer
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
NumBytes
);
if
(
object
->
buffer
==
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppBuffer
=
NULL
;
return
E_OUTOFMEMORY
;
}
*
ppBuffer
=
(
LPD3DXBUFFER
)
object
;
return
D3D_OK
;
}
dlls/d3dx9_36/d3dx9_36.spec
View file @
de5090c5
...
...
@@ -32,7 +32,7 @@
@ stub D3DXConvertMeshSubsetToStrips
@ stub D3DXCreateAnimationController
@ stub D3DXCreateBox
@ stdcall D3DXCreateBuffer(long ptr)
d3dx8.D3DXCreateBuffer
@ stdcall D3DXCreateBuffer(long ptr)
@ stub D3DXCreateCompressedAnimationSet
@ stub D3DXCreateCubeTexture
@ stub D3DXCreateCubeTextureFromFileA
...
...
dlls/d3dx9_36/d3dx9_36_private.h
View file @
de5090c5
/*
* Copyright (C) 2002 Raphael Junqueira
* Copyright (C) 2008 Tony Wasserka
*
* This library is free software; you can redistribute it and/or
...
...
@@ -32,6 +33,20 @@
HRESULT
map_view_of_file
(
LPCWSTR
filename
,
LPVOID
*
buffer
,
DWORD
*
length
);
HRESULT
load_resource_into_memory
(
HMODULE
module
,
HRSRC
resinfo
,
LPVOID
*
buffer
,
DWORD
*
length
);
extern
const
ID3DXBufferVtbl
D3DXBuffer_Vtbl
;
/* ID3DXBUFFER */
typedef
struct
ID3DXBufferImpl
{
/* IUnknown fields */
const
ID3DXBufferVtbl
*
lpVtbl
;
LONG
ref
;
/* ID3DXBuffer fields */
DWORD
*
buffer
;
DWORD
bufferSize
;
}
ID3DXBufferImpl
;
/* ID3DXFont */
typedef
struct
ID3DXFontImpl
...
...
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