No subject


Wed Feb 20 09:39:33 CST 2008


=0A=0A---=0A dlls/d3dx9_36/Makefile.in        |    3 +-=0A dlls/d3dx9_36/d3=
dx9_36.spec      |    8 +-=0A dlls/d3dx9_36/d3dx9_36_main.c    |    1 +=0A =
dlls/d3dx9_36/d3dx9_36_private.h |   50 +++++++=0A dlls/d3dx9_36/font.c    =
         |  265 ++++++++++++++++++++++++++++++++++++++=0A 5 files changed, =
322 insertions(+), 5 deletions(-)=0A create mode 100755 dlls/d3dx9_36/d3dx9=
_36_private.h=0A create mode 100644 dlls/d3dx9_36/font.c=0A=0Adiff --git a/=
dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in=0Aindex 3b0f062..c4cd=
bb4 100644=0A--- a/dlls/d3dx9_36/Makefile.in=0A+++ b/dlls/d3dx9_36/Makefile=
.in=0A@@ -7,7 +7,8 @@ IMPORTLIB =3D d3dx9=0A IMPORTS   =3D d3d9 d3dx8 kerne=
l32=0A =0A C_SRCS =3D \=0A-=09d3dx9_36_main.c=0A+=09d3dx9_36_main.c \=0A+=
=09font.c=0A =0A @MAKE_DLL_RULES@=0A =0Adiff --git a/dlls/d3dx9_36/d3dx9_36=
.spec b/dlls/d3dx9_36/d3dx9_36.spec=0Aindex c859e94..46c7cd5 100644=0A--- a=
/dlls/d3dx9_36/d3dx9_36.spec=0A+++ b/dlls/d3dx9_36/d3dx9_36.spec=0A@@ -62,1=
0 +62,10 @@=0A @ stub D3DXCreateEffectFromResourceExW=0A @ stub D3DXCreateE=
ffectFromResourceW=0A @ stub D3DXCreateEffectPool=0A-@ stub D3DXCreateFontA=
=0A-@ stub D3DXCreateFontIndirectA=0A-@ stub D3DXCreateFontIndirectW=0A-@ s=
tub D3DXCreateFontW=0A+@ stdcall D3DXCreateFontA(ptr long long long long lo=
ng long long long long str ptr)=0A+@ stdcall D3DXCreateFontIndirectA(ptr pt=
r ptr)=0A+@ stdcall D3DXCreateFontIndirectW(ptr ptr ptr)=0A+@ stdcall D3DXC=
reateFontW(ptr long long long long long long long long long wstr ptr)=0A @ =
stub D3DXCreateFragmentLinker=0A @ stub D3DXCreateFragmentLinkerEx=0A @ stu=
b D3DXCreateKeyframedAnimationSet=0Adiff --git a/dlls/d3dx9_36/d3dx9_36_mai=
n.c b/dlls/d3dx9_36/d3dx9_36_main.c=0Aindex 6a98c60..fbf0eed 100644=0A--- a=
/dlls/d3dx9_36/d3dx9_36_main.c=0A+++ b/dlls/d3dx9_36/d3dx9_36_main.c=0A@@ -=
22,6 +22,7 @@=0A =0A #include "config.h"=0A #include "wine/port.h"=0A+#incl=
ude "initguid.h"=0A =0A #include <stdarg.h>=0A =0Adiff --git a/dlls/d3dx9_3=
6/d3dx9_36_private.h b/dlls/d3dx9_36/d3dx9_36_private.h=0Anew file mode 100=
755=0Aindex 0000000..873a907=0A--- /dev/null=0A+++ b/dlls/d3dx9_36/d3dx9_36=
_private.h=0A@@ -0,0 +1,50 @@=0A+/*=0A+ * Copyright (C) 2008 Tony Wasserka=
=0A+ *=0A+ * This library is free software; you can redistribute it and/or=
=0A+ * modify it under the terms of the GNU Lesser General Public=0A+ * Lic=
ense as published by the Free Software Foundation; either=0A+ * version 2.1=
 of the License, or (at your option) any later version.=0A+ *=0A+ * This li=
brary is distributed in the hope that it will be useful,=0A+ * but WITHOUT =
ANY WARRANTY; without even the implied warranty of=0A+ * MERCHANTABILITY or=
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU=0A+ * Lesser General Public=
 License for more details.=0A+ *=0A+ * You should have received a copy of t=
he GNU Lesser General Public=0A+ * License along with this library; if not,=
 write to the Free Software=0A+ * Foundation, Inc., 51 Franklin St, Fifth F=
loor, Boston, MA 02110-1301, USA=0A+ *=0A+ */=0A+=0A+#ifndef __WINE_D3DX9_3=
6_PRIVATE_H=0A+#define __WINE_D3DX9_36_PRIVATE_H=0A+=0A+#include <stdarg.h>=
=0A+=0A+#define COBJMACROS=0A+#include "wingdi.h"=0A+#include "d3dx9.h"=0A+=
=0A+/**********************************************=0A+ ****************** =
typedefs ******************=0A+ *******************************************=
***/=0A+extern const ID3DXFontVtbl D3DXFont_Vtbl;=0A+=0A+/*****************=
*****************************=0A+ ********** Implementation interfaces ****=
*****=0A+ **********************************************/=0A+=0A+/* ID3DXBu=
ffer is implemented in d3dx8 */=0A+=0A+typedef struct ID3DXFontImpl=0A+{=0A=
+  /* IUnknown fields */=0A+  const ID3DXFontVtbl *lpVtbl;=0A+  LONG ref;=
=0A+=0A+  /* ID3DXFont fields */=0A+} ID3DXFontImpl;=0A+=0A+=0A+#endif /* _=
_WINE_D3DX9_36_PRIVATE_H */=0Adiff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx=
9_36/font.c=0Anew file mode 100644=0Aindex 0000000..64add46=0A--- /dev/null=
=0A+++ b/dlls/d3dx9_36/font.c=0A@@ -0,0 +1,265 @@=0A+/*=0A+ * Copyright (C)=
 2008 Tony Wasserka=0A+ *=0A+ * This library is free software; you can redi=
stribute it and/or=0A+ * modify it under the terms of the GNU Lesser Genera=
l Public=0A+ * License as published by the Free Software Foundation; either=
=0A+ * version 2.1 of the License, or (at your option) any later version.=
=0A+ *=0A+ * This library is distributed in the hope that it will be useful=
,=0A+ * but WITHOUT ANY WARRANTY; without even the implied warranty of=0A+ =
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU=0A+ * L=
esser General Public License for more details.=0A+ *=0A+ * You should have =
received a copy of the GNU Lesser General Public=0A+ * License along with t=
his library; if not, write to the Free Software=0A+ * Foundation, Inc., 51 =
Franklin St, Fifth Floor, Boston, MA 02110-1301, USA=0A+ *=0A+ */=0A+=0A+#i=
nclude "config.h"=0A+#include "wine/port.h"=0A+=0A+#include "wine/debug.h"=
=0A+#include "wine/unicode.h"=0A+#include "d3dx9_36_private.h"=0A+=0A+WINE_=
DEFAULT_DEBUG_CHANNEL(d3dx);=0A+=0A+HRESULT WINAPI D3DXCreateFontA(LPDIRECT=
3DDEVICE9 device, INT height, UINT width, UINT weight, UINT miplevels, BOOL=
 italic, DWORD charset,=0A+                               DWORD precision, =
DWORD quality, DWORD pitchandfamily, LPCSTR facename, LPD3DXFONT *font)=0A+=
{=0A+    D3DXFONT_DESCA desc;=0A+=0A+    if(!facename) return D3DXERR_INVAL=
IDDATA;=0A+=0A+    desc.Height=3Dheight;=0A+    desc.Width=3Dwidth;=0A+    =
desc.Weight=3Dweight;=0A+    desc.MipLevels=3Dmiplevels;=0A+    desc.Italic=
=3Ditalic;=0A+    desc.CharSet=3Dcharset;=0A+    desc.OutputPrecision=3Dpre=
cision;=0A+    desc.Quality=3Dquality;=0A+    desc.PitchAndFamily=3Dpitchan=
dfamily;=0A+    lstrcpyA(desc.FaceName, facename);=0A+=0A+    return D3DXCr=
eateFontIndirectA(device, &desc, font);=0A+}=0A+=0A+HRESULT WINAPI D3DXCrea=
teFontW(LPDIRECT3DDEVICE9 device, INT height, UINT width, UINT weight, UINT=
 miplevels, BOOL italic, DWORD charset,=0A+                               D=
WORD precision, DWORD quality, DWORD pitchandfamily, LPCWSTR facename, LPD3=
DXFONT *font)=0A+{=0A+    D3DXFONT_DESCW desc;=0A+=0A+    if(!facename) ret=
urn D3DXERR_INVALIDDATA;=0A+=0A+    desc.Height=3Dheight;=0A+    desc.Width=
=3Dwidth;=0A+    desc.Weight=3Dweight;=0A+    desc.MipLevels=3Dmiplevels;=
=0A+    desc.Italic=3Ditalic;=0A+    desc.CharSet=3Dcharset;=0A+    desc.Ou=
tputPrecision=3Dprecision;=0A+    desc.Quality=3Dquality;=0A+    desc.Pitch=
AndFamily=3Dpitchandfamily;=0A+    strcpyW(desc.FaceName, facename);=0A+=0A=
+    return D3DXCreateFontIndirectW(device, &desc, font);=0A+}=0A+=0A+HRESU=
LT WINAPI D3DXCreateFontIndirectA(LPDIRECT3DDEVICE9 device, CONST D3DXFONT_=
DESCA *desc, LPD3DXFONT *font)=0A+{=0A+    D3DXFONT_DESCW widedesc;=0A+=0A+=
    if(!desc) return D3DERR_INVALIDCALL;=0A+    if(!desc->FaceName) return =
D3DERR_INVALIDCALL;=0A+=0A+    memcpy(&widedesc, desc, sizeof(D3DXFONT_DESC=
A));=0A+    MultiByteToWideChar(CP_ACP, 0, desc->FaceName, -1, widedesc.Fac=
eName, sizeof(desc->FaceName));=0A+    return D3DXCreateFontIndirectW(devic=
e, &widedesc, font);=0A+}=0A+=0A+HRESULT WINAPI D3DXCreateFontIndirectW(LPD=
IRECT3DDEVICE9 device, CONST D3DXFONT_DESCW *desc, LPD3DXFONT *font)=0A+{=
=0A+    ID3DXFontImpl *object;=0A+=0A+    FIXME("(void): stub\n");=0A+=0A+ =
   if(!desc) return D3DERR_INVALIDCALL;=0A+=0A+    object=3DHeapAlloc(GetPr=
ocessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXFontImpl));=0A+    if(object=3D=
=3DNULL) {=0A+        *font=3DNULL;=0A+        return E_OUTOFMEMORY;=0A+   =
 }=0A+    object->lpVtbl=3D&D3DXFont_Vtbl;=0A+    object->ref=3D1;=0A+=0A+ =
   *font=3D(LPD3DXFONT)object;=0A+=0A+    return D3D_OK;=0A+}=0A+=0A+static=
 HRESULT WINAPI ID3DXFontImpl_QueryInterface(LPD3DXFONT iface, REFIID riid,=
 LPVOID *object)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=
