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    =
         |  267 ++++++++++++++++++++++++++++++++++++++=0A include/d3dx9core=
.h              |    2 +=0A 6 files changed, 326 insertions(+), 5 deletions=
(-)=0A create mode 100755 dlls/d3dx9_36/d3dx9_36_private.h=0A create mode 1=
00644 dlls/d3dx9_36/font.c=0A=0Adiff --git a/dlls/d3dx9_36/Makefile.in b/dl=
ls/d3dx9_36/Makefile.in=0Aindex 3b0f062..c4cdbb4 100644=0A--- a/dlls/d3dx9_=
36/Makefile.in=0A+++ b/dlls/d3dx9_36/Makefile.in=0A@@ -7,7 +7,8 @@ IMPORTLI=
B =3D d3dx9=0A IMPORTS   =3D d3d9 d3dx8 kernel32=0A =0A C_SRCS =3D \=0A-=09=
d3dx9_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.s=
pec=0Aindex c859e94..46c7cd5 100644=0A--- a/dlls/d3dx9_36/d3dx9_36.spec=0A+=
++ b/dlls/d3dx9_36/d3dx9_36.spec=0A@@ -62,10 +62,10 @@=0A @ stub D3DXCreate=
EffectFromResourceExW=0A @ stub D3DXCreateEffectFromResourceW=0A @ stub D3D=
XCreateEffectPool=0A-@ stub D3DXCreateFontA=0A-@ stub D3DXCreateFontIndirec=
tA=0A-@ stub D3DXCreateFontIndirectW=0A-@ stub D3DXCreateFontW=0A+@ stdcall=
 D3DXCreateFontA(ptr long long long long long long long long long str ptr)=
=0A+@ stdcall D3DXCreateFontIndirectA(ptr ptr ptr)=0A+@ stdcall D3DXCreateF=
ontIndirectW(ptr ptr ptr)=0A+@ stdcall D3DXCreateFontW(ptr long long long l=
ong long long long long long wstr ptr)=0A @ stub D3DXCreateFragmentLinker=
=0A @ stub D3DXCreateFragmentLinkerEx=0A @ stub D3DXCreateKeyframedAnimatio=
nSet=0Adiff --git a/dlls/d3dx9_36/d3dx9_36_main.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+#include "initguid.h"=0A =0A #incl=
ude <stdarg.h>=0A =0Adiff --git a/dlls/d3dx9_36/d3dx9_36_private.h b/dlls/d=
3dx9_36/d3dx9_36_private.h=0Anew file mode 100755=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 ter=
ms of the GNU Lesser General Public=0A+ * License as published by the Free =
Software Foundation; either=0A+ * version 2.1 of the License, or (at your o=
ption) any later version.=0A+ *=0A+ * This library is distributed in the ho=
pe that it will be useful,=0A+ * but WITHOUT ANY WARRANTY; without even the=
 implied warranty of=0A+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURP=
OSE.  See the GNU=0A+ * Lesser General Public License for more details.=0A+=
 *=0A+ * You should have received a copy of the GNU Lesser General Public=
