Commit e7d14d02 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Remove trailing spaces.

parent 1c68cb3c
......@@ -368,7 +368,6 @@ typedef struct IDirect3DBaseTexture9Impl
/* IDirect3DResource9 fields */
IWineD3DBaseTexture *wineD3DBaseTexture;
} IDirect3DBaseTexture9Impl;
/* --------------------- */
......
......@@ -622,8 +622,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetDialogBoxMode(LPDIRECT3DDEVICE9EX
return hr;
}
static void WINAPI IDirect3DDevice9Impl_SetGammaRamp(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp) {
static void WINAPI IDirect3DDevice9Impl_SetGammaRamp(IDirect3DDevice9Ex *iface, UINT iSwapChain,
DWORD Flags, const D3DGAMMARAMP *pRamp)
{
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
TRACE("(%p) Relay\n", This);
......@@ -653,14 +654,10 @@ static HRESULT IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9EX iface, UIN
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
TRACE("(%p) Relay\n", This);
if(MultisampleQuality > 0){
if (MultisampleQuality > 0)
{
FIXME("MultisampleQuality set to %d, bstituting 0\n", MultisampleQuality);
/*
MultisampleQuality
[in] Quality level. The valid range is between zero and one less than the level returned by pQualityLevels used by IDirect3D9::CheckDeviceMultiSampleType. Passing a larger value returns the error D3DERR_INVALIDCALL. The MultisampleQuality values of paired render targets, depth stencil surfaces, and the MultiSample type must all match.
*/
MultisampleQuality=0;
MultisampleQuality = 0;
}
/*FIXME: Check MAX bounds of MultisampleQuality*/
......@@ -696,12 +693,10 @@ static HRESULT IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9EX iface, UIN
return hrc;
}
static HRESULT WINAPI IDirect3DDevice9Impl_CreateRenderTarget(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height,
D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample,
DWORD MultisampleQuality, BOOL Lockable,
IDirect3DSurface9 **ppSurface, HANDLE* pSharedHandle) {
static HRESULT WINAPI IDirect3DDevice9Impl_CreateRenderTarget(IDirect3DDevice9Ex *iface, UINT Width, UINT Height,
D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable,
IDirect3DSurface9 **ppSurface, HANDLE *pSharedHandle)
{
HRESULT hr;
TRACE("Relay\n");
......@@ -1287,7 +1282,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetTextureStageState(LPDIRECT3DDEVI
return hr;
}
static HRESULT WINAPI IDirect3DDevice9Impl_GetSamplerState(LPDIRECT3DDEVICE9EX iface, DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue) {
static HRESULT WINAPI IDirect3DDevice9Impl_GetSamplerState(IDirect3DDevice9Ex *iface, DWORD Sampler,
D3DSAMPLERSTATETYPE Type, DWORD *pValue)
{
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
HRESULT hr;
TRACE("(%p) Relay\n" , This);
......@@ -1323,7 +1320,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_ValidateDevice(LPDIRECT3DDEVICE9EX
return hr;
}
static HRESULT WINAPI IDirect3DDevice9Impl_SetPaletteEntries(LPDIRECT3DDEVICE9EX iface, UINT PaletteNumber, CONST PALETTEENTRY* pEntries) {
static HRESULT WINAPI IDirect3DDevice9Impl_SetPaletteEntries(IDirect3DDevice9Ex *iface, UINT PaletteNumber,
const PALETTEENTRY *pEntries)
{
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
HRESULT hr;
TRACE("(%p) Relay\n" , This);
......@@ -1443,7 +1442,9 @@ static float WINAPI IDirect3DDevice9Impl_GetNPatchMode(LPDIRECT3DDEVICE9EX i
return ret;
}
static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitive(LPDIRECT3DDEVICE9EX iface, D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount) {
static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitive(IDirect3DDevice9Ex *iface, D3DPRIMITIVETYPE PrimitiveType,
UINT StartVertex, UINT PrimitiveCount)
{
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
HRESULT hr;
TRACE("(%p) Relay\n" , This);
......@@ -1474,7 +1475,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitive(LPDIRECT3DDEVI
return hr;
}
static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitiveUP(LPDIRECT3DDEVICE9EX iface, D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) {
static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitiveUP(IDirect3DDevice9Ex *iface, D3DPRIMITIVETYPE PrimitiveType,
UINT PrimitiveCount, const void *pVertexStreamZeroData, UINT VertexStreamZeroStride)
{
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
HRESULT hr;
TRACE("(%p) Relay\n" , This);
......@@ -1643,7 +1646,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSource(LPDIRECT3DDEVICE9EX i
wined3d_mutex_lock();
hr = IWineD3DDevice_SetStreamSource(This->WineD3DDevice, StreamNumber,
pStreamData==NULL ? NULL:((IDirect3DVertexBuffer9Impl *)pStreamData)->wineD3DVertexBuffer,
pStreamData ? ((IDirect3DVertexBuffer9Impl *)pStreamData)->wineD3DVertexBuffer : NULL,
OffsetInBytes, Stride);
wined3d_mutex_unlock();
......@@ -1677,7 +1680,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(LPDIRECT3DDEVICE9EX i
return rc;
}
static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSourceFreq(LPDIRECT3DDEVICE9EX iface, UINT StreamNumber, UINT Divider) {
static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSourceFreq(IDirect3DDevice9Ex *iface, UINT StreamNumber,
UINT Divider)
{
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
HRESULT hr;
TRACE("(%p) Relay\n" , This);
......
......@@ -232,10 +232,9 @@ static const IDirect3DIndexBuffer9Vtbl Direct3DIndexBuffer9_Vtbl =
/* IDirect3DDevice9 IDirect3DIndexBuffer9 Methods follow: */
HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9EX iface,
UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool,
IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle) {
HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(IDirect3DDevice9Ex *iface, UINT Length, DWORD Usage,
D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9 **ppIndexBuffer, HANDLE *pSharedHandle)
{
IDirect3DIndexBuffer9Impl *object;
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
HRESULT hrc = D3D_OK;
......
......@@ -160,7 +160,8 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateStateBlock(LPDIRECT3DDEVICE9EX iface,
return hrc;
}
HRESULT WINAPI IDirect3DDevice9Impl_BeginStateBlock(LPDIRECT3DDEVICE9EX iface) {
HRESULT WINAPI IDirect3DDevice9Impl_BeginStateBlock(IDirect3DDevice9Ex *iface)
{
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
HRESULT hr;
TRACE("(%p) Relay\n", This);
......@@ -172,11 +173,12 @@ HRESULT WINAPI IDirect3DDevice9Impl_BeginStateBlock(LPDIRECT3DDEVICE9EX iface)
return hr;
}
HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(LPDIRECT3DDEVICE9EX iface, IDirect3DStateBlock9** ppSB) {
HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(IDirect3DDevice9Ex *iface, IDirect3DStateBlock9 **ppSB)
{
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
IWineD3DStateBlock *wineD3DStateBlock;
IDirect3DStateBlock9Impl *object;
HRESULT hr;
IWineD3DStateBlock* wineD3DStateBlock;
IDirect3DStateBlock9Impl* object;
TRACE("(%p) Relay\n", This);
......@@ -192,7 +194,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(LPDIRECT3DDEVICE9EX iface, I
return hr;
}
/* allocate a new IDirectD3DStateBlock */
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY ,sizeof(IDirect3DStateBlock9Impl));
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DStateBlock9Impl));
if (!object) return E_OUTOFMEMORY;
object->ref = 1;
object->lpVtbl = &Direct3DStateBlock9_Vtbl;
......
......@@ -216,8 +216,8 @@ static void execute_test_chain(
}
}
else if (outcome & EVENT_CHECK_DEFAULT) {
else if (outcome & EVENT_CHECK_DEFAULT)
{
BOOL test_failed = memcmp(test[i].default_data, test[i].return_data, test[i].data_size);
ok (!test_failed, "Test %s, Stage %u: returned data does not match default data [csize=%u]\n",
test[i].test_name, j, test[i].data_size);
......@@ -230,8 +230,8 @@ static void execute_test_chain(
}
}
else if (outcome & EVENT_CHECK_INITIAL) {
else if (outcome & EVENT_CHECK_INITIAL)
{
BOOL test_failed = memcmp(test[i].initial_data, test[i].return_data, test[i].data_size);
ok (!test_failed, "Test %s, Stage %u: returned data does not match initial data [csize=%u]\n",
test[i].test_name, j, test[i].data_size);
......@@ -263,10 +263,8 @@ typedef struct event_data {
IDirect3DSwapChain9* new_swap_chain;
} event_data;
static int switch_render_target(
IDirect3DDevice9* device,
void* data) {
static int switch_render_target(IDirect3DDevice9 *device, void *data)
{
HRESULT hret;
D3DPRESENT_PARAMETERS present_parameters;
event_data* edata = data;
......@@ -308,10 +306,8 @@ static int switch_render_target(
return EVENT_ERROR;
}
static int revert_render_target(
IDirect3DDevice9* device,
void* data) {
static int revert_render_target(IDirect3DDevice9 *device, void *data)
{
HRESULT hret;
event_data* edata = data;
......@@ -605,9 +601,8 @@ static HRESULT shader_constant_setup_handler(
return D3D_OK;
}
static void shader_constant_teardown_handler(
state_test* test) {
static void shader_constant_teardown_handler(state_test *test)
{
HeapFree(GetProcessHeap(), 0, test->test_context);
}
......@@ -739,9 +734,8 @@ static const light_data light_test_data_out =
{ 5.0, 5.0, 5.0 }, { 6.0, 6.0, 6.0 },
7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0 }, 128, D3D_OK, D3D_OK};
static HRESULT light_setup_handler(
state_test* test) {
static HRESULT light_setup_handler(state_test *test)
{
light_context *ctx = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(light_context));
if (ctx == NULL) return E_FAIL;
test->test_context = ctx;
......@@ -758,9 +752,8 @@ static HRESULT light_setup_handler(
return D3D_OK;
}
static void light_teardown_handler(
state_test* test) {
static void light_teardown_handler(state_test *test)
{
HeapFree(GetProcessHeap(), 0, test->test_context);
}
......@@ -937,9 +930,8 @@ static HRESULT transform_setup_handler(
return D3D_OK;
}
static void transform_teardown_handler(
state_test* test) {
static void transform_teardown_handler(state_test *test)
{
HeapFree(GetProcessHeap(), 0, test->test_context);
}
......
......@@ -231,13 +231,8 @@ static void test_get_declaration(IDirect3DVertexDeclaration9 *decl_ptr, D3DVERTE
/* FIXME: also write a test, which shows that attempting to set
* an invalid vertex declaration returns E_FAIL */
static HRESULT test_fvf_to_decl(
IDirect3DDevice9* device,
IDirect3DVertexDeclaration9* default_decl,
DWORD test_fvf,
const D3DVERTEXELEMENT9 expected_elements[],
char object_should_change)
static HRESULT test_fvf_to_decl(IDirect3DDevice9 *device, IDirect3DVertexDeclaration9 *default_decl,
DWORD test_fvf, const D3DVERTEXELEMENT9 expected_elements[], char object_should_change)
{
HRESULT hr;
......
......@@ -235,10 +235,9 @@ static const IDirect3DVertexBuffer9Vtbl Direct3DVertexBuffer9_Vtbl =
/* IDirect3DDevice9 IDirect3DVertexBuffer9 Methods follow: */
HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(LPDIRECT3DDEVICE9EX iface,
UINT Size, DWORD Usage, DWORD FVF, D3DPOOL Pool,
IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle) {
HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(IDirect3DDevice9Ex *iface, UINT Size, DWORD Usage,
DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle)
{
IDirect3DVertexBuffer9Impl *object;
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
HRESULT hrc = D3D_OK;
......
......@@ -87,8 +87,7 @@ HRESULT vdecl_convert_fvf(
/* convert the declaration */
elements = HeapAlloc(GetProcessHeap(), 0, size * sizeof(D3DVERTEXELEMENT9));
if (!elements)
return D3DERR_OUTOFVIDEOMEMORY;
if (!elements) return D3DERR_OUTOFVIDEOMEMORY;
elements[size-1] = end_element;
idx = 0;
......@@ -351,8 +350,9 @@ static HRESULT convert_to_wined3d_declaration(const D3DVERTEXELEMENT9* d3d9_elem
}
/* IDirect3DDevice9 IDirect3DVertexDeclaration9 Methods follow: */
HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexDeclaration(LPDIRECT3DDEVICE9EX iface, CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl) {
HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexDeclaration(IDirect3DDevice9Ex *iface,
const D3DVERTEXELEMENT9 *pVertexElements, IDirect3DVertexDeclaration9 **ppDecl)
{
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
IDirect3DVertexDeclaration9Impl *object = NULL;
WINED3DVERTEXELEMENT* wined3d_elements;
......
......@@ -405,11 +405,10 @@ static const IDirect3DVolumeTexture9Vtbl Direct3DVolumeTexture9_Vtbl =
/* IDirect3DDevice9 IDirect3DVolumeTexture9 Methods follow: */
HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9EX iface,
UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage,
D3DFORMAT Format, D3DPOOL Pool,
IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle) {
HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(IDirect3DDevice9Ex *iface,
UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format,
D3DPOOL Pool, IDirect3DVolumeTexture9 **ppVolumeTexture, HANDLE *pSharedHandle)
{
IDirect3DVolumeTexture9Impl *object;
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
HRESULT hrc = D3D_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment