mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
d3dx8: Make the virtual table functions static where possible.
This commit is contained in:
parent
c3bd09e563
commit
a34074c5db
@ -54,24 +54,10 @@ struct ID3DXBufferImpl
|
||||
DWORD bufferSize;
|
||||
};
|
||||
|
||||
/* IUnknown: */
|
||||
extern HRESULT WINAPI ID3DXBufferImpl_QueryInterface(LPD3DXBUFFER iface, REFIID refiid, LPVOID *obj);
|
||||
extern ULONG WINAPI ID3DXBufferImpl_AddRef(LPD3DXBUFFER iface);
|
||||
extern ULONG WINAPI ID3DXBufferImpl_Release(LPD3DXBUFFER iface);
|
||||
|
||||
/* ID3DXBuffer: */
|
||||
extern LPVOID WINAPI ID3DXBufferImpl_GetBufferPointer(LPD3DXBUFFER iface);
|
||||
extern DWORD WINAPI ID3DXBufferImpl_GetBufferSize(LPD3DXBUFFER iface);
|
||||
|
||||
/* --------- */
|
||||
/* ID3DXFont */
|
||||
/* --------- */
|
||||
|
||||
/*****************************************************************************
|
||||
* Predeclare the interface implementation structures
|
||||
*/
|
||||
extern const ID3DXFontVtbl D3DXFont_Vtbl;
|
||||
|
||||
/*****************************************************************************
|
||||
* ID3DXFontImpl implementation structure
|
||||
*/
|
||||
@ -84,12 +70,4 @@ struct ID3DXFontImpl
|
||||
/* ID3DXFont fields */
|
||||
};
|
||||
|
||||
/* IUnknown: */
|
||||
extern HRESULT WINAPI ID3DXFontImpl_QueryInterface(LPD3DXFONT iface, REFIID refiid, LPVOID *obj);
|
||||
extern ULONG WINAPI ID3DXFontImpl_AddRef(LPD3DXFONT iface);
|
||||
extern ULONG WINAPI ID3DXFontImpl_Release(LPD3DXFONT iface);
|
||||
|
||||
/* ID3DXFont: */
|
||||
extern INT WINAPI ID3DXFontImpl_DrawTextA(LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color);
|
||||
|
||||
#endif /*__WINE_D3DX8CORE_PRIVATE_H */
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
@ -35,12 +36,12 @@
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
|
||||
/* ID3DXBuffer IUnknown parts follow: */
|
||||
HRESULT WINAPI ID3DXBufferImpl_QueryInterface(LPD3DXBUFFER iface, REFIID riid, LPVOID* ppobj) {
|
||||
static HRESULT WINAPI ID3DXBufferImpl_QueryInterface(LPD3DXBUFFER iface, REFIID riid, LPVOID* ppobj) {
|
||||
ID3DXBufferImpl *This = (ID3DXBufferImpl *)iface;
|
||||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| IsEqualGUID(riid, &IID_ID3DXBuffer)) {
|
||||
ID3DXBufferImpl_AddRef(iface);
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
}
|
||||
@ -49,7 +50,7 @@ HRESULT WINAPI ID3DXBufferImpl_QueryInterface(LPD3DXBUFFER iface, REFIID riid, L
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
ULONG WINAPI ID3DXBufferImpl_AddRef(LPD3DXBUFFER iface) {
|
||||
static ULONG WINAPI ID3DXBufferImpl_AddRef(LPD3DXBUFFER iface) {
|
||||
ID3DXBufferImpl *This = (ID3DXBufferImpl *)iface;
|
||||
ULONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
@ -58,7 +59,7 @@ ULONG WINAPI ID3DXBufferImpl_AddRef(LPD3DXBUFFER iface) {
|
||||
return ref;
|
||||
}
|
||||
|
||||
ULONG WINAPI ID3DXBufferImpl_Release(LPD3DXBUFFER iface) {
|
||||
static ULONG WINAPI ID3DXBufferImpl_Release(LPD3DXBUFFER iface) {
|
||||
ID3DXBufferImpl *This = (ID3DXBufferImpl *)iface;
|
||||
ULONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
@ -72,12 +73,12 @@ ULONG WINAPI ID3DXBufferImpl_Release(LPD3DXBUFFER iface) {
|
||||
}
|
||||
|
||||
/* ID3DXBuffer Interface follow: */
|
||||
LPVOID WINAPI ID3DXBufferImpl_GetBufferPointer(LPD3DXBUFFER iface) {
|
||||
static LPVOID WINAPI ID3DXBufferImpl_GetBufferPointer(LPD3DXBUFFER iface) {
|
||||
ID3DXBufferImpl *This = (ID3DXBufferImpl *)iface;
|
||||
return This->buffer;
|
||||
}
|
||||
|
||||
DWORD WINAPI ID3DXBufferImpl_GetBufferSize(LPD3DXBUFFER iface) {
|
||||
static DWORD WINAPI ID3DXBufferImpl_GetBufferSize(LPD3DXBUFFER iface) {
|
||||
ID3DXBufferImpl *This = (ID3DXBufferImpl *)iface;
|
||||
return This->bufferSize;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user