=0A+ * License along with this 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+#ifndef __WINE_D3DX9_36_PRIVATE_H=0A+#define __WI=
NE_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 ID3DX=
FontVtbl D3DXFont_Vtbl;=0A+=0A+/*******************************************=
***=0A+ ********** Implementation interfaces *********=0A+ ****************=
******************************/=0A+=0A+/* ID3DXBuffer is implemented in d3d=
x8 */=0A+=0A+typedef struct ID3DXFontImpl=0A+{=0A+  /* IUnknown fields */=
=0A+  const ID3DXFontVtbl *lpVtbl;=0A+  LONG ref;=0A+=0A+  /* ID3DXFont fie=
lds */=0A+} ID3DXFontImpl;=0A+=0A+=0A+#endif /* __WINE_D3DX9_36_PRIVATE_H *=
/=0Adiff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c=0Anew file mod=
e 100644=0Aindex 0000000..0cca40d=0A--- /dev/null=0A+++ b/dlls/d3dx9_36/fon=
t.c=0A@@ -0,0 +1,267 @@=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+ * 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 i=
s distributed in the hope that it will be useful,=0A+ * but WITHOUT ANY WAR=
RANTY; without even the implied warranty of=0A+ * MERCHANTABILITY or FITNES=
S FOR A PARTICULAR PURPOSE.  See the GNU=0A+ * Lesser General Public Licens=
e for more details.=0A+ *=0A+ * You should have received a copy of the GNU =
Lesser General Public=0A+ * License along with this library; if not, write =
to the Free Software=0A+ * Foundation, Inc., 51 Franklin St, Fifth Floor, B=
oston, MA 02110-1301, USA=0A+ *=0A+ */=0A+=0A+#include "config.h"=0A+#inclu=
de "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(LPDIRECT3DDEVICE9 device, INT height=
, UINT width, UINT weight, UINT miplevels, BOOL italic, DWORD charset,=0A+ =
                              DWORD precision, DWORD quality, DWORD pitchan=