=0A+=0A+    TRACE("(%p): QueryInterface from %s\n", This, debugstr_guid(rii=
d));=0A+    if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_I=
D3DXFont)) {=0A+        IUnknown_AddRef(iface);=0A+        *object=3DThis;=
=0A+        return S_OK;=0A+    }=0A+    WARN("(%p)->(%s, %p): not found\n"=
, iface, debugstr_guid(riid), *object);=0A+    return E_NOINTERFACE;=0A+}=
=0A+=0A+static ULONG WINAPI ID3DXFontImpl_AddRef(LPD3DXFONT iface)=0A+{=0A+=
    ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    ULONG ref=3DInterlo=
ckedIncrement(&This->ref);=0A+    TRACE("(%p): AddRef from %d\n", This, ref=
-1);=0A+    return ref;=0A+}=0A+=0A+static ULONG WINAPI ID3DXFontImpl_Relea=
se(LPD3DXFONT iface)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)ifac=
e;=0A+    ULONG ref=3DInterlockedDecrement(&This->ref);=0A+    TRACE("(%p):=
 ReleaseRef to %d\n", This, ref);=0A+=0A+    if(ref=3D=3D0) {=0A+        He=
apFree(GetProcessHeap(), 0, This);=0A+    }=0A+    return ref;=0A+}=0A+=0A+=
static HRESULT WINAPI ID3DXFontImpl_GetDevice(LPD3DXFONT iface, LPDIRECT3DD=
EVICE9 *device)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A=
+    FIXME("(%p): stub\n", This);=0A+    return D3D_OK;=0A+}=0A+=0A+static =
HRESULT WINAPI ID3DXFontImpl_GetDescA(LPD3DXFONT iface, D3DXFONT_DESCA *des=
c)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(=
%p): stub\n", This);=0A+    return D3D_OK;=0A+}=0A+=0A+static HRESULT WINAP=
I ID3DXFontImpl_GetDescW(LPD3DXFONT iface, D3DXFONT_DESCW *desc)=0A+{=0A+  =
  ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n",=
 This);=0A+    return D3D_OK;=0A+}=0A+=0A+static BOOL WINAPI ID3DXFontImpl_=
