ddraw: Kill stray tabs.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2017-01-24 22:15:28 +01:00 committed by Alexandre Julliard
parent 1bd56b6ca5
commit 31fcbb6bf2
2 changed files with 36 additions and 45 deletions

View File

@ -75,12 +75,12 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
for (;;) for (;;)
{ {
D3DINSTRUCTION *current = (D3DINSTRUCTION *)instr; D3DINSTRUCTION *current = (D3DINSTRUCTION *)instr;
BYTE size; BYTE size;
WORD count; WORD count;
count = current->wCount; count = current->wCount;
size = current->bSize; size = current->bSize;
instr += sizeof(D3DINSTRUCTION); instr += sizeof(*current);
primitive_size = 0; primitive_size = 0;
switch (current->bOpcode) switch (current->bOpcode)
@ -203,10 +203,10 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
break; break;
} }
case D3DOP_MATRIXLOAD: case D3DOP_MATRIXLOAD:
WARN("MATRIXLOAD-s (%d)\n", count); WARN("MATRIXLOAD-s (%u)\n", count);
instr += count * size; instr += count * size;
break; break;
case D3DOP_MATRIXMULTIPLY: case D3DOP_MATRIXMULTIPLY:
TRACE("MATRIXMULTIPLY (%d)\n", count); TRACE("MATRIXMULTIPLY (%d)\n", count);
@ -351,19 +351,15 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
} }
break; break;
case D3DOP_TEXTURELOAD: { case D3DOP_TEXTURELOAD:
WARN("TEXTURELOAD-s (%d)\n", count); WARN("TEXTURELOAD-s (%u)\n", count);
instr += count * size;
break;
instr += count * size; case D3DOP_EXIT:
} break; TRACE("EXIT (%u)\n", count);
instr += size;
case D3DOP_EXIT: { goto end_of_buffer;
TRACE("EXIT (%d)\n", count);
/* We did this instruction */
instr += size;
/* Exit this loop */
goto end_of_buffer;
} break;
case D3DOP_BRANCHFORWARD: case D3DOP_BRANCHFORWARD:
TRACE("BRANCHFORWARD (%d)\n", count); TRACE("BRANCHFORWARD (%d)\n", count);
@ -380,26 +376,28 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
instr = (char*)current + ci->dwOffset; instr = (char*)current + ci->dwOffset;
break; break;
} }
} }
} else { }
if (ci->bNegate) { else
{
if (ci->bNegate)
{
TRACE(" Branch to %d\n", ci->dwOffset); TRACE(" Branch to %d\n", ci->dwOffset);
if (ci->dwOffset) { if (ci->dwOffset) {
instr = (char*)current + ci->dwOffset; instr = (char*)current + ci->dwOffset;
break; break;
} }
} }
} }
instr += size; instr += size;
} }
break; break;
case D3DOP_SPAN: { case D3DOP_SPAN:
WARN("SPAN-s (%d)\n", count); WARN("SPAN-s (%u)\n", count);
instr += count * size;
instr += count * size; break;
} break;
case D3DOP_SETSTATUS: case D3DOP_SETSTATUS:
TRACE("SETSTATUS (%d)\n", count); TRACE("SETSTATUS (%d)\n", count);
@ -410,12 +408,11 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
} }
break; break;
default: default:
ERR("Unhandled OpCode %d !!!\n",current->bOpcode); ERR("Unhandled OpCode %#x.\n",current->bOpcode);
/* Try to save ... */ instr += count * size;
instr += count * size; break;
break; }
}
} }
end_of_buffer: end_of_buffer:

View File

@ -748,17 +748,11 @@ HRESULT WINAPI DllCanUnloadNow(void)
} }
/***********************************************************************
* DllRegisterServer (DDRAW.@)
*/
HRESULT WINAPI DllRegisterServer(void) HRESULT WINAPI DllRegisterServer(void)
{ {
return __wine_register_resources( instance ); return __wine_register_resources( instance );
} }
/***********************************************************************
* DllUnregisterServer (DDRAW.@)
*/
HRESULT WINAPI DllUnregisterServer(void) HRESULT WINAPI DllUnregisterServer(void)
{ {
return __wine_unregister_resources( instance ); return __wine_unregister_resources( instance );