dfamily, LPCSTR facename, LPD3DXFONT *font)=0A+{=0A+    D3DXFONT_DESCA desc=
;=0A+=0A+    if(!facename) return D3DXERR_INVALIDDATA;=0A+=0A+    desc.Heig=
ht=3Dheight;=0A+    desc.Width=3Dwidth;=0A+    desc.Weight=3Dweight;=0A+   =
 desc.MipLevels=3Dmiplevels;=0A+    desc.Italic=3Ditalic;=0A+    desc.CharS=
et=3Dcharset;=0A+    desc.OutputPrecision=3Dprecision;=0A+    desc.Quality=
=3Dquality;=0A+    desc.PitchAndFamily=3Dpitchandfamily;=0A+    lstrcpyA(de=
sc.FaceName, facename);=0A+=0A+    return D3DXCreateFontIndirectA(device, &=
desc, font);=0A+}=0A+=0A+HRESULT WINAPI D3DXCreateFontW(LPDIRECT3DDEVICE9 d=
evice, INT height, UINT width, UINT weight, UINT miplevels, BOOL italic, DW=
ORD charset,=0A+                               DWORD precision, DWORD quali=
ty, DWORD pitchandfamily, LPCWSTR facename, LPD3DXFONT *font)=0A+{=0A+    D=
3DXFONT_DESCW desc;=0A+=0A+    if(!facename) return D3DXERR_INVALIDDATA;=0A=
+=0A+    desc.Height=3Dheight;=0A+    desc.Width=3Dwidth;=0A+    desc.Weigh=
t=3Dweight;=0A+    desc.MipLevels=3Dmiplevels;=0A+    desc.Italic=3Ditalic;=
=0A+    desc.CharSet=3Dcharset;=0A+    desc.OutputPrecision=3Dprecision;=0A=
+    desc.Quality=3Dquality;=0A+    desc.PitchAndFamily=3Dpitchandfamily;=
=0A+    strcpyW(desc.FaceName, facename);=0A+=0A+    return D3DXCreateFontI=
ndirectW(device, &desc, font);=0A+}=0A+=0A+HRESULT WINAPI D3DXCreateFontInd=
irectA(LPDIRECT3DDEVICE9 device, CONST D3DXFONT_DESCA *desc, LPD3DXFONT *fo=
nt)=0A+{=0A+    D3DXFONT_DESCW widedesc;=0A+=0A+    if(!desc) return D3DERR=
_INVALIDCALL;=0A+    if(!desc->FaceName) return D3DERR_INVALIDCALL;=0A+=0A+=
    /* Copy everything but the last structure member. This requires the=0A+=
       two D3DXFONT_DESC structures to be equal until the FaceName member *=
/=0A+    memcpy(&widedesc, desc, FIELD_OFFSET(D3DXFONT_DESCA, FaceName));=
=0A+    MultiByteToWideChar(CP_ACP, 0, desc->FaceName, -1, widedesc.FaceNam=
e, sizeof(desc->FaceName));=0A+    return D3DXCreateFontIndirectW(device, &=
widedesc, font);=0A+}=0A+=0A+HRESULT WINAPI D3DXCreateFontIndirectW(LPDIREC=
T3DDEVICE9 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(GetProcessH=
eap(), 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+    *fon=
t=3D(LPD3DXFONT)object;=0A+=0A+    return D3D_OK;=0A+}=0A+=0A+static HRESUL=
T 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(riid));=0A+ =
   if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXFont)=
) {=0A+        IUnknown_AddRef(iface);=0A+        *object=3DThis;=0A+      =
  return S_OK;=0A+    }=0A+    WARN("(%p)->(%s, %p): not found\n", iface, d=
ebugstr_guid(riid), *object);=0A+    return E_NOINTERFACE;=0A+}=0A+=0A+stat=
ic ULONG WINAPI ID3DXFontImpl_AddRef(LPD3DXFONT iface)=0A+{=0A+    ID3DXFon=
tImpl *This=3D(ID3DXFontImpl*)iface;=0A+    ULONG ref=3DInterlockedIncremen=
t(&This->ref);=0A+    TRACE("(%p): AddRef from %d\n", This, ref-1);=0A+    =
return ref;=0A+}=0A+=0A+static ULONG WINAPI ID3DXFontImpl_Release(LPD3DXFON=
T iface)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    UL=
ONG ref=3DInterlockedDecrement(&This->ref);=0A+    TRACE("(%p): ReleaseRef =
to %d\n", This, ref);=0A+=0A+    if(ref=3D=3D0) {=0A+        HeapFree(GetPr=
ocessHeap(), 0, This);=0A+    }=0A+    return ref;=0A+}=0A+=0A+static HRESU=
LT WINAPI ID3DXFontImpl_GetDevice(LPD3DXFONT iface, LPDIRECT3DDEVICE9 *devi=
ce)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("=
(%p): stub\n", This);=0A+    return D3D_OK;=0A+}=0A+=0A+static HRESULT WINA=
PI ID3DXFontImpl_GetDescA(LPD3DXFONT iface, D3DXFONT_DESCA *desc)=0A+{=0A+ =
   ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n"=
, This);=0A+    return D3D_OK;=0A+}=0A+=0A+static HRESULT WINAPI ID3DXFontI=
mpl_GetDescW(LPD3DXFONT iface, D3DXFONT_DESCW *desc)=0A+{=0A+    ID3DXFontI=
mpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+ =
   return D3D_OK;=0A+}=0A+=0A+static BOOL WINAPI ID3DXFontImpl_GetTextMetri=
csA(LPD3DXFONT iface, TEXTMETRICA *metrics)=0A+{=0A+    ID3DXFontImpl *This=
=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    return=
 FALSE;=0A+}=0A+=0A+static BOOL WINAPI ID3DXFontImpl_GetTextMetricsW(LPD3DX=
FONT iface, TEXTMETRICW *metrics)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXF=
ontImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    return FALSE;=0A=
+}=0A+=0A+static HDC WINAPI ID3DXFontImpl_GetDC(LPD3DXFONT iface)=0A+{=0A+ =
   ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n"=
, This);=0A+    return NULL;=0A+}=0A+=0A+static HRESULT WINAPI ID3DXFontImp=
l_GetGlyphData(LPD3DXFONT iface, UINT glyph, LPDIRECT3DTEXTURE9 *texture, R=
ECT *blackbox, POINT *cellinc)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFont=
Impl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    return D3D_OK;=0A+}=
=0A+=0A+static HRESULT WINAPI ID3DXFontImpl_PreloadCharacters(LPD3DXFONT if=
ace, UINT first, UINT last)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImp=
l*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    return D3D_OK;=0A+}=0A=
+=0A+static HRESULT WINAPI ID3DXFontImpl_PreloadGlyphs(LPD3DXFONT iface, UI=
NT first, UINT last)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)ifac=
e;=0A+    FIXME("(%p): stub\n", This);=0A+    return D3D_OK;=0A+}=0A+=0A+st=
atic HRESULT WINAPI ID3DXFontImpl_PreloadTextA(LPD3DXFONT iface, LPCSTR str=
ing, INT count)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)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(ID3DXFontImpl*)iface;=0A+   =
 FIXME("(%p): stub\n", This);=0A+    return D3D_OK;=0A+}=0A+=0A+static INT =
WINAPI ID3DXFontImpl_DrawTextA(LPD3DXFONT iface, LPD3DXSPRITE sprite, LPCST=
R string, INT count, LPRECT rect, DWORD format, D3DCOLOR color)=0A+{=0A+   =
 ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", =
This);=0A+    return 1;=0A+}=0A+=0A+static INT WINAPI ID3DXFontImpl_DrawTex=
tW(LPD3DXFONT iface, LPD3DXSPRITE sprite, LPCWSTR string, INT count, LPRECT=
 rect, DWORD format, D3DCOLOR color)=0A+{=0A+    ID3DXFontImpl *This=3D(ID3=
DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    return 1;=0A+=
}=0A+=0A+static HRESULT WINAPI ID3DXFontImpl_OnLostDevice(LPD3DXFONT iface)=
=0A+{=0A+    ID3DXFontImpl *This=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p=
): stub\n", This);=0A+    return D3D_OK;=0A+}=0A+=0A+static HRESULT WINAPI =
ID3DXFontImpl_OnResetDevice(LPD3DXFONT iface)=0A+{=0A+    ID3DXFontImpl *Th=
is=3D(ID3DXFontImpl*)iface;=0A+    FIXME("(%p): stub\n", This);=0A+    retu=
rn D3D_OK;=0A+}=0A+=0A+const ID3DXFontVtbl D3DXFont_Vtbl =3D=0A+{=0A+    /*=
** IUnknown methods ***/=0A+    ID3DXFontImpl_QueryInterface,=0A+    ID3DXF=
ontImpl_AddRef,=0A+    ID3DXFontImpl_Release,=0A+    /*** ID3DXFont methods=
 ***/=0A+    ID3DXFontImpl_GetDevice,=0A+    ID3DXFontImpl_GetDescA,=0A+   =
 ID3DXFontImpl_GetDescW,=0A+    ID3DXFontImpl_GetTextMetricsA,=0A+    ID3DX=
FontImpl_GetTextMetricsW,=0A+    ID3DXFontImpl_GetDC,=0A+    ID3DXFontImpl_=
GetGlyphData,=0A+    ID3DXFontImpl_PreloadCharacters,=0A+    ID3DXFontImpl_=
PreloadGlyphs,=0A+    ID3DXFontImpl_PreloadTextA,=0A+    ID3DXFontImpl_Prel=
oadTextW,=0A+    ID3DXFontImpl_DrawTextA,=0A+    ID3DXFontImpl_DrawTextW,=
=0A+    ID3DXFontImpl_OnLostDevice,=0A+    ID3DXFontImpl_OnResetDevice=0A+}=
;=0Adiff --git a/include/d3dx9core.h b/include/d3dx9core.h=0Aindex 9a108fa.=
.c38edc3 100644=0A--- a/include/d3dx9core.h=0A+++ b/include/d3dx9core.h=0A@=
@ -92,6 +92,8 @@ DECLARE_INTERFACE_(ID3DXBuffer, IUnknown)=0A #define ID3DX=
Buffer_GetBufferSize(p)      (p)->GetBufferSize()=0A #endif=0A =0A+/* These=
 two structures must be equal until FaceName=0A+   as this is needed by D3D=
XCreateFontIndirectA */=0A typedef struct _D3DXFONT_DESCA=0A {=0A     INT H=
eight;=0A-- =0A1.5.3.7=0A=0A

--bb107439d699943c55d9ad77b8a53a841--



More information about the wine-patches mailing list