GetTextMetricsA(LPD3DXFONT iface, TEXTMETRICA *metrics)=0A+{=0A+    ID3DXFo=
ntImpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=
=0A+    return FALSE;=0A+}=0A+=0A+static BOOL WINAPI ID3DXFontImpl_GetTextM=
etricsW(LPD3DXFONT iface, TEXTMETRICW *metrics)=0A+{=0A+    ID3DXFontImpl *=
This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    re=
turn FALSE;=0A+}=0A+=0A+static HDC WINAPI ID3DXFontImpl_GetDC(LPD3DXFONT if=
ace)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME(=
"(%p): stub\n", This);=0A+    return NULL;=0A+}=0A+=0A+static HRESULT WINAP=
I ID3DXFontImpl_GetGlyphData(LPD3DXFONT iface, UINT glyph, LPDIRECT3DTEXTUR=
E9 *texture, RECT *blackbox, POINT *cellinc)=0A+{=0A+    ID3DXFontImpl *Thi=
s=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    retur=
n D3D_OK;=0A+}=0A+=0A+static HRESULT WINAPI ID3DXFontImpl_PreloadCharacters=
(LPD3DXFONT iface, UINT first, UINT last)=0A+{=0A+    ID3DXFontImpl *This=
=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    return=
 D3D_OK;=0A+}=0A+=0A+static HRESULT WINAPI ID3DXFontImpl_PreloadGlyphs(LPD3=
DXFONT iface, UINT first, UINT last)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3=
DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    return D3D_OK=
;=0A+}=0A+=0A+static HRESULT WINAPI ID3DXFontImpl_PreloadTextA(LPD3DXFONT i=
face, LPCSTR string, INT count)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFon=
tImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    return D3D_OK;=0A+=
}=0A+=0A+static HRESULT WINAPI ID3DXFontImpl_PreloadTextW(LPD3DXFONT iface,=
 LPCWSTR string, INT count)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImp=
l*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    return D3D_OK;=0A+}=0A=
+=0A+static INT WINAPI ID3DXFontImpl_DrawTextA(LPD3DXFONT iface, LPD3DXSPRI=
TE sprite, LPCSTR string, INT count, LPRECT rect, DWORD format, D3DCOLOR co=
lor)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME(=
"(%p): stub\n", This);=0A+    return 1;=0A+}=0A+=0A+static INT WINAPI ID3DX=
FontImpl_DrawTextW(LPD3DXFONT iface, LPD3DXSPRITE sprite, LPCWSTR string, I=
NT count, LPRECT rect, DWORD format, D3DCOLOR color)=0A+{=0A+    ID3DXFontI=
mpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+ =
   return 1;=0A+}=0A+=0A+static HRESULT WINAPI ID3DXFontImpl_OnLostDevice(L=
PD3DXFONT iface)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=
=0A+    FIXME("(%p): stub\n", This);=0A+    return D3D_OK;=0A+}=0A+=0A+stat=
ic HRESULT WINAPI ID3DXFontImpl_OnResetDevice(LPD3DXFONT iface)=0A+{=0A+   =
 ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", =
This);=0A+    return D3D_OK;=0A+}=0A+=0A+const ID3DXFontVtbl D3DXFont_Vtbl =
=3D=0A+{=0A+    /*** IUnknown methods ***/=0A+    ID3DXFontImpl_QueryInterf=
ace,=0A+    ID3DXFontImpl_AddRef,=0A+    ID3DXFontImpl_Release,=0A+    /***=
 ID3DXFont methods ***/=0A+    ID3DXFontImpl_GetDevice,=0A+    ID3DXFontImp=
l_GetDescA,=0A+    ID3DXFontImpl_GetDescW,=0A+    ID3DXFontImpl_GetTextMetr=
icsA,=0A+    ID3DXFontImpl_GetTextMetricsW,=0A+    ID3DXFontImpl_GetDC,=0A+=
    ID3DXFontImpl_GetGlyphData,=0A+    ID3DXFontImpl_PreloadCharacters,=0A+=
    ID3DXFontImpl_PreloadGlyphs,=0A+    ID3DXFontImpl_PreloadTextA,=0A+    =
ID3DXFontImpl_PreloadTextW,=0A+    ID3DXFontImpl_DrawTextA,=0A+    ID3DXFon=
tImpl_DrawTextW,=0A+    ID3DXFontImpl_OnLostDevice,=0A+    ID3DXFontImpl_On=
ResetDevice=0A+};=0A-- =0A1.5.3.7=0A=0A

--b2b68a01275fa2a69d8c35c35b8794f6f
Content-Type: text/x-patch; charset="ISO-8859-1"; name=0001-d3dx9-Add-stubs-for-the-ID3DXFont-functions1.patch
Content-disposition: attachment; filename="0001-d3dx9-Add-stubs-for-the-ID3DXFont-functions1.patch"
Content-Transfer-Encoding: quoted-printable



More information about the wine-patches mailing list