Index: ddraw/glClassFactory.cpp |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | ULONG WINAPI glClassFactory::AddRef()
|
27 | 27 | {
|
28 | 28 | TRACE_ENTER(1,14,this);
|
29 | | - if(!this) TRACE_RET(8,0);
|
| 29 | + if(!this) TRACE_RET(ULONG,8,0);
|
30 | 30 | refcount++;
|
31 | 31 | TRACE_EXIT(8,refcount);
|
32 | 32 | return refcount;
|
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | ULONG WINAPI glClassFactory::Release()
|
35 | 35 | {
|
36 | 36 | TRACE_ENTER(1,14,this);
|
37 | | - if(!this) TRACE_RET(8,0);
|
| 37 | + if(!this) TRACE_RET(ULONG,8,0);
|
38 | 38 | ULONG ret;
|
39 | 39 | refcount--;
|
40 | 40 | ret = refcount;
|
— | — | @@ -45,8 +45,8 @@ |
46 | 46 | HRESULT WINAPI glClassFactory::QueryInterface(REFIID riid, void** ppvObj)
|
47 | 47 | {
|
48 | 48 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
49 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
50 | | - if(!ppvObj) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 49 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 50 | + if(!ppvObj) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
51 | 51 | if((riid == IID_IUnknown) || (riid == IID_IClassFactory))
|
52 | 52 | {
|
53 | 53 | *ppvObj = this;
|
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | else
|
57 | 57 | {
|
58 | 58 | *ppvObj = NULL;
|
59 | | - TRACE_RET(23,E_NOINTERFACE);
|
| 59 | + TRACE_RET(HRESULT,23,E_NOINTERFACE);
|
60 | 60 | }
|
61 | 61 | TRACE_VAR("*ppvObj",14,*ppvObj);
|
62 | 62 | TRACE_EXIT(23,S_OK);
|
— | — | @@ -64,9 +64,9 @@ |
65 | 65 | HRESULT WINAPI glClassFactory::CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
|
66 | 66 | {
|
67 | 67 | TRACE_ENTER(4,14,this,14,pUnkOuter,24,&riid,14,ppvObject);
|
68 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 68 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
69 | 69 | glDirectDraw7 *glDD7;
|
70 | | - if(pUnkOuter != NULL) TRACE_RET(23,CLASS_E_NOAGGREGATION);
|
| 70 | + if(pUnkOuter != NULL) TRACE_RET(HRESULT,23,CLASS_E_NOAGGREGATION);
|
71 | 71 | if(riid == IID_IDirectDraw)
|
72 | 72 | {
|
73 | 73 | glDD7 = new glDirectDraw7;
|
— | — | @@ -115,7 +115,7 @@ |
116 | 116 | HRESULT WINAPI glClassFactory::LockServer(BOOL fLock)
|
117 | 117 | {
|
118 | 118 | TRACE_ENTER(2,14,this,22,fLock);
|
119 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 119 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
120 | 120 | if(fLock) InterlockedIncrement(&locks);
|
121 | 121 | else InterlockedDecrement(&locks);
|
122 | 122 | TRACE_EXIT(23,S_OK);
|
Index: ddraw/glDirect3D.cpp |
— | — | @@ -217,7 +217,7 @@ |
218 | 218 | ULONG WINAPI glDirect3D7::AddRef()
|
219 | 219 | {
|
220 | 220 | TRACE_ENTER(1,14,this);
|
221 | | - if(!this) TRACE_RET(8,0);
|
| 221 | + if(!this) TRACE_RET(ULONG,8,0);
|
222 | 222 | refcount++;
|
223 | 223 | TRACE_EXIT(8,refcount);
|
224 | 224 | return refcount;
|
— | — | @@ -225,7 +225,7 @@ |
226 | 226 | ULONG WINAPI glDirect3D7::Release()
|
227 | 227 | {
|
228 | 228 | TRACE_ENTER(1,14,this);
|
229 | | - if(!this) TRACE_RET(8,0);
|
| 229 | + if(!this) TRACE_RET(ULONG,8,0);
|
230 | 230 | ULONG ret;
|
231 | 231 | refcount--;
|
232 | 232 | ret = refcount;
|
— | — | @@ -237,8 +237,8 @@ |
238 | 238 | HRESULT WINAPI glDirect3D7::QueryInterface(REFIID riid, void** ppvObj)
|
239 | 239 | {
|
240 | 240 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
241 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
242 | | - if(!ppvObj) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 241 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 242 | + if(!ppvObj) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
243 | 243 | if(riid == IID_IUnknown)
|
244 | 244 | {
|
245 | 245 | this->AddRef();
|
— | — | @@ -315,10 +315,10 @@ |
316 | 316 | HRESULT WINAPI glDirect3D7::CreateDevice(REFCLSID rclsid, LPDIRECTDRAWSURFACE7 lpDDS, LPDIRECT3DDEVICE7 *lplpD3DDevice)
|
317 | 317 | {
|
318 | 318 | TRACE_ENTER(4,14,this,24,&rclsid,14,lpDDS,14,lplpD3DDevice);
|
319 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 319 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
320 | 320 | HRESULT ret;
|
321 | 321 | glDirect3DDevice7 *glD3DDev7 = new glDirect3DDevice7(rclsid,this,(glDirectDrawSurface7*)lpDDS);
|
322 | | - if(!glD3DDev7) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 322 | + if(!glD3DDev7) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
323 | 323 | if(FAILED(glD3DDev7->err()))
|
324 | 324 | {
|
325 | 325 | ret = glD3DDev7->err();
|
— | — | @@ -334,9 +334,9 @@ |
335 | 335 | HRESULT WINAPI glDirect3D7::CreateLight(LPDIRECT3DLIGHT* lplpDirect3DLight, IUnknown* pUnkOuter)
|
336 | 336 | {
|
337 | 337 | TRACE_ENTER(3,14,this,14,lplpDirect3DLight,14,pUnkOuter);
|
338 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
339 | | - if(!lplpDirect3DLight) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
340 | | - if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 338 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 339 | + if(!lplpDirect3DLight) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 340 | + if(pUnkOuter) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
341 | 341 | *lplpDirect3DLight = new glDirect3DLight();
|
342 | 342 | TRACE_VAR("*lplpDirect3DLight",14,*lplpDirect3DLight);
|
343 | 343 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -345,9 +345,9 @@ |
346 | 346 | HRESULT WINAPI glDirect3D7::CreateMaterial(LPDIRECT3DMATERIAL3* lplpDirect3DMaterial, IUnknown* pUnkOuter)
|
347 | 347 | {
|
348 | 348 | TRACE_ENTER(3,14,this,14,lplpDirect3DMaterial,14,pUnkOuter);
|
349 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
350 | | - if(!lplpDirect3DMaterial) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
351 | | - if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 349 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 350 | + if(!lplpDirect3DMaterial) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 351 | + if(pUnkOuter) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
352 | 352 | *lplpDirect3DMaterial = new glDirect3DMaterial3();
|
353 | 353 | TRACE_VAR("*lplpDirect3DMaterial",14,*lplpDirect3DMaterial);
|
354 | 354 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -356,9 +356,9 @@ |
357 | 357 | HRESULT WINAPI glDirect3D7::CreateVertexBuffer(LPD3DVERTEXBUFFERDESC lpVBDesc, LPDIRECT3DVERTEXBUFFER7* lplpD3DVertexBuffer, DWORD dwFlags)
|
358 | 358 | {
|
359 | 359 | TRACE_ENTER(4,14,this,14,lpVBDesc,14,lplpD3DVertexBuffer,9,dwFlags);
|
360 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
361 | | - if(!lplpD3DVertexBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
362 | | - if(!lpVBDesc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 360 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 361 | + if(!lplpD3DVertexBuffer) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 362 | + if(!lpVBDesc) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
363 | 363 | *lplpD3DVertexBuffer = (LPDIRECT3DVERTEXBUFFER7)new glDirect3DVertexBuffer7(this,*lpVBDesc,dwFlags);
|
364 | 364 | TRACE_VAR("*lplpD3DVertexBuffer",14,*lplpD3DVertexBuffer);
|
365 | 365 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -367,9 +367,9 @@ |
368 | 368 | HRESULT WINAPI glDirect3D7::CreateViewport(LPDIRECT3DVIEWPORT3* lplpD3DViewport, IUnknown* pUnkOuter)
|
369 | 369 | {
|
370 | 370 | TRACE_ENTER(3,14,this,14,lplpD3DViewport,14,pUnkOuter);
|
371 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
372 | | - if(!lplpD3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
373 | | - if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 371 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 372 | + if(!lplpD3DViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 373 | + if(pUnkOuter) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
374 | 374 | *lplpD3DViewport = new glDirect3DViewport3();
|
375 | 375 | TRACE_VAR("*lplpD3DViewport",14,*lplpD3DViewport);
|
376 | 376 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -378,8 +378,8 @@ |
379 | 379 | HRESULT WINAPI glDirect3D7::EnumDevices(LPD3DENUMDEVICESCALLBACK7 lpEnumDevicesCallback, LPVOID lpUserArg)
|
380 | 380 | {
|
381 | 381 | TRACE_ENTER(3,14,this,14,lpEnumDevicesCallback,14,lpUserArg);
|
382 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
383 | | - if(!lpEnumDevicesCallback) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 382 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 383 | + if(!lpEnumDevicesCallback) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
384 | 384 | HRESULT result;
|
385 | 385 | D3DDEVICEDESC7 desc = d3ddesc;
|
386 | 386 | for(int i = 0; i < 3; i++)
|
— | — | @@ -408,13 +408,13 @@ |
409 | 409 | HRESULT WINAPI glDirect3D7::EnumDevices3(LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg)
|
410 | 410 | {
|
411 | 411 | TRACE_ENTER(3,14,this,14,lpEnumDevicesCallback,14,lpUserArg);
|
412 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
413 | | - if(!lpEnumDevicesCallback) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 412 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 413 | + if(!lpEnumDevicesCallback) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
414 | 414 | HRESULT result;
|
415 | 415 | D3DDEVICEDESC desc = d3ddesc3;
|
416 | 416 | GUID guid = IID_IDirect3DRGBDevice;
|
417 | 417 | result = lpEnumDevicesCallback(&guid,devices[0].name,devices[0].devname,&desc,&desc,lpUserArg);
|
418 | | - if(result != D3DENUMRET_OK) TRACE_RET(23,D3D_OK);
|
| 418 | + if(result != D3DENUMRET_OK) TRACE_RET(HRESULT,23,D3D_OK);
|
419 | 419 | guid = IID_IDirect3DHALDevice;
|
420 | 420 | result = lpEnumDevicesCallback(&guid,devices[1].name,devices[1].devname,&desc,&desc,lpUserArg);
|
421 | 421 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -423,7 +423,7 @@ |
424 | 424 | HRESULT WINAPI glDirect3D7::EnumZBufferFormats(REFCLSID riidDevice, LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback, LPVOID lpContext)
|
425 | 425 | {
|
426 | 426 | TRACE_ENTER(4,14,this,24,&riidDevice,14,lpEnumCallback,14,lpContext);
|
427 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 427 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
428 | 428 | DDPIXELFORMAT ddpf;
|
429 | 429 | ZeroMemory(&ddpf,sizeof(DDPIXELFORMAT));
|
430 | 430 | ddpf.dwSize = sizeof(DDPIXELFORMAT);
|
— | — | @@ -430,14 +430,14 @@ |
431 | 431 | ddpf.dwFlags = DDPF_ZBUFFER;
|
432 | 432 | ddpf.dwZBufferBitDepth = 16;
|
433 | 433 | ddpf.dwZBitMask = 0xffff;
|
434 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
| 434 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(HRESULT,23,D3D_OK);
|
435 | 435 | ddpf.dwZBufferBitDepth = 24;
|
436 | 436 | ddpf.dwZBitMask = 0xffffff00;
|
437 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
| 437 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(HRESULT,23,D3D_OK);
|
438 | 438 | ddpf.dwZBufferBitDepth = 32;
|
439 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
| 439 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(HRESULT,23,D3D_OK);
|
440 | 440 | ddpf.dwZBitMask = 0xffffffff;
|
441 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
| 441 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(HRESULT,23,D3D_OK);
|
442 | 442 | if(GLEXT_EXT_packed_depth_stencil || GLEXT_NV_packed_depth_stencil)
|
443 | 443 | {
|
444 | 444 | ddpf.dwZBufferBitDepth = 32;
|
— | — | @@ -444,10 +444,10 @@ |
445 | 445 | ddpf.dwStencilBitDepth = 8;
|
446 | 446 | ddpf.dwZBitMask = 0xffffff00;
|
447 | 447 | ddpf.dwStencilBitMask = 0xff;
|
448 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
| 448 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(HRESULT,23,D3D_OK);
|
449 | 449 | ddpf.dwZBitMask = 0x00ffffff;
|
450 | 450 | ddpf.dwStencilBitMask = 0xff000000;
|
451 | | - if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(23,D3D_OK);
|
| 451 | + if(lpEnumCallback(&ddpf,lpContext) == D3DENUMRET_CANCEL) TRACE_RET(HRESULT,23,D3D_OK);
|
452 | 452 | }
|
453 | 453 | TRACE_EXIT(23,D3D_OK);
|
454 | 454 | return D3D_OK;
|
— | — | @@ -462,11 +462,11 @@ |
463 | 463 | HRESULT WINAPI glDirect3D7::FindDevice(LPD3DFINDDEVICESEARCH lpD3DFDS, LPD3DFINDDEVICERESULT lpD3DFDR)
|
464 | 464 | {
|
465 | 465 | TRACE_ENTER(3,14,this,14,lpD3DFDS,14,lpD3DFDR);
|
466 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
467 | | - if(!lpD3DFDS) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
468 | | - if(!lpD3DFDR) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
469 | | - if(lpD3DFDR->dwSize < sizeof(D3DFINDDEVICERESULT)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
470 | | - if(lpD3DFDS->dwSize < sizeof(D3DFINDDEVICESEARCH)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 466 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 467 | + if(!lpD3DFDS) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 468 | + if(!lpD3DFDR) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 469 | + if(lpD3DFDR->dwSize < sizeof(D3DFINDDEVICERESULT)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 470 | + if(lpD3DFDS->dwSize < sizeof(D3DFINDDEVICESEARCH)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
471 | 471 | bool found = true;
|
472 | 472 | GUID guid = IID_IDirect3DHALDevice;
|
473 | 473 | if((lpD3DFDS->dwFlags & D3DFDS_LINES) || (lpD3DFDS->dwFlags & D3DFDS_TRIANGLES))
|
— | — | @@ -541,7 +541,7 @@ |
542 | 542 | }
|
543 | 543 | else if(!lpD3DFDS->bHardware) guid = IID_IDirect3DRGBDevice;
|
544 | 544 | }
|
545 | | - if(!found) TRACE_RET(23,DDERR_NOTFOUND);
|
| 545 | + if(!found) TRACE_RET(HRESULT,23,DDERR_NOTFOUND);
|
546 | 546 | if(guid == IID_IDirect3DRGBDevice) lpD3DFDR->ddSwDesc = d3ddesc3;
|
547 | 547 | else lpD3DFDR->ddHwDesc = d3ddesc3;
|
548 | 548 | lpD3DFDR->guid = guid;
|
— | — | @@ -570,7 +570,7 @@ |
571 | 571 | HRESULT WINAPI glDirect3D3::QueryInterface(REFIID riid, void** ppvObj)
|
572 | 572 | {
|
573 | 573 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
574 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 574 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
575 | 575 | if(riid == IID_IUnknown)
|
576 | 576 | {
|
577 | 577 | this->AddRef();
|
— | — | @@ -579,13 +579,13 @@ |
580 | 580 | TRACE_EXIT(23,DD_OK);
|
581 | 581 | return DD_OK;
|
582 | 582 | }
|
583 | | - TRACE_RET(23,glD3D7->QueryInterface(riid,ppvObj));
|
| 583 | + TRACE_RET(HRESULT,23,glD3D7->QueryInterface(riid,ppvObj));
|
584 | 584 | }
|
585 | 585 |
|
586 | 586 | ULONG WINAPI glDirect3D3::AddRef()
|
587 | 587 | {
|
588 | 588 | TRACE_ENTER(1,14,this);
|
589 | | - if(!this) TRACE_RET(8,0);
|
| 589 | + if(!this) TRACE_RET(ULONG,8,0);
|
590 | 590 | refcount++;
|
591 | 591 | TRACE_EXIT(8,refcount);
|
592 | 592 | return refcount;
|
— | — | @@ -594,7 +594,7 @@ |
595 | 595 | ULONG WINAPI glDirect3D3::Release()
|
596 | 596 | {
|
597 | 597 | TRACE_ENTER(1,14,this);
|
598 | | - if(!this) TRACE_RET(8,0);
|
| 598 | + if(!this) TRACE_RET(ULONG,8,0);
|
599 | 599 | ULONG ret;
|
600 | 600 | refcount--;
|
601 | 601 | ret = refcount;
|
— | — | @@ -606,8 +606,8 @@ |
607 | 607 | HRESULT WINAPI glDirect3D3::CreateDevice(REFCLSID rclsid, LPDIRECTDRAWSURFACE4 lpDDS, LPDIRECT3DDEVICE3 *lplpD3DDevice, LPUNKNOWN pUnkOuter)
|
608 | 608 | {
|
609 | 609 | TRACE_ENTER(5,14,this,24,&rclsid,14,lpDDS,14,lplpD3DDevice,14,pUnkOuter);
|
610 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
611 | | - if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 610 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 611 | + if(pUnkOuter) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
612 | 612 | LPDIRECT3DDEVICE7 lpD3DDev7;
|
613 | 613 | HRESULT err = glD3D7->CreateDevice(rclsid,((glDirectDrawSurface4*)lpDDS)->GetDDS7(),&lpD3DDev7);
|
614 | 614 | if(err == D3D_OK)
|
— | — | @@ -625,20 +625,20 @@ |
626 | 626 | HRESULT WINAPI glDirect3D3::CreateLight(LPDIRECT3DLIGHT* lplpDirect3DLight, IUnknown* pUnkOuter)
|
627 | 627 | {
|
628 | 628 | TRACE_ENTER(3,14,this,14,lplpDirect3DLight,14,pUnkOuter);
|
629 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
630 | | - TRACE_RET(23,glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter));
|
| 629 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 630 | + TRACE_RET(HRESULT,23,glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter));
|
631 | 631 | }
|
632 | 632 | HRESULT WINAPI glDirect3D3::CreateMaterial(LPDIRECT3DMATERIAL3* lplpDirect3DMaterial, IUnknown* pUnkOuter)
|
633 | 633 | {
|
634 | 634 | TRACE_ENTER(3,14,this,14,lplpDirect3DMaterial,14,pUnkOuter);
|
635 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
636 | | - TRACE_RET(23,glD3D7->CreateMaterial(lplpDirect3DMaterial,pUnkOuter));
|
| 635 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 636 | + TRACE_RET(HRESULT,23,glD3D7->CreateMaterial(lplpDirect3DMaterial,pUnkOuter));
|
637 | 637 | }
|
638 | 638 | HRESULT WINAPI glDirect3D3::CreateVertexBuffer(LPD3DVERTEXBUFFERDESC lpVBDesc, LPDIRECT3DVERTEXBUFFER* lplpD3DVertexBuffer, DWORD dwFlags, LPUNKNOWN pUnkOuter)
|
639 | 639 | {
|
640 | 640 | TRACE_ENTER(5,14,this,14,lpVBDesc,14,lplpD3DVertexBuffer,9,dwFlags,14,pUnkOuter);
|
641 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
642 | | - if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 641 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 642 | + if(pUnkOuter) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
643 | 643 | LPDIRECT3DVERTEXBUFFER7 lpD3DVB7;
|
644 | 644 | HRESULT err = glD3D7->CreateVertexBuffer(lpVBDesc,&lpD3DVB7,dwFlags);
|
645 | 645 | if(err == D3D_OK)
|
— | — | @@ -655,34 +655,34 @@ |
656 | 656 | HRESULT WINAPI glDirect3D3::CreateViewport(LPDIRECT3DVIEWPORT3* lplpD3DViewport, IUnknown* pUnkOuter)
|
657 | 657 | {
|
658 | 658 | TRACE_ENTER(3,14,this,14,lplpD3DViewport,14,pUnkOuter);
|
659 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
660 | | - TRACE_RET(23,glD3D7->CreateViewport(lplpD3DViewport,pUnkOuter));
|
| 659 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 660 | + TRACE_RET(HRESULT,23,glD3D7->CreateViewport(lplpD3DViewport,pUnkOuter));
|
661 | 661 | }
|
662 | 662 |
|
663 | 663 | HRESULT WINAPI glDirect3D3::EnumDevices(LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg)
|
664 | 664 | {
|
665 | 665 | TRACE_ENTER(3,14,this,14,lpEnumDevicesCallback,14,lpUserArg);
|
666 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
667 | | - TRACE_RET(23,glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg));
|
| 666 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 667 | + TRACE_RET(HRESULT,23,glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg));
|
668 | 668 | }
|
669 | 669 |
|
670 | 670 | HRESULT WINAPI glDirect3D3::EnumZBufferFormats(REFCLSID riidDevice, LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback, LPVOID lpContext)
|
671 | 671 | {
|
672 | 672 | TRACE_ENTER(4,14,this,24,&riidDevice,14,lpEnumCallback,14,lpContext);
|
673 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
674 | | - TRACE_RET(23,glD3D7->EnumZBufferFormats(riidDevice,lpEnumCallback,lpContext));
|
| 673 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 674 | + TRACE_RET(HRESULT,23,glD3D7->EnumZBufferFormats(riidDevice,lpEnumCallback,lpContext));
|
675 | 675 | }
|
676 | 676 | HRESULT WINAPI glDirect3D3::EvictManagedTextures()
|
677 | 677 | {
|
678 | 678 | TRACE_ENTER(1,14,this);
|
679 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
680 | | - TRACE_RET(23,glD3D7->EvictManagedTextures());
|
| 679 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 680 | + TRACE_RET(HRESULT,23,glD3D7->EvictManagedTextures());
|
681 | 681 | }
|
682 | 682 | HRESULT WINAPI glDirect3D3::FindDevice(LPD3DFINDDEVICESEARCH lpD3DFDS, LPD3DFINDDEVICERESULT lpD3DFDR)
|
683 | 683 | {
|
684 | 684 | TRACE_ENTER(3,14,this,14,lpD3DFDS,14,lpD3DFDR);
|
685 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
686 | | - TRACE_RET(23,glD3D7->FindDevice(lpD3DFDS,lpD3DFDR));
|
| 685 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 686 | + TRACE_RET(HRESULT,23,glD3D7->FindDevice(lpD3DFDS,lpD3DFDR));
|
687 | 687 | }
|
688 | 688 |
|
689 | 689 |
|
— | — | @@ -705,7 +705,7 @@ |
706 | 706 | HRESULT WINAPI glDirect3D2::QueryInterface(REFIID riid, void** ppvObj)
|
707 | 707 | {
|
708 | 708 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
709 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 709 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
710 | 710 | if(riid == IID_IUnknown)
|
711 | 711 | {
|
712 | 712 | this->AddRef();
|
— | — | @@ -714,13 +714,13 @@ |
715 | 715 | TRACE_ENTER(23,DD_OK);
|
716 | 716 | return DD_OK;
|
717 | 717 | }
|
718 | | - TRACE_RET(23,glD3D7->QueryInterface(riid,ppvObj));
|
| 718 | + TRACE_RET(HRESULT,23,glD3D7->QueryInterface(riid,ppvObj));
|
719 | 719 | }
|
720 | 720 |
|
721 | 721 | ULONG WINAPI glDirect3D2::AddRef()
|
722 | 722 | {
|
723 | 723 | TRACE_ENTER(1,14,this);
|
724 | | - if(!this) TRACE_RET(8,0);
|
| 724 | + if(!this) TRACE_RET(ULONG,8,0);
|
725 | 725 | refcount++;
|
726 | 726 | TRACE_EXIT(8,refcount);
|
727 | 727 | return refcount;
|
— | — | @@ -729,7 +729,7 @@ |
730 | 730 | ULONG WINAPI glDirect3D2::Release()
|
731 | 731 | {
|
732 | 732 | TRACE_ENTER(1,14,this);
|
733 | | - if(!this) TRACE_RET(8,0);
|
| 733 | + if(!this) TRACE_RET(ULONG,8,0);
|
734 | 734 | ULONG ret;
|
735 | 735 | refcount--;
|
736 | 736 | ret = refcount;
|
— | — | @@ -741,8 +741,8 @@ |
742 | 742 | HRESULT WINAPI glDirect3D2::CreateDevice(REFCLSID rclsid, LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DDEVICE2 *lplpD3DDevice)
|
743 | 743 | {
|
744 | 744 | TRACE_ENTER(4,14,this,24,&rclsid,14,lpDDS,14,lplpD3DDevice);
|
745 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
746 | | - if(!lplpD3DDevice) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 745 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 746 | + if(!lplpD3DDevice) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
747 | 747 | LPDIRECT3DDEVICE7 lpD3DDev7;
|
748 | 748 | HRESULT err = glD3D7->CreateDevice(rclsid,((glDirectDrawSurface1*)lpDDS)->GetDDS7(),&lpD3DDev7);
|
749 | 749 | if(err == D3D_OK)
|
— | — | @@ -760,18 +760,18 @@ |
761 | 761 | HRESULT WINAPI glDirect3D2::CreateLight(LPDIRECT3DLIGHT* lplpDirect3DLight, IUnknown* pUnkOuter)
|
762 | 762 | {
|
763 | 763 | TRACE_ENTER(3,14,this,14,lplpDirect3DLight,14,pUnkOuter);
|
764 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
765 | | - TRACE_RET(23,glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter));
|
| 764 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 765 | + TRACE_RET(HRESULT,23,glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter));
|
766 | 766 | }
|
767 | 767 |
|
768 | 768 | HRESULT WINAPI glDirect3D2::CreateMaterial(LPDIRECT3DMATERIAL2* lplpDirect3DMaterial2, IUnknown* pUnkOuter)
|
769 | 769 | {
|
770 | 770 | TRACE_ENTER(3,14,this,14,lplpDirect3DMaterial2,14,pUnkOuter);
|
771 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
772 | | - if(!lplpDirect3DMaterial2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 771 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 772 | + if(!lplpDirect3DMaterial2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
773 | 773 | glDirect3DMaterial3 *glD3DM3;
|
774 | 774 | HRESULT error = glD3D7->CreateMaterial((LPDIRECT3DMATERIAL3*)&glD3DM3,pUnkOuter);
|
775 | | - if(FAILED(error)) TRACE_RET(23,error);
|
| 775 | + if(FAILED(error)) TRACE_RET(HRESULT,23,error);
|
776 | 776 | glD3DM3->QueryInterface(IID_IDirect3DMaterial2,(void**)lplpDirect3DMaterial2);
|
777 | 777 | glD3DM3->Release();
|
778 | 778 | TRACE_VAR("*lplpDirect3DMaterial2",14,*lplpDirect3DMaterial2);
|
— | — | @@ -782,11 +782,11 @@ |
783 | 783 | HRESULT WINAPI glDirect3D2::CreateViewport(LPDIRECT3DVIEWPORT2* lplpD3DViewport2, IUnknown* pUnkOuter)
|
784 | 784 | {
|
785 | 785 | TRACE_ENTER(3,14,this,14,lplpD3DViewport2,14,pUnkOuter);
|
786 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
787 | | - if(!lplpD3DViewport2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 786 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 787 | + if(!lplpD3DViewport2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
788 | 788 | glDirect3DMaterial3 *glD3DV3;
|
789 | 789 | HRESULT error = glD3D7->CreateViewport((LPDIRECT3DVIEWPORT3*)&glD3DV3,pUnkOuter);
|
790 | | - if(FAILED(error)) TRACE_RET(23,error);
|
| 790 | + if(FAILED(error)) TRACE_RET(HRESULT,23,error);
|
791 | 791 | glD3DV3->QueryInterface(IID_IDirect3DViewport2,(void**)lplpD3DViewport2);
|
792 | 792 | glD3DV3->Release();
|
793 | 793 | TRACE_VAR("*lplpD3DViewport2",14,*lplpD3DViewport2);
|
— | — | @@ -797,15 +797,15 @@ |
798 | 798 | HRESULT WINAPI glDirect3D2::EnumDevices(LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg)
|
799 | 799 | {
|
800 | 800 | TRACE_ENTER(3,14,this,14,lpEnumDevicesCallback,14,lpUserArg);
|
801 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
802 | | - TRACE_RET(23,glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg));
|
| 801 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 802 | + TRACE_RET(HRESULT,23,glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg));
|
803 | 803 | }
|
804 | 804 |
|
805 | 805 | HRESULT WINAPI glDirect3D2::FindDevice(LPD3DFINDDEVICESEARCH lpD3DFDS, LPD3DFINDDEVICERESULT lpD3DFDR)
|
806 | 806 | {
|
807 | 807 | TRACE_ENTER(3,14,this,14,lpD3DFDS,14,lpD3DFDR);
|
808 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
809 | | - TRACE_RET(23,glD3D7->FindDevice(lpD3DFDS,lpD3DFDR));
|
| 808 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 809 | + TRACE_RET(HRESULT,23,glD3D7->FindDevice(lpD3DFDS,lpD3DFDR));
|
810 | 810 | }
|
811 | 811 |
|
812 | 812 | glDirect3D1::glDirect3D1(glDirect3D7 *glD3D7)
|
— | — | @@ -827,7 +827,7 @@ |
828 | 828 | HRESULT WINAPI glDirect3D1::QueryInterface(REFIID riid, void** ppvObj)
|
829 | 829 | {
|
830 | 830 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
831 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 831 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
832 | 832 | if(riid == IID_IUnknown)
|
833 | 833 | {
|
834 | 834 | this->AddRef();
|
— | — | @@ -836,13 +836,13 @@ |
837 | 837 | TRACE_EXIT(23,DD_OK);
|
838 | 838 | return DD_OK;
|
839 | 839 | }
|
840 | | - TRACE_RET(23,glD3D7->QueryInterface(riid,ppvObj));
|
| 840 | + TRACE_RET(HRESULT,23,glD3D7->QueryInterface(riid,ppvObj));
|
841 | 841 | }
|
842 | 842 |
|
843 | 843 | ULONG WINAPI glDirect3D1::AddRef()
|
844 | 844 | {
|
845 | 845 | TRACE_ENTER(1,14,this);
|
846 | | - if(!this) TRACE_RET(8,0);
|
| 846 | + if(!this) TRACE_RET(ULONG,8,0);
|
847 | 847 | refcount++;
|
848 | 848 | TRACE_EXIT(8,refcount);
|
849 | 849 | return refcount;
|
— | — | @@ -851,7 +851,7 @@ |
852 | 852 | ULONG WINAPI glDirect3D1::Release()
|
853 | 853 | {
|
854 | 854 | TRACE_ENTER(1,14,this);
|
855 | | - if(!this) TRACE_RET(8,0);
|
| 855 | + if(!this) TRACE_RET(ULONG,8,0);
|
856 | 856 | ULONG ret;
|
857 | 857 | refcount--;
|
858 | 858 | ret = refcount;
|
— | — | @@ -863,18 +863,18 @@ |
864 | 864 | HRESULT WINAPI glDirect3D1::CreateLight(LPDIRECT3DLIGHT* lplpDirect3DLight, IUnknown* pUnkOuter)
|
865 | 865 | {
|
866 | 866 | TRACE_ENTER(3,14,this,14,pUnkOuter);
|
867 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
868 | | - TRACE_RET(23,glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter));
|
| 867 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 868 | + TRACE_RET(HRESULT,23,glD3D7->CreateLight(lplpDirect3DLight,pUnkOuter));
|
869 | 869 | }
|
870 | 870 |
|
871 | 871 | HRESULT WINAPI glDirect3D1::CreateMaterial(LPDIRECT3DMATERIAL* lplpDirect3DMaterial, IUnknown* pUnkOuter)
|
872 | 872 | {
|
873 | 873 | TRACE_ENTER(3,14,this,14,lplpDirect3DMaterial,14,pUnkOuter);
|
874 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
875 | | - if(!lplpDirect3DMaterial) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 874 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 875 | + if(!lplpDirect3DMaterial) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
876 | 876 | glDirect3DMaterial3 *glD3DM3;
|
877 | 877 | HRESULT error = glD3D7->CreateMaterial((LPDIRECT3DMATERIAL3*)&glD3DM3,pUnkOuter);
|
878 | | - if(FAILED(error)) TRACE_RET(23,error);
|
| 878 | + if(FAILED(error)) TRACE_RET(HRESULT,23,error);
|
879 | 879 | glD3DM3->QueryInterface(IID_IDirect3DMaterial,(void**)lplpDirect3DMaterial);
|
880 | 880 | glD3DM3->Release();
|
881 | 881 | TRACE_VAR("*lplpDirect3DMaterial",14,*lplpDirect3DMaterial);
|
— | — | @@ -885,11 +885,11 @@ |
886 | 886 | HRESULT WINAPI glDirect3D1::CreateViewport(LPDIRECT3DVIEWPORT* lplpD3DViewport, IUnknown* pUnkOuter)
|
887 | 887 | {
|
888 | 888 | TRACE_ENTER(3,14,this,14,lplpD3DViewport,14,pUnkOuter);
|
889 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
890 | | - if(!lplpD3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 889 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 890 | + if(!lplpD3DViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
891 | 891 | glDirect3DMaterial3 *glD3DV3;
|
892 | 892 | HRESULT error = glD3D7->CreateViewport((LPDIRECT3DVIEWPORT3*)&glD3DV3,pUnkOuter);
|
893 | | - if(FAILED(error)) TRACE_RET(23,error);
|
| 893 | + if(FAILED(error)) TRACE_RET(HRESULT,23,error);
|
894 | 894 | glD3DV3->QueryInterface(IID_IDirect3DViewport,(void**)lplpD3DViewport);
|
895 | 895 | glD3DV3->Release();
|
896 | 896 | TRACE_VAR("*lplpD3DViewport",14,*lplpD3DViewport);
|
— | — | @@ -900,20 +900,20 @@ |
901 | 901 | HRESULT WINAPI glDirect3D1::EnumDevices(LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg)
|
902 | 902 | {
|
903 | 903 | TRACE_ENTER(3,14,this,14,lpEnumDevicesCallback,14,lpUserArg);
|
904 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
905 | | - TRACE_RET(23,glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg));
|
| 904 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 905 | + TRACE_RET(HRESULT,23,glD3D7->EnumDevices3(lpEnumDevicesCallback,lpUserArg));
|
906 | 906 | }
|
907 | 907 |
|
908 | 908 | HRESULT WINAPI glDirect3D1::FindDevice(LPD3DFINDDEVICESEARCH lpD3DFDS, LPD3DFINDDEVICERESULT lpD3DFDR)
|
909 | 909 | {
|
910 | 910 | TRACE_ENTER(3,14,this,14,lpD3DFDS,14,lpD3DFDR);
|
911 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
912 | | - TRACE_RET(23,glD3D7->FindDevice(lpD3DFDS,lpD3DFDR));
|
| 911 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 912 | + TRACE_RET(HRESULT,23,glD3D7->FindDevice(lpD3DFDS,lpD3DFDR));
|
913 | 913 | }
|
914 | 914 |
|
915 | 915 | HRESULT WINAPI glDirect3D1::Initialize(REFIID lpREFIID)
|
916 | 916 | {
|
917 | 917 | TRACE_ENTER(2,14,this,24,&lpREFIID);
|
918 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
919 | | - TRACE_RET(23,DDERR_ALREADYINITIALIZED);
|
| 918 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 919 | + TRACE_RET(HRESULT,23,DDERR_ALREADYINITIALIZED);
|
920 | 920 | }
|
Index: ddraw/glDirect3DDevice.cpp |
— | — | @@ -416,8 +416,8 @@ |
417 | 417 | HRESULT WINAPI glDirect3DDevice7::QueryInterface(REFIID riid, void** ppvObj)
|
418 | 418 | {
|
419 | 419 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
420 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
421 | | - if(!ppvObj) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 420 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 421 | + if(!ppvObj) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
422 | 422 | if(riid == IID_IUnknown)
|
423 | 423 | {
|
424 | 424 | this->AddRef();
|
— | — | @@ -501,7 +501,7 @@ |
502 | 502 | ULONG WINAPI glDirect3DDevice7::AddRef()
|
503 | 503 | {
|
504 | 504 | TRACE_ENTER(1,14,this);
|
505 | | - if(!this) TRACE_RET(8,0);
|
| 505 | + if(!this) TRACE_RET(ULONG,8,0);
|
506 | 506 | refcount++;
|
507 | 507 | TRACE_EXIT(8,refcount);
|
508 | 508 | return refcount;
|
— | — | @@ -509,7 +509,7 @@ |
510 | 510 | ULONG WINAPI glDirect3DDevice7::Release()
|
511 | 511 | {
|
512 | 512 | TRACE_ENTER(1,14,this);
|
513 | | - if(!this) TRACE_RET(8,0);
|
| 513 | + if(!this) TRACE_RET(ULONG,8,0);
|
514 | 514 | ULONG ret;
|
515 | 515 | refcount--;
|
516 | 516 | ret = refcount;
|
— | — | @@ -521,7 +521,7 @@ |
522 | 522 | HRESULT WINAPI glDirect3DDevice7::ApplyStateBlock(DWORD dwBlockHandle)
|
523 | 523 | {
|
524 | 524 | TRACE_ENTER(2,14,this,9,dwBlockHandle);
|
525 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 525 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
526 | 526 | FIXME("glDirect3DDevice7::ApplyStateBlock: stub");
|
527 | 527 | TRACE_EXIT(23,DDERR_GENERIC);
|
528 | 528 | ERR(DDERR_GENERIC);
|
— | — | @@ -529,8 +529,8 @@ |
530 | 530 | HRESULT WINAPI glDirect3DDevice7::BeginScene()
|
531 | 531 | {
|
532 | 532 | TRACE_ENTER(1,14,this);
|
533 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
534 | | - if(inscene) TRACE_RET(23,D3DERR_SCENE_IN_SCENE);
|
| 533 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 534 | + if(inscene) TRACE_RET(HRESULT,23,D3DERR_SCENE_IN_SCENE);
|
535 | 535 | inscene = true;
|
536 | 536 | TRACE_EXIT(23,D3D_OK);
|
537 | 537 | return D3D_OK;
|
— | — | @@ -538,7 +538,7 @@ |
539 | 539 | HRESULT WINAPI glDirect3DDevice7::BeginStateBlock()
|
540 | 540 | {
|
541 | 541 | TRACE_ENTER(1,14,this);
|
542 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 542 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
543 | 543 | FIXME("glDirect3DDevice7::BeginStateBlock: stub");
|
544 | 544 | TRACE_EXIT(23,D3D_OK);
|
545 | 545 | ERR(DDERR_GENERIC);
|
— | — | @@ -546,7 +546,7 @@ |
547 | 547 | HRESULT WINAPI glDirect3DDevice7::CaptureStateBlock(DWORD dwBlockHandle)
|
548 | 548 | {
|
549 | 549 | TRACE_ENTER(2,14,this,9,dwBlockHandle);
|
550 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 550 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
551 | 551 | FIXME("glDirect3DDevice7::CaptureStateBlock: stub");
|
552 | 552 | TRACE_EXIT(23,D3D_OK);
|
553 | 553 | ERR(DDERR_GENERIC);
|
— | — | @@ -554,7 +554,7 @@ |
555 | 555 | HRESULT WINAPI glDirect3DDevice7::CreateStateBlock(D3DSTATEBLOCKTYPE d3dsbtype, LPDWORD lpdwBlockHandle)
|
556 | 556 | {
|
557 | 557 | TRACE_ENTER(3,14,this,9,d3dsbtype,14,lpdwBlockHandle);
|
558 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 558 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
559 | 559 | FIXME("glDirect3DDevice7::CreateStateBlock: stub");
|
560 | 560 | TRACE_EXIT(23,D3D_OK);
|
561 | 561 | ERR(DDERR_GENERIC);
|
— | — | @@ -562,15 +562,15 @@ |
563 | 563 | HRESULT WINAPI glDirect3DDevice7::Clear(DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags, DWORD dwColor, D3DVALUE dvZ, DWORD dwStencil)
|
564 | 564 | {
|
565 | 565 | TRACE_ENTER(7,14,this,8,dwCount,14,lpRects,9,dwFlags,9,dwColor,19,&dvZ,9,dwStencil);
|
566 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
567 | | - if(dwCount && !lpRects) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
568 | | - TRACE_RET(23,renderer->Clear(glDDS7,dwCount,lpRects,dwFlags,dwColor,dvZ,dwStencil));
|
| 566 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 567 | + if(dwCount && !lpRects) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 568 | + TRACE_RET(HRESULT,23,renderer->Clear(glDDS7,dwCount,lpRects,dwFlags,dwColor,dvZ,dwStencil));
|
569 | 569 | }
|
570 | 570 | HRESULT WINAPI glDirect3DDevice7::ComputeSphereVisibility(LPD3DVECTOR lpCenters, LPD3DVALUE lpRadii, DWORD dwNumSpheres,
|
571 | 571 | DWORD dwFlags, LPDWORD lpdwReturnValues)
|
572 | 572 | {
|
573 | 573 | TRACE_ENTER(6,14,this,14,lpCenters,14,lpRadii,8,dwNumSpheres,9,dwFlags,14,lpdwReturnValues);
|
574 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 574 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
575 | 575 | FIXME("glDirect3DDevice7::ComputeSphereVisibility: stub");
|
576 | 576 | TRACE_EXIT(23,DDERR_GENERIC);
|
577 | 577 | ERR(DDERR_GENERIC);
|
— | — | @@ -578,7 +578,7 @@ |
579 | 579 | HRESULT WINAPI glDirect3DDevice7::DeleteStateBlock(DWORD dwBlockHandle)
|
580 | 580 | {
|
581 | 581 | TRACE_ENTER(2,14,this,9,dwBlockHandle);
|
582 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 582 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
583 | 583 | FIXME("glDirect3DDevice7::DeleteStateBlock: stub");
|
584 | 584 | TRACE_EXIT(23,DDERR_GENERIC);
|
585 | 585 | ERR(DDERR_GENERIC);
|
— | — | @@ -708,7 +708,7 @@ |
709 | 709 | int i;
|
710 | 710 | int ptr = 0;
|
711 | 711 | if((dwVertexTypeDesc & D3DFVF_XYZ) && (dwVertexTypeDesc & D3DFVF_XYZRHW))
|
712 | | - TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 712 | + TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
713 | 713 | if(dwVertexTypeDesc & D3DFVF_XYZ)
|
714 | 714 | {
|
715 | 715 | vertdata[0].data = vertptr;
|
— | — | @@ -722,7 +722,7 @@ |
723 | 723 | vertdata[1].data = &vertptr[3];
|
724 | 724 | ptr += 4;
|
725 | 725 | }
|
726 | | - else TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 726 | + else TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
727 | 727 | for(i = 0; i < 5; i++)
|
728 | 728 | vertdata[i+2].data = NULL;
|
729 | 729 | if(((dwVertexTypeDesc >> 1) & 7) >= 3)
|
— | — | @@ -786,13 +786,13 @@ |
787 | 787 | LPVOID lpvVertices, DWORD dwVertexCount, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
788 | 788 | {
|
789 | 789 | TRACE_ENTER(8,9,d3dptPrimitiveType,9,dwVertexTypeDesc,14,lpvVertices,8,dwVertexCount,14,lpwIndices,8,dwIndexCount,9,dwFlags);
|
790 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
791 | | - if(!inscene) TRACE_RET(23,D3DERR_SCENE_NOT_IN_SCENE);
|
| 790 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 791 | + if(!inscene) TRACE_RET(HRESULT,23,D3DERR_SCENE_NOT_IN_SCENE);
|
792 | 792 | HRESULT err = fvftoglvertex(dwVertexTypeDesc,(LPDWORD)lpvVertices);
|
793 | 793 | if(lpwIndices) AddStats(d3dptPrimitiveType,dwIndexCount,&stats);
|
794 | 794 | else AddStats(d3dptPrimitiveType,dwVertexCount,&stats);
|
795 | | - if(err != D3D_OK) TRACE_RET(23,err);
|
796 | | - TRACE_RET(23,renderer->DrawPrimitives(this,setdrawmode(d3dptPrimitiveType),vertdata,texformats,
|
| 795 | + if(err != D3D_OK) TRACE_RET(HRESULT,23,err);
|
| 796 | + TRACE_RET(HRESULT,23,renderer->DrawPrimitives(this,setdrawmode(d3dptPrimitiveType),vertdata,texformats,
|
797 | 797 | dwVertexCount,lpwIndices,dwIndexCount,dwFlags));
|
798 | 798 | }
|
799 | 799 | HRESULT WINAPI glDirect3DDevice7::DrawIndexedPrimitiveStrided(D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD dwVertexTypeDesc,
|
— | — | @@ -799,7 +799,7 @@ |
800 | 800 | LPD3DDRAWPRIMITIVESTRIDEDDATA lpvVertexArray, DWORD dwVertexCount, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
801 | 801 | {
|
802 | 802 | TRACE_ENTER(8,14,this,9,d3dptPrimitiveType,9,dwVertexTypeDesc,14,lpvVertexArray,8,dwVertexCount,14,lpwIndices,8,dwIndexCount,9,dwFlags);
|
803 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 803 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
804 | 804 | FIXME("glDirect3DDevice7::DrawIndexedPrimitiveStrided: stub");
|
805 | 805 | TRACE_EXIT(23,DDERR_GENERIC);
|
806 | 806 | ERR(DDERR_GENERIC);
|
— | — | @@ -808,7 +808,7 @@ |
809 | 809 | DWORD dwStartVertex, DWORD dwNumVertices, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
810 | 810 | {
|
811 | 811 | TRACE_ENTER(8,14,this,9,d3dptPrimitiveType,14,lpd3dVertexBuffer,8,dwStartVertex,8,dwNumVertices,9,lpwIndices,8,dwIndexCount,9,dwFlags);
|
812 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 812 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
813 | 813 | FIXME("glDirect3DDevice7::DrawIndexedPrimitiveVB: stub");
|
814 | 814 | TRACE_EXIT(23,DDERR_GENERIC);
|
815 | 815 | ERR(DDERR_GENERIC);
|
— | — | @@ -817,14 +817,14 @@ |
818 | 818 | DWORD dwVertexCount, DWORD dwFlags)
|
819 | 819 | {
|
820 | 820 | TRACE_ENTER(6,14,this,9,dptPrimitiveType,9,dwVertexTypeDesc,14,lpVertices,8,dwVertexCount,9,dwFlags);
|
821 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
822 | | - TRACE_RET(23,DrawIndexedPrimitive(dptPrimitiveType,dwVertexTypeDesc,lpVertices,dwVertexCount,NULL,0,dwFlags));
|
| 821 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 822 | + TRACE_RET(HRESULT,23,DrawIndexedPrimitive(dptPrimitiveType,dwVertexTypeDesc,lpVertices,dwVertexCount,NULL,0,dwFlags));
|
823 | 823 | }
|
824 | 824 | HRESULT WINAPI glDirect3DDevice7::DrawPrimitiveStrided(D3DPRIMITIVETYPE dptPrimitiveType, DWORD dwVertexTypeDesc,
|
825 | 825 | LPD3DDRAWPRIMITIVESTRIDEDDATA lpVertexArray, DWORD dwVertexCount, DWORD dwFlags)
|
826 | 826 | {
|
827 | 827 | TRACE_ENTER(6,14,this,9,dptPrimitiveType,9,dwVertexTypeDesc,14,lpVertexArray,8,dwVertexCount,9,dwFlags);
|
828 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 828 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
829 | 829 | FIXME("glDirect3DDevice7::DrawPrimitiveStrided: stub");
|
830 | 830 | TRACE_EXIT(23,DDERR_GENERIC);
|
831 | 831 | ERR(DDERR_GENERIC);
|
— | — | @@ -833,7 +833,7 @@ |
834 | 834 | DWORD dwStartVertex, DWORD dwNumVertices, DWORD dwFlags)
|
835 | 835 | {
|
836 | 836 | TRACE_ENTER(5,14,this,9,d3dptPrimitiveType,14,lpd3dVertexBuffer,8,dwStartVertex,8,dwNumVertices,9,dwFlags);
|
837 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 837 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
838 | 838 | FIXME("glDirect3DDevice7::DrawPrimitiveVB: stub");
|
839 | 839 | TRACE_EXIT(23,DDERR_GENERIC);
|
840 | 840 | ERR(DDERR_GENERIC);
|
— | — | @@ -841,8 +841,8 @@ |
842 | 842 | HRESULT WINAPI glDirect3DDevice7::EndScene()
|
843 | 843 | {
|
844 | 844 | TRACE_ENTER(1,14,this);
|
845 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
846 | | - if(!inscene) TRACE_RET(23,D3DERR_SCENE_NOT_IN_SCENE);
|
| 845 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 846 | + if(!inscene) TRACE_RET(HRESULT,23,D3DERR_SCENE_NOT_IN_SCENE);
|
847 | 847 | inscene = false;
|
848 | 848 | renderer->Flush();
|
849 | 849 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -851,7 +851,7 @@ |
852 | 852 | HRESULT WINAPI glDirect3DDevice7::EndStateBlock(LPDWORD lpdwBlockHandle)
|
853 | 853 | {
|
854 | 854 | TRACE_ENTER(2,14,this,14,lpdwBlockHandle);
|
855 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 855 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
856 | 856 | FIXME("glDirect3DDevice7::EndStateBlock: stub");
|
857 | 857 | TRACE_EXIT(23,DDERR_GENERIC);
|
858 | 858 | ERR(DDERR_GENERIC);
|
— | — | @@ -860,7 +860,7 @@ |
861 | 861 | HRESULT WINAPI glDirect3DDevice7::EnumTextureFormats(LPD3DENUMPIXELFORMATSCALLBACK lpd3dEnumPixelProc, LPVOID lpArg)
|
862 | 862 | {
|
863 | 863 | TRACE_ENTER(3,14,this,14,lpd3dEnumPixelProc,14,lpArg);
|
864 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 864 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
865 | 865 | HRESULT result;
|
866 | 866 | DDPIXELFORMAT fmt;
|
867 | 867 | for(int i = 0; i < numtexformats; i++)
|
— | — | @@ -869,7 +869,7 @@ |
870 | 870 | if(::texformats[i].dwFlags & DDPF_PALETTEINDEXED8) continue;
|
871 | 871 | memcpy(&fmt,&::texformats[i],sizeof(DDPIXELFORMAT));
|
872 | 872 | result = lpd3dEnumPixelProc(&fmt,lpArg);
|
873 | | - if(result != D3DENUMRET_OK) TRACE_RET(23,D3D_OK);
|
| 873 | + if(result != D3DENUMRET_OK) TRACE_RET(HRESULT,23,D3D_OK);
|
874 | 874 | }
|
875 | 875 | TRACE_EXIT(23,D3D_OK);
|
876 | 876 | return D3D_OK;
|
— | — | @@ -877,7 +877,7 @@ |
878 | 878 | HRESULT WINAPI glDirect3DDevice7::GetCaps(LPD3DDEVICEDESC7 lpD3DDevDesc)
|
879 | 879 | {
|
880 | 880 | TRACE_ENTER(2,14,this,14,lpD3DDevDesc);
|
881 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 881 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
882 | 882 | D3DDEVICEDESC7 desc = d3ddesc;
|
883 | 883 | desc.dwDevCaps |= D3DDEVCAPS_HWRASTERIZATION | D3DDEVCAPS_HWTRANSFORMANDLIGHT;
|
884 | 884 | desc.deviceGUID = IID_IDirect3DTnLHalDevice;
|
— | — | @@ -888,7 +888,7 @@ |
889 | 889 | HRESULT WINAPI glDirect3DDevice7::GetClipPlane(DWORD dwIndex, D3DVALUE *pPlaneEquation)
|
890 | 890 | {
|
891 | 891 | TRACE_ENTER(3,14,this,8,dwIndex,9,pPlaneEquation);
|
892 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 892 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
893 | 893 | FIXME("glDirect3DDevice7::GetClipPlane: stub");
|
894 | 894 | TRACE_EXIT(23,DDERR_GENERIC);
|
895 | 895 | ERR(DDERR_GENERIC);
|
— | — | @@ -896,7 +896,7 @@ |
897 | 897 | HRESULT WINAPI glDirect3DDevice7::GetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
898 | 898 | {
|
899 | 899 | TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
900 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 900 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
901 | 901 | FIXME("glDirect3DDevice7::GetClipStatus: stub");
|
902 | 902 | TRACE_EXIT(23,DDERR_GENERIC);
|
903 | 903 | ERR(DDERR_GENERIC);
|
— | — | @@ -904,8 +904,8 @@ |
905 | 905 | HRESULT WINAPI glDirect3DDevice7::GetDirect3D(LPDIRECT3D7 *lplpD3D)
|
906 | 906 | {
|
907 | 907 | TRACE_ENTER(2,14,this,14,lplpD3D);
|
908 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
909 | | - if(!lplpD3D) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 908 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 909 | + if(!lplpD3D) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
910 | 910 | *lplpD3D = glD3D7;
|
911 | 911 | glD3D7->AddRef();
|
912 | 912 | TRACE_VAR("*lplpD3D",14,*lplpD3D);
|
— | — | @@ -915,7 +915,7 @@ |
916 | 916 | HRESULT WINAPI glDirect3DDevice7::GetInfo(DWORD dwDevInfoID, LPVOID pDevInfoStruct, DWORD dwSize)
|
917 | 917 | {
|
918 | 918 | TRACE_ENTER(4,14,this,9,dwDevInfoID,14,pDevInfoStruct,8,dwSize);
|
919 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 919 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
920 | 920 | FIXME("glDirect3DDevice7::GetInfo: stub");
|
921 | 921 | TRACE_EXIT(23,DDERR_GENERIC);
|
922 | 922 | ERR(DDERR_GENERIC);
|
— | — | @@ -923,10 +923,10 @@ |
924 | 924 | HRESULT WINAPI glDirect3DDevice7::GetLight(DWORD dwLightIndex, LPD3DLIGHT7 lpLight)
|
925 | 925 | {
|
926 | 926 | TRACE_ENTER(3,14,this,8,dwLightIndex,14,lpLight);
|
927 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
928 | | - if(!lpLight) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
929 | | - if(dwLightIndex >= lightsmax) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
930 | | - if(!lights[dwLightIndex]) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 927 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 928 | + if(!lpLight) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 929 | + if(dwLightIndex >= lightsmax) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 930 | + if(!lights[dwLightIndex]) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
931 | 931 | lights[dwLightIndex]->GetLight7(lpLight);
|
932 | 932 | TRACE_EXIT(23,D3D_OK);
|
933 | 933 | return D3D_OK;
|
— | — | @@ -934,10 +934,10 @@ |
935 | 935 | HRESULT WINAPI glDirect3DDevice7::GetLightEnable(DWORD dwLightIndex, BOOL* pbEnable)
|
936 | 936 | {
|
937 | 937 | TRACE_ENTER(3,14,this,8,dwLightIndex,14,pbEnable);
|
938 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
939 | | - if(dwLightIndex >= lightsmax) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
940 | | - if(!lights[dwLightIndex]) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
941 | | - if(!pbEnable) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 938 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 939 | + if(dwLightIndex >= lightsmax) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 940 | + if(!lights[dwLightIndex]) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 941 | + if(!pbEnable) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
942 | 942 | *pbEnable = FALSE;
|
943 | 943 | for(int i = 0; i < 8; i++)
|
944 | 944 | if(gllights[i] == dwLightIndex) *pbEnable = TRUE;
|
— | — | @@ -948,8 +948,8 @@ |
949 | 949 | HRESULT WINAPI glDirect3DDevice7::GetMaterial(LPD3DMATERIAL7 lpMaterial)
|
950 | 950 | {
|
951 | 951 | TRACE_ENTER(2,14,this,14,lpMaterial);
|
952 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
953 | | - if(!lpMaterial) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 952 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 953 | + if(!lpMaterial) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
954 | 954 | memcpy(lpMaterial,&material,sizeof(D3DMATERIAL7));
|
955 | 955 | TRACE_EXIT(23,D3D_OK);
|
956 | 956 | return D3D_OK;
|
— | — | @@ -957,7 +957,7 @@ |
958 | 958 | HRESULT WINAPI glDirect3DDevice7::GetRenderState(D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState)
|
959 | 959 | {
|
960 | 960 | TRACE_ENTER(3,14,this,27,dwRenderStateType,14,lpdwRenderState);
|
961 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 961 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
962 | 962 | if(dwRenderStateType <= 152)
|
963 | 963 | {
|
964 | 964 | *lpdwRenderState = renderstate[dwRenderStateType];
|
— | — | @@ -971,8 +971,8 @@ |
972 | 972 | HRESULT WINAPI glDirect3DDevice7::GetRenderTarget(LPDIRECTDRAWSURFACE7 *lplpRenderTarget)
|
973 | 973 | {
|
974 | 974 | TRACE_ENTER(2,14,this,14,lplpRenderTarget);
|
975 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
976 | | - if(!lplpRenderTarget) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 975 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 976 | + if(!lplpRenderTarget) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
977 | 977 | glDDS7->AddRef();
|
978 | 978 | *lplpRenderTarget = glDDS7;
|
979 | 979 | TRACE_VAR("*lplpRenderTarger",14,*lplpRenderTarget);
|
— | — | @@ -982,7 +982,7 @@ |
983 | 983 | HRESULT WINAPI glDirect3DDevice7::GetStateData(DWORD dwState, LPVOID* lplpStateData)
|
984 | 984 | {
|
985 | 985 | TRACE_ENTER(3,14,this,9,dwState,14,lplpStateData);
|
986 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 986 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
987 | 987 | FIXME("glDirect3DDevice7::GetStateData: stub");
|
988 | 988 | TRACE_EXIT(23,DDERR_GENERIC);
|
989 | 989 | ERR(DDERR_GENERIC);
|
— | — | @@ -990,10 +990,10 @@ |
991 | 991 | HRESULT WINAPI glDirect3DDevice7::GetTexture(DWORD dwStage, LPDIRECTDRAWSURFACE7 *lplpTexture)
|
992 | 992 | {
|
993 | 993 | TRACE_ENTER(3,14,this,8,dwStage,14,lplpTexture);
|
994 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
995 | | - if(!lplpTexture) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
996 | | - if(dwStage > 7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
997 | | - if(!texstages[dwStage].texture) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 994 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 995 | + if(!lplpTexture) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 996 | + if(dwStage > 7) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 997 | + if(!texstages[dwStage].texture) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
998 | 998 | *lplpTexture = texstages[dwStage].texture;
|
999 | 999 | texstages[dwStage].texture->AddRef();
|
1000 | 1000 | TRACE_VAR("*lplpTexture",14,*lplpTexture);
|
— | — | @@ -1003,110 +1003,110 @@ |
1004 | 1004 | HRESULT WINAPI glDirect3DDevice7::GetTextureStageState(DWORD dwStage, D3DTEXTURESTAGESTATETYPE dwState, LPDWORD lpdwValue)
|
1005 | 1005 | {
|
1006 | 1006 | TRACE_ENTER(4,14,this,8,dwStage,28,dwState,14,lpdwValue);
|
1007 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1008 | | - if(dwStage > 7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1009 | | - if(!lpdwValue) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1007 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1008 | + if(dwStage > 7) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1009 | + if(!lpdwValue) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1010 | 1010 | switch(dwState)
|
1011 | 1011 | {
|
1012 | 1012 | case D3DTSS_COLOROP:
|
1013 | 1013 | *lpdwValue = texstages[dwStage].colorop;
|
1014 | | - TRACE_RET(23,D3D_OK);
|
| 1014 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1015 | 1015 | case D3DTSS_COLORARG1:
|
1016 | 1016 | *lpdwValue = texstages[dwStage].colorarg1;
|
1017 | | - TRACE_RET(23,D3D_OK);
|
| 1017 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1018 | 1018 | case D3DTSS_COLORARG2:
|
1019 | 1019 | *lpdwValue = texstages[dwStage].colorarg2;
|
1020 | | - TRACE_RET(23,D3D_OK);
|
| 1020 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1021 | 1021 | case D3DTSS_ALPHAOP:
|
1022 | 1022 | *lpdwValue = texstages[dwStage].alphaop;
|
1023 | | - TRACE_RET(23,D3D_OK);
|
| 1023 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1024 | 1024 | case D3DTSS_ALPHAARG1:
|
1025 | 1025 | *lpdwValue = texstages[dwStage].alphaarg1;
|
1026 | | - TRACE_RET(23,D3D_OK);
|
| 1026 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1027 | 1027 | case D3DTSS_ALPHAARG2:
|
1028 | 1028 | *lpdwValue = texstages[dwStage].alphaarg2;
|
1029 | | - TRACE_RET(23,D3D_OK);
|
| 1029 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1030 | 1030 | case D3DTSS_BUMPENVMAT00:
|
1031 | 1031 | memcpy(lpdwValue,&texstages[dwStage].bumpenv00,sizeof(D3DVALUE));
|
1032 | | - TRACE_RET(23,D3D_OK);
|
| 1032 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1033 | 1033 | case D3DTSS_BUMPENVMAT01:
|
1034 | 1034 | memcpy(lpdwValue,&texstages[dwStage].bumpenv01,sizeof(D3DVALUE));
|
1035 | | - TRACE_RET(23,D3D_OK);
|
| 1035 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1036 | 1036 | case D3DTSS_BUMPENVMAT10:
|
1037 | 1037 | memcpy(lpdwValue,&texstages[dwStage].bumpenv10,sizeof(D3DVALUE));
|
1038 | | - TRACE_RET(23,D3D_OK);
|
| 1038 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1039 | 1039 | case D3DTSS_BUMPENVMAT11:
|
1040 | 1040 | memcpy(lpdwValue,&texstages[dwStage].bumpenv11,sizeof(D3DVALUE));
|
1041 | | - TRACE_RET(23,D3D_OK);
|
| 1041 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1042 | 1042 | case D3DTSS_TEXCOORDINDEX:
|
1043 | 1043 | *lpdwValue = texstages[dwStage].texcoordindex;
|
1044 | | - TRACE_RET(23,D3D_OK);
|
| 1044 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1045 | 1045 | case D3DTSS_ADDRESS:
|
1046 | 1046 | case D3DTSS_ADDRESSU:
|
1047 | 1047 | *lpdwValue = texstages[dwStage].addressu;
|
1048 | | - TRACE_RET(23,D3D_OK);
|
| 1048 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1049 | 1049 | case D3DTSS_ADDRESSV:
|
1050 | 1050 | *lpdwValue = texstages[dwStage].addressv;
|
1051 | | - TRACE_RET(23,D3D_OK);
|
| 1051 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1052 | 1052 | case D3DTSS_BORDERCOLOR:
|
1053 | 1053 | *lpdwValue = texstages[dwStage].bordercolor;
|
1054 | | - TRACE_RET(23,D3D_OK);
|
| 1054 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1055 | 1055 | case D3DTSS_MAGFILTER:
|
1056 | 1056 | *lpdwValue = texstages[dwStage].magfilter;
|
1057 | | - TRACE_RET(23,D3D_OK);
|
| 1057 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1058 | 1058 | case D3DTSS_MINFILTER:
|
1059 | 1059 | *lpdwValue = texstages[dwStage].minfilter;
|
1060 | | - TRACE_RET(23,D3D_OK);
|
| 1060 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1061 | 1061 | case D3DTSS_MIPFILTER:
|
1062 | 1062 | *lpdwValue = texstages[dwStage].mipfilter;
|
1063 | | - TRACE_RET(23,D3D_OK);
|
| 1063 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1064 | 1064 | case D3DTSS_MIPMAPLODBIAS:
|
1065 | 1065 | memcpy(lpdwValue,&texstages[dwStage].lodbias,sizeof(D3DVALUE));
|
1066 | | - TRACE_RET(23,D3D_OK);
|
| 1066 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1067 | 1067 | case D3DTSS_MAXMIPLEVEL:
|
1068 | 1068 | *lpdwValue = texstages[dwStage].miplevel;
|
1069 | | - TRACE_RET(23,D3D_OK);
|
| 1069 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1070 | 1070 | case D3DTSS_MAXANISOTROPY:
|
1071 | 1071 | *lpdwValue = texstages[dwStage].anisotropy;
|
1072 | | - TRACE_RET(23,D3D_OK);
|
| 1072 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1073 | 1073 | case D3DTSS_BUMPENVLSCALE:
|
1074 | 1074 | memcpy(lpdwValue,&texstages[dwStage].bumpenvlscale,sizeof(D3DVALUE));
|
1075 | | - TRACE_RET(23,D3D_OK);
|
| 1075 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1076 | 1076 | case D3DTSS_BUMPENVLOFFSET:
|
1077 | 1077 | memcpy(lpdwValue,&texstages[dwStage].bumpenvloffset,sizeof(D3DVALUE));
|
1078 | | - TRACE_RET(23,D3D_OK);
|
| 1078 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1079 | 1079 | case D3DTSS_TEXTURETRANSFORMFLAGS:
|
1080 | 1080 | *lpdwValue = texstages[dwStage].textransform;
|
1081 | | - TRACE_RET(23,D3D_OK);
|
| 1081 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1082 | 1082 | default:
|
1083 | | - TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1083 | + TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1084 | 1084 | }
|
1085 | | - TRACE_RET(23,DDERR_GENERIC);
|
| 1085 | + TRACE_RET(HRESULT,23,DDERR_GENERIC);
|
1086 | 1086 | }
|
1087 | 1087 | HRESULT WINAPI glDirect3DDevice7::GetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
1088 | 1088 | {
|
1089 | 1089 | TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
1090 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1090 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1091 | 1091 | switch(dtstTransformStateType)
|
1092 | 1092 | {
|
1093 | 1093 | case D3DTRANSFORMSTATE_WORLD:
|
1094 | 1094 | memcpy(lpD3DMatrix,&matWorld,sizeof(D3DMATRIX));
|
1095 | | - TRACE_RET(23,D3D_OK);
|
| 1095 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1096 | 1096 | case D3DTRANSFORMSTATE_VIEW:
|
1097 | 1097 | memcpy(lpD3DMatrix,&matView,sizeof(D3DMATRIX));
|
1098 | | - TRACE_RET(23,D3D_OK);
|
| 1098 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1099 | 1099 | case D3DTRANSFORMSTATE_PROJECTION:
|
1100 | 1100 | memcpy(lpD3DMatrix,&matProjection,sizeof(D3DMATRIX));
|
1101 | | - TRACE_RET(23,D3D_OK);
|
| 1101 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1102 | 1102 | default:
|
1103 | | - TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1103 | + TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1104 | 1104 | }
|
1105 | | - TRACE_RET(23,DDERR_GENERIC);
|
| 1105 | + TRACE_RET(HRESULT,23,DDERR_GENERIC);
|
1106 | 1106 | }
|
1107 | 1107 | HRESULT WINAPI glDirect3DDevice7::GetViewport(LPD3DVIEWPORT7 lpViewport)
|
1108 | 1108 | {
|
1109 | 1109 | TRACE_ENTER(2,14,this,14,lpViewport);
|
1110 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1110 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1111 | 1111 | memcpy(lpViewport,&viewport,sizeof(D3DVIEWPORT7));
|
1112 | 1112 | TRACE_EXIT(23,D3D_OK);
|
1113 | 1113 | return D3D_OK;
|
— | — | @@ -1114,19 +1114,19 @@ |
1115 | 1115 | HRESULT WINAPI glDirect3DDevice7::LightEnable(DWORD dwLightIndex, BOOL bEnable)
|
1116 | 1116 | {
|
1117 | 1117 | TRACE_ENTER(3,14,this,8,dwLightIndex,22,bEnable);
|
1118 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1118 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1119 | 1119 | int i;
|
1120 | 1120 | D3DLIGHT7 light;
|
1121 | 1121 | bool foundlight = false;
|
1122 | 1122 | if(dwLightIndex >= lightsmax)
|
1123 | 1123 | {
|
1124 | | - if(!ExpandLightBuffer(&lights,&lightsmax,dwLightIndex-1)) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 1124 | + if(!ExpandLightBuffer(&lights,&lightsmax,dwLightIndex-1)) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
1125 | 1125 | }
|
1126 | 1126 | if(!lights[dwLightIndex]) lights[dwLightIndex] = new glDirect3DLight;
|
1127 | 1127 | if(bEnable)
|
1128 | 1128 | {
|
1129 | 1129 | for(i = 0; i < 8; i++)
|
1130 | | - if(gllights[i] == dwLightIndex) TRACE_RET(23,D3D_OK);
|
| 1130 | + if(gllights[i] == dwLightIndex) TRACE_RET(HRESULT,23,D3D_OK);
|
1131 | 1131 | for(i = 0; i < 8; i++)
|
1132 | 1132 | {
|
1133 | 1133 | if(gllights[i] == -1)
|
— | — | @@ -1136,7 +1136,7 @@ |
1137 | 1137 | break;
|
1138 | 1138 | }
|
1139 | 1139 | }
|
1140 | | - if(!foundlight) TRACE_RET(23,D3DERR_LIGHT_SET_FAILED);
|
| 1140 | + if(!foundlight) TRACE_RET(HRESULT,23,D3DERR_LIGHT_SET_FAILED);
|
1141 | 1141 | }
|
1142 | 1142 | else
|
1143 | 1143 | {
|
— | — | @@ -1157,7 +1157,7 @@ |
1158 | 1158 | LPRECT lprcSrcRect, DWORD dwFlags)
|
1159 | 1159 | {
|
1160 | 1160 | TRACE_ENTER(6,14,this,14,lpDestTex,25,lpDestPoint,14,lpSrcTex,26,lprcSrcRect,9,dwFlags);
|
1161 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1161 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1162 | 1162 | FIXME("glDirect3DDevice7::Load: stub");
|
1163 | 1163 | TRACE_EXIT(23,DDERR_GENERIC);
|
1164 | 1164 | ERR(DDERR_GENERIC);
|
— | — | @@ -1165,7 +1165,7 @@ |
1166 | 1166 | HRESULT WINAPI glDirect3DDevice7::MultiplyTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
1167 | 1167 | {
|
1168 | 1168 | TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
1169 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1169 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1170 | 1170 | FIXME("glDirect3DDevice7::MultiplyTransform: stub");
|
1171 | 1171 | TRACE_EXIT(23,DDERR_GENERIC);
|
1172 | 1172 | ERR(DDERR_GENERIC);
|
— | — | @@ -1173,7 +1173,7 @@ |
1174 | 1174 | HRESULT WINAPI glDirect3DDevice7::PreLoad(LPDIRECTDRAWSURFACE7 lpddsTexture)
|
1175 | 1175 | {
|
1176 | 1176 | TRACE_ENTER(2,14,this,14,lpddsTexture);
|
1177 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1177 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1178 | 1178 | FIXME("glDirect3DDevice7::PreLoad: stub");
|
1179 | 1179 | TRACE_EXIT(23,DDERR_GENERIC);
|
1180 | 1180 | ERR(DDERR_GENERIC);
|
— | — | @@ -1181,7 +1181,7 @@ |
1182 | 1182 | HRESULT WINAPI glDirect3DDevice7::SetClipPlane(DWORD dwIndex, D3DVALUE* pPlaneEquation)
|
1183 | 1183 | {
|
1184 | 1184 | TRACE_ENTER(3,14,this,8,dwIndex,14,pPlaneEquation);
|
1185 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1185 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1186 | 1186 | FIXME("glDirect3DDevice7::SetClipPland: stub");
|
1187 | 1187 | TRACE_EXIT(23,DDERR_GENERIC);
|
1188 | 1188 | ERR(DDERR_GENERIC);
|
— | — | @@ -1189,7 +1189,7 @@ |
1190 | 1190 | HRESULT WINAPI glDirect3DDevice7::SetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
1191 | 1191 | {
|
1192 | 1192 | TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
1193 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1193 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1194 | 1194 | FIXME("glDirect3DDevice7::SetClipStatus: stub");
|
1195 | 1195 | TRACE_EXIT(23,DDERR_GENERIC);
|
1196 | 1196 | ERR(DDERR_GENERIC);
|
— | — | @@ -1197,11 +1197,11 @@ |
1198 | 1198 | HRESULT WINAPI glDirect3DDevice7::SetLight(DWORD dwLightIndex, LPD3DLIGHT7 lpLight)
|
1199 | 1199 | {
|
1200 | 1200 | TRACE_ENTER(3,14,this,8,dwLightIndex,14,lpLight);
|
1201 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1201 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1202 | 1202 | bool foundlight = false;
|
1203 | 1203 | if(dwLightIndex >= lightsmax)
|
1204 | 1204 | {
|
1205 | | - if(!ExpandLightBuffer(&lights,&lightsmax,dwLightIndex-1)) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 1205 | + if(!ExpandLightBuffer(&lights,&lightsmax,dwLightIndex-1)) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
1206 | 1206 | }
|
1207 | 1207 | if(!lights[dwLightIndex]) lights[dwLightIndex] = new glDirect3DLight;
|
1208 | 1208 | lights[dwLightIndex]->SetLight7(lpLight);
|
— | — | @@ -1211,8 +1211,8 @@ |
1212 | 1212 | HRESULT WINAPI glDirect3DDevice7::SetMaterial(LPD3DMATERIAL7 lpMaterial)
|
1213 | 1213 | {
|
1214 | 1214 | TRACE_ENTER(2,14,this,14,lpMaterial);
|
1215 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1216 | | - if(!lpMaterial) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1215 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1216 | + if(!lpMaterial) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1217 | 1217 | memcpy(&material,lpMaterial,sizeof(D3DMATERIAL7));
|
1218 | 1218 | TRACE_EXIT(23,D3D_OK);
|
1219 | 1219 | return D3D_OK;
|
— | — | @@ -1221,14 +1221,14 @@ |
1222 | 1222 | HRESULT WINAPI glDirect3DDevice7::SetRenderState(D3DRENDERSTATETYPE dwRendStateType, DWORD dwRenderState)
|
1223 | 1223 | {
|
1224 | 1224 | TRACE_ENTER(3,14,this,27,dwRendStateType,9,dwRenderState);
|
1225 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1225 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1226 | 1226 | switch(dwRendStateType)
|
1227 | 1227 | {
|
1228 | 1228 | case D3DRENDERSTATE_TEXTUREHANDLE:
|
1229 | | - if(dwRenderState > texturecount-1) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1229 | + if(dwRenderState > texturecount-1) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1230 | 1230 | if(dwRenderState)
|
1231 | 1231 | {
|
1232 | | - if(!textures[dwRenderState]) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1232 | + if(!textures[dwRenderState]) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1233 | 1233 | SetTexture(0,textures[dwRenderState]);
|
1234 | 1234 | }
|
1235 | 1235 | else SetTexture(0,NULL);
|
— | — | @@ -1287,7 +1287,7 @@ |
1288 | 1288 | }
|
1289 | 1289 | break;
|
1290 | 1290 | case D3DRENDERSTATE_TEXTUREMAPBLEND:
|
1291 | | - if(!dwRenderState || (dwRenderState > D3DTBLEND_ADD)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1291 | + if(!dwRenderState || (dwRenderState > D3DTBLEND_ADD)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1292 | 1292 | switch(dwRenderState)
|
1293 | 1293 | {
|
1294 | 1294 | case D3DTBLEND_DECAL:
|
— | — | @@ -1323,7 +1323,7 @@ |
1324 | 1324 | case D3DTBLEND_DECALMASK:
|
1325 | 1325 | case D3DTBLEND_MODULATEMASK:
|
1326 | 1326 | FIXME("DX5 masked blend modes not supported.");
|
1327 | | - TRACE_RET(23,DDERR_UNSUPPORTED);
|
| 1327 | + TRACE_RET(HRESULT,23,DDERR_UNSUPPORTED);
|
1328 | 1328 | case D3DTBLEND_ADD:
|
1329 | 1329 | SetTextureStageState(0,D3DTSS_COLORARG1,D3DTA_TEXTURE);
|
1330 | 1330 | SetTextureStageState(0,D3DTSS_COLORARG2,D3DTA_CURRENT);
|
— | — | @@ -1334,8 +1334,8 @@ |
1335 | 1335 | }
|
1336 | 1336 | break;
|
1337 | 1337 | }
|
1338 | | - if(dwRendStateType > 152) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1339 | | - if(dwRendStateType < 0) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1338 | + if(dwRendStateType > 152) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1339 | + if(dwRendStateType < 0) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1340 | 1340 | renderstate[dwRendStateType] = dwRenderState;
|
1341 | 1341 | TRACE_EXIT(23,D3D_OK);
|
1342 | 1342 | return D3D_OK;
|
— | — | @@ -1343,13 +1343,13 @@ |
1344 | 1344 | HRESULT WINAPI glDirect3DDevice7::SetRenderTarget(LPDIRECTDRAWSURFACE7 lpNewRenderTarget, DWORD dwFlags)
|
1345 | 1345 | {
|
1346 | 1346 | TRACE_ENTER(3,14,this,14,lpNewRenderTarget,9,dwFlags);
|
1347 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1348 | | - if(!lpNewRenderTarget) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1349 | | - if(dwFlags) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1347 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1348 | + if(!lpNewRenderTarget) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1349 | + if(dwFlags) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1350 | 1350 | DDSURFACEDESC2 ddsd;
|
1351 | 1351 | ddsd.dwSize = sizeof(DDSURFACEDESC2);
|
1352 | 1352 | lpNewRenderTarget->GetSurfaceDesc(&ddsd);
|
1353 | | - if(!(ddsd.ddsCaps.dwCaps & DDSCAPS_3DDEVICE)) TRACE_RET(23,DDERR_INVALIDSURFACETYPE);
|
| 1353 | + if(!(ddsd.ddsCaps.dwCaps & DDSCAPS_3DDEVICE)) TRACE_RET(HRESULT,23,DDERR_INVALIDSURFACETYPE);
|
1354 | 1354 | glDDS7->Release();
|
1355 | 1355 | glDDS7 = (glDirectDrawSurface7*)lpNewRenderTarget;
|
1356 | 1356 | glDDS7->AddRef();
|
— | — | @@ -1359,7 +1359,7 @@ |
1360 | 1360 | HRESULT WINAPI glDirect3DDevice7::SetStateData(DWORD dwState, LPVOID lpStateData)
|
1361 | 1361 | {
|
1362 | 1362 | TRACE_ENTER(3,14,this,8,dwState,14,lpStateData);
|
1363 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1363 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1364 | 1364 | FIXME("glDirect3DDevice7::SetStateData: stub");
|
1365 | 1365 | TRACE_EXIT(23,DDERR_GENERIC);
|
1366 | 1366 | ERR(DDERR_GENERIC);
|
— | — | @@ -1367,8 +1367,8 @@ |
1368 | 1368 | HRESULT WINAPI glDirect3DDevice7::SetTexture(DWORD dwStage, LPDIRECTDRAWSURFACE7 lpTexture)
|
1369 | 1369 | {
|
1370 | 1370 | TRACE_ENTER(3,14,this,8,dwStage,14,lpTexture);
|
1371 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1372 | | - if(dwStage > 7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1371 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1372 | + if(dwStage > 7) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1373 | 1373 | if(texstages[dwStage].texture) texstages[dwStage].texture->Release();
|
1374 | 1374 | texstages[dwStage].texture = (glDirectDrawSurface7*)lpTexture;
|
1375 | 1375 | texstages[dwStage].dirty = true;
|
— | — | @@ -1379,12 +1379,12 @@ |
1380 | 1380 | HRESULT WINAPI glDirect3DDevice7::SetTextureStageState(DWORD dwStage, D3DTEXTURESTAGESTATETYPE dwState, DWORD dwValue)
|
1381 | 1381 | {
|
1382 | 1382 | TRACE_ENTER(4,14,this,8,dwStage,28,dwState,9,dwValue);
|
1383 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1384 | | - if(dwStage > 7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1383 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1384 | + if(dwStage > 7) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1385 | 1385 | switch(dwState)
|
1386 | 1386 | {
|
1387 | 1387 | case D3DTSS_COLOROP:
|
1388 | | - if(!dwValue || (dwValue > 24)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1388 | + if(!dwValue || (dwValue > 24)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1389 | 1389 | if(dwStage == 0)renderstate[D3DRENDERSTATE_TEXTUREMAPBLEND] = 0;
|
1390 | 1390 | texstages[dwStage].colorop = (D3DTEXTUREOP)dwValue;
|
1391 | 1391 | texstages[dwStage].dirty = true;
|
— | — | @@ -1391,21 +1391,21 @@ |
1392 | 1392 | TRACE_EXIT(23,D3D_OK);
|
1393 | 1393 | return D3D_OK;
|
1394 | 1394 | case D3DTSS_COLORARG1:
|
1395 | | - if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1396 | | - if(dwValue > 0x34) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1395 | + if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1396 | + if(dwValue > 0x34) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1397 | 1397 | texstages[dwStage].colorarg1 = dwValue;
|
1398 | 1398 | texstages[dwStage].dirty = true;
|
1399 | 1399 | TRACE_EXIT(23,D3D_OK);
|
1400 | 1400 | return D3D_OK;
|
1401 | 1401 | case D3DTSS_COLORARG2:
|
1402 | | - if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1403 | | - if(dwValue > 0x34) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1402 | + if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1403 | + if(dwValue > 0x34) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1404 | 1404 | texstages[dwStage].colorarg2 = dwValue;
|
1405 | 1405 | texstages[dwStage].dirty = true;
|
1406 | 1406 | TRACE_EXIT(23,D3D_OK);
|
1407 | 1407 | return D3D_OK;
|
1408 | 1408 | case D3DTSS_ALPHAOP:
|
1409 | | - if(!dwValue || (dwValue > 24)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1409 | + if(!dwValue || (dwValue > 24)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1410 | 1410 | if(dwStage == 0)renderstate[D3DRENDERSTATE_TEXTUREMAPBLEND] = 0;
|
1411 | 1411 | texstages[dwStage].alphaop = (D3DTEXTUREOP )dwValue;
|
1412 | 1412 | texstages[dwStage].dirty = true;
|
— | — | @@ -1412,15 +1412,15 @@ |
1413 | 1413 | TRACE_EXIT(23,D3D_OK);
|
1414 | 1414 | return D3D_OK;
|
1415 | 1415 | case D3DTSS_ALPHAARG1:
|
1416 | | - if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1417 | | - if(dwValue > 0x34) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1416 | + if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1417 | + if(dwValue > 0x34) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1418 | 1418 | texstages[dwStage].alphaarg1 = dwValue;
|
1419 | 1419 | texstages[dwStage].dirty = true;
|
1420 | | - TRACE_RET(23,D3D_OK);
|
| 1420 | + TRACE_RET(HRESULT,23,D3D_OK);
|
1421 | 1421 | return D3D_OK;
|
1422 | 1422 | case D3DTSS_ALPHAARG2:
|
1423 | | - if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1424 | | - if(dwValue > 0x34) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1423 | + if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1424 | + if(dwValue > 0x34) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1425 | 1425 | texstages[dwStage].alphaarg2 = dwValue;
|
1426 | 1426 | texstages[dwStage].dirty = true;
|
1427 | 1427 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -1446,14 +1446,14 @@ |
1447 | 1447 | TRACE_EXIT(23,D3D_OK);
|
1448 | 1448 | return D3D_OK;
|
1449 | 1449 | case D3DTSS_TEXCOORDINDEX:
|
1450 | | - if((dwValue & 0xFFFF) > 7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1451 | | - if((dwValue >> 16) > 3) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1450 | + if((dwValue & 0xFFFF) > 7) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1451 | + if((dwValue >> 16) > 3) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1452 | 1452 | texstages[dwStage].texcoordindex = dwValue;
|
1453 | 1453 | texstages[dwStage].dirty = true;
|
1454 | 1454 | TRACE_EXIT(23,D3D_OK);
|
1455 | 1455 | return D3D_OK;
|
1456 | 1456 | case D3DTSS_ADDRESS:
|
1457 | | - if(!dwValue || (dwValue > 4)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1457 | + if(!dwValue || (dwValue > 4)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1458 | 1458 | texstages[dwStage].addressu = (D3DTEXTUREADDRESS)dwValue;
|
1459 | 1459 | texstages[dwStage].addressv = (D3DTEXTUREADDRESS)dwValue;
|
1460 | 1460 | texstages[dwStage].dirty = true;
|
— | — | @@ -1460,13 +1460,13 @@ |
1461 | 1461 | TRACE_EXIT(23,D3D_OK);
|
1462 | 1462 | return D3D_OK;
|
1463 | 1463 | case D3DTSS_ADDRESSU:
|
1464 | | - if(!dwValue || (dwValue > 4)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1464 | + if(!dwValue || (dwValue > 4)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1465 | 1465 | texstages[dwStage].addressu = (D3DTEXTUREADDRESS)dwValue;
|
1466 | 1466 | texstages[dwStage].dirty = true;
|
1467 | 1467 | TRACE_EXIT(23,D3D_OK);
|
1468 | 1468 | return D3D_OK;
|
1469 | 1469 | case D3DTSS_ADDRESSV:
|
1470 | | - if(!dwValue || (dwValue > 4)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1470 | + if(!dwValue || (dwValue > 4)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1471 | 1471 | texstages[dwStage].addressv = (D3DTEXTUREADDRESS)dwValue;
|
1472 | 1472 | texstages[dwStage].dirty = true;
|
1473 | 1473 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -1477,7 +1477,7 @@ |
1478 | 1478 | TRACE_EXIT(23,D3D_OK);
|
1479 | 1479 | return D3D_OK;
|
1480 | 1480 | case D3DTSS_MAGFILTER:
|
1481 | | - if(!dwValue || (dwValue > 5)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1481 | + if(!dwValue || (dwValue > 5)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1482 | 1482 | texstages[dwStage].magfilter = (D3DTEXTUREMAGFILTER)dwValue;
|
1483 | 1483 | texstages[dwStage].dirty = true;
|
1484 | 1484 | switch(texstages[dwStage].magfilter)
|
— | — | @@ -1496,7 +1496,7 @@ |
1497 | 1497 | TRACE_EXIT(23,D3D_OK);
|
1498 | 1498 | return D3D_OK;
|
1499 | 1499 | case D3DTSS_MINFILTER:
|
1500 | | - if(!dwValue || (dwValue > 3)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1500 | + if(!dwValue || (dwValue > 3)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1501 | 1501 | texstages[dwStage].minfilter = (D3DTEXTUREMINFILTER)dwValue;
|
1502 | 1502 | texstages[dwStage].dirty = true;
|
1503 | 1503 | switch(texstages[dwStage].minfilter)
|
— | — | @@ -1537,7 +1537,7 @@ |
1538 | 1538 | TRACE_EXIT(23,D3D_OK);
|
1539 | 1539 | return D3D_OK;
|
1540 | 1540 | case D3DTSS_MIPFILTER:
|
1541 | | - if(!dwValue || (dwValue > 3)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1541 | + if(!dwValue || (dwValue > 3)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1542 | 1542 | texstages[dwStage].mipfilter = (D3DTEXTUREMIPFILTER)dwValue;
|
1543 | 1543 | texstages[dwStage].dirty = true;
|
1544 | 1544 | switch(texstages[dwStage].mipfilter)
|
— | — | @@ -1605,8 +1605,8 @@ |
1606 | 1606 | TRACE_EXIT(23,D3D_OK);
|
1607 | 1607 | return D3D_OK;
|
1608 | 1608 | case D3DTSS_TEXTURETRANSFORMFLAGS:
|
1609 | | - if((dwValue & 0xFF) > 4) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1610 | | - if((dwValue >> 8) > 1) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1609 | + if((dwValue & 0xFF) > 4) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1610 | + if((dwValue >> 8) > 1) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1611 | 1611 | texstages[dwStage].textransform = (D3DTEXTURETRANSFORMFLAGS)dwValue;
|
1612 | 1612 | texstages[dwStage].dirty = true;
|
1613 | 1613 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -1615,13 +1615,13 @@ |
1616 | 1616 | TRACE_EXIT(23,DDERR_INVALIDPARAMS);
|
1617 | 1617 | return DDERR_INVALIDPARAMS;
|
1618 | 1618 | }
|
1619 | | - TRACE_RET(23,DDERR_GENERIC);
|
| 1619 | + TRACE_RET(HRESULT,23,DDERR_GENERIC);
|
1620 | 1620 | ERR(DDERR_GENERIC);
|
1621 | 1621 | }
|
1622 | 1622 | HRESULT WINAPI glDirect3DDevice7::SetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
1623 | 1623 | {
|
1624 | 1624 | TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
1625 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1625 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1626 | 1626 | switch(dtstTransformStateType)
|
1627 | 1627 | {
|
1628 | 1628 | case D3DTRANSFORMSTATE_WORLD:
|
— | — | @@ -1643,7 +1643,7 @@ |
1644 | 1644 | TRACE_EXIT(23,D3D_OK);
|
1645 | 1645 | return D3D_OK;
|
1646 | 1646 | default:
|
1647 | | - TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1647 | + TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1648 | 1648 | }
|
1649 | 1649 | TRACE_EXIT(23,DDERR_GENERIC);
|
1650 | 1650 | return DDERR_GENERIC;
|
— | — | @@ -1651,7 +1651,7 @@ |
1652 | 1652 | HRESULT WINAPI glDirect3DDevice7::SetViewport(LPD3DVIEWPORT7 lpViewport)
|
1653 | 1653 | {
|
1654 | 1654 | TRACE_ENTER(2,14,this,14,lpViewport);
|
1655 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1655 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1656 | 1656 | memcpy(&viewport,lpViewport,sizeof(D3DVIEWPORT7));
|
1657 | 1657 | transform_dirty = true;
|
1658 | 1658 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -1660,7 +1660,7 @@ |
1661 | 1661 | HRESULT WINAPI glDirect3DDevice7::ValidateDevice(LPDWORD lpdwPasses)
|
1662 | 1662 | {
|
1663 | 1663 | TRACE_ENTER(2,14,this,14,lpdwPasses);
|
1664 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1664 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1665 | 1665 | for(int i = 0; i < 8; i++)
|
1666 | 1666 | {
|
1667 | 1667 | switch(texstages[i].colorop)
|
— | — | @@ -1682,7 +1682,7 @@ |
1683 | 1683 | case D3DTOP_BLENDCURRENTALPHA:
|
1684 | 1684 | break;
|
1685 | 1685 | default:
|
1686 | | - TRACE_RET(23,D3DERR_UNSUPPORTEDCOLOROPERATION);
|
| 1686 | + TRACE_RET(HRESULT,23,D3DERR_UNSUPPORTEDCOLOROPERATION);
|
1687 | 1687 | }
|
1688 | 1688 | }
|
1689 | 1689 | for(int i = 0; i < 8; i++)
|
— | — | @@ -1706,7 +1706,7 @@ |
1707 | 1707 | case D3DTOP_BLENDCURRENTALPHA:
|
1708 | 1708 | break;
|
1709 | 1709 | default:
|
1710 | | - TRACE_RET(23,D3DERR_UNSUPPORTEDALPHAOPERATION);
|
| 1710 | + TRACE_RET(HRESULT,23,D3DERR_UNSUPPORTEDALPHAOPERATION);
|
1711 | 1711 | }
|
1712 | 1712 | }
|
1713 | 1713 | if(lpdwPasses) *lpdwPasses = 1;
|
— | — | @@ -1804,11 +1804,11 @@ |
1805 | 1805 | HRESULT glDirect3DDevice7::AddViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport)
|
1806 | 1806 | {
|
1807 | 1807 | TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
1808 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1809 | | - if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1808 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1809 | + if(!lpDirect3DViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1810 | 1810 | for(int i = 0; i < maxviewports; i++)
|
1811 | 1811 | {
|
1812 | | - if(viewports[i] == lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1812 | + if(viewports[i] == lpDirect3DViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1813 | 1813 | }
|
1814 | 1814 | viewports[viewportcount] = (glDirect3DViewport3*)lpDirect3DViewport;
|
1815 | 1815 | viewports[viewportcount]->AddRef();
|
— | — | @@ -1824,7 +1824,7 @@ |
1825 | 1825 | viewports[viewportcount]->Release();
|
1826 | 1826 | viewports[viewportcount] = NULL;
|
1827 | 1827 | maxviewports -= 32;
|
1828 | | - TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 1828 | + TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
1829 | 1829 | }
|
1830 | 1830 | }
|
1831 | 1831 | viewports[viewportcount-1]->SetDevice(this);
|
— | — | @@ -1835,8 +1835,8 @@ |
1836 | 1836 | HRESULT glDirect3DDevice7::DeleteViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport)
|
1837 | 1837 | {
|
1838 | 1838 | TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
1839 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1840 | | - if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1839 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1840 | + if(!lpDirect3DViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1841 | 1841 | for(int i = 0; i < maxviewports; i++)
|
1842 | 1842 | {
|
1843 | 1843 | if(viewports[i] == lpDirect3DViewport)
|
— | — | @@ -1857,9 +1857,9 @@ |
1858 | 1858 | HRESULT glDirect3DDevice7::NextViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport, LPDIRECT3DVIEWPORT3 *lplpAnotherViewport, DWORD dwFlags)
|
1859 | 1859 | {
|
1860 | 1860 | TRACE_ENTER(4,14,this,14,lpDirect3DViewport,14,lplpAnotherViewport,9,dwFlags);
|
1861 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1862 | | - if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1863 | | - if(!lplpAnotherViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1861 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1862 | + if(!lpDirect3DViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1863 | + if(!lplpAnotherViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1864 | 1864 | FIXME("glDirect3DDevice7::NextViewport: stub");
|
1865 | 1865 | TRACE_EXIT(23,DDERR_GENERIC);
|
1866 | 1866 | return DDERR_GENERIC;
|
— | — | @@ -1868,9 +1868,9 @@ |
1869 | 1869 | HRESULT glDirect3DDevice7::GetCurrentViewport(LPDIRECT3DVIEWPORT3 *lplpd3dViewport)
|
1870 | 1870 | {
|
1871 | 1871 | TRACE_ENTER(2,14,this,14,lplpd3dViewport);
|
1872 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1873 | | - if(!lplpd3dViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1874 | | - if(!currentviewport) TRACE_RET(23,D3DERR_NOCURRENTVIEWPORT);
|
| 1872 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1873 | + if(!lplpd3dViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1874 | + if(!currentviewport) TRACE_RET(HRESULT,23,D3DERR_NOCURRENTVIEWPORT);
|
1875 | 1875 | *lplpd3dViewport = currentviewport;
|
1876 | 1876 | currentviewport->AddRef();
|
1877 | 1877 | TRACE_VAR("*lplpd3dViewport",14,*lplpd3dViewport);
|
— | — | @@ -1881,9 +1881,9 @@ |
1882 | 1882 | HRESULT glDirect3DDevice7::SetCurrentViewport(LPDIRECT3DVIEWPORT3 lpd3dViewport)
|
1883 | 1883 | {
|
1884 | 1884 | TRACE_ENTER(2,14,this,14,lpd3dViewport);
|
1885 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1886 | | - if(!lpd3dViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1887 | | - if(currentviewport == lpd3dViewport) TRACE_RET(23,D3D_OK);
|
| 1885 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1886 | + if(!lpd3dViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1887 | + if(currentviewport == lpd3dViewport) TRACE_RET(HRESULT,23,D3D_OK);
|
1888 | 1888 | for(int i = 0; i < maxviewports; i++)
|
1889 | 1889 | {
|
1890 | 1890 | if(lpd3dViewport == viewports[i])
|
— | — | @@ -1901,7 +1901,7 @@ |
1902 | 1902 | HRESULT glDirect3DDevice7::Begin(D3DPRIMITIVETYPE d3dpt, DWORD dwVertexTypeDesc, DWORD dwFlags)
|
1903 | 1903 | {
|
1904 | 1904 | TRACE_ENTER(4,14,this,8,d3dpt,9,dwVertexTypeDesc,9,dwFlags);
|
1905 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1905 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1906 | 1906 | FIXME("glDirect3DDevice7::Begin: stub");
|
1907 | 1907 | TRACE_EXIT(23,DDERR_GENERIC);
|
1908 | 1908 | return DDERR_GENERIC;
|
— | — | @@ -1909,8 +1909,8 @@ |
1910 | 1910 | HRESULT glDirect3DDevice7::BeginIndexed(D3DPRIMITIVETYPE dptPrimitiveType, DWORD dwVertexTypeDesc, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags)
|
1911 | 1911 | {
|
1912 | 1912 | TRACE_ENTER(6,14,this,8,dptPrimitiveType,9,dwVertexTypeDesc,14,lpvVertices,8,dwNumVertices,9,dwFlags);
|
1913 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1914 | | - if(!lpvVertices) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1913 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1914 | + if(!lpvVertices) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1915 | 1915 | FIXME("glDirect3DDevice7::BeginIndexed: stub");
|
1916 | 1916 | TRACE_EXIT(23,DDERR_GENERIC);
|
1917 | 1917 | return DDERR_GENERIC;
|
— | — | @@ -1918,7 +1918,7 @@ |
1919 | 1919 | HRESULT glDirect3DDevice7::Index(WORD wVertexIndex)
|
1920 | 1920 | {
|
1921 | 1921 | TRACE_ENTER(2,14,this,5,wVertexIndex);
|
1922 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1922 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1923 | 1923 | FIXME("glDirect3DDevice7::Index: stub");
|
1924 | 1924 | TRACE_EXIT(23,DDERR_GENERIC);
|
1925 | 1925 | return DDERR_GENERIC;
|
— | — | @@ -1926,8 +1926,8 @@ |
1927 | 1927 | HRESULT glDirect3DDevice7::Vertex(LPVOID lpVertex)
|
1928 | 1928 | {
|
1929 | 1929 | TRACE_ENTER(2,14,this,14,lpVertex);
|
1930 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1931 | | - if(!lpVertex) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1930 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1931 | + if(!lpVertex) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1932 | 1932 | FIXME("glDirect3DDevice7::Vertex: stub");
|
1933 | 1933 | TRACE_EXIT(23,DDERR_GENERIC);
|
1934 | 1934 | return DDERR_GENERIC;
|
— | — | @@ -1935,7 +1935,7 @@ |
1936 | 1936 | HRESULT glDirect3DDevice7::End(DWORD dwFlags)
|
1937 | 1937 | {
|
1938 | 1938 | TRACE_ENTER(2,14,this,9,dwFlags);
|
1939 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1939 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1940 | 1940 | FIXME("glDirect3DDevice7::End: stub");
|
1941 | 1941 | TRACE_EXIT(23,DDERR_GENERIC);
|
1942 | 1942 | return DDERR_GENERIC;
|
— | — | @@ -1944,7 +1944,7 @@ |
1945 | 1945 | HRESULT glDirect3DDevice7::ComputeSphereVisibility3(LPD3DVECTOR lpCenters, LPD3DVALUE lpRadii, DWORD dwNumSpheres, DWORD dwFlags, LPDWORD lpdwReturnValues)
|
1946 | 1946 | {
|
1947 | 1947 | TRACE_ENTER(6,14,this,14,lpCenters,14,lpRadii,8,dwNumSpheres,9,dwFlags,14,lpdwReturnValues);
|
1948 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1948 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1949 | 1949 | FIXME("glDirect3DDevice3::ComputeSphereVisibility: stub");
|
1950 | 1950 | TRACE_EXIT(23,DDERR_GENERIC);
|
1951 | 1951 | return DDERR_GENERIC;
|
— | — | @@ -1953,13 +1953,13 @@ |
1954 | 1954 | HRESULT glDirect3DDevice7::GetCaps3(LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc)
|
1955 | 1955 | {
|
1956 | 1956 | TRACE_ENTER(3,14,this,14,lpD3DHWDevDesc,14,lpD3DHELDevDesc);
|
1957 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1958 | | - if(!lpD3DHWDevDesc && !lpD3DHELDevDesc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1957 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1958 | + if(!lpD3DHWDevDesc && !lpD3DHELDevDesc) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1959 | 1959 | D3DDEVICEDESC desc = d3ddesc3;
|
1960 | 1960 | if(lpD3DHELDevDesc)
|
1961 | 1961 | {
|
1962 | 1962 | desc.dwSize = lpD3DHELDevDesc->dwSize;
|
1963 | | - if(desc.dwSize < sizeof(D3DDEVICEDESC1)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1963 | + if(desc.dwSize < sizeof(D3DDEVICEDESC1)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1964 | 1964 | if(desc.dwSize > sizeof(D3DDEVICEDESC1)) desc.dwSize = sizeof(D3DDEVICEDESC);
|
1965 | 1965 | memcpy(lpD3DHELDevDesc, &desc, desc.dwSize);
|
1966 | 1966 | }
|
— | — | @@ -1967,7 +1967,7 @@ |
1968 | 1968 | if(lpD3DHWDevDesc)
|
1969 | 1969 | {
|
1970 | 1970 | desc.dwSize = lpD3DHWDevDesc->dwSize;
|
1971 | | - if(desc.dwSize < sizeof(D3DDEVICEDESC1)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1971 | + if(desc.dwSize < sizeof(D3DDEVICEDESC1)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1972 | 1972 | if(desc.dwSize > sizeof(D3DDEVICEDESC1)) desc.dwSize = sizeof(D3DDEVICEDESC);
|
1973 | 1973 | memcpy(lpD3DHWDevDesc, &desc, desc.dwSize);
|
1974 | 1974 | }
|
— | — | @@ -1978,8 +1978,8 @@ |
1979 | 1979 | HRESULT glDirect3DDevice7::GetLightState(D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState)
|
1980 | 1980 | {
|
1981 | 1981 | TRACE_ENTER(3,14,this,30,dwLightStateType,14,lpdwLightState);
|
1982 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1983 | | - if(!lpdwLightState)TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1982 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1983 | + if(!lpdwLightState)TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1984 | 1984 | switch(dwLightStateType)
|
1985 | 1985 | {
|
1986 | 1986 | default:
|
— | — | @@ -1991,27 +1991,27 @@ |
1992 | 1992 | TRACE_EXIT(23,D3D_OK);
|
1993 | 1993 | return D3D_OK;
|
1994 | 1994 | case D3DLIGHTSTATE_AMBIENT:
|
1995 | | - TRACE_RET(23,GetRenderState(D3DRENDERSTATE_AMBIENT,lpdwLightState));
|
| 1995 | + TRACE_RET(HRESULT,23,GetRenderState(D3DRENDERSTATE_AMBIENT,lpdwLightState));
|
1996 | 1996 | case D3DLIGHTSTATE_COLORMODEL:
|
1997 | 1997 | *lpdwLightState = D3DCOLOR_RGB;
|
1998 | 1998 | TRACE_EXIT(23,D3D_OK);
|
1999 | 1999 | return D3D_OK;
|
2000 | 2000 | case D3DLIGHTSTATE_FOGMODE:
|
2001 | | - TRACE_RET(23,GetRenderState(D3DRENDERSTATE_FOGVERTEXMODE,lpdwLightState));
|
| 2001 | + TRACE_RET(HRESULT,23,GetRenderState(D3DRENDERSTATE_FOGVERTEXMODE,lpdwLightState));
|
2002 | 2002 | case D3DLIGHTSTATE_FOGSTART:
|
2003 | | - TRACE_RET(23,GetRenderState(D3DRENDERSTATE_FOGSTART,lpdwLightState));
|
| 2003 | + TRACE_RET(HRESULT,23,GetRenderState(D3DRENDERSTATE_FOGSTART,lpdwLightState));
|
2004 | 2004 | case D3DLIGHTSTATE_FOGEND:
|
2005 | | - TRACE_RET(23,GetRenderState(D3DRENDERSTATE_FOGEND,lpdwLightState));
|
| 2005 | + TRACE_RET(HRESULT,23,GetRenderState(D3DRENDERSTATE_FOGEND,lpdwLightState));
|
2006 | 2006 | case D3DLIGHTSTATE_FOGDENSITY:
|
2007 | | - TRACE_RET(23,GetRenderState(D3DRENDERSTATE_FOGDENSITY,lpdwLightState));
|
| 2007 | + TRACE_RET(HRESULT,23,GetRenderState(D3DRENDERSTATE_FOGDENSITY,lpdwLightState));
|
2008 | 2008 | case D3DLIGHTSTATE_COLORVERTEX:
|
2009 | | - TRACE_RET(23,GetRenderState(D3DRENDERSTATE_COLORVERTEX,lpdwLightState));
|
| 2009 | + TRACE_RET(HRESULT,23,GetRenderState(D3DRENDERSTATE_COLORVERTEX,lpdwLightState));
|
2010 | 2010 | }
|
2011 | 2011 | }
|
2012 | 2012 | HRESULT glDirect3DDevice7::SetLightState(D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState)
|
2013 | 2013 | {
|
2014 | 2014 | TRACE_ENTER(3,14,this,30,dwLightStateType,9,dwLightState);
|
2015 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2015 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2016 | 2016 | switch(dwLightStateType)
|
2017 | 2017 | {
|
2018 | 2018 | default:
|
— | — | @@ -2018,10 +2018,10 @@ |
2019 | 2019 | TRACE_EXIT(23,DDERR_INVALIDPARAMS);
|
2020 | 2020 | return DDERR_INVALIDPARAMS;
|
2021 | 2021 | case D3DLIGHTSTATE_MATERIAL:
|
2022 | | - if(!dwLightState) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2022 | + if(!dwLightState) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
2023 | 2023 | if(dwLightState < materialcount)
|
2024 | 2024 | {
|
2025 | | - if(materials[dwLightState] == currentmaterial) TRACE_RET(23,D3D_OK);
|
| 2025 | + if(materials[dwLightState] == currentmaterial) TRACE_RET(HRESULT,23,D3D_OK);
|
2026 | 2026 | if(materials[dwLightState])
|
2027 | 2027 | {
|
2028 | 2028 | if(currentmaterial)currentmaterial->SetCurrent(false);
|
— | — | @@ -2032,20 +2032,20 @@ |
2033 | 2033 | TRACE_EXIT(23,D3D_OK);
|
2034 | 2034 | return D3D_OK;
|
2035 | 2035 | case D3DLIGHTSTATE_AMBIENT:
|
2036 | | - TRACE_RET(23,SetRenderState(D3DRENDERSTATE_AMBIENT,dwLightState));
|
| 2036 | + TRACE_RET(HRESULT,23,SetRenderState(D3DRENDERSTATE_AMBIENT,dwLightState));
|
2037 | 2037 | case D3DLIGHTSTATE_COLORMODEL:
|
2038 | 2038 | TRACE_EXIT(23,D3D_OK);
|
2039 | 2039 | return D3D_OK;
|
2040 | 2040 | case D3DLIGHTSTATE_FOGMODE:
|
2041 | | - TRACE_RET(23,SetRenderState(D3DRENDERSTATE_FOGVERTEXMODE,dwLightState));
|
| 2041 | + TRACE_RET(HRESULT,23,SetRenderState(D3DRENDERSTATE_FOGVERTEXMODE,dwLightState));
|
2042 | 2042 | case D3DLIGHTSTATE_FOGSTART:
|
2043 | | - TRACE_RET(23,SetRenderState(D3DRENDERSTATE_FOGSTART,dwLightState));
|
| 2043 | + TRACE_RET(HRESULT,23,SetRenderState(D3DRENDERSTATE_FOGSTART,dwLightState));
|
2044 | 2044 | case D3DLIGHTSTATE_FOGEND:
|
2045 | | - TRACE_RET(23,SetRenderState(D3DRENDERSTATE_FOGEND,dwLightState));
|
| 2045 | + TRACE_RET(HRESULT,23,SetRenderState(D3DRENDERSTATE_FOGEND,dwLightState));
|
2046 | 2046 | case D3DLIGHTSTATE_FOGDENSITY:
|
2047 | | - TRACE_RET(23,SetRenderState(D3DRENDERSTATE_FOGDENSITY,dwLightState));
|
| 2047 | + TRACE_RET(HRESULT,23,SetRenderState(D3DRENDERSTATE_FOGDENSITY,dwLightState));
|
2048 | 2048 | case D3DLIGHTSTATE_COLORVERTEX:
|
2049 | | - TRACE_RET(23,SetRenderState(D3DRENDERSTATE_COLORVERTEX,dwLightState));
|
| 2049 | + TRACE_RET(HRESULT,23,SetRenderState(D3DRENDERSTATE_COLORVERTEX,dwLightState));
|
2050 | 2050 | }
|
2051 | 2051 | }
|
2052 | 2052 |
|
— | — | @@ -2052,9 +2052,9 @@ |
2053 | 2053 | HRESULT glDirect3DDevice7::GetStats(LPD3DSTATS lpD3DStats)
|
2054 | 2054 | {
|
2055 | 2055 | TRACE_ENTER(2,14,this,14,lpD3DStats);
|
2056 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2057 | | - if(!lpD3DStats) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2058 | | - if(lpD3DStats->dwSize < sizeof(D3DSTATS)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2056 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2057 | + if(!lpD3DStats) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2058 | + if(lpD3DStats->dwSize < sizeof(D3DSTATS)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
2059 | 2059 | memcpy(lpD3DStats,&stats,sizeof(D3DSTATS));
|
2060 | 2060 | TRACE_EXIT(23,D3D_OK);
|
2061 | 2061 | return D3D_OK;
|
— | — | @@ -2063,9 +2063,9 @@ |
2064 | 2064 | HRESULT glDirect3DDevice7::SwapTextureHandles(LPDIRECT3DTEXTURE2 lpD3DTex1, LPDIRECT3DTEXTURE2 lpD3DTex2)
|
2065 | 2065 | {
|
2066 | 2066 | TRACE_ENTER(3,14,this,14,lpD3DTex1,14,lpD3DTex2);
|
2067 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2068 | | - if(!lpD3DTex1) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2069 | | - if(!lpD3DTex2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2067 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2068 | + if(!lpD3DTex1) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2069 | + if(!lpD3DTex2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
2070 | 2070 | FIXME("glDirect3DDevice7::SwapTextureHandles: stub");
|
2071 | 2071 | TRACE_EXIT(23,DDERR_GENERIC);
|
2072 | 2072 | return DDERR_GENERIC;
|
— | — | @@ -2088,13 +2088,13 @@ |
2089 | 2089 | HRESULT glDirect3DDevice7::CreateMatrix(LPD3DMATRIXHANDLE lpD3DMatHandle)
|
2090 | 2090 | {
|
2091 | 2091 | TRACE_ENTER(2,14,this,14,lpD3DMatHandle);
|
2092 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2093 | | - if(!lpD3DMatHandle) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2092 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2093 | + if(!lpD3DMatHandle) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
2094 | 2094 | int foundslot = 0;
|
2095 | 2095 | if(!matrices)
|
2096 | 2096 | {
|
2097 | 2097 | matrices = (D3D1MATRIX*)malloc(16*sizeof(D3D1MATRIX));
|
2098 | | - if(!matrices) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 2098 | + if(!matrices) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
2099 | 2099 | ZeroMemory(matrices,16*sizeof(D3D1MATRIX));
|
2100 | 2100 | matrixcount = 16;
|
2101 | 2101 | }
|
— | — | @@ -2113,7 +2113,7 @@ |
2114 | 2114 | D3D1MATRIX *newmatrices;
|
2115 | 2115 | newcount = matrixcount + 16;
|
2116 | 2116 | newmatrices = (D3D1MATRIX*)realloc(matrices,newcount*sizeof(D3D1MATRIX));
|
2117 | | - if(!newmatrices) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 2117 | + if(!newmatrices) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
2118 | 2118 | ZeroMemory(&newmatrices[matrixcount],16*sizeof(D3D1MATRIX));
|
2119 | 2119 | matrices = newmatrices;
|
2120 | 2120 | foundslot = matrixcount;
|
— | — | @@ -2130,10 +2130,10 @@ |
2131 | 2131 | HRESULT glDirect3DDevice7::DeleteMatrix(D3DMATRIXHANDLE d3dMatHandle)
|
2132 | 2132 | {
|
2133 | 2133 | TRACE_ENTER(2,14,this,9,d3dMatHandle);
|
2134 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2135 | | - if(!d3dMatHandle) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2136 | | - if(d3dMatHandle >= matrixcount) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2137 | | - if(!matrices[d3dMatHandle].active) TRACE_RET(23,D3DERR_MATRIX_DESTROY_FAILED);
|
| 2134 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2135 | + if(!d3dMatHandle) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2136 | + if(d3dMatHandle >= matrixcount) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2137 | + if(!matrices[d3dMatHandle].active) TRACE_RET(HRESULT,23,D3DERR_MATRIX_DESTROY_FAILED);
|
2138 | 2138 | matrices[d3dMatHandle].active = FALSE;
|
2139 | 2139 | TRACE_EXIT(23,D3D_OK);
|
2140 | 2140 | return D3D_OK;
|
— | — | @@ -2142,7 +2142,7 @@ |
2143 | 2143 | HRESULT glDirect3DDevice7::GetMatrix(D3DMATRIXHANDLE lpD3DMatHandle, LPD3DMATRIX lpD3DMatrix)
|
2144 | 2144 | {
|
2145 | 2145 | TRACE_ENTER(3,14,this,9,lpD3DMatHandle,14,lpD3DMatrix);
|
2146 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2146 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2147 | 2147 | if(!lpD3DMatHandle)
|
2148 | 2148 | {
|
2149 | 2149 | __gluMakeIdentityf((GLfloat*)lpD3DMatrix);
|
— | — | @@ -2149,8 +2149,8 @@ |
2150 | 2150 | TRACE_EXIT(23,D3D_OK);
|
2151 | 2151 | return D3D_OK;
|
2152 | 2152 | }
|
2153 | | - if(lpD3DMatHandle >= matrixcount) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2154 | | - if(!matrices[lpD3DMatHandle].active) TRACE_RET(23,D3DERR_MATRIX_GETDATA_FAILED);
|
| 2153 | + if(lpD3DMatHandle >= matrixcount) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2154 | + if(!matrices[lpD3DMatHandle].active) TRACE_RET(HRESULT,23,D3DERR_MATRIX_GETDATA_FAILED);
|
2155 | 2155 | memcpy(lpD3DMatrix,&matrices[lpD3DMatHandle].matrix,sizeof(D3DMATRIX));
|
2156 | 2156 | TRACE_EXIT(23,D3D_OK);
|
2157 | 2157 | return D3D_OK;
|
— | — | @@ -2159,10 +2159,10 @@ |
2160 | 2160 | HRESULT glDirect3DDevice7::SetMatrix(D3DMATRIXHANDLE d3dMatHandle, LPD3DMATRIX lpD3DMatrix)
|
2161 | 2161 | {
|
2162 | 2162 | TRACE_ENTER(3,14,this,9,d3dMatHandle,14,lpD3DMatrix);
|
2163 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2164 | | - if(!d3dMatHandle) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2165 | | - if(d3dMatHandle >= matrixcount) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2166 | | - if(!matrices[d3dMatHandle].active) TRACE_RET(23,D3DERR_MATRIX_SETDATA_FAILED);
|
| 2163 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2164 | + if(!d3dMatHandle) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2165 | + if(d3dMatHandle >= matrixcount) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2166 | + if(!matrices[d3dMatHandle].active) TRACE_RET(HRESULT,23,D3DERR_MATRIX_SETDATA_FAILED);
|
2167 | 2167 | memcpy(&matrices[d3dMatHandle].matrix,lpD3DMatrix,sizeof(D3DMATRIX));
|
2168 | 2168 | if(d3dMatHandle == mhWorld) SetTransform(D3DTRANSFORMSTATE_WORLD,lpD3DMatrix);
|
2169 | 2169 | if(d3dMatHandle == mhView) SetTransform(D3DTRANSFORMSTATE_VIEW,lpD3DMatrix);
|
— | — | @@ -2175,14 +2175,14 @@ |
2176 | 2176 | IUnknown* pUnkOuter)
|
2177 | 2177 | {
|
2178 | 2178 | TRACE_ENTER(4,14,this,14,lpDesc,14,lplpDirect3DExecuteBuffer,14,pUnkOuter);
|
2179 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2180 | | - if(!lpDesc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2181 | | - if(!lplpDirect3DExecuteBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2182 | | - if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2183 | | - if(lpDesc->dwSize != sizeof(D3DEXECUTEBUFFERDESC)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2184 | | - if(!(lpDesc->dwFlags & D3DDEB_BUFSIZE)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2179 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2180 | + if(!lpDesc) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2181 | + if(!lplpDirect3DExecuteBuffer) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2182 | + if(pUnkOuter) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2183 | + if(lpDesc->dwSize != sizeof(D3DEXECUTEBUFFERDESC)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2184 | + if(!(lpDesc->dwFlags & D3DDEB_BUFSIZE)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
2185 | 2185 | *lplpDirect3DExecuteBuffer = new glDirect3DExecuteBuffer(lpDesc);
|
2186 | | - if(!*lplpDirect3DExecuteBuffer) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 2186 | + if(!*lplpDirect3DExecuteBuffer) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
2187 | 2187 | TRACE_VAR("*lplpDirect3DExecuteBuffer",14,*lplpDirect3DExecuteBuffer);
|
2188 | 2188 | TRACE_EXIT(23,D3D_OK);
|
2189 | 2189 | return D3D_OK;
|
— | — | @@ -2339,7 +2339,7 @@ |
2340 | 2340 | if(*outsize < (dest+count)*sizeof(D3DTLVERTEX))
|
2341 | 2341 | {
|
2342 | 2342 | D3DTLVERTEX *tmpptr = (D3DTLVERTEX*)realloc(*output,(dest+count)*sizeof(D3DTLVERTEX));
|
2343 | | - if(!tmpptr) TRACE_RET(11,-1);
|
| 2343 | + if(!tmpptr) TRACE_RET(INT,11,-1);
|
2344 | 2344 | *output = tmpptr;
|
2345 | 2345 | *outsize = (dest+count)*sizeof(D3DTLVERTEX);
|
2346 | 2346 | }
|
— | — | @@ -2450,7 +2450,7 @@ |
2451 | 2451 | if(*outsize < (dest+count)*sizeof(D3DTLVERTEX))
|
2452 | 2452 | {
|
2453 | 2453 | D3DTLVERTEX *tmpptr = (D3DTLVERTEX*)realloc(*output,(dest+count)*sizeof(D3DTLVERTEX));
|
2454 | | - if(!tmpptr) TRACE_RET(11,-1);
|
| 2454 | + if(!tmpptr) TRACE_RET(INT,11,-1);
|
2455 | 2455 | *output = tmpptr;
|
2456 | 2456 | *outsize = (dest+count)*sizeof(D3DTLVERTEX);
|
2457 | 2457 | }
|
— | — | @@ -2480,7 +2480,7 @@ |
2481 | 2481 | if(*outsize < (dest+count)*sizeof(D3DTLVERTEX))
|
2482 | 2482 | {
|
2483 | 2483 | D3DTLVERTEX *tmpptr = (D3DTLVERTEX*)realloc(*output,(dest+count)*sizeof(D3DTLVERTEX));
|
2484 | | - if(!tmpptr) TRACE_RET(11,-1);
|
| 2484 | + if(!tmpptr) TRACE_RET(INT,11,-1);
|
2485 | 2485 | *output = tmpptr;
|
2486 | 2486 | *outsize = (dest+count)*sizeof(D3DTLVERTEX);
|
2487 | 2487 | }
|
— | — | @@ -2508,7 +2508,7 @@ |
2509 | 2509 | if(*outsize < (dest+count)*sizeof(D3DTLVERTEX))
|
2510 | 2510 | {
|
2511 | 2511 | D3DTLVERTEX *tmpptr = (D3DTLVERTEX*)realloc(*output,(dest+count)*sizeof(D3DTLVERTEX));
|
2512 | | - if(!tmpptr) TRACE_RET(11,-1);
|
| 2512 | + if(!tmpptr) TRACE_RET(INT,11,-1);
|
2513 | 2513 | *output = tmpptr;
|
2514 | 2514 | *outsize = (dest+count)*sizeof(D3DTLVERTEX);
|
2515 | 2515 | }
|
— | — | @@ -2521,9 +2521,9 @@ |
2522 | 2522 | HRESULT glDirect3DDevice7::Execute(LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags)
|
2523 | 2523 | {
|
2524 | 2524 | TRACE_ENTER(4,14,this,14,lpDirect3DExecuteBuffer,14,lpDirect3DViewport,9,dwFlags);
|
2525 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2526 | | - if(!lpDirect3DExecuteBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2527 | | - if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2525 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2526 | + if(!lpDirect3DExecuteBuffer) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2527 | + if(!lpDirect3DViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
2528 | 2528 | LPDIRECT3DVIEWPORT3 vp;
|
2529 | 2529 | lpDirect3DViewport->QueryInterface(IID_IDirect3DViewport3,(void**)&vp);
|
2530 | 2530 | if(FAILED(SetCurrentViewport(vp)))
|
— | — | @@ -2536,7 +2536,7 @@ |
2537 | 2537 | D3DEXECUTEBUFFERDESC desc;
|
2538 | 2538 | D3DEXECUTEDATA data;
|
2539 | 2539 | HRESULT err = ((glDirect3DExecuteBuffer*)lpDirect3DExecuteBuffer)->ExecuteLock(&desc,&data);
|
2540 | | - if(FAILED(err)) TRACE_RET(23,err);
|
| 2540 | + if(FAILED(err)) TRACE_RET(HRESULT,23,err);
|
2541 | 2541 | unsigned char *opptr = (unsigned char *)desc.lpData + data.dwInstructionOffset;
|
2542 | 2542 | unsigned char *in_vertptr = (unsigned char *)desc.lpData + data.dwVertexOffset;
|
2543 | 2543 | DWORD offset;
|
— | — | @@ -2547,7 +2547,7 @@ |
2548 | 2548 | if(outbuffersize < desc.dwBufferSize)
|
2549 | 2549 | {
|
2550 | 2550 | unsigned char *tmpbuffer = (unsigned char *)realloc(outbuffer,desc.dwBufferSize);
|
2551 | | - if(!tmpbuffer) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 2551 | + if(!tmpbuffer) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
2552 | 2552 | outbuffer = tmpbuffer;
|
2553 | 2553 | outbuffersize = desc.dwBufferSize;
|
2554 | 2554 | }
|
— | — | @@ -2571,7 +2571,7 @@ |
2572 | 2572 | {
|
2573 | 2573 | if(!ExpandBuffer((void**)&ebBuffer,&ebBufferSize,(((D3DPOINT*)opptr)->wCount*sizeof(D3DVERTEX) > 1024) ?
|
2574 | 2574 | ((D3DPOINT*)opptr)->wCount*sizeof(D3DVERTEX) : 1024))
|
2575 | | - TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 2575 | + TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
2576 | 2576 | }
|
2577 | 2577 | memcpy(&ebBuffer+offset,&vert_ptr[((D3DPOINT*)opptr)->wFirst],((D3DPOINT*)opptr)->wCount*sizeof(D3DVERTEX));
|
2578 | 2578 | offset+=((D3DPOINT*)opptr)->wCount;
|
— | — | @@ -2590,7 +2590,7 @@ |
2591 | 2591 | {
|
2592 | 2592 | if(ebBufferSize < (offset + sizeof(D3DLINE)))
|
2593 | 2593 | {
|
2594 | | - if(!ExpandBuffer((void**)&ebBuffer,&ebBufferSize,1024)) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 2594 | + if(!ExpandBuffer((void**)&ebBuffer,&ebBufferSize,1024)) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
2595 | 2595 | }
|
2596 | 2596 | memcpy(&ebBuffer+offset,opptr,sizeof(D3DLINE));
|
2597 | 2597 | offset += sizeof(D3DLINE);
|
— | — | @@ -2609,7 +2609,7 @@ |
2610 | 2610 | for(i = 0; i < instruction->wCount; i++)
|
2611 | 2611 | {
|
2612 | 2612 | result = AddTriangle(&ebBuffer,&ebBufferSize,&offset,(D3DTRIANGLE*)opptr);
|
2613 | | - if(result == -1) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 2613 | + if(result == -1) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
2614 | 2614 | opptr += instruction->bSize;
|
2615 | 2615 | }
|
2616 | 2616 | if(instruction->wCount) DrawIndexedPrimitive(D3DPT_TRIANGLELIST,D3DFVF_TLVERTEX,vert_ptr,
|
— | — | @@ -2794,8 +2794,8 @@ |
2795 | 2795 | HRESULT glDirect3DDevice7::GetPickRecords(LPDWORD lpCount, LPD3DPICKRECORD lpD3DPickRec)
|
2796 | 2796 | {
|
2797 | 2797 | TRACE_ENTER(3,14,this,14,lpCount,14,lpD3DPickRec);
|
2798 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2799 | | - if(!lpCount) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2798 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2799 | + if(!lpCount) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2800 | 2800 | FIXME("glDirect3DDevice1::GetPickRecords: stub");
|
2801 | 2801 | TRACE_EXIT(23,DDERR_GENERIC);
|
2802 | 2802 | ERR(DDERR_GENERIC);
|
— | — | @@ -2805,10 +2805,10 @@ |
2806 | 2806 | LPD3DRECT lpRect)
|
2807 | 2807 | {
|
2808 | 2808 | TRACE_ENTER(5,14,this,14,lpDirect3DExecuteBuffer,14,lpDirect3DViewport,9,dwFlags,26,lpRect);
|
2809 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2810 | | - if(lpDirect3DExecuteBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2811 | | - if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2812 | | - if(!lpRect) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2809 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2810 | + if(lpDirect3DExecuteBuffer) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2811 | + if(!lpDirect3DViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2812 | + if(!lpRect) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
2813 | 2813 | FIXME("glDirect3DDevice1::Pick: stub");
|
2814 | 2814 | TRACE_EXIT(23,DDERR_GENERIC);
|
2815 | 2815 | ERR(DDERR_GENERIC);
|
— | — | @@ -2834,7 +2834,7 @@ |
2835 | 2835 | HRESULT WINAPI glDirect3DDevice3::QueryInterface(REFIID riid, void** ppvObj)
|
2836 | 2836 | {
|
2837 | 2837 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
2838 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2838 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2839 | 2839 | if(riid == IID_IUnknown)
|
2840 | 2840 | {
|
2841 | 2841 | this->AddRef();
|
— | — | @@ -2843,13 +2843,13 @@ |
2844 | 2844 | TRACE_EXIT(23,DD_OK);
|
2845 | 2845 | return DD_OK;
|
2846 | 2846 | }
|
2847 | | - TRACE_RET(23,glD3DDev7->QueryInterface(riid,ppvObj));
|
| 2847 | + TRACE_RET(HRESULT,23,glD3DDev7->QueryInterface(riid,ppvObj));
|
2848 | 2848 | }
|
2849 | 2849 |
|
2850 | 2850 | ULONG WINAPI glDirect3DDevice3::AddRef()
|
2851 | 2851 | {
|
2852 | 2852 | TRACE_ENTER(1,14,this);
|
2853 | | - if(!this) TRACE_RET(8,0);
|
| 2853 | + if(!this) TRACE_RET(ULONG,8,0);
|
2854 | 2854 | refcount++;
|
2855 | 2855 | TRACE_EXIT(8,refcount);
|
2856 | 2856 | return refcount;
|
— | — | @@ -2858,7 +2858,7 @@ |
2859 | 2859 | ULONG WINAPI glDirect3DDevice3::Release()
|
2860 | 2860 | {
|
2861 | 2861 | TRACE_ENTER(1,14,this);
|
2862 | | - if(!this) TRACE_RET(8,0);
|
| 2862 | + if(!this) TRACE_RET(ULONG,8,0);
|
2863 | 2863 | ULONG ret;
|
2864 | 2864 | refcount--;
|
2865 | 2865 | ret = refcount;
|
— | — | @@ -2870,43 +2870,43 @@ |
2871 | 2871 | HRESULT WINAPI glDirect3DDevice3::AddViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport)
|
2872 | 2872 | {
|
2873 | 2873 | TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
2874 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2875 | | - TRACE_RET(23,glD3DDev7->AddViewport(lpDirect3DViewport));
|
| 2874 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2875 | + TRACE_RET(HRESULT,23,glD3DDev7->AddViewport(lpDirect3DViewport));
|
2876 | 2876 | }
|
2877 | 2877 |
|
2878 | 2878 | HRESULT WINAPI glDirect3DDevice3::Begin(D3DPRIMITIVETYPE d3dpt, DWORD dwVertexTypeDesc, DWORD dwFlags)
|
2879 | 2879 | {
|
2880 | 2880 | TRACE_ENTER(4,14,this,8,d3dpt,9,dwVertexTypeDesc,9,dwFlags);
|
2881 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2882 | | - TRACE_RET(23,glD3DDev7->Begin(d3dpt,dwVertexTypeDesc,dwFlags));
|
| 2881 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2882 | + TRACE_RET(HRESULT,23,glD3DDev7->Begin(d3dpt,dwVertexTypeDesc,dwFlags));
|
2883 | 2883 | }
|
2884 | 2884 |
|
2885 | 2885 | HRESULT WINAPI glDirect3DDevice3::BeginIndexed(D3DPRIMITIVETYPE dptPrimitiveType, DWORD dwVertexTypeDesc, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags)
|
2886 | 2886 | {
|
2887 | 2887 | TRACE_ENTER(6,14,this,8,dptPrimitiveType,9,dwVertexTypeDesc,14,lpvVertices,8,dwNumVertices,9,dwFlags);
|
2888 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2889 | | - TRACE_RET(23,glD3DDev7->BeginIndexed(dptPrimitiveType,dwVertexTypeDesc,lpvVertices,dwNumVertices,dwFlags));
|
| 2888 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2889 | + TRACE_RET(HRESULT,23,glD3DDev7->BeginIndexed(dptPrimitiveType,dwVertexTypeDesc,lpvVertices,dwNumVertices,dwFlags));
|
2890 | 2890 | }
|
2891 | 2891 |
|
2892 | 2892 | HRESULT WINAPI glDirect3DDevice3::BeginScene()
|
2893 | 2893 | {
|
2894 | 2894 | TRACE_ENTER(1,14,this);
|
2895 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2896 | | - TRACE_RET(23,glD3DDev7->BeginScene());
|
| 2895 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2896 | + TRACE_RET(HRESULT,23,glD3DDev7->BeginScene());
|
2897 | 2897 | }
|
2898 | 2898 |
|
2899 | 2899 | HRESULT WINAPI glDirect3DDevice3::ComputeSphereVisibility(LPD3DVECTOR lpCenters, LPD3DVALUE lpRadii, DWORD dwNumSpheres, DWORD dwFlags, LPDWORD lpdwReturnValues)
|
2900 | 2900 | {
|
2901 | 2901 | TRACE_ENTER(6,14,this,14,lpCenters,14,lpRadii,8,dwNumSpheres,9,dwFlags,14,lpdwReturnValues);
|
2902 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2903 | | - TRACE_RET(23,glD3DDev7->ComputeSphereVisibility3(lpCenters,lpRadii,dwNumSpheres,dwFlags,lpdwReturnValues));
|
| 2902 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2903 | + TRACE_RET(HRESULT,23,glD3DDev7->ComputeSphereVisibility3(lpCenters,lpRadii,dwNumSpheres,dwFlags,lpdwReturnValues));
|
2904 | 2904 | }
|
2905 | 2905 |
|
2906 | 2906 | HRESULT WINAPI glDirect3DDevice3::DeleteViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport)
|
2907 | 2907 | {
|
2908 | 2908 | TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
2909 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2910 | | - TRACE_RET(23,glD3DDev7->DeleteViewport(lpDirect3DViewport));
|
| 2909 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2910 | + TRACE_RET(HRESULT,23,glD3DDev7->DeleteViewport(lpDirect3DViewport));
|
2911 | 2911 | }
|
2912 | 2912 |
|
2913 | 2913 | HRESULT WINAPI glDirect3DDevice3::DrawIndexedPrimitive(D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD dwVertexTypeDesc,
|
— | — | @@ -2913,8 +2913,8 @@ |
2914 | 2914 | LPVOID lpvVertices, DWORD dwVertexCount, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
2915 | 2915 | {
|
2916 | 2916 | TRACE_ENTER(8,14,this,8,d3dptPrimitiveType,9,dwVertexTypeDesc,14,lpvVertices,8,dwVertexCount,14,lpwIndices,8,dwIndexCount,9,dwFlags);
|
2917 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2918 | | - TRACE_RET(23,glD3DDev7->DrawIndexedPrimitive(d3dptPrimitiveType,dwVertexTypeDesc,lpvVertices,dwVertexCount,lpwIndices,dwIndexCount,dwFlags));
|
| 2917 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2918 | + TRACE_RET(HRESULT,23,glD3DDev7->DrawIndexedPrimitive(d3dptPrimitiveType,dwVertexTypeDesc,lpvVertices,dwVertexCount,lpwIndices,dwIndexCount,dwFlags));
|
2919 | 2919 | }
|
2920 | 2920 |
|
2921 | 2921 | HRESULT WINAPI glDirect3DDevice3::DrawIndexedPrimitiveStrided(D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD dwVertexTypeDesc,
|
— | — | @@ -2921,8 +2921,8 @@ |
2922 | 2922 | LPD3DDRAWPRIMITIVESTRIDEDDATA lpVertexArray, DWORD dwVertexCount, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
2923 | 2923 | {
|
2924 | 2924 | TRACE_ENTER(8,14,this,8,d3dptPrimitiveType,9,dwVertexTypeDesc,14,lpVertexArray,8,dwVertexCount,14,lpwIndices,8,dwIndexCount,9,dwFlags);
|
2925 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2926 | | - TRACE_RET(23,glD3DDev7->DrawIndexedPrimitiveStrided(d3dptPrimitiveType,dwVertexTypeDesc,lpVertexArray,dwVertexCount,lpwIndices,dwIndexCount,dwFlags));
|
| 2925 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2926 | + TRACE_RET(HRESULT,23,glD3DDev7->DrawIndexedPrimitiveStrided(d3dptPrimitiveType,dwVertexTypeDesc,lpVertexArray,dwVertexCount,lpwIndices,dwIndexCount,dwFlags));
|
2927 | 2927 | }
|
2928 | 2928 |
|
2929 | 2929 | HRESULT WINAPI glDirect3DDevice3::DrawIndexedPrimitiveVB(D3DPRIMITIVETYPE d3dptPrimitiveType, LPDIRECT3DVERTEXBUFFER lpd3dVertexBuffer,
|
— | — | @@ -2929,9 +2929,9 @@ |
2930 | 2930 | LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
2931 | 2931 | {
|
2932 | 2932 | TRACE_ENTER(6,14,this,8,d3dptPrimitiveType,14,lpd3dVertexBuffer,14,lpwIndices,8,dwIndexCount,9,dwFlags);
|
2933 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2934 | | - if(!lpd3dVertexBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2935 | | - TRACE_RET(23,glD3DDev7->DrawIndexedPrimitiveVB(d3dptPrimitiveType,
|
| 2933 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2934 | + if(!lpd3dVertexBuffer) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2935 | + TRACE_RET(HRESULT,23,glD3DDev7->DrawIndexedPrimitiveVB(d3dptPrimitiveType,
|
2936 | 2936 | ((glDirect3DVertexBuffer1*)lpd3dVertexBuffer)->GetGLD3DVB7(),0,-1,lpwIndices,dwIndexCount,dwFlags));
|
2937 | 2937 | }
|
2938 | 2938 |
|
— | — | @@ -2939,8 +2939,8 @@ |
2940 | 2940 | DWORD dwVertexCount, DWORD dwFlags)
|
2941 | 2941 | {
|
2942 | 2942 | TRACE_ENTER(6,14,this,8,dptPrimitiveType,9,dwVertexTypeDesc,14,lpVertices,8,dwVertexCount,9,dwFlags);
|
2943 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2944 | | - TRACE_RET(23,glD3DDev7->DrawPrimitive(dptPrimitiveType,dwVertexTypeDesc,lpVertices,dwVertexCount,dwFlags));
|
| 2943 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2944 | + TRACE_RET(HRESULT,23,glD3DDev7->DrawPrimitive(dptPrimitiveType,dwVertexTypeDesc,lpVertices,dwVertexCount,dwFlags));
|
2945 | 2945 | }
|
2946 | 2946 |
|
2947 | 2947 | HRESULT WINAPI glDirect3DDevice3::DrawPrimitiveStrided(D3DPRIMITIVETYPE dptPrimitiveType, DWORD dwVertexTypeDesc,
|
— | — | @@ -2947,8 +2947,8 @@ |
2948 | 2948 | LPD3DDRAWPRIMITIVESTRIDEDDATA lpVertexArray, DWORD dwVertexCount, DWORD dwFlags)
|
2949 | 2949 | {
|
2950 | 2950 | TRACE_ENTER(6,14,this,8,dptPrimitiveType,9,dwVertexTypeDesc,14,lpVertexArray,8,dwVertexCount,9,dwFlags);
|
2951 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2952 | | - TRACE_RET(23,glD3DDev7->DrawPrimitiveStrided(dptPrimitiveType,dwVertexTypeDesc,lpVertexArray,dwVertexCount,dwFlags));
|
| 2951 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2952 | + TRACE_RET(HRESULT,23,glD3DDev7->DrawPrimitiveStrided(dptPrimitiveType,dwVertexTypeDesc,lpVertexArray,dwVertexCount,dwFlags));
|
2953 | 2953 | }
|
2954 | 2954 |
|
2955 | 2955 | HRESULT WINAPI glDirect3DDevice3::DrawPrimitiveVB(D3DPRIMITIVETYPE d3dptPrimitiveType, LPDIRECT3DVERTEXBUFFER lpd3dVertexBuffer,
|
— | — | @@ -2955,60 +2955,60 @@ |
2956 | 2956 | DWORD dwStartVertex, DWORD dwNumVertices, DWORD dwFlags)
|
2957 | 2957 | {
|
2958 | 2958 | TRACE_ENTER(6,14,this,8,d3dptPrimitiveType,14,lpd3dVertexBuffer,8,dwStartVertex,8,dwNumVertices,9,dwFlags);
|
2959 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2960 | | - if(!lpd3dVertexBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2961 | | - TRACE_RET(23,glD3DDev7->DrawPrimitiveVB(d3dptPrimitiveType,((glDirect3DVertexBuffer1*)lpd3dVertexBuffer)->GetGLD3DVB7(),
|
| 2959 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2960 | + if(!lpd3dVertexBuffer) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2961 | + TRACE_RET(HRESULT,23,glD3DDev7->DrawPrimitiveVB(d3dptPrimitiveType,((glDirect3DVertexBuffer1*)lpd3dVertexBuffer)->GetGLD3DVB7(),
|
2962 | 2962 | dwStartVertex,dwNumVertices,dwFlags));
|
2963 | 2963 | }
|
2964 | 2964 | HRESULT WINAPI glDirect3DDevice3::End(DWORD dwFlags)
|
2965 | 2965 | {
|
2966 | 2966 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2967 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2968 | | - TRACE_RET(23,glD3DDev7->End(dwFlags));
|
| 2967 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2968 | + TRACE_RET(HRESULT,23,glD3DDev7->End(dwFlags));
|
2969 | 2969 | }
|
2970 | 2970 |
|
2971 | 2971 | HRESULT WINAPI glDirect3DDevice3::EndScene()
|
2972 | 2972 | {
|
2973 | 2973 | TRACE_ENTER(1,14,this);
|
2974 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2975 | | - TRACE_RET(23,glD3DDev7->EndScene());
|
| 2974 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2975 | + TRACE_RET(HRESULT,23,glD3DDev7->EndScene());
|
2976 | 2976 | }
|
2977 | 2977 |
|
2978 | 2978 | HRESULT WINAPI glDirect3DDevice3::EnumTextureFormats(LPD3DENUMPIXELFORMATSCALLBACK lpd3dEnumPixelProc, LPVOID lpArg)
|
2979 | 2979 | {
|
2980 | 2980 | TRACE_ENTER(3,14,this,14,lpd3dEnumPixelProc,14,lpArg);
|
2981 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2982 | | - TRACE_RET(23,glD3DDev7->EnumTextureFormats(lpd3dEnumPixelProc,lpArg));
|
| 2981 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2982 | + TRACE_RET(HRESULT,23,glD3DDev7->EnumTextureFormats(lpd3dEnumPixelProc,lpArg));
|
2983 | 2983 | }
|
2984 | 2984 |
|
2985 | 2985 | HRESULT WINAPI glDirect3DDevice3::GetCaps(LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc)
|
2986 | 2986 | {
|
2987 | 2987 | TRACE_ENTER(3,14,this,14,lpD3DHWDevDesc,14,lpD3DHELDevDesc);
|
2988 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2989 | | - TRACE_RET(23,glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc));
|
| 2988 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2989 | + TRACE_RET(HRESULT,23,glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc));
|
2990 | 2990 | }
|
2991 | 2991 |
|
2992 | 2992 | HRESULT WINAPI glDirect3DDevice3::GetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
2993 | 2993 | {
|
2994 | 2994 | TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
2995 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2996 | | - TRACE_RET(23,glD3DDev7->GetClipStatus(lpD3DClipStatus));
|
| 2995 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2996 | + TRACE_RET(HRESULT,23,glD3DDev7->GetClipStatus(lpD3DClipStatus));
|
2997 | 2997 | }
|
2998 | 2998 |
|
2999 | 2999 | HRESULT WINAPI glDirect3DDevice3::GetCurrentViewport(LPDIRECT3DVIEWPORT3 *lplpd3dViewport)
|
3000 | 3000 | {
|
3001 | 3001 | TRACE_ENTER(2,14,this,14,lplpd3dViewport);
|
3002 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3003 | | - TRACE_RET(23,glD3DDev7->GetCurrentViewport(lplpd3dViewport));
|
| 3002 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3003 | + TRACE_RET(HRESULT,23,glD3DDev7->GetCurrentViewport(lplpd3dViewport));
|
3004 | 3004 | }
|
3005 | 3005 |
|
3006 | 3006 | HRESULT WINAPI glDirect3DDevice3::GetDirect3D(LPDIRECT3D3 *lplpD3D)
|
3007 | 3007 | {
|
3008 | 3008 | TRACE_ENTER(2,14,this,14,lplpD3D);
|
3009 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3009 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3010 | 3010 | LPDIRECT3D7 d3d7;
|
3011 | 3011 | HRESULT err = glD3DDev7->GetDirect3D(&d3d7);
|
3012 | | - if(!d3d7) TRACE_RET(23,err);
|
| 3012 | + if(!d3d7) TRACE_RET(HRESULT,23,err);
|
3013 | 3013 | d3d7->QueryInterface(IID_IDirect3D3,(void**)lplpD3D);
|
3014 | 3014 | d3d7->Release();
|
3015 | 3015 | TRACE_VAR("*lplpD3D",14,*lplpD3D);
|
— | — | @@ -3019,24 +3019,24 @@ |
3020 | 3020 | HRESULT WINAPI glDirect3DDevice3::GetLightState(D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState)
|
3021 | 3021 | {
|
3022 | 3022 | TRACE_ENTER(3,14,this,30,dwLightStateType,14,lpdwLightState);
|
3023 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3024 | | - TRACE_RET(23,glD3DDev7->GetLightState(dwLightStateType,lpdwLightState));
|
| 3023 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3024 | + TRACE_RET(HRESULT,23,glD3DDev7->GetLightState(dwLightStateType,lpdwLightState));
|
3025 | 3025 | }
|
3026 | 3026 |
|
3027 | 3027 | HRESULT WINAPI glDirect3DDevice3::GetRenderState(D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState)
|
3028 | 3028 | {
|
3029 | 3029 | TRACE_ENTER(3,14,this,27,dwRenderStateType,14,lpdwRenderState);
|
3030 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3031 | | - TRACE_RET(23,glD3DDev7->GetRenderState(dwRenderStateType,lpdwRenderState));
|
| 3030 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3031 | + TRACE_RET(HRESULT,23,glD3DDev7->GetRenderState(dwRenderStateType,lpdwRenderState));
|
3032 | 3032 | }
|
3033 | 3033 |
|
3034 | 3034 | HRESULT WINAPI glDirect3DDevice3::GetRenderTarget(LPDIRECTDRAWSURFACE4 *lplpRenderTarget)
|
3035 | 3035 | {
|
3036 | 3036 | TRACE_ENTER(2,14,this,14,lplpRenderTarget);
|
3037 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3037 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3038 | 3038 | LPDIRECTDRAWSURFACE7 dds7;
|
3039 | 3039 | HRESULT err = glD3DDev7->GetRenderTarget(&dds7);
|
3040 | | - if(!dds7) TRACE_RET(23,err);
|
| 3040 | + if(!dds7) TRACE_RET(HRESULT,23,err);
|
3041 | 3041 | dds7->QueryInterface(IID_IDirectDrawSurface4,(void**)lplpRenderTarget);
|
3042 | 3042 | dds7->Release();
|
3043 | 3043 | TRACE_VAR("*lplpRenderTarget",14,*lplpRenderTarget);
|
— | — | @@ -3047,17 +3047,17 @@ |
3048 | 3048 | HRESULT WINAPI glDirect3DDevice3::GetStats(LPD3DSTATS lpD3DStats)
|
3049 | 3049 | {
|
3050 | 3050 | TRACE_ENTER(2,14,this,14,lpD3DStats);
|
3051 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3052 | | - TRACE_RET(23,glD3DDev7->GetStats(lpD3DStats));
|
| 3051 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3052 | + TRACE_RET(HRESULT,23,glD3DDev7->GetStats(lpD3DStats));
|
3053 | 3053 | }
|
3054 | 3054 |
|
3055 | 3055 | HRESULT WINAPI glDirect3DDevice3::GetTexture(DWORD dwStage, LPDIRECT3DTEXTURE2 *lplpTexture)
|
3056 | 3056 | {
|
3057 | 3057 | TRACE_ENTER(3,14,this,8,dwStage,14,lplpTexture);
|
3058 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3058 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3059 | 3059 | LPDIRECTDRAWSURFACE7 dds7;
|
3060 | 3060 | HRESULT err = glD3DDev7->GetTexture(dwStage,&dds7);
|
3061 | | - if(!dds7) TRACE_RET(23,err);
|
| 3061 | + if(!dds7) TRACE_RET(HRESULT,23,err);
|
3062 | 3062 | dds7->QueryInterface(IID_IDirect3DTexture2,(void**)lplpTexture);
|
3063 | 3063 | dds7->Release();
|
3064 | 3064 | TRACE_VAR("*lplpTexture",14,*lplpTexture);
|
— | — | @@ -3068,108 +3068,108 @@ |
3069 | 3069 | HRESULT WINAPI glDirect3DDevice3::GetTextureStageState(DWORD dwStage, D3DTEXTURESTAGESTATETYPE dwState, LPDWORD lpdwValue)
|
3070 | 3070 | {
|
3071 | 3071 | TRACE_ENTER(4,14,this,8,dwStage,28,dwState,14,lpdwValue);
|
3072 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3073 | | - TRACE_RET(23,glD3DDev7->GetTextureStageState(dwStage,dwState,lpdwValue));
|
| 3072 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3073 | + TRACE_RET(HRESULT,23,glD3DDev7->GetTextureStageState(dwStage,dwState,lpdwValue));
|
3074 | 3074 | }
|
3075 | 3075 |
|
3076 | 3076 | HRESULT WINAPI glDirect3DDevice3::GetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
3077 | 3077 | {
|
3078 | 3078 | TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
3079 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3080 | | - TRACE_RET(23,glD3DDev7->GetTransform(dtstTransformStateType,lpD3DMatrix));
|
| 3079 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3080 | + TRACE_RET(HRESULT,23,glD3DDev7->GetTransform(dtstTransformStateType,lpD3DMatrix));
|
3081 | 3081 | }
|
3082 | 3082 |
|
3083 | 3083 | HRESULT WINAPI glDirect3DDevice3::Index(WORD wVertexIndex)
|
3084 | 3084 | {
|
3085 | 3085 | TRACE_ENTER(2,14,this,5,wVertexIndex);
|
3086 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3087 | | - TRACE_RET(23,glD3DDev7->Index(wVertexIndex));
|
| 3086 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3087 | + TRACE_RET(HRESULT,23,glD3DDev7->Index(wVertexIndex));
|
3088 | 3088 | }
|
3089 | 3089 |
|
3090 | 3090 | HRESULT WINAPI glDirect3DDevice3::MultiplyTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
3091 | 3091 | {
|
3092 | 3092 | TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
3093 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3094 | | - TRACE_RET(23,glD3DDev7->MultiplyTransform(dtstTransformStateType,lpD3DMatrix));
|
| 3093 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3094 | + TRACE_RET(HRESULT,23,glD3DDev7->MultiplyTransform(dtstTransformStateType,lpD3DMatrix));
|
3095 | 3095 | }
|
3096 | 3096 | HRESULT WINAPI glDirect3DDevice3::NextViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport, LPDIRECT3DVIEWPORT3 *lplpAnotherViewport, DWORD dwFlags)
|
3097 | 3097 | {
|
3098 | 3098 | TRACE_ENTER(4,14,this,14,lpDirect3DViewport,14,lplpAnotherViewport,9,dwFlags);
|
3099 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3100 | | - TRACE_RET(23,glD3DDev7->NextViewport(lpDirect3DViewport,lplpAnotherViewport,dwFlags));
|
| 3099 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3100 | + TRACE_RET(HRESULT,23,glD3DDev7->NextViewport(lpDirect3DViewport,lplpAnotherViewport,dwFlags));
|
3101 | 3101 | }
|
3102 | 3102 |
|
3103 | 3103 | HRESULT WINAPI glDirect3DDevice3::SetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
3104 | 3104 | {
|
3105 | 3105 | TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
3106 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3107 | | - TRACE_RET(23,glD3DDev7->SetClipStatus(lpD3DClipStatus));
|
| 3106 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3107 | + TRACE_RET(HRESULT,23,glD3DDev7->SetClipStatus(lpD3DClipStatus));
|
3108 | 3108 | }
|
3109 | 3109 |
|
3110 | 3110 | HRESULT WINAPI glDirect3DDevice3::SetCurrentViewport(LPDIRECT3DVIEWPORT3 lpd3dViewport)
|
3111 | 3111 | {
|
3112 | 3112 | TRACE_ENTER(2,14,this,14,lpd3dViewport);
|
3113 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3114 | | - TRACE_RET(23,glD3DDev7->SetCurrentViewport(lpd3dViewport));
|
| 3113 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3114 | + TRACE_RET(HRESULT,23,glD3DDev7->SetCurrentViewport(lpd3dViewport));
|
3115 | 3115 | }
|
3116 | 3116 |
|
3117 | 3117 | HRESULT WINAPI glDirect3DDevice3::SetLightState(D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState)
|
3118 | 3118 | {
|
3119 | 3119 | TRACE_ENTER(3,14,this,30,dwLightStateType,8,dwLightState);
|
3120 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3121 | | - TRACE_RET(23,glD3DDev7->SetLightState(dwLightStateType,dwLightState));
|
| 3120 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3121 | + TRACE_RET(HRESULT,23,glD3DDev7->SetLightState(dwLightStateType,dwLightState));
|
3122 | 3122 | }
|
3123 | 3123 |
|
3124 | 3124 | HRESULT WINAPI glDirect3DDevice3::SetRenderState(D3DRENDERSTATETYPE dwRendStateType, DWORD dwRenderState)
|
3125 | 3125 | {
|
3126 | 3126 | TRACE_ENTER(3,14,this,27,dwRendStateType,9,dwRenderState);
|
3127 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3128 | | - TRACE_RET(23,glD3DDev7->SetRenderState(dwRendStateType,dwRenderState));
|
| 3127 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3128 | + TRACE_RET(HRESULT,23,glD3DDev7->SetRenderState(dwRendStateType,dwRenderState));
|
3129 | 3129 | }
|
3130 | 3130 |
|
3131 | 3131 | HRESULT WINAPI glDirect3DDevice3::SetRenderTarget(LPDIRECTDRAWSURFACE4 lpNewRenderTarget, DWORD dwFlags)
|
3132 | 3132 | {
|
3133 | 3133 | TRACE_ENTER(3,14,this,14,lpNewRenderTarget,9,dwFlags);
|
3134 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3135 | | - TRACE_RET(23,glD3DDev7->SetRenderTarget(((glDirectDrawSurface4*)lpNewRenderTarget)->GetDDS7(),dwFlags));
|
| 3134 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3135 | + TRACE_RET(HRESULT,23,glD3DDev7->SetRenderTarget(((glDirectDrawSurface4*)lpNewRenderTarget)->GetDDS7(),dwFlags));
|
3136 | 3136 | }
|
3137 | 3137 |
|
3138 | 3138 | HRESULT WINAPI glDirect3DDevice3::SetTexture(DWORD dwStage, LPDIRECT3DTEXTURE2 lpTexture)
|
3139 | 3139 | {
|
3140 | 3140 | TRACE_ENTER(3,14,this,8,dwStage,14,lpTexture);
|
3141 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3141 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3142 | 3142 | glDirectDrawSurface7 *dds7;
|
3143 | 3143 | if(lpTexture) dds7 = ((glDirect3DTexture2*)lpTexture)->GetDDS7();
|
3144 | 3144 | else dds7 = NULL;
|
3145 | | - TRACE_RET(23,glD3DDev7->SetTexture(dwStage,dds7));
|
| 3145 | + TRACE_RET(HRESULT,23,glD3DDev7->SetTexture(dwStage,dds7));
|
3146 | 3146 | }
|
3147 | 3147 |
|
3148 | 3148 | HRESULT WINAPI glDirect3DDevice3::SetTextureStageState(DWORD dwStage, D3DTEXTURESTAGESTATETYPE dwState, DWORD dwValue)
|
3149 | 3149 | {
|
3150 | 3150 | TRACE_ENTER(4,14,this,8,dwStage,28,dwState,9,dwValue);
|
3151 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3152 | | - TRACE_RET(23,glD3DDev7->SetTextureStageState(dwStage,dwState,dwValue));
|
| 3151 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3152 | + TRACE_RET(HRESULT,23,glD3DDev7->SetTextureStageState(dwStage,dwState,dwValue));
|
3153 | 3153 | }
|
3154 | 3154 |
|
3155 | 3155 | HRESULT WINAPI glDirect3DDevice3::SetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
3156 | 3156 | {
|
3157 | 3157 | TRACE_ENTER(3,14,this,27,dtstTransformStateType,14,lpD3DMatrix);
|
3158 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3159 | | - TRACE_RET(23,glD3DDev7->SetTransform(dtstTransformStateType,lpD3DMatrix));
|
| 3158 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3159 | + TRACE_RET(HRESULT,23,glD3DDev7->SetTransform(dtstTransformStateType,lpD3DMatrix));
|
3160 | 3160 | }
|
3161 | 3161 |
|
3162 | 3162 | HRESULT WINAPI glDirect3DDevice3::ValidateDevice(LPDWORD lpdwPasses)
|
3163 | 3163 | {
|
3164 | 3164 | TRACE_ENTER(2,14,this,14,lpdwPasses);
|
3165 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3166 | | - TRACE_RET(23,glD3DDev7->ValidateDevice(lpdwPasses));
|
| 3165 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3166 | + TRACE_RET(HRESULT,23,glD3DDev7->ValidateDevice(lpdwPasses));
|
3167 | 3167 | }
|
3168 | 3168 |
|
3169 | 3169 | HRESULT WINAPI glDirect3DDevice3::Vertex(LPVOID lpVertex)
|
3170 | 3170 | {
|
3171 | 3171 | TRACE_ENTER(2,14,this,14,lpVertex);
|
3172 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3173 | | - TRACE_RET(23,glD3DDev7->Vertex(lpVertex));
|
| 3172 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3173 | + TRACE_RET(HRESULT,23,glD3DDev7->Vertex(lpVertex));
|
3174 | 3174 | }
|
3175 | 3175 |
|
3176 | 3176 | // IDirect3DDevice2 wrapper
|
— | — | @@ -3193,7 +3193,7 @@ |
3194 | 3194 | HRESULT WINAPI glDirect3DDevice2::QueryInterface(REFIID riid, void** ppvObj)
|
3195 | 3195 | {
|
3196 | 3196 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
3197 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3197 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3198 | 3198 | if(riid == IID_IUnknown)
|
3199 | 3199 | {
|
3200 | 3200 | this->AddRef();
|
— | — | @@ -3202,13 +3202,13 @@ |
3203 | 3203 | TRACE_EXIT(23,DD_OK);
|
3204 | 3204 | return DD_OK;
|
3205 | 3205 | }
|
3206 | | - TRACE_RET(23,glD3DDev7->QueryInterface(riid,ppvObj));
|
| 3206 | + TRACE_RET(HRESULT,23,glD3DDev7->QueryInterface(riid,ppvObj));
|
3207 | 3207 | }
|
3208 | 3208 |
|
3209 | 3209 | ULONG WINAPI glDirect3DDevice2::AddRef()
|
3210 | 3210 | {
|
3211 | 3211 | TRACE_ENTER(1,14,this);
|
3212 | | - if(!this) TRACE_EXIT(8,0);;
|
| 3212 | + if(!this) TRACE_RET(ULONG,8,0);
|
3213 | 3213 | refcount++;
|
3214 | 3214 | TRACE_EXIT(8,refcount);
|
3215 | 3215 | return refcount;
|
— | — | @@ -3217,7 +3217,7 @@ |
3218 | 3218 | ULONG WINAPI glDirect3DDevice2::Release()
|
3219 | 3219 | {
|
3220 | 3220 | TRACE_ENTER(1,14,this);
|
3221 | | - if(!this) TRACE_EXIT(8,0);
|
| 3221 | + if(!this) TRACE_RET(ULONG,8,0);
|
3222 | 3222 | ULONG ret;
|
3223 | 3223 | refcount--;
|
3224 | 3224 | ret = refcount;
|
— | — | @@ -3229,8 +3229,8 @@ |
3230 | 3230 | HRESULT WINAPI glDirect3DDevice2::AddViewport(LPDIRECT3DVIEWPORT2 lpDirect3DViewport2)
|
3231 | 3231 | {
|
3232 | 3232 | TRACE_ENTER(2,14,this,14,lpDirect3DViewport2);
|
3233 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3234 | | - if(!lpDirect3DViewport2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3233 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3234 | + if(!lpDirect3DViewport2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
3235 | 3235 | glDirect3DViewport3 *glD3DV3;
|
3236 | 3236 | lpDirect3DViewport2->QueryInterface(IID_IDirect3DViewport3,(void**)&glD3DV3);
|
3237 | 3237 | HRESULT ret = glD3DDev7->AddViewport(glD3DV3);
|
— | — | @@ -3257,32 +3257,32 @@ |
3258 | 3258 | HRESULT WINAPI glDirect3DDevice2::Begin(D3DPRIMITIVETYPE d3dpt, D3DVERTEXTYPE d3dvt, DWORD dwFlags)
|
3259 | 3259 | {
|
3260 | 3260 | TRACE_ENTER(4,14,this,8,d3dpt,8,d3dvt,9,dwFlags);
|
3261 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3261 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3262 | 3262 | DWORD vertextype = d3dvttofvf(d3dvt);
|
3263 | | - if(!vertextype) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
3264 | | - TRACE_RET(23,glD3DDev7->Begin(d3dpt,vertextype,dwFlags));
|
| 3263 | + if(!vertextype) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 3264 | + TRACE_RET(HRESULT,23,glD3DDev7->Begin(d3dpt,vertextype,dwFlags));
|
3265 | 3265 | }
|
3266 | 3266 |
|
3267 | 3267 | HRESULT WINAPI glDirect3DDevice2::BeginIndexed(D3DPRIMITIVETYPE dptPrimitiveType, D3DVERTEXTYPE dvtVertexType, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags)
|
3268 | 3268 | {
|
3269 | 3269 | TRACE_ENTER(6,14,this,8,dptPrimitiveType,8,dvtVertexType,14,lpvVertices,8,dwNumVertices,9,dwFlags);
|
3270 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3270 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3271 | 3271 | DWORD vertextype = d3dvttofvf(dvtVertexType);
|
3272 | | - if(!vertextype) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
3273 | | - TRACE_RET(23,glD3DDev7->BeginIndexed(dptPrimitiveType,vertextype,lpvVertices,dwNumVertices,dwFlags));
|
| 3272 | + if(!vertextype) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 3273 | + TRACE_RET(HRESULT,23,glD3DDev7->BeginIndexed(dptPrimitiveType,vertextype,lpvVertices,dwNumVertices,dwFlags));
|
3274 | 3274 | }
|
3275 | 3275 |
|
3276 | 3276 | HRESULT WINAPI glDirect3DDevice2::BeginScene()
|
3277 | 3277 | {
|
3278 | 3278 | TRACE_ENTER(1,14,this);
|
3279 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3280 | | - TRACE_RET(23,glD3DDev7->BeginScene());
|
| 3279 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3280 | + TRACE_RET(HRESULT,23,glD3DDev7->BeginScene());
|
3281 | 3281 | }
|
3282 | 3282 |
|
3283 | 3283 | HRESULT WINAPI glDirect3DDevice2::DeleteViewport(LPDIRECT3DVIEWPORT2 lpDirect3DViewport2)
|
3284 | 3284 | {
|
3285 | 3285 | TRACE_ENTER(2,14,this,14,lpDirect3DViewport2);
|
3286 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3286 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3287 | 3287 | glDirect3DViewport3 *glD3DV3;
|
3288 | 3288 | lpDirect3DViewport2->QueryInterface(IID_IDirect3DViewport3,(void**)&glD3DV3);
|
3289 | 3289 | HRESULT ret = glD3DDev7->DeleteViewport(glD3DV3);
|
— | — | @@ -3295,10 +3295,10 @@ |
3296 | 3296 | LPVOID lpvVertices, DWORD dwVertexCount, LPWORD dwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
3297 | 3297 | {
|
3298 | 3298 | TRACE_ENTER(8,14,this,8,d3dptPrimitiveType,8,d3dvtVertexType,14,lpvVertices,8,dwVertexCount,14,dwIndices,8,dwIndexCount,9,dwFlags);
|
3299 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3299 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3300 | 3300 | DWORD vertextype = d3dvttofvf(d3dvtVertexType);
|
3301 | | - if(!vertextype) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
3302 | | - TRACE_RET(23,glD3DDev7->DrawIndexedPrimitive(d3dptPrimitiveType,vertextype,lpvVertices,dwVertexCount,dwIndices,dwIndexCount,dwFlags));
|
| 3301 | + if(!vertextype) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 3302 | + TRACE_RET(HRESULT,23,glD3DDev7->DrawIndexedPrimitive(d3dptPrimitiveType,vertextype,lpvVertices,dwVertexCount,dwIndices,dwIndexCount,dwFlags));
|
3303 | 3303 | }
|
3304 | 3304 |
|
3305 | 3305 | HRESULT WINAPI glDirect3DDevice2::DrawPrimitive(D3DPRIMITIVETYPE dptPrimitiveType, D3DVERTEXTYPE dvtVertexType, LPVOID lpvVertices,
|
— | — | @@ -3305,24 +3305,24 @@ |
3306 | 3306 | DWORD dwVertexCount, DWORD dwFlags)
|
3307 | 3307 | {
|
3308 | 3308 | TRACE_ENTER(6,14,this,8,dptPrimitiveType,8,dvtVertexType,14,lpvVertices,8,dwVertexCount,9,dwFlags);
|
3309 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3309 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3310 | 3310 | DWORD vertextype = d3dvttofvf(dvtVertexType);
|
3311 | | - if(!vertextype) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
3312 | | - TRACE_RET(23,glD3DDev7->DrawPrimitive(dptPrimitiveType,vertextype,lpvVertices,dwVertexCount,dwFlags));
|
| 3311 | + if(!vertextype) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 3312 | + TRACE_RET(HRESULT,23,glD3DDev7->DrawPrimitive(dptPrimitiveType,vertextype,lpvVertices,dwVertexCount,dwFlags));
|
3313 | 3313 | }
|
3314 | 3314 |
|
3315 | 3315 | HRESULT WINAPI glDirect3DDevice2::End(DWORD dwFlags)
|
3316 | 3316 | {
|
3317 | 3317 | TRACE_ENTER(2,14,this,9,dwFlags);
|
3318 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3319 | | - TRACE_RET(23,glD3DDev7->End(dwFlags));
|
| 3318 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3319 | + TRACE_RET(HRESULT,23,glD3DDev7->End(dwFlags));
|
3320 | 3320 | }
|
3321 | 3321 |
|
3322 | 3322 | HRESULT WINAPI glDirect3DDevice2::EndScene()
|
3323 | 3323 | {
|
3324 | 3324 | TRACE_ENTER(1,14,this);
|
3325 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3326 | | - TRACE_RET(23,glD3DDev7->EndScene());
|
| 3325 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3326 | + TRACE_RET(HRESULT,23,glD3DDev7->EndScene());
|
3327 | 3327 | }
|
3328 | 3328 |
|
3329 | 3329 | HRESULT WINAPI EnumTex2(LPDDPIXELFORMAT ddpf, LPVOID lpUserArg)
|
— | — | @@ -3344,34 +3344,34 @@ |
3345 | 3345 | HRESULT WINAPI glDirect3DDevice2::EnumTextureFormats(LPD3DENUMTEXTUREFORMATSCALLBACK lpd3dEnumTextureProc, LPVOID lpArg)
|
3346 | 3346 | {
|
3347 | 3347 | TRACE_ENTER(3,14,this,14,lpd3dEnumTextureProc,14,lpArg);
|
3348 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3348 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3349 | 3349 | LPVOID context[2];
|
3350 | 3350 | context[0] = (LPVOID)lpd3dEnumTextureProc;
|
3351 | 3351 | context[1] = lpArg;
|
3352 | | - TRACE_RET(23,glD3DDev7->EnumTextureFormats(EnumTex2,&context));
|
| 3352 | + TRACE_RET(HRESULT,23,glD3DDev7->EnumTextureFormats(EnumTex2,&context));
|
3353 | 3353 | }
|
3354 | 3354 |
|
3355 | 3355 | HRESULT WINAPI glDirect3DDevice2::GetCaps(LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc)
|
3356 | 3356 | {
|
3357 | 3357 | TRACE_ENTER(3,14,this,14,lpD3DHWDevDesc,14,lpD3DHELDevDesc);
|
3358 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3359 | | - TRACE_RET(23,glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc));
|
| 3358 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3359 | + TRACE_RET(HRESULT,23,glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc));
|
3360 | 3360 | }
|
3361 | 3361 |
|
3362 | 3362 | HRESULT WINAPI glDirect3DDevice2::GetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
3363 | 3363 | {
|
3364 | 3364 | TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
3365 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3366 | | - TRACE_RET(23,glD3DDev7->GetClipStatus(lpD3DClipStatus));
|
| 3365 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3366 | + TRACE_RET(HRESULT,23,glD3DDev7->GetClipStatus(lpD3DClipStatus));
|
3367 | 3367 | }
|
3368 | 3368 |
|
3369 | 3369 | HRESULT WINAPI glDirect3DDevice2::GetCurrentViewport(LPDIRECT3DVIEWPORT2 *lplpd3dViewport2)
|
3370 | 3370 | {
|
3371 | 3371 | TRACE_ENTER(2,14,this,14,lplpd3dViewport2);
|
3372 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3372 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3373 | 3373 | glDirect3DViewport3 *glD3DV3;
|
3374 | 3374 | HRESULT ret = glD3DDev7->GetCurrentViewport((LPDIRECT3DVIEWPORT3*)&glD3DV3);
|
3375 | | - if(!glD3DV3) TRACE_RET(23,ret);
|
| 3375 | + if(!glD3DV3) TRACE_RET(HRESULT,23,ret);
|
3376 | 3376 | glD3DV3->QueryInterface(IID_IDirect3DViewport2,(void**)lplpd3dViewport2);
|
3377 | 3377 | glD3DV3->Release();
|
3378 | 3378 | TRACE_VAR("*lplpd3dViewport2",14,*lplpd3dViewport2);
|
— | — | @@ -3382,10 +3382,10 @@ |
3383 | 3383 | HRESULT WINAPI glDirect3DDevice2::GetDirect3D(LPDIRECT3D2 *lplpD3D2)
|
3384 | 3384 | {
|
3385 | 3385 | TRACE_ENTER(2,14,this,14,lplpD3D2);
|
3386 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3386 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3387 | 3387 | LPDIRECT3D7 d3d7;
|
3388 | 3388 | HRESULT err = glD3DDev7->GetDirect3D(&d3d7);
|
3389 | | - if(!d3d7) TRACE_RET(23,err);
|
| 3389 | + if(!d3d7) TRACE_RET(HRESULT,23,err);
|
3390 | 3390 | d3d7->QueryInterface(IID_IDirect3D2,(void**)lplpD3D2);
|
3391 | 3391 | d3d7->Release();
|
3392 | 3392 | TRACE_VAR("*lplpD3D2",14,*lplpD3D2);
|
— | — | @@ -3396,24 +3396,24 @@ |
3397 | 3397 | HRESULT WINAPI glDirect3DDevice2::GetLightState(D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState)
|
3398 | 3398 | {
|
3399 | 3399 | TRACE_ENTER(3,14,this,30,dwLightStateType,14,lpdwLightState);
|
3400 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3401 | | - TRACE_RET(23,glD3DDev7->GetLightState(dwLightStateType,lpdwLightState));
|
| 3400 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3401 | + TRACE_RET(HRESULT,23,glD3DDev7->GetLightState(dwLightStateType,lpdwLightState));
|
3402 | 3402 | }
|
3403 | 3403 |
|
3404 | 3404 | HRESULT WINAPI glDirect3DDevice2::GetRenderState(D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState)
|
3405 | 3405 | {
|
3406 | 3406 | TRACE_ENTER(3,14,this,27,dwRenderStateType,14,lpdwRenderState);
|
3407 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3408 | | - TRACE_RET(23,glD3DDev7->GetRenderState(dwRenderStateType,lpdwRenderState));
|
| 3407 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3408 | + TRACE_RET(HRESULT,23,glD3DDev7->GetRenderState(dwRenderStateType,lpdwRenderState));
|
3409 | 3409 | }
|
3410 | 3410 |
|
3411 | 3411 | HRESULT WINAPI glDirect3DDevice2::GetRenderTarget(LPDIRECTDRAWSURFACE *lplpRenderTarget)
|
3412 | 3412 | {
|
3413 | 3413 | TRACE_ENTER(2,14,this,14,lplpRenderTarget);
|
3414 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3414 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3415 | 3415 | LPDIRECTDRAWSURFACE7 dds7;
|
3416 | 3416 | HRESULT err = glD3DDev7->GetRenderTarget(&dds7);
|
3417 | | - if(!dds7) TRACE_RET(23,err);
|
| 3417 | + if(!dds7) TRACE_RET(HRESULT,23,err);
|
3418 | 3418 | dds7->QueryInterface(IID_IDirectDrawSurface,(void**)lplpRenderTarget);
|
3419 | 3419 | dds7->Release();
|
3420 | 3420 | TRACE_VAR("*lplpRenderTarget",14,*lplpRenderTarget);
|
— | — | @@ -3424,37 +3424,37 @@ |
3425 | 3425 | HRESULT WINAPI glDirect3DDevice2::GetStats(LPD3DSTATS lpD3DStats)
|
3426 | 3426 | {
|
3427 | 3427 | TRACE_ENTER(2,14,this,14,lpD3DStats);
|
3428 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3429 | | - TRACE_RET(23,glD3DDev7->GetStats(lpD3DStats));
|
| 3428 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3429 | + TRACE_RET(HRESULT,23,glD3DDev7->GetStats(lpD3DStats));
|
3430 | 3430 | }
|
3431 | 3431 |
|
3432 | 3432 | HRESULT WINAPI glDirect3DDevice2::GetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
3433 | 3433 | {
|
3434 | 3434 | TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
3435 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3436 | | - TRACE_RET(23,glD3DDev7->GetTransform(dtstTransformStateType,lpD3DMatrix));
|
| 3435 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3436 | + TRACE_RET(HRESULT,23,glD3DDev7->GetTransform(dtstTransformStateType,lpD3DMatrix));
|
3437 | 3437 | }
|
3438 | 3438 |
|
3439 | 3439 | HRESULT WINAPI glDirect3DDevice2::Index(WORD wVertexIndex)
|
3440 | 3440 | {
|
3441 | 3441 | TRACE_ENTER(2,14,this,5,wVertexIndex);
|
3442 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3443 | | - TRACE_RET(23,glD3DDev7->Index(wVertexIndex));
|
| 3442 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3443 | + TRACE_RET(HRESULT,23,glD3DDev7->Index(wVertexIndex));
|
3444 | 3444 | }
|
3445 | 3445 |
|
3446 | 3446 | HRESULT WINAPI glDirect3DDevice2::MultiplyTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
3447 | 3447 | {
|
3448 | 3448 | TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
3449 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3450 | | - TRACE_RET(23,glD3DDev7->MultiplyTransform(dtstTransformStateType,lpD3DMatrix));
|
| 3449 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3450 | + TRACE_RET(HRESULT,23,glD3DDev7->MultiplyTransform(dtstTransformStateType,lpD3DMatrix));
|
3451 | 3451 | }
|
3452 | 3452 |
|
3453 | 3453 | HRESULT WINAPI glDirect3DDevice2::NextViewport(LPDIRECT3DVIEWPORT2 lpDirect3DViewport2, LPDIRECT3DVIEWPORT2 *lplpDirect3DViewport2, DWORD dwFlags)
|
3454 | 3454 | {
|
3455 | 3455 | TRACE_ENTER(4,14,this,14,lpDirect3DViewport2,14,lplpDirect3DViewport2,9,dwFlags);
|
3456 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3457 | | - if(!lpDirect3DViewport2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
3458 | | - if(!lplpDirect3DViewport2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3456 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3457 | + if(!lpDirect3DViewport2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 3458 | + if(!lplpDirect3DViewport2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
3459 | 3459 | FIXME("glDirect3DDevice2::NextViewport: stub");
|
3460 | 3460 | TRACE_EXIT(23,DDERR_GENERIC);
|
3461 | 3461 | ERR(DDERR_GENERIC);
|
— | — | @@ -3463,15 +3463,15 @@ |
3464 | 3464 | HRESULT WINAPI glDirect3DDevice2::SetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
3465 | 3465 | {
|
3466 | 3466 | TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
3467 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3468 | | - TRACE_RET(23,glD3DDev7->SetClipStatus(lpD3DClipStatus));
|
| 3467 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3468 | + TRACE_RET(HRESULT,23,glD3DDev7->SetClipStatus(lpD3DClipStatus));
|
3469 | 3469 | }
|
3470 | 3470 |
|
3471 | 3471 | HRESULT WINAPI glDirect3DDevice2::SetCurrentViewport(LPDIRECT3DVIEWPORT2 lpd3dViewport2)
|
3472 | 3472 | {
|
3473 | 3473 | TRACE_ENTER(2,14,this,14,lpd3dViewport2);
|
3474 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3475 | | - if(!lpd3dViewport2) TRACE_RET(23,glD3DDev7->SetCurrentViewport(NULL));
|
| 3474 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3475 | + if(!lpd3dViewport2) TRACE_RET(HRESULT,23,glD3DDev7->SetCurrentViewport(NULL));
|
3476 | 3476 | glDirect3DViewport3 *glD3DV3;
|
3477 | 3477 | lpd3dViewport2->QueryInterface(IID_IDirect3DViewport3,(void**)&glD3DV3);
|
3478 | 3478 | HRESULT ret = glD3DDev7->SetCurrentViewport(glD3DV3);
|
— | — | @@ -3483,43 +3483,43 @@ |
3484 | 3484 | HRESULT WINAPI glDirect3DDevice2::SetLightState(D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState)
|
3485 | 3485 | {
|
3486 | 3486 | TRACE_ENTER(3,14,this,30,dwLightStateType,9,dwLightState);
|
3487 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3488 | | - TRACE_RET(23,glD3DDev7->SetLightState(dwLightStateType,dwLightState));
|
| 3487 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3488 | + TRACE_RET(HRESULT,23,glD3DDev7->SetLightState(dwLightStateType,dwLightState));
|
3489 | 3489 | }
|
3490 | 3490 |
|
3491 | 3491 | HRESULT WINAPI glDirect3DDevice2::SetRenderState(D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState)
|
3492 | 3492 | {
|
3493 | 3493 | TRACE_ENTER(3,14,this,27,dwRenderStateType,9,dwRenderState);
|
3494 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3495 | | - TRACE_RET(23,glD3DDev7->SetRenderState(dwRenderStateType,dwRenderState));
|
| 3494 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3495 | + TRACE_RET(HRESULT,23,glD3DDev7->SetRenderState(dwRenderStateType,dwRenderState));
|
3496 | 3496 | }
|
3497 | 3497 |
|
3498 | 3498 | HRESULT WINAPI glDirect3DDevice2::SetRenderTarget(LPDIRECTDRAWSURFACE lpNewRenderTarget, DWORD dwFlags)
|
3499 | 3499 | {
|
3500 | 3500 | TRACE_ENTER(3,14,this,14,lpNewRenderTarget,9,dwFlags);
|
3501 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3502 | | - TRACE_RET(23,glD3DDev7->SetRenderTarget(((glDirectDrawSurface1*)lpNewRenderTarget)->GetDDS7(),dwFlags));
|
| 3501 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3502 | + TRACE_RET(HRESULT,23,glD3DDev7->SetRenderTarget(((glDirectDrawSurface1*)lpNewRenderTarget)->GetDDS7(),dwFlags));
|
3503 | 3503 | }
|
3504 | 3504 |
|
3505 | 3505 | HRESULT WINAPI glDirect3DDevice2::SetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
3506 | 3506 | {
|
3507 | 3507 | TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
3508 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3509 | | - TRACE_RET(23,glD3DDev7->SetTransform(dtstTransformStateType,lpD3DMatrix));
|
| 3508 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3509 | + TRACE_RET(HRESULT,23,glD3DDev7->SetTransform(dtstTransformStateType,lpD3DMatrix));
|
3510 | 3510 | }
|
3511 | 3511 |
|
3512 | 3512 | HRESULT WINAPI glDirect3DDevice2::SwapTextureHandles(LPDIRECT3DTEXTURE2 lpD3DTex1, LPDIRECT3DTEXTURE2 lpD3DTex2)
|
3513 | 3513 | {
|
3514 | 3514 | TRACE_ENTER(3,14,this,14,lpD3DTex1,14,lpD3DTex2);
|
3515 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3516 | | - TRACE_RET(23,glD3DDev7->SwapTextureHandles(lpD3DTex1,lpD3DTex2));
|
| 3515 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3516 | + TRACE_RET(HRESULT,23,glD3DDev7->SwapTextureHandles(lpD3DTex1,lpD3DTex2));
|
3517 | 3517 | }
|
3518 | 3518 |
|
3519 | 3519 | HRESULT WINAPI glDirect3DDevice2::Vertex(LPVOID lpVertexType)
|
3520 | 3520 | {
|
3521 | 3521 | TRACE_ENTER(2,14,this,14,lpVertexType);
|
3522 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3523 | | - TRACE_RET(23,glD3DDev7->Vertex(lpVertexType));
|
| 3522 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3523 | + TRACE_RET(HRESULT,23,glD3DDev7->Vertex(lpVertexType));
|
3524 | 3524 | }
|
3525 | 3525 |
|
3526 | 3526 | // IDirect3DDevice wrapper
|
— | — | @@ -3543,7 +3543,7 @@ |
3544 | 3544 | HRESULT WINAPI glDirect3DDevice1::QueryInterface(REFIID riid, void** ppvObj)
|
3545 | 3545 | {
|
3546 | 3546 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
3547 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3547 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3548 | 3548 | if(riid == IID_IUnknown)
|
3549 | 3549 | {
|
3550 | 3550 | this->AddRef();
|
— | — | @@ -3552,13 +3552,13 @@ |
3553 | 3553 | TRACE_EXIT(23,DD_OK);
|
3554 | 3554 | return DD_OK;
|
3555 | 3555 | }
|
3556 | | - TRACE_RET(23,glD3DDev7->QueryInterface(riid,ppvObj));
|
| 3556 | + TRACE_RET(HRESULT,23,glD3DDev7->QueryInterface(riid,ppvObj));
|
3557 | 3557 | }
|
3558 | 3558 |
|
3559 | 3559 | ULONG WINAPI glDirect3DDevice1::AddRef()
|
3560 | 3560 | {
|
3561 | 3561 | TRACE_ENTER(1,14,this);
|
3562 | | - if(!this) TRACE_RET(8,0);
|
| 3562 | + if(!this) TRACE_RET(ULONG,8,0);
|
3563 | 3563 | refcount++;
|
3564 | 3564 | TRACE_EXIT(8,refcount);
|
3565 | 3565 | return refcount;
|
— | — | @@ -3567,7 +3567,7 @@ |
3568 | 3568 | ULONG WINAPI glDirect3DDevice1::Release()
|
3569 | 3569 | {
|
3570 | 3570 | TRACE_ENTER(1,14,this);
|
3571 | | - if(!this) TRACE_RET(8,0);
|
| 3571 | + if(!this) TRACE_RET(ULONG,8,0);
|
3572 | 3572 | ULONG ret;
|
3573 | 3573 | refcount--;
|
3574 | 3574 | ret = refcount;
|
— | — | @@ -3579,8 +3579,8 @@ |
3580 | 3580 | HRESULT WINAPI glDirect3DDevice1::AddViewport(LPDIRECT3DVIEWPORT lpDirect3DViewport)
|
3581 | 3581 | {
|
3582 | 3582 | TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
3583 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3584 | | - if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3583 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3584 | + if(!lpDirect3DViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
3585 | 3585 | glDirect3DViewport3 *glD3DV3;
|
3586 | 3586 | lpDirect3DViewport->QueryInterface(IID_IDirect3DViewport3,(void**)&glD3DV3);
|
3587 | 3587 | HRESULT ret = glD3DDev7->AddViewport(glD3DV3);
|
— | — | @@ -3591,32 +3591,32 @@ |
3592 | 3592 | HRESULT WINAPI glDirect3DDevice1::BeginScene()
|
3593 | 3593 | {
|
3594 | 3594 | TRACE_ENTER(1,14,this);
|
3595 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3596 | | - TRACE_RET(23,glD3DDev7->BeginScene());
|
| 3595 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3596 | + TRACE_RET(HRESULT,23,glD3DDev7->BeginScene());
|
3597 | 3597 | }
|
3598 | 3598 | HRESULT WINAPI glDirect3DDevice1::CreateExecuteBuffer(LPD3DEXECUTEBUFFERDESC lpDesc,
|
3599 | 3599 | LPDIRECT3DEXECUTEBUFFER* lplpDirect3DExecuteBuffer, IUnknown* pUnkOuter)
|
3600 | 3600 | {
|
3601 | 3601 | TRACE_ENTER(4,14,this,14,lpDesc,14,lplpDirect3DExecuteBuffer,14,pUnkOuter);
|
3602 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3603 | | - TRACE_RET(23,glD3DDev7->CreateExecuteBuffer(lpDesc,lplpDirect3DExecuteBuffer,pUnkOuter));
|
| 3602 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3603 | + TRACE_RET(HRESULT,23,glD3DDev7->CreateExecuteBuffer(lpDesc,lplpDirect3DExecuteBuffer,pUnkOuter));
|
3604 | 3604 | }
|
3605 | 3605 | HRESULT WINAPI glDirect3DDevice1::CreateMatrix(LPD3DMATRIXHANDLE lpD3DMatHandle)
|
3606 | 3606 | {
|
3607 | 3607 | TRACE_ENTER(2,14,this,14,lpD3DMatHandle);
|
3608 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3609 | | - TRACE_RET(23,glD3DDev7->CreateMatrix(lpD3DMatHandle));
|
| 3608 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3609 | + TRACE_RET(HRESULT,23,glD3DDev7->CreateMatrix(lpD3DMatHandle));
|
3610 | 3610 | }
|
3611 | 3611 | HRESULT WINAPI glDirect3DDevice1::DeleteMatrix(D3DMATRIXHANDLE d3dMatHandle)
|
3612 | 3612 | {
|
3613 | 3613 | TRACE_ENTER(2,14,this,9,d3dMatHandle);
|
3614 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3615 | | - TRACE_RET(23,glD3DDev7->DeleteMatrix(d3dMatHandle));
|
| 3614 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3615 | + TRACE_RET(HRESULT,23,glD3DDev7->DeleteMatrix(d3dMatHandle));
|
3616 | 3616 | }
|
3617 | 3617 | HRESULT WINAPI glDirect3DDevice1::DeleteViewport(LPDIRECT3DVIEWPORT lpDirect3DViewport)
|
3618 | 3618 | {
|
3619 | 3619 | TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
3620 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3620 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3621 | 3621 | glDirect3DViewport3 *glD3DV3;
|
3622 | 3622 | lpDirect3DViewport->QueryInterface(IID_IDirect3DViewport3,(void**)&glD3DV3);
|
3623 | 3623 | HRESULT ret = glD3DDev7->DeleteViewport(glD3DV3);
|
— | — | @@ -3627,37 +3627,37 @@ |
3628 | 3628 | HRESULT WINAPI glDirect3DDevice1::EndScene()
|
3629 | 3629 | {
|
3630 | 3630 | TRACE_ENTER(1,14,this);
|
3631 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3632 | | - TRACE_RET(23,glD3DDev7->EndScene());
|
| 3631 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3632 | + TRACE_RET(HRESULT,23,glD3DDev7->EndScene());
|
3633 | 3633 | }
|
3634 | 3634 | HRESULT WINAPI glDirect3DDevice1::EnumTextureFormats(LPD3DENUMTEXTUREFORMATSCALLBACK lpd3dEnumTextureProc, LPVOID lpArg)
|
3635 | 3635 | {
|
3636 | 3636 | TRACE_ENTER(3,14,this,14,lpd3dEnumTextureProc,14,lpArg);
|
3637 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3637 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3638 | 3638 | LPVOID context[2];
|
3639 | 3639 | context[0] = (LPVOID)lpd3dEnumTextureProc;
|
3640 | 3640 | context[1] = lpArg;
|
3641 | | - TRACE_RET(23,glD3DDev7->EnumTextureFormats(EnumTex2,&context));
|
| 3641 | + TRACE_RET(HRESULT,23,glD3DDev7->EnumTextureFormats(EnumTex2,&context));
|
3642 | 3642 | }
|
3643 | 3643 | HRESULT WINAPI glDirect3DDevice1::Execute(LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags)
|
3644 | 3644 | {
|
3645 | 3645 | TRACE_ENTER(4,14,this,14,lpDirect3DExecuteBuffer,14,lpDirect3DViewport,9,dwFlags);
|
3646 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3647 | | - TRACE_RET(23,glD3DDev7->Execute(lpDirect3DExecuteBuffer,lpDirect3DViewport,dwFlags));
|
| 3646 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3647 | + TRACE_RET(HRESULT,23,glD3DDev7->Execute(lpDirect3DExecuteBuffer,lpDirect3DViewport,dwFlags));
|
3648 | 3648 | }
|
3649 | 3649 | HRESULT WINAPI glDirect3DDevice1::GetCaps(LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc)
|
3650 | 3650 | {
|
3651 | 3651 | TRACE_ENTER(3,14,this,14,lpD3DHWDevDesc,14,lpD3DHELDevDesc);
|
3652 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3653 | | - TRACE_RET(23,glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc));
|
| 3652 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3653 | + TRACE_RET(HRESULT,23,glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc));
|
3654 | 3654 | }
|
3655 | 3655 | HRESULT WINAPI glDirect3DDevice1::GetDirect3D(LPDIRECT3D* lpD3D)
|
3656 | 3656 | {
|
3657 | 3657 | TRACE_ENTER(2,14,this,14,lpD3D);
|
3658 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3658 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
3659 | 3659 | LPDIRECT3D7 d3d7;
|
3660 | 3660 | HRESULT err = glD3DDev7->GetDirect3D(&d3d7);
|
3661 | | - if(!d3d7) TRACE_RET(23,err);
|
| 3661 | + if(!d3d7) TRACE_RET(HRESULT,23,err);
|
3662 | 3662 | d3d7->QueryInterface(IID_IDirect3D,(void**)lpD3D);
|
3663 | 3663 | d3d7->Release();
|
3664 | 3664 | TRACE_VAR("*lpD3D",14,*lpD3D);
|
— | — | @@ -3668,36 +3668,36 @@ |
3669 | 3669 | HRESULT WINAPI glDirect3DDevice1::GetMatrix(D3DMATRIXHANDLE lpD3DMatHandle, LPD3DMATRIX lpD3DMatrix)
|
3670 | 3670 | {
|
3671 | 3671 | TRACE_ENTER(3,14,this,9,lpD3DMatHandle,14,lpD3DMatrix);
|
3672 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3673 | | - TRACE_RET(23,glD3DDev7->GetMatrix(lpD3DMatHandle,lpD3DMatrix));
|
| 3672 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3673 | + TRACE_RET(HRESULT,23,glD3DDev7->GetMatrix(lpD3DMatHandle,lpD3DMatrix));
|
3674 | 3674 | }
|
3675 | 3675 |
|
3676 | 3676 | HRESULT WINAPI glDirect3DDevice1::GetPickRecords(LPDWORD lpCount, LPD3DPICKRECORD lpD3DPickRec)
|
3677 | 3677 | {
|
3678 | 3678 | TRACE_ENTER(3,14,this,14,lpCount,14,lpD3DPickRec);
|
3679 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3680 | | - TRACE_RET(23,glD3DDev7->GetPickRecords(lpCount,lpD3DPickRec));
|
| 3679 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3680 | + TRACE_RET(HRESULT,23,glD3DDev7->GetPickRecords(lpCount,lpD3DPickRec));
|
3681 | 3681 | }
|
3682 | 3682 |
|
3683 | 3683 | HRESULT WINAPI glDirect3DDevice1::GetStats(LPD3DSTATS lpD3DStats)
|
3684 | 3684 | {
|
3685 | 3685 | TRACE_ENTER(2,14,this,14,lpD3DStats);
|
3686 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3687 | | - TRACE_RET(23,glD3DDev7->GetStats(lpD3DStats));
|
| 3686 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3687 | + TRACE_RET(HRESULT,23,glD3DDev7->GetStats(lpD3DStats));
|
3688 | 3688 | }
|
3689 | 3689 |
|
3690 | 3690 | HRESULT WINAPI glDirect3DDevice1::Initialize(LPDIRECT3D lpd3d, LPGUID lpGUID, LPD3DDEVICEDESC lpd3ddvdesc)
|
3691 | 3691 | {
|
3692 | 3692 | TRACE_ENTER(4,14,this,14,lpd3d,24,lpGUID,14,lpd3ddvdesc);
|
3693 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3694 | | - TRACE_RET(23,DDERR_ALREADYINITIALIZED);
|
| 3693 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3694 | + TRACE_RET(HRESULT,23,DDERR_ALREADYINITIALIZED);
|
3695 | 3695 | }
|
3696 | 3696 | HRESULT WINAPI glDirect3DDevice1::NextViewport(LPDIRECT3DVIEWPORT lpDirect3DViewport, LPDIRECT3DVIEWPORT *lplpDirect3DViewport, DWORD dwFlags)
|
3697 | 3697 | {
|
3698 | 3698 | TRACE_ENTER(4,14,this,14,lpDirect3DViewport,14,lplpDirect3DViewport,9,dwFlags);
|
3699 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3700 | | - if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
3701 | | - if(!lplpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3699 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3700 | + if(!lpDirect3DViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 3701 | + if(!lplpDirect3DViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
3702 | 3702 | FIXME("glDirect3DDevice1::NextViewport: stub");
|
3703 | 3703 | TRACE_EXIT(23,DDERR_GENERIC);
|
3704 | 3704 | ERR(DDERR_GENERIC);
|
— | — | @@ -3706,23 +3706,23 @@ |
3707 | 3707 | DWORD dwFlags, LPD3DRECT lpRect)
|
3708 | 3708 | {
|
3709 | 3709 | TRACE_ENTER(5,14,this,14,lpDirect3DExecuteBuffer,14,lpDirect3DViewport,9,dwFlags,26,lpRect);
|
3710 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3711 | | - TRACE_RET(23,glD3DDev7->Pick(lpDirect3DExecuteBuffer, lpDirect3DViewport, dwFlags, lpRect));
|
| 3710 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3711 | + TRACE_RET(HRESULT,23,glD3DDev7->Pick(lpDirect3DExecuteBuffer, lpDirect3DViewport, dwFlags, lpRect));
|
3712 | 3712 | }
|
3713 | 3713 |
|
3714 | 3714 | HRESULT WINAPI glDirect3DDevice1::SetMatrix(D3DMATRIXHANDLE d3dMatHandle, LPD3DMATRIX lpD3DMatrix)
|
3715 | 3715 | {
|
3716 | 3716 | TRACE_ENTER(3,14,this,9,d3dMatHandle,14,lpD3DMatrix);
|
3717 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3718 | | - TRACE_RET(23,glD3DDev7->SetMatrix(d3dMatHandle,lpD3DMatrix));
|
| 3717 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3718 | + TRACE_RET(HRESULT,23,glD3DDev7->SetMatrix(d3dMatHandle,lpD3DMatrix));
|
3719 | 3719 | }
|
3720 | 3720 |
|
3721 | 3721 | HRESULT WINAPI glDirect3DDevice1::SwapTextureHandles(LPDIRECT3DTEXTURE lpD3DTex1, LPDIRECT3DTEXTURE lpD3DTex2)
|
3722 | 3722 | {
|
3723 | 3723 | TRACE_ENTER(3,14,this,14,lpD3DTex1,14,lpD3DTex2);
|
3724 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3725 | | - if(!lpD3DTex1) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
3726 | | - if(!lpD3DTex2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3724 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 3725 | + if(!lpD3DTex1) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 3726 | + if(!lpD3DTex2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
3727 | 3727 | LPDIRECT3DTEXTURE2 tex1, tex2;
|
3728 | 3728 | lpD3DTex1->QueryInterface(IID_IDirect3DTexture2,(void**)&tex1);
|
3729 | 3729 | lpD3DTex2->QueryInterface(IID_IDirect3DTexture2,(void**)&tex2);
|
Index: ddraw/glDirect3DExecuteBuffer.cpp |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | HRESULT WINAPI glDirect3DExecuteBuffer::QueryInterface(REFIID riid, void** ppvObj)
|
46 | 46 | {
|
47 | 47 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
48 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 48 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
49 | 49 | if((riid == IID_IUnknown) || (riid == IID_IDirect3DExecuteBuffer))
|
50 | 50 | {
|
51 | 51 | this->AddRef();
|
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | ULONG WINAPI glDirect3DExecuteBuffer::AddRef()
|
61 | 61 | {
|
62 | 62 | TRACE_ENTER(1,14,this);
|
63 | | - if(!this) TRACE_RET(8,0);
|
| 63 | + if(!this) TRACE_RET(ULONG,8,0);
|
64 | 64 | refcount++;
|
65 | 65 | TRACE_EXIT(8,refcount);
|
66 | 66 | return refcount;
|
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | ULONG WINAPI glDirect3DExecuteBuffer::Release()
|
70 | 70 | {
|
71 | 71 | TRACE_ENTER(1,14,this);
|
72 | | - if(!this) TRACE_RET(8,0);
|
| 72 | + if(!this) TRACE_RET(ULONG,8,0);
|
73 | 73 | ULONG ret;
|
74 | 74 | refcount--;
|
75 | 75 | ret = refcount;
|
— | — | @@ -80,10 +80,10 @@ |
81 | 81 | HRESULT WINAPI glDirect3DExecuteBuffer::GetExecuteData(LPD3DEXECUTEDATA lpData)
|
82 | 82 | {
|
83 | 83 | TRACE_ENTER(2,14,this,14,lpData);
|
84 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
85 | | - if(!lpData) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
86 | | - if(locked) TRACE_RET(23,D3DERR_EXECUTE_LOCKED);
|
87 | | - if(lpData->dwSize < sizeof(D3DEXECUTEDATA)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 84 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 85 | + if(!lpData) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 86 | + if(locked) TRACE_RET(HRESULT,23,D3DERR_EXECUTE_LOCKED);
|
| 87 | + if(lpData->dwSize < sizeof(D3DEXECUTEDATA)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
88 | 88 | memcpy(lpData,&datadesc,sizeof(D3DEXECUTEDATA));
|
89 | 89 | TRACE_EXIT(23,D3D_OK);
|
90 | 90 | return D3D_OK;
|
— | — | @@ -93,7 +93,7 @@ |
94 | 94 | LPD3DEXECUTEBUFFERDESC lpDesc)
|
95 | 95 | {
|
96 | 96 | TRACE_ENTER(3,14,this,14,lpDirect3DDevice,14,lpDesc);
|
97 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 97 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
98 | 98 | TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
99 | 99 | return DDERR_ALREADYINITIALIZED;
|
100 | 100 | }
|
— | — | @@ -101,11 +101,11 @@ |
102 | 102 | HRESULT WINAPI glDirect3DExecuteBuffer::Lock(LPD3DEXECUTEBUFFERDESC lpDesc)
|
103 | 103 | {
|
104 | 104 | TRACE_ENTER(2,14,this,14,lpDesc);
|
105 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
106 | | - if(!lpDesc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
107 | | - if(lpDesc->dwSize < sizeof(D3DEXECUTEBUFFERDESC)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
108 | | - if(inuse) TRACE_RET(23,DDERR_WASSTILLDRAWING);
|
109 | | - if(locked) TRACE_RET(23,D3DERR_EXECUTE_LOCKED);
|
| 105 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 106 | + if(!lpDesc) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 107 | + if(lpDesc->dwSize < sizeof(D3DEXECUTEBUFFERDESC)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 108 | + if(inuse) TRACE_RET(HRESULT,23,DDERR_WASSTILLDRAWING);
|
| 109 | + if(locked) TRACE_RET(HRESULT,23,D3DERR_EXECUTE_LOCKED);
|
110 | 110 | desc.dwCaps = lpDesc->dwCaps;
|
111 | 111 | desc.dwFlags |= D3DDEB_LPDATA;
|
112 | 112 | if(!data)
|
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | HRESULT WINAPI glDirect3DExecuteBuffer::Optimize(DWORD dwDummy)
|
125 | 125 | {
|
126 | 126 | TRACE_ENTER(2,14,this,9,dwDummy);
|
127 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 127 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
128 | 128 | TRACE_EXIT(23,DDERR_UNSUPPORTED);
|
129 | 129 | return DDERR_UNSUPPORTED;
|
130 | 130 | }
|
— | — | @@ -131,9 +131,9 @@ |
132 | 132 | HRESULT WINAPI glDirect3DExecuteBuffer::SetExecuteData(LPD3DEXECUTEDATA lpData)
|
133 | 133 | {
|
134 | 134 | TRACE_ENTER(2,14,this,14,lpData);
|
135 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
136 | | - if(!lpData) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
137 | | - if(lpData->dwSize != sizeof(D3DEXECUTEDATA)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 135 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 136 | + if(!lpData) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 137 | + if(lpData->dwSize != sizeof(D3DEXECUTEDATA)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
138 | 138 | memcpy(&datadesc,lpData,sizeof(D3DEXECUTEDATA));
|
139 | 139 | TRACE_EXIT(23,D3D_OK);
|
140 | 140 | return D3D_OK;
|
— | — | @@ -142,11 +142,11 @@ |
143 | 143 | HRESULT WINAPI glDirect3DExecuteBuffer::Unlock()
|
144 | 144 | {
|
145 | 145 | TRACE_ENTER(1,14,this);
|
146 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
147 | | - if(inuse) TRACE_RET(23,D3DERR_EXECUTE_NOT_LOCKED);
|
148 | | - if(!locked) TRACE_RET(23,D3DERR_EXECUTE_NOT_LOCKED);
|
| 146 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 147 | + if(inuse) TRACE_RET(HRESULT,23,D3DERR_EXECUTE_NOT_LOCKED);
|
| 148 | + if(!locked) TRACE_RET(HRESULT,23,D3DERR_EXECUTE_NOT_LOCKED);
|
149 | 149 | locked = false;
|
150 | | - TRACE_RET(23,D3D_OK);
|
| 150 | + TRACE_RET(HRESULT,23,D3D_OK);
|
151 | 151 | return D3D_OK;
|
152 | 152 | }
|
153 | 153 |
|
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | HRESULT WINAPI glDirect3DExecuteBuffer::Validate(LPDWORD lpdwOffset, LPD3DVALIDATECALLBACK lpFunc, LPVOID lpUserArg, DWORD dwReserved)
|
155 | 155 | {
|
156 | 156 | TRACE_ENTER(5,14,this,14,lpdwOffset,14,lpFunc,14,lpUserArg,9,dwReserved);
|
157 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 157 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
158 | 158 | TRACE_EXIT(23,DDERR_UNSUPPORTED);
|
159 | 159 | return DDERR_UNSUPPORTED;
|
160 | 160 | }
|
— | — | @@ -161,16 +161,16 @@ |
162 | 162 | HRESULT glDirect3DExecuteBuffer::ExecuteLock(LPD3DEXECUTEBUFFERDESC lpDesc,LPD3DEXECUTEDATA lpData)
|
163 | 163 | {
|
164 | 164 | TRACE_ENTER(3,14,this,14,lpDesc,14,lpData);
|
165 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
166 | | - if(inuse) TRACE_RET(23,DDERR_WASSTILLDRAWING);
|
167 | | - if(locked) TRACE_RET(23,D3DERR_EXECUTE_LOCKED);
|
168 | | - if(!lpDesc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
169 | | - if(!lpData) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 165 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 166 | + if(inuse) TRACE_RET(HRESULT,23,DDERR_WASSTILLDRAWING);
|
| 167 | + if(locked) TRACE_RET(HRESULT,23,D3DERR_EXECUTE_LOCKED);
|
| 168 | + if(!lpDesc) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 169 | + if(!lpData) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
170 | 170 | desc.dwFlags |= D3DDEB_LPDATA;
|
171 | 171 | if(!data)
|
172 | 172 | {
|
173 | 173 | data = (unsigned char *)malloc(desc.dwBufferSize);
|
174 | | - if(!data) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 174 | + if(!data) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
175 | 175 | }
|
176 | 176 | desc.lpData = data;
|
177 | 177 | memcpy(lpDesc,&desc,sizeof(D3DEXECUTEBUFFERDESC));
|
— | — | @@ -184,12 +184,12 @@ |
185 | 185 | HRESULT glDirect3DExecuteBuffer::ExecuteUnlock(LPD3DEXECUTEDATA lpData)
|
186 | 186 | {
|
187 | 187 | TRACE_ENTER(2,14,this,14,lpData);
|
188 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
189 | | - if(!lpData) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
190 | | - if(!inuse) TRACE_RET(23,D3DERR_EXECUTE_NOT_LOCKED);
|
| 188 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 189 | + if(!lpData) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 190 | + if(!inuse) TRACE_RET(HRESULT,23,D3DERR_EXECUTE_NOT_LOCKED);
|
191 | 191 | inuse = false;
|
192 | 192 | locked = false;
|
193 | 193 | memcpy(&datadesc,lpData,sizeof(D3DEXECUTEDATA));
|
194 | | - TRACE_RET(23,D3D_OK);
|
| 194 | + TRACE_RET(HRESULT,23,D3D_OK);
|
195 | 195 | return D3D_OK;
|
196 | 196 | } |
\ No newline at end of file |
Index: ddraw/glDirect3DLight.cpp |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | ULONG WINAPI glDirect3DLight::AddRef()
|
57 | 57 | {
|
58 | 58 | TRACE_ENTER(1,14,this);
|
59 | | - if(!this) TRACE_RET(8,0);
|
| 59 | + if(!this) TRACE_RET(ULONG,8,0);
|
60 | 60 | refcount++;
|
61 | 61 | TRACE_EXIT(8,refcount);
|
62 | 62 | return refcount;
|
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | ULONG WINAPI glDirect3DLight::Release()
|
65 | 65 | {
|
66 | 66 | TRACE_ENTER(1,14,this);
|
67 | | - if(!this) TRACE_RET(8,0);
|
| 67 | + if(!this) TRACE_RET(ULONG,8,0);
|
68 | 68 | ULONG ret;
|
69 | 69 | refcount--;
|
70 | 70 | ret = refcount;
|
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | HRESULT WINAPI glDirect3DLight::Initialize(LPDIRECT3D lpDirect3D)
|
77 | 77 | {
|
78 | 78 | TRACE_ENTER(2,14,this,14,lpDirect3D);
|
79 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 79 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
80 | 80 | TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
81 | 81 | return DDERR_ALREADYINITIALIZED;
|
82 | 82 | }
|
— | — | @@ -82,8 +82,8 @@ |
83 | 83 |
|
84 | 84 | HRESULT WINAPI glDirect3DLight::QueryInterface(REFIID riid, void** ppvObj)
|
85 | 85 | {TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
86 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
87 | | - if(!ppvObj) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 86 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 87 | + if(!ppvObj) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
88 | 88 | if(riid == IID_IUnknown)
|
89 | 89 | {
|
90 | 90 | this->AddRef();
|
— | — | @@ -112,9 +112,9 @@ |
113 | 113 | HRESULT WINAPI glDirect3DLight::GetLight(LPD3DLIGHT lpLight)
|
114 | 114 | {
|
115 | 115 | TRACE_ENTER(2,14,this,14,lpLight);
|
116 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
117 | | - if(!lpLight) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
118 | | - if(lpLight->dwSize < sizeof(D3DLIGHT)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 116 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 117 | + if(!lpLight) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 118 | + if(lpLight->dwSize < sizeof(D3DLIGHT)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
119 | 119 | lpLight->dltType = light.dltType;
|
120 | 120 | lpLight->dcvColor = light.dcvDiffuse;
|
121 | 121 | lpLight->dvPosition = light.dvPosition;
|
— | — | @@ -132,9 +132,9 @@ |
133 | 133 | HRESULT WINAPI glDirect3DLight::SetLight(LPD3DLIGHT lpLight)
|
134 | 134 | {
|
135 | 135 | TRACE_ENTER(2,14,this,14,lpLight);
|
136 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
137 | | - if(!lpLight) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
138 | | - if(lpLight->dwSize < sizeof(D3DLIGHT)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 136 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 137 | + if(!lpLight) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 138 | + if(lpLight->dwSize < sizeof(D3DLIGHT)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
139 | 139 | light.dltType = lpLight->dltType;
|
140 | 140 | light.dcvDiffuse = lpLight->dcvColor;
|
141 | 141 | light.dcvAmbient.r = light.dcvAmbient.g = light.dcvAmbient.b = light.dcvAmbient.a = 0;
|
Index: ddraw/glDirect3DMaterial.cpp |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | HRESULT WINAPI glDirect3DMaterial3::QueryInterface(REFIID riid, void** ppvObj)
|
52 | 52 | {
|
53 | 53 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
54 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 54 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
55 | 55 | if(riid == IID_IUnknown)
|
56 | 56 | {
|
57 | 57 | this->AddRef();
|
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | ULONG WINAPI glDirect3DMaterial3::AddRef()
|
116 | 116 | {
|
117 | 117 | TRACE_ENTER(1,14,this);
|
118 | | - if(!this) TRACE_RET(8,0);
|
| 118 | + if(!this) TRACE_RET(ULONG,8,0);
|
119 | 119 | refcount++;
|
120 | 120 | TRACE_EXIT(8,refcount);
|
121 | 121 | return refcount;
|
— | — | @@ -122,7 +122,7 @@ |
123 | 123 |
|
124 | 124 | ULONG WINAPI glDirect3DMaterial3::Release()
|
125 | 125 | {
|
126 | | - if(!this) TRACE_RET(8,0);
|
| 126 | + if(!this) TRACE_RET(ULONG,8,0);
|
127 | 127 | ULONG ret;
|
128 | 128 | refcount--;
|
129 | 129 | ret = refcount;
|
— | — | @@ -134,12 +134,12 @@ |
135 | 135 | HRESULT WINAPI glDirect3DMaterial3::GetHandle(LPDIRECT3DDEVICE3 lpDirect3DDevice, LPD3DMATERIALHANDLE lpHandle)
|
136 | 136 | {
|
137 | 137 | TRACE_ENTER(3,14,this,14,lpDirect3DDevice,14,lpHandle);
|
138 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
139 | | - if(!lpDirect3DDevice) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 138 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 139 | + if(!lpDirect3DDevice) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
140 | 140 | glDirect3DDevice3 *dev3 = (glDirect3DDevice3*)lpDirect3DDevice;
|
141 | 141 | if(handle)
|
142 | 142 | {
|
143 | | - if(device != dev3->GetGLD3DDev7()) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 143 | + if(device != dev3->GetGLD3DDev7()) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
144 | 144 | *lpHandle = handle;
|
145 | 145 | TRACE_VAR("*lpHandle",9,*lpHandle);
|
146 | 146 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -147,7 +147,7 @@ |
148 | 148 | }
|
149 | 149 | device = dev3->GetGLD3DDev7();
|
150 | 150 | handle = device->AddMaterial(this);
|
151 | | - if(handle == -1) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 151 | + if(handle == -1) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
152 | 152 | *lpHandle = handle;
|
153 | 153 | TRACE_VAR("*lpHandle",9,*lpHandle);
|
154 | 154 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -157,8 +157,8 @@ |
158 | 158 | HRESULT WINAPI glDirect3DMaterial3::GetMaterial(LPD3DMATERIAL lpMat)
|
159 | 159 | {
|
160 | 160 | TRACE_ENTER(2,14,this,14,lpMat);
|
161 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
162 | | - if(lpMat->dwSize < sizeof(D3DMATERIAL)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 161 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 162 | + if(lpMat->dwSize < sizeof(D3DMATERIAL)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
163 | 163 | memcpy(lpMat,&material,sizeof(D3DMATERIAL));
|
164 | 164 | TRACE_EXIT(23,D3D_OK);
|
165 | 165 | return D3D_OK;
|
— | — | @@ -167,8 +167,8 @@ |
168 | 168 | HRESULT WINAPI glDirect3DMaterial3::SetMaterial(LPD3DMATERIAL lpMat)
|
169 | 169 | {
|
170 | 170 | TRACE_ENTER(2,14,this,14,lpMat);
|
171 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
172 | | - if(lpMat->dwSize != sizeof(D3DMATERIAL)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 171 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 172 | + if(lpMat->dwSize != sizeof(D3DMATERIAL)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
173 | 173 | memcpy(&material,lpMat,sizeof(D3DMATERIAL));
|
174 | 174 | if(device && current) Sync();
|
175 | 175 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -229,7 +229,7 @@ |
230 | 230 | ULONG WINAPI glDirect3DMaterial2::AddRef()
|
231 | 231 | {
|
232 | 232 | TRACE_ENTER(1,14,this);
|
233 | | - if(!this) TRACE_RET(8,0);
|
| 233 | + if(!this) TRACE_RET(ULONG,8,0);
|
234 | 234 | refcount++;
|
235 | 235 | TRACE_EXIT(8,refcount);
|
236 | 236 | return refcount;
|
— | — | @@ -238,7 +238,7 @@ |
239 | 239 | ULONG WINAPI glDirect3DMaterial2::Release()
|
240 | 240 | {
|
241 | 241 | TRACE_ENTER(1,14,this);
|
242 | | - if(!this) TRACE_RET(8,0);
|
| 242 | + if(!this) TRACE_RET(ULONG,8,0);
|
243 | 243 | ULONG ret;
|
244 | 244 | refcount--;
|
245 | 245 | ret = refcount;
|
— | — | @@ -250,7 +250,7 @@ |
251 | 251 | HRESULT WINAPI glDirect3DMaterial2::QueryInterface(REFIID riid, void** ppvObj)
|
252 | 252 | {
|
253 | 253 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
254 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 254 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
255 | 255 | if(riid == IID_IUnknown)
|
256 | 256 | {
|
257 | 257 | this->AddRef();
|
— | — | @@ -259,14 +259,14 @@ |
260 | 260 | TRACE_EXIT(23,D3D_OK);
|
261 | 261 | return D3D_OK;
|
262 | 262 | }
|
263 | | - TRACE_RET(23,glD3DM3->QueryInterface(riid,ppvObj));
|
| 263 | + TRACE_RET(HRESULT,23,glD3DM3->QueryInterface(riid,ppvObj));
|
264 | 264 | }
|
265 | 265 |
|
266 | 266 | HRESULT WINAPI glDirect3DMaterial2::GetHandle(LPDIRECT3DDEVICE2 lpDirect3DDevice, LPD3DMATERIALHANDLE lpHandle)
|
267 | 267 | {
|
268 | 268 | TRACE_ENTER(3,14,this,14,lpDirect3DDevice,14,lpHandle);
|
269 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
270 | | - if(!lpDirect3DDevice) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 269 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 270 | + if(!lpDirect3DDevice) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
271 | 271 | glDirect3DDevice2 *glD3DDev2 = (glDirect3DDevice2*)lpDirect3DDevice;
|
272 | 272 | glDirect3DDevice3 *glD3DDev3;
|
273 | 273 | glD3DDev2->QueryInterface(IID_IDirect3DDevice3,(void**)&glD3DDev3);
|
— | — | @@ -279,14 +279,14 @@ |
280 | 280 | HRESULT WINAPI glDirect3DMaterial2::GetMaterial(LPD3DMATERIAL lpMat)
|
281 | 281 | {
|
282 | 282 | TRACE_ENTER(2,14,this,14,lpMat);
|
283 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
284 | | - TRACE_RET(23,glD3DM3->GetMaterial(lpMat));
|
| 283 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 284 | + TRACE_RET(HRESULT,23,glD3DM3->GetMaterial(lpMat));
|
285 | 285 | }
|
286 | 286 | HRESULT WINAPI glDirect3DMaterial2::SetMaterial(LPD3DMATERIAL lpMat)
|
287 | 287 | {
|
288 | 288 | TRACE_ENTER(2,14,this,14,lpMat);
|
289 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
290 | | - TRACE_RET(23,glD3DM3->SetMaterial(lpMat));
|
| 289 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 290 | + TRACE_RET(HRESULT,23,glD3DM3->SetMaterial(lpMat));
|
291 | 291 | }
|
292 | 292 |
|
293 | 293 | glDirect3DMaterial1::glDirect3DMaterial1(glDirect3DMaterial3 *glD3DM3)
|
— | — | @@ -308,7 +308,7 @@ |
309 | 309 | ULONG WINAPI glDirect3DMaterial1::AddRef()
|
310 | 310 | {
|
311 | 311 | TRACE_ENTER(1,14,this);
|
312 | | - if(!this) TRACE_RET(8,0);
|
| 312 | + if(!this) TRACE_RET(ULONG,8,0);
|
313 | 313 | refcount++;
|
314 | 314 | TRACE_EXIT(8,refcount);
|
315 | 315 | return refcount;
|
— | — | @@ -317,7 +317,7 @@ |
318 | 318 | ULONG WINAPI glDirect3DMaterial1::Release()
|
319 | 319 | {
|
320 | 320 | TRACE_ENTER(1,14,this);
|
321 | | - if(!this) TRACE_RET(8,0);
|
| 321 | + if(!this) TRACE_RET(ULONG,8,0);
|
322 | 322 | ULONG ret;
|
323 | 323 | refcount--;
|
324 | 324 | ret = refcount;
|
— | — | @@ -329,7 +329,7 @@ |
330 | 330 | HRESULT WINAPI glDirect3DMaterial1::QueryInterface(REFIID riid, void** ppvObj)
|
331 | 331 | {
|
332 | 332 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
333 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 333 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
334 | 334 | if(riid == IID_IUnknown)
|
335 | 335 | {
|
336 | 336 | this->AddRef();
|
— | — | @@ -338,14 +338,14 @@ |
339 | 339 | TRACE_EXIT(23,D3D_OK);
|
340 | 340 | return D3D_OK;
|
341 | 341 | }
|
342 | | - TRACE_RET(23,glD3DM3->QueryInterface(riid,ppvObj));
|
| 342 | + TRACE_RET(HRESULT,23,glD3DM3->QueryInterface(riid,ppvObj));
|
343 | 343 | }
|
344 | 344 |
|
345 | 345 | HRESULT WINAPI glDirect3DMaterial1::GetHandle(LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DMATERIALHANDLE lpHandle)
|
346 | 346 | {
|
347 | 347 | TRACE_ENTER(3,14,this,14,lpDirect3DDevice,14,lpHandle);
|
348 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
349 | | - if(!lpDirect3DDevice) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 348 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 349 | + if(!lpDirect3DDevice) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
350 | 350 | glDirect3DDevice1 *glD3DDev1 = (glDirect3DDevice1*)lpDirect3DDevice;
|
351 | 351 | glDirect3DDevice3 *glD3DDev3;
|
352 | 352 | glD3DDev1->QueryInterface(IID_IDirect3DDevice3,(void**)&glD3DDev3);
|
— | — | @@ -358,14 +358,14 @@ |
359 | 359 | HRESULT WINAPI glDirect3DMaterial1::GetMaterial(LPD3DMATERIAL lpMat)
|
360 | 360 | {
|
361 | 361 | TRACE_ENTER(2,14,this,14,lpMat);
|
362 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
363 | | - TRACE_RET(23,glD3DM3->GetMaterial(lpMat));
|
| 362 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 363 | + TRACE_RET(HRESULT,23,glD3DM3->GetMaterial(lpMat));
|
364 | 364 | }
|
365 | 365 |
|
366 | 366 | HRESULT WINAPI glDirect3DMaterial1::Initialize(LPDIRECT3D lpDirect3D)
|
367 | 367 | {
|
368 | 368 | TRACE_ENTER(2,14,this,14,lpDirect3D);
|
369 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 369 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
370 | 370 | TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
371 | 371 | return DDERR_ALREADYINITIALIZED;
|
372 | 372 | }
|
— | — | @@ -373,7 +373,7 @@ |
374 | 374 | HRESULT WINAPI glDirect3DMaterial1::Reserve()
|
375 | 375 | {
|
376 | 376 | TRACE_ENTER(1,14,this);
|
377 | | - if(!this) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 377 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
378 | 378 | TRACE_EXIT(23,DDERR_UNSUPPORTED);
|
379 | 379 | return DDERR_UNSUPPORTED;
|
380 | 380 | }
|
— | — | @@ -381,14 +381,14 @@ |
382 | 382 | HRESULT WINAPI glDirect3DMaterial1::SetMaterial(LPD3DMATERIAL lpMat)
|
383 | 383 | {
|
384 | 384 | TRACE_ENTER(2,14,this,14,lpMat);
|
385 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
386 | | - TRACE_RET(23,glD3DM3->SetMaterial(lpMat));
|
| 385 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 386 | + TRACE_RET(HRESULT,23,glD3DM3->SetMaterial(lpMat));
|
387 | 387 | }
|
388 | 388 |
|
389 | 389 | HRESULT WINAPI glDirect3DMaterial1::Unreserve()
|
390 | 390 | {
|
391 | 391 | TRACE_ENTER(1,14,this);
|
392 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 392 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
393 | 393 | TRACE_EXIT(23,DDERR_UNSUPPORTED);
|
394 | 394 | return DDERR_UNSUPPORTED;
|
395 | 395 | }
|
Index: ddraw/glDirect3DTexture.cpp |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | HRESULT WINAPI glDirect3DTexture2::QueryInterface(REFIID riid, void** ppvObj)
|
44 | 44 | {
|
45 | 45 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
46 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 46 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
47 | 47 | if(riid == IID_IUnknown)
|
48 | 48 | {
|
49 | 49 | this->AddRef();
|
— | — | @@ -51,13 +51,13 @@ |
52 | 52 | TRACE_EXIT(23,DD_OK);
|
53 | 53 | return DD_OK;
|
54 | 54 | }
|
55 | | - TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
| 55 | + TRACE_RET(HRESULT,23,glDDS7->QueryInterface(riid,ppvObj));
|
56 | 56 | }
|
57 | 57 |
|
58 | 58 | ULONG WINAPI glDirect3DTexture2::AddRef()
|
59 | 59 | {
|
60 | 60 | TRACE_ENTER(1,14,this);
|
61 | | - if(!this) TRACE_RET(8,0);
|
| 61 | + if(!this) TRACE_RET(ULONG,8,0);
|
62 | 62 | refcount++;
|
63 | 63 | TRACE_EXIT(8,refcount);
|
64 | 64 | return refcount;
|
— | — | @@ -66,7 +66,7 @@ |
67 | 67 | ULONG WINAPI glDirect3DTexture2::Release()
|
68 | 68 | {
|
69 | 69 | TRACE_ENTER(1,14,this);
|
70 | | - if(!this) TRACE_RET(8,0);
|
| 70 | + if(!this) TRACE_RET(ULONG,8,0);
|
71 | 71 | ULONG ret;
|
72 | 72 | refcount--;
|
73 | 73 | ret = refcount;
|
— | — | @@ -78,8 +78,8 @@ |
79 | 79 | HRESULT WINAPI glDirect3DTexture2::GetHandle(LPDIRECT3DDEVICE2 lpDirect3DDevice2, LPD3DTEXTUREHANDLE lpHandle)
|
80 | 80 | {
|
81 | 81 | TRACE_ENTER(3,14,this,14,lpDirect3DDevice2,14,lpHandle);
|
82 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
83 | | - if(!lpDirect3DDevice2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 82 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 83 | + if(!lpDirect3DDevice2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
84 | 84 | glDirect3DDevice7 *glD3DDev7;
|
85 | 85 | lpDirect3DDevice2->QueryInterface(IID_IDirect3DDevice7,(void**)&glD3DDev7);
|
86 | 86 | HRESULT ret = glDDS7->GetHandle(glD3DDev7,lpHandle);
|
— | — | @@ -90,14 +90,14 @@ |
91 | 91 | HRESULT WINAPI glDirect3DTexture2::Load(LPDIRECT3DTEXTURE2 lpD3DTexture2)
|
92 | 92 | {
|
93 | 93 | TRACE_ENTER(2,14,this,14,lpD3DTexture2);
|
94 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
95 | | - if(!lpD3DTexture2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
96 | | - TRACE_RET(23,glDDS7->Load(((glDirect3DTexture2*)lpD3DTexture2)->GetDDS7()));
|
| 94 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 95 | + if(!lpD3DTexture2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 96 | + TRACE_RET(HRESULT,23,glDDS7->Load(((glDirect3DTexture2*)lpD3DTexture2)->GetDDS7()));
|
97 | 97 | }
|
98 | 98 | HRESULT WINAPI glDirect3DTexture2::PaletteChanged(DWORD dwStart, DWORD dwCount)
|
99 | 99 | {
|
100 | 100 | TRACE_ENTER(3,14,this,8,dwStart,8,dwCount);
|
101 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 101 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
102 | 102 | FIXME("glDirect3DTexture2::PaletteChanged: stub");
|
103 | 103 | TRACE_EXIT(23,DDERR_GENERIC);
|
104 | 104 | return DDERR_GENERIC;
|
— | — | @@ -120,7 +120,7 @@ |
121 | 121 | HRESULT WINAPI glDirect3DTexture1::QueryInterface(REFIID riid, void** ppvObj)
|
122 | 122 | {
|
123 | 123 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
124 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 124 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
125 | 125 | if(riid == IID_IUnknown)
|
126 | 126 | {
|
127 | 127 | this->AddRef();
|
— | — | @@ -129,12 +129,12 @@ |
130 | 130 | TRACE_EXIT(23,DD_OK);
|
131 | 131 | return DD_OK;
|
132 | 132 | }
|
133 | | - TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
| 133 | + TRACE_RET(HRESULT,23,glDDS7->QueryInterface(riid,ppvObj));
|
134 | 134 | }
|
135 | 135 | ULONG WINAPI glDirect3DTexture1::AddRef()
|
136 | 136 | {
|
137 | 137 | TRACE_ENTER(1,14,this);
|
138 | | - if(!this) TRACE_RET(8,0);
|
| 138 | + if(!this) TRACE_RET(ULONG,8,0);
|
139 | 139 | refcount++;
|
140 | 140 | TRACE_EXIT(8,refcount);
|
141 | 141 | return refcount;
|
— | — | @@ -142,7 +142,7 @@ |
143 | 143 | ULONG WINAPI glDirect3DTexture1::Release()
|
144 | 144 | {
|
145 | 145 | TRACE_ENTER(1,14,this);
|
146 | | - if(!this) TRACE_RET(8,0);
|
| 146 | + if(!this) TRACE_RET(ULONG,8,0);
|
147 | 147 | ULONG ret;
|
148 | 148 | refcount--;
|
149 | 149 | ret = refcount;
|
— | — | @@ -154,8 +154,8 @@ |
155 | 155 | HRESULT WINAPI glDirect3DTexture1::GetHandle(LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DTEXTUREHANDLE lpHandle)
|
156 | 156 | {
|
157 | 157 | TRACE_ENTER(3,14,this,14,lpDirect3DDevice,14,lpHandle);
|
158 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
159 | | - if(!lpDirect3DDevice) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 158 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 159 | + if(!lpDirect3DDevice) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
160 | 160 | glDirect3DDevice7 *glD3DDev7;
|
161 | 161 | lpDirect3DDevice->QueryInterface(IID_IDirect3DDevice7,(void**)&glD3DDev7);
|
162 | 162 | HRESULT ret = glDDS7->GetHandle(glD3DDev7,lpHandle);
|
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | HRESULT WINAPI glDirect3DTexture1::Initialize(LPDIRECT3DDEVICE lpD3DDevice, LPDIRECTDRAWSURFACE lpDDSurface)
|
168 | 168 | {
|
169 | 169 | TRACE_ENTER(3,14,this,14,lpD3DDevice,14,lpDDSurface);
|
170 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 170 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
171 | 171 | TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
172 | 172 | return DDERR_ALREADYINITIALIZED;
|
173 | 173 | }
|
— | — | @@ -173,14 +173,14 @@ |
174 | 174 | HRESULT WINAPI glDirect3DTexture1::Load(LPDIRECT3DTEXTURE lpD3DTexture)
|
175 | 175 | {
|
176 | 176 | TRACE_ENTER(2,14,this,14,lpD3DTexture);
|
177 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
178 | | - if(!lpD3DTexture) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
179 | | - TRACE_RET(23,glDDS7->Load(((glDirect3DTexture1*)lpD3DTexture)->GetDDS7()));
|
| 177 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 178 | + if(!lpD3DTexture) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 179 | + TRACE_RET(HRESULT,23,glDDS7->Load(((glDirect3DTexture1*)lpD3DTexture)->GetDDS7()));
|
180 | 180 | }
|
181 | 181 | HRESULT WINAPI glDirect3DTexture1::PaletteChanged(DWORD dwStart, DWORD dwCount)
|
182 | 182 | {
|
183 | 183 | TRACE_ENTER(3,14,this,8,dwStart,8,dwCount);
|
184 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 184 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
185 | 185 | FIXME("glDirect3DTexture1::PaletteChanged: stub");
|
186 | 186 | TRACE_EXIT(23,DDERR_GENERIC);
|
187 | 187 | return DDERR_GENERIC;
|
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | HRESULT WINAPI glDirect3DTexture1::Unload()
|
190 | 190 | {
|
191 | 191 | TRACE_ENTER(1,14,this);
|
192 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 192 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
193 | 193 | TRACE_EXIT(23,DDERR_UNSUPPORTED);
|
194 | 194 | return DDERR_UNSUPPORTED;
|
195 | 195 | }
|
Index: ddraw/glDirect3DVertexBuffer.cpp |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | ULONG WINAPI glDirect3DVertexBuffer7::AddRef()
|
47 | 47 | {
|
48 | 48 | TRACE_ENTER(1,14,this);
|
49 | | - if(!this) TRACE_RET(8,0);
|
| 49 | + if(!this) TRACE_RET(ULONG,8,0);
|
50 | 50 | refcount++;
|
51 | 51 | TRACE_EXIT(8,refcount);
|
52 | 52 | return refcount;
|
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | ULONG WINAPI glDirect3DVertexBuffer7::Release()
|
55 | 55 | {
|
56 | 56 | TRACE_ENTER(1,14,this);
|
57 | | - if(!this) TRACE_RET(8,0);
|
| 57 | + if(!this) TRACE_RET(ULONG,8,0);
|
58 | 58 | ULONG ret;
|
59 | 59 | refcount--;
|
60 | 60 | ret = refcount;
|
— | — | @@ -65,8 +65,8 @@ |
66 | 66 | HRESULT WINAPI glDirect3DVertexBuffer7::QueryInterface(REFIID riid, void** ppvObj)
|
67 | 67 | {
|
68 | 68 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
69 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
70 | | - if(!ppvObj) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 69 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 70 | + if(!ppvObj) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
71 | 71 | if(riid == IID_IUnknown)
|
72 | 72 | {
|
73 | 73 | this->AddRef();
|
— | — | @@ -82,8 +82,8 @@ |
83 | 83 | HRESULT WINAPI glDirect3DVertexBuffer7::GetVertexBufferDesc(LPD3DVERTEXBUFFERDESC lpVBDesc)
|
84 | 84 | {
|
85 | 85 | TRACE_ENTER(2,14,this,14,lpVBDesc);
|
86 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
87 | | - if(!lpVBDesc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 86 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 87 | + if(!lpVBDesc) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
88 | 88 | *lpVBDesc = vbdesc;
|
89 | 89 | TRACE_EXIT(23,D3D_OK);
|
90 | 90 | return D3D_OK;
|
— | — | @@ -92,7 +92,7 @@ |
93 | 93 | HRESULT WINAPI glDirect3DVertexBuffer7::Lock(DWORD dwFlags, LPVOID* lplpData, LPDWORD lpdwSize)
|
94 | 94 | {
|
95 | 95 | TRACE_ENTER(4,14,this,9,dwFlags,14,lplpData,14,lpdwSize);
|
96 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 96 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
97 | 97 | FIXME("glDirect3DVertexBuffer7::Lock: stub");
|
98 | 98 | TRACE_EXIT(23,DDERR_GENERIC);
|
99 | 99 | return DDERR_GENERIC;
|
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | HRESULT WINAPI glDirect3DVertexBuffer7::Optimize(LPDIRECT3DDEVICE7 lpD3DDevice, DWORD dwFlags)
|
103 | 103 | {
|
104 | 104 | TRACE_ENTER(3,14,this,14,lpD3DDevice,9,dwFlags);
|
105 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 105 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
106 | 106 | FIXME("glDirect3DVertexBuffer7::Optimize: stub");
|
107 | 107 | TRACE_EXIT(23,DDERR_GENERIC);
|
108 | 108 | return DDERR_GENERIC;
|
— | — | @@ -110,7 +110,7 @@ |
111 | 111 | LPDIRECT3DVERTEXBUFFER7 lpSrcBuffer, DWORD dwSrcIndex, LPDIRECT3DDEVICE7 lpD3DDevice, DWORD dwFlags)
|
112 | 112 | {
|
113 | 113 | TRACE_ENTER(8,14,this,9,dwVertexOp,8,dwDestIndex,8,dwCount,14,lpSrcBuffer,8,dwSrcIndex,14,lpD3DDevice,9,dwFlags);
|
114 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 114 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
115 | 115 | FIXME("glDirect3DVertexBuffer7::ProcessVertices: stub");
|
116 | 116 | TRACE_EXIT(23,DDERR_GENERIC);
|
117 | 117 | return DDERR_GENERIC;
|
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | LPD3DDRAWPRIMITIVESTRIDEDDATA lpVertexArray, DWORD dwSrcIndex, LPDIRECT3DDEVICE7 lpD3DDevice, DWORD dwFlags)
|
121 | 121 | {
|
122 | 122 | TRACE_ENTER(8,14,this,9,dwVertexOp,8,dwDestIndex,8,dwCount,14,lpVertexArray,8,dwSrcIndex,14,lpD3DDevice,9,dwFlags);
|
123 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 123 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
124 | 124 | FIXME("glDirect3DVertexBuffer7::ProcessVerticesStrided: stub");
|
125 | 125 | TRACE_EXIT(23,DDERR_GENERIC);
|
126 | 126 | return DDERR_GENERIC;
|
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | HRESULT WINAPI glDirect3DVertexBuffer7::Unlock()
|
129 | 129 | {
|
130 | 130 | TRACE_ENTER(1,14,this);
|
131 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 131 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
132 | 132 | FIXME("glDirect3DVertexBuffer7::Unlock: stub");
|
133 | 133 | TRACE_EXIT(23,DDERR_GENERIC);
|
134 | 134 | return DDERR_GENERIC;
|
Index: ddraw/glDirect3DViewport.cpp |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | HRESULT WINAPI glDirect3DViewport3::QueryInterface(REFIID riid, void** ppvObj)
|
69 | 69 | {
|
70 | 70 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
71 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 71 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
72 | 72 | if(riid == IID_IUnknown)
|
73 | 73 | {
|
74 | 74 | this->AddRef();
|
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | ULONG WINAPI glDirect3DViewport3::AddRef()
|
133 | 133 | {
|
134 | 134 | TRACE_ENTER(1,14,this);
|
135 | | - if(!this) TRACE_RET(8,0);
|
| 135 | + if(!this) TRACE_RET(ULONG,8,0);
|
136 | 136 | refcount++;
|
137 | 137 | TRACE_EXIT(8,refcount);
|
138 | 138 | return refcount;
|
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | ULONG WINAPI glDirect3DViewport3::Release()
|
142 | 142 | {
|
143 | 143 | TRACE_ENTER(1,14,this);
|
144 | | - if(!this) TRACE_RET(8,0);
|
| 144 | + if(!this) TRACE_RET(ULONG,8,0);
|
145 | 145 | ULONG ret;
|
146 | 146 | refcount--;
|
147 | 147 | ret = refcount;
|
— | — | @@ -152,8 +152,8 @@ |
153 | 153 | HRESULT WINAPI glDirect3DViewport3::AddLight(LPDIRECT3DLIGHT lpDirect3DLight)
|
154 | 154 | {
|
155 | 155 | TRACE_ENTER(2,14,this,14,lpDirect3DLight);
|
156 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
157 | | - if(((glDirect3DLight*)lpDirect3DLight)->viewport) TRACE_EXIT(23,D3DERR_LIGHTHASVIEWPORT);
|
| 156 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 157 | + if(((glDirect3DLight*)lpDirect3DLight)->viewport) TRACE_RET(HRESULT,23,D3DERR_LIGHTHASVIEWPORT);
|
158 | 158 | for(int i = 0; i < 8; i++)
|
159 | 159 | {
|
160 | 160 | if(!lights[i])
|
— | — | @@ -175,26 +175,26 @@ |
176 | 176 | HRESULT WINAPI glDirect3DViewport3::Clear(DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags)
|
177 | 177 | {
|
178 | 178 | TRACE_ENTER(4,14,this,8,dwCount,14,lpRects,9,dwFlags);
|
179 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
180 | | - if(!device) TRACE_RET(23,D3DERR_VIEWPORTHASNODEVICE);
|
| 179 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 180 | + if(!device) TRACE_RET(HRESULT,23,D3DERR_VIEWPORTHASNODEVICE);
|
181 | 181 | D3DCOLORVALUE bgcolor = {0.0,0.0,0.0,0.0};
|
182 | 182 | if(device->materials[background]) bgcolor = device->materials[background]->material.diffuse;
|
183 | | - TRACE_RET(23,device->Clear(dwCount,lpRects,dwFlags,d3dcvtod3dcolor(bgcolor),0.0,0));
|
| 183 | + TRACE_RET(HRESULT,23,device->Clear(dwCount,lpRects,dwFlags,d3dcvtod3dcolor(bgcolor),0.0,0));
|
184 | 184 | }
|
185 | 185 |
|
186 | 186 | HRESULT WINAPI glDirect3DViewport3::Clear2(DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags, DWORD dwColor, D3DVALUE dvZ, DWORD dwStencil)
|
187 | 187 | {
|
188 | 188 | TRACE_ENTER(7,14,this,8,dwCount,14,lpRects,9,dwFlags,9,dwColor,19,&dvZ,9,dwStencil);
|
189 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
190 | | - if(!device) TRACE_EXIT(23,D3DERR_VIEWPORTHASNODEVICE);
|
191 | | - TRACE_RET(23,device->Clear(dwCount,lpRects,dwFlags,dwColor,dvZ,dwStencil));
|
| 189 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 190 | + if(!device) TRACE_RET(HRESULT,23,D3DERR_VIEWPORTHASNODEVICE);
|
| 191 | + TRACE_RET(HRESULT,23,device->Clear(dwCount,lpRects,dwFlags,dwColor,dvZ,dwStencil));
|
192 | 192 | }
|
193 | 193 |
|
194 | 194 | HRESULT WINAPI glDirect3DViewport3::DeleteLight(LPDIRECT3DLIGHT lpDirect3DLight)
|
195 | 195 | {
|
196 | 196 | TRACE_ENTER(2,14,this,14,lpDirect3DLight);
|
197 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
198 | | - if(!lpDirect3DLight) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 197 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 198 | + if(!lpDirect3DLight) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
199 | 199 | for(int i = 0; i < 8; i++)
|
200 | 200 | {
|
201 | 201 | if(lights[i] == lpDirect3DLight)
|
— | — | @@ -213,8 +213,8 @@ |
214 | 214 | HRESULT WINAPI glDirect3DViewport3::GetBackground(LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid)
|
215 | 215 | {
|
216 | 216 | TRACE_ENTER(3,14,this,14,lphMat,14,lpValid);
|
217 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
218 | | - if(!lphMat) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 217 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 218 | + if(!lphMat) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
219 | 219 | if(lpValid)
|
220 | 220 | {
|
221 | 221 | if(background) *lpValid = TRUE;
|
— | — | @@ -230,8 +230,8 @@ |
231 | 231 | HRESULT WINAPI glDirect3DViewport3::GetBackgroundDepth(LPDIRECTDRAWSURFACE* lplpDDSurface, LPBOOL lpValid)
|
232 | 232 | {
|
233 | 233 | TRACE_ENTER(3,14,this,14,lplpDDSurface,14,lpValid);
|
234 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
235 | | - if(!lplpDDSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 234 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 235 | + if(!lplpDDSurface) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
236 | 236 | if(lpValid)
|
237 | 237 | {
|
238 | 238 | if(backZ) *lpValid = TRUE;
|
— | — | @@ -247,8 +247,8 @@ |
248 | 248 | HRESULT WINAPI glDirect3DViewport3::GetBackgroundDepth2(LPDIRECTDRAWSURFACE4* lplpDDS, LPBOOL lpValid)
|
249 | 249 | {
|
250 | 250 | TRACE_ENTER(3,14,this,14,lplpDDS,14,lpValid);
|
251 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
252 | | - if(!lplpDDS) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 251 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 252 | + if(!lplpDDS) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
253 | 253 | if(lpValid)
|
254 | 254 | {
|
255 | 255 | if(backZ) *lpValid = TRUE;
|
— | — | @@ -264,8 +264,8 @@ |
265 | 265 | HRESULT WINAPI glDirect3DViewport3::GetViewport(LPD3DVIEWPORT lpData)
|
266 | 266 | {
|
267 | 267 | TRACE_ENTER(2,14,this,14,lpData);
|
268 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
269 | | - if(!lpData) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 268 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 269 | + if(!lpData) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
270 | 270 | memcpy(lpData,&viewport,sizeof(D3DVIEWPORT2));
|
271 | 271 | lpData->dvScaleX = scaleX;
|
272 | 272 | lpData->dvScaleY = scaleY;
|
— | — | @@ -277,8 +277,8 @@ |
278 | 278 | HRESULT WINAPI glDirect3DViewport3::GetViewport2(LPD3DVIEWPORT2 lpData)
|
279 | 279 | {
|
280 | 280 | TRACE_ENTER(2,14,this,14,lpData);
|
281 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
282 | | - if(!lpData) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 281 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 282 | + if(!lpData) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
283 | 283 | memcpy(lpData,&viewport,sizeof(D3DVIEWPORT2));
|
284 | 284 | TRACE_EXIT(23,D3D_OK);
|
285 | 285 | return D3D_OK;
|
— | — | @@ -286,7 +286,7 @@ |
287 | 287 | HRESULT WINAPI glDirect3DViewport3::Initialize(LPDIRECT3D lpDirect3D)
|
288 | 288 | {
|
289 | 289 | TRACE_ENTER(2,14,this,14,lpDirect3D);
|
290 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 290 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
291 | 291 | TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
292 | 292 | return DDERR_ALREADYINITIALIZED;
|
293 | 293 | }
|
— | — | @@ -293,7 +293,7 @@ |
294 | 294 | HRESULT WINAPI glDirect3DViewport3::LightElements(DWORD dwElementCount, LPD3DLIGHTDATA lpData)
|
295 | 295 | {
|
296 | 296 | TRACE_ENTER(3,14,this,8,dwElementCount,14,lpData);
|
297 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 297 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
298 | 298 | TRACE_EXIT(23,DDERR_UNSUPPORTED);
|
299 | 299 | return DDERR_UNSUPPORTED;
|
300 | 300 | }
|
— | — | @@ -300,8 +300,8 @@ |
301 | 301 | HRESULT WINAPI glDirect3DViewport3::NextLight(LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT* lplpDirect3DLight, DWORD dwFlags)
|
302 | 302 | {
|
303 | 303 | TRACE_ENTER(4,14,this,14,lpDirect3DLight,14,lplpDirect3DLight,9,dwFlags);
|
304 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
305 | | - if(!lplpDirect3DLight) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 304 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 305 | + if(!lplpDirect3DLight) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
306 | 306 | FIXME("glDirect3DViewport3::NextLight: stub");
|
307 | 307 | TRACE_EXIT(23,DDERR_GENERIC);
|
308 | 308 | return DDERR_GENERIC;
|
— | — | @@ -309,9 +309,9 @@ |
310 | 310 | HRESULT WINAPI glDirect3DViewport3::SetBackground(D3DMATERIALHANDLE hMat)
|
311 | 311 | {
|
312 | 312 | TRACE_ENTER(2,14,this,9,hMat);
|
313 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
314 | | - if(!device) TRACE_RET(23,D3DERR_VIEWPORTHASNODEVICE);
|
315 | | - if(hMat > device->materialcount) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 313 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 314 | + if(!device) TRACE_RET(HRESULT,23,D3DERR_VIEWPORTHASNODEVICE);
|
| 315 | + if(hMat > device->materialcount) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
316 | 316 | background = hMat;
|
317 | 317 | TRACE_EXIT(23,D3D_OK);
|
318 | 318 | return D3D_OK;
|
— | — | @@ -319,9 +319,9 @@ |
320 | 320 | HRESULT WINAPI glDirect3DViewport3::SetBackgroundDepth(LPDIRECTDRAWSURFACE lpDDSurface)
|
321 | 321 | {
|
322 | 322 | TRACE_ENTER(2,14,this,14,lpDDSurface);
|
323 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
324 | | - if(!backZ && !lpDDSurface) TRACE_RET(23,D3D_OK);
|
325 | | - if(((glDirectDrawSurface1*)lpDDSurface)->GetDDS7() == backZ) TRACE_RET(23,D3D_OK);
|
| 323 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 324 | + if(!backZ && !lpDDSurface) TRACE_RET(HRESULT,23,D3D_OK);
|
| 325 | + if(((glDirectDrawSurface1*)lpDDSurface)->GetDDS7() == backZ) TRACE_RET(HRESULT,23,D3D_OK);
|
326 | 326 | if(backZ)backZ->Release();
|
327 | 327 | if(lpDDSurface) lpDDSurface->QueryInterface(IID_IDirectDrawSurface7,(void**)&backZ);
|
328 | 328 | else backZ = NULL;
|
— | — | @@ -331,9 +331,9 @@ |
332 | 332 | HRESULT WINAPI glDirect3DViewport3::SetBackgroundDepth2(LPDIRECTDRAWSURFACE4 lpDDS)
|
333 | 333 | {
|
334 | 334 | TRACE_ENTER(2,14,this,14,lpDDS);
|
335 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
336 | | - if(!backZ && !lpDDS) TRACE_RET(23,D3D_OK);
|
337 | | - if(((glDirectDrawSurface4*)lpDDS)->GetDDS7() == backZ) TRACE_RET(23,D3D_OK);
|
| 335 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 336 | + if(!backZ && !lpDDS) TRACE_RET(HRESULT,23,D3D_OK);
|
| 337 | + if(((glDirectDrawSurface4*)lpDDS)->GetDDS7() == backZ) TRACE_RET(HRESULT,23,D3D_OK);
|
338 | 338 | if(backZ)backZ->Release();
|
339 | 339 | if(lpDDS) lpDDS->QueryInterface(IID_IDirectDrawSurface7,(void**)&backZ);
|
340 | 340 | else backZ = NULL;
|
— | — | @@ -344,9 +344,9 @@ |
345 | 345 | HRESULT WINAPI glDirect3DViewport3::SetViewport(LPD3DVIEWPORT lpData)
|
346 | 346 | {
|
347 | 347 | TRACE_ENTER(2,14,this,14,lpData);
|
348 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
349 | | - if(!device) TRACE_RET(23,D3DERR_VIEWPORTHASNODEVICE);
|
350 | | - if(!lpData) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 348 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 349 | + if(!device) TRACE_RET(HRESULT,23,D3DERR_VIEWPORTHASNODEVICE);
|
| 350 | + if(!lpData) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
351 | 351 | D3DVIEWPORT2 vp;
|
352 | 352 | memcpy(&vp,lpData,sizeof(D3DVIEWPORT));
|
353 | 353 | vp.dvClipHeight = viewport.dvClipHeight;
|
— | — | @@ -366,9 +366,9 @@ |
367 | 367 | HRESULT WINAPI glDirect3DViewport3::SetViewport2(LPD3DVIEWPORT2 lpData)
|
368 | 368 | {
|
369 | 369 | TRACE_ENTER(2,14,this,14,lpData);
|
370 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
371 | | - if(!device) TRACE_RET(23,D3DERR_VIEWPORTHASNODEVICE);
|
372 | | - if(!lpData) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 370 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 371 | + if(!device) TRACE_RET(HRESULT,23,D3DERR_VIEWPORTHASNODEVICE);
|
| 372 | + if(!lpData) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
373 | 373 | viewport = *lpData;
|
374 | 374 | if(current && device) Sync();
|
375 | 375 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -377,7 +377,7 @@ |
378 | 378 | HRESULT WINAPI glDirect3DViewport3::TransformVertices(DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffscreen)
|
379 | 379 | {
|
380 | 380 | TRACE_ENTER(5,14,this,8,dwVertexCount,14,lpData,9,dwFlags,14,lpOffscreen);
|
381 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 381 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
382 | 382 | FIXME("glDirect3DViewport3::TransformVertices: stub");
|
383 | 383 | TRACE_EXIT(23,DDERR_GENERIC);
|
384 | 384 | return DDERR_GENERIC;
|
— | — | @@ -453,7 +453,7 @@ |
454 | 454 | ULONG WINAPI glDirect3DViewport2::AddRef()
|
455 | 455 | {
|
456 | 456 | TRACE_ENTER(1,14,this);
|
457 | | - if(!this) TRACE_RET(8,0);
|
| 457 | + if(!this) TRACE_RET(ULONG,8,0);
|
458 | 458 | refcount++;
|
459 | 459 | TRACE_EXIT(8,refcount);
|
460 | 460 | return refcount;
|
— | — | @@ -462,7 +462,7 @@ |
463 | 463 | ULONG WINAPI glDirect3DViewport2::Release()
|
464 | 464 | {
|
465 | 465 | TRACE_ENTER(1,14,this);
|
466 | | - if(!this) TRACE_RET(8,0);
|
| 466 | + if(!this) TRACE_RET(ULONG,8,0);
|
467 | 467 | ULONG ret;
|
468 | 468 | refcount--;
|
469 | 469 | ret = refcount;
|
— | — | @@ -474,7 +474,7 @@ |
475 | 475 | HRESULT WINAPI glDirect3DViewport2::QueryInterface(REFIID riid, void** ppvObj)
|
476 | 476 | {
|
477 | 477 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
478 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 478 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
479 | 479 | if(riid == IID_IUnknown)
|
480 | 480 | {
|
481 | 481 | this->AddRef();
|
— | — | @@ -483,98 +483,98 @@ |
484 | 484 | TRACE_EXIT(23,D3D_OK);
|
485 | 485 | return D3D_OK;
|
486 | 486 | }
|
487 | | - TRACE_RET(23,glD3DV3->QueryInterface(riid,ppvObj));
|
| 487 | + TRACE_RET(HRESULT,23,glD3DV3->QueryInterface(riid,ppvObj));
|
488 | 488 | }
|
489 | 489 |
|
490 | 490 | HRESULT WINAPI glDirect3DViewport2::AddLight(LPDIRECT3DLIGHT lpLight)
|
491 | 491 | {
|
492 | 492 | TRACE_ENTER(2,14,this,14,lpLight);
|
493 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
494 | | - TRACE_RET(23,glD3DV3->AddLight(lpLight));
|
| 493 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 494 | + TRACE_RET(HRESULT,23,glD3DV3->AddLight(lpLight));
|
495 | 495 | }
|
496 | 496 | HRESULT WINAPI glDirect3DViewport2::Clear(DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags)
|
497 | 497 | {
|
498 | 498 | TRACE_ENTER(4,14,this,9,dwCount,14,lpRects,9,dwFlags);
|
499 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
500 | | - TRACE_RET(23,glD3DV3->Clear(dwCount,lpRects,dwFlags));
|
| 499 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 500 | + TRACE_RET(HRESULT,23,glD3DV3->Clear(dwCount,lpRects,dwFlags));
|
501 | 501 | }
|
502 | 502 | HRESULT WINAPI glDirect3DViewport2::DeleteLight(LPDIRECT3DLIGHT lpDirect3DLight)
|
503 | 503 | {
|
504 | 504 | TRACE_ENTER(2,14,this,14,lpDirect3DLight);
|
505 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
506 | | - TRACE_RET(23,glD3DV3->DeleteLight(lpDirect3DLight));
|
| 505 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 506 | + TRACE_RET(HRESULT,23,glD3DV3->DeleteLight(lpDirect3DLight));
|
507 | 507 | }
|
508 | 508 | HRESULT WINAPI glDirect3DViewport2::GetBackground(LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid)
|
509 | 509 | {
|
510 | 510 | TRACE_ENTER(3,14,this,14,lphMat,14,lpValid);
|
511 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
512 | | - TRACE_RET(23,glD3DV3->GetBackground(lphMat,lpValid));
|
| 511 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 512 | + TRACE_RET(HRESULT,23,glD3DV3->GetBackground(lphMat,lpValid));
|
513 | 513 | }
|
514 | 514 | HRESULT WINAPI glDirect3DViewport2::GetBackgroundDepth(LPDIRECTDRAWSURFACE* lplpDDSurface, LPBOOL lpValid)
|
515 | 515 | {
|
516 | 516 | TRACE_ENTER(3,14,this,14,lplpDDSurface,14,lpValid);
|
517 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
518 | | - TRACE_RET(23,glD3DV3->GetBackgroundDepth(lplpDDSurface,lpValid));
|
| 517 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 518 | + TRACE_RET(HRESULT,23,glD3DV3->GetBackgroundDepth(lplpDDSurface,lpValid));
|
519 | 519 | }
|
520 | 520 | HRESULT WINAPI glDirect3DViewport2::GetViewport(LPD3DVIEWPORT lpData)
|
521 | 521 | {
|
522 | 522 | TRACE_ENTER(2,14,this,14,lpData);
|
523 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
524 | | - TRACE_RET(23,glD3DV3->GetViewport(lpData));
|
| 523 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 524 | + TRACE_RET(HRESULT,23,glD3DV3->GetViewport(lpData));
|
525 | 525 | }
|
526 | 526 | HRESULT WINAPI glDirect3DViewport2::GetViewport2(LPD3DVIEWPORT2 lpData)
|
527 | 527 | {
|
528 | 528 | TRACE_ENTER(2,14,this,14,lpData);
|
529 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
530 | | - TRACE_RET(23,glD3DV3->GetViewport2(lpData));
|
| 529 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 530 | + TRACE_RET(HRESULT,23,glD3DV3->GetViewport2(lpData));
|
531 | 531 | }
|
532 | 532 | HRESULT WINAPI glDirect3DViewport2::Initialize(LPDIRECT3D lpDirect3D)
|
533 | 533 | {
|
534 | 534 | TRACE_ENTER(2,14,this,14,lpDirect3D);
|
535 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
536 | | - TRACE_RET(23,glD3DV3->Initialize(lpDirect3D));
|
| 535 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 536 | + TRACE_RET(HRESULT,23,glD3DV3->Initialize(lpDirect3D));
|
537 | 537 | }
|
538 | 538 | HRESULT WINAPI glDirect3DViewport2::LightElements(DWORD dwElementCount, LPD3DLIGHTDATA lpData)
|
539 | 539 | {
|
540 | 540 | TRACE_ENTER(3,14,this,8,dwElementCount,14,lpData);
|
541 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
542 | | - TRACE_RET(23,glD3DV3->LightElements(dwElementCount,lpData));
|
| 541 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 542 | + TRACE_RET(HRESULT,23,glD3DV3->LightElements(dwElementCount,lpData));
|
543 | 543 | }
|
544 | 544 | HRESULT WINAPI glDirect3DViewport2::NextLight(LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT* lplpDirect3DLight, DWORD dwFlags)
|
545 | 545 | {
|
546 | 546 | TRACE_ENTER(4,14,this,14,lpDirect3DLight,14,lplpDirect3DLight,9,dwFlags);
|
547 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
548 | | - TRACE_RET(23,glD3DV3->NextLight(lpDirect3DLight,lplpDirect3DLight,dwFlags));
|
| 547 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 548 | + TRACE_RET(HRESULT,23,glD3DV3->NextLight(lpDirect3DLight,lplpDirect3DLight,dwFlags));
|
549 | 549 | }
|
550 | 550 | HRESULT WINAPI glDirect3DViewport2::SetBackground(D3DMATERIALHANDLE hMat)
|
551 | 551 | {
|
552 | 552 | TRACE_ENTER(2,14,this,9,hMat);
|
553 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
554 | | - TRACE_RET(23,glD3DV3->SetBackground(hMat));
|
| 553 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 554 | + TRACE_RET(HRESULT,23,glD3DV3->SetBackground(hMat));
|
555 | 555 | }
|
556 | 556 | HRESULT WINAPI glDirect3DViewport2::SetBackgroundDepth(LPDIRECTDRAWSURFACE lpDDSurface)
|
557 | 557 | {
|
558 | 558 | TRACE_ENTER(2,14,this,14,lpDDSurface);
|
559 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
560 | | - TRACE_RET(23,glD3DV3->SetBackgroundDepth(lpDDSurface));
|
| 559 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 560 | + TRACE_RET(HRESULT,23,glD3DV3->SetBackgroundDepth(lpDDSurface));
|
561 | 561 | }
|
562 | 562 | HRESULT WINAPI glDirect3DViewport2::SetViewport(LPD3DVIEWPORT lpData)
|
563 | 563 | {
|
564 | 564 | TRACE_ENTER(2,14,this,14,lpData);
|
565 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
566 | | - TRACE_RET(23,glD3DV3->SetViewport(lpData));
|
| 565 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 566 | + TRACE_RET(HRESULT,23,glD3DV3->SetViewport(lpData));
|
567 | 567 | }
|
568 | 568 | HRESULT WINAPI glDirect3DViewport2::SetViewport2(LPD3DVIEWPORT2 lpData)
|
569 | 569 | {
|
570 | 570 | TRACE_ENTER(2,14,this,14,lpData);
|
571 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
572 | | - TRACE_RET(23,glD3DV3->SetViewport2(lpData));
|
| 571 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 572 | + TRACE_RET(HRESULT,23,glD3DV3->SetViewport2(lpData));
|
573 | 573 | }
|
574 | 574 | HRESULT WINAPI glDirect3DViewport2::TransformVertices(DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffscreen)
|
575 | 575 | {
|
576 | 576 | TRACE_ENTER(5,14,this,8,dwVertexCount,14,lpData,9,dwFlags,14,lpOffscreen);
|
577 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
578 | | - TRACE_RET(23,glD3DV3->TransformVertices(dwVertexCount,lpData,dwFlags,lpOffscreen));
|
| 577 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 578 | + TRACE_RET(HRESULT,23,glD3DV3->TransformVertices(dwVertexCount,lpData,dwFlags,lpOffscreen));
|
579 | 579 | }
|
580 | 580 |
|
581 | 581 |
|
— | — | @@ -597,7 +597,7 @@ |
598 | 598 | ULONG WINAPI glDirect3DViewport1::AddRef()
|
599 | 599 | {
|
600 | 600 | TRACE_ENTER(1,14,this);
|
601 | | - if(!this) TRACE_RET(8,0);
|
| 601 | + if(!this) TRACE_RET(ULONG,8,0);
|
602 | 602 | refcount++;
|
603 | 603 | TRACE_EXIT(8,refcount);
|
604 | 604 | return refcount;
|
— | — | @@ -606,7 +606,7 @@ |
607 | 607 | ULONG WINAPI glDirect3DViewport1::Release()
|
608 | 608 | {
|
609 | 609 | TRACE_ENTER(1,14,this);
|
610 | | - if(!this) TRACE_RET(8,0);
|
| 610 | + if(!this) TRACE_RET(ULONG,8,0);
|
611 | 611 | ULONG ret;
|
612 | 612 | refcount--;
|
613 | 613 | ret = refcount;
|
— | — | @@ -627,84 +627,84 @@ |
628 | 628 | TRACE_EXIT(23,D3D_OK);
|
629 | 629 | return D3D_OK;
|
630 | 630 | }
|
631 | | - TRACE_RET(23,glD3DV3->QueryInterface(riid,ppvObj));
|
| 631 | + TRACE_RET(HRESULT,23,glD3DV3->QueryInterface(riid,ppvObj));
|
632 | 632 | }
|
633 | 633 |
|
634 | 634 | HRESULT WINAPI glDirect3DViewport1::AddLight(LPDIRECT3DLIGHT lpLight)
|
635 | 635 | {
|
636 | 636 | TRACE_ENTER(2,14,this,14,lpLight);
|
637 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
638 | | - TRACE_RET(23,glD3DV3->AddLight(lpLight));
|
| 637 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 638 | + TRACE_RET(HRESULT,23,glD3DV3->AddLight(lpLight));
|
639 | 639 | }
|
640 | 640 | HRESULT WINAPI glDirect3DViewport1::Clear(DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags)
|
641 | 641 | {
|
642 | 642 | TRACE_ENTER(4,14,this,8,dwCount,14,lpRects,9,dwFlags);
|
643 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
644 | | - TRACE_RET(23,glD3DV3->Clear(dwCount,lpRects,dwFlags));
|
| 643 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 644 | + TRACE_RET(HRESULT,23,glD3DV3->Clear(dwCount,lpRects,dwFlags));
|
645 | 645 | }
|
646 | 646 | HRESULT WINAPI glDirect3DViewport1::DeleteLight(LPDIRECT3DLIGHT lpDirect3DLight)
|
647 | 647 | {
|
648 | 648 | TRACE_ENTER(2,14,this,14,lpDirect3DLight);
|
649 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
650 | | - TRACE_RET(23,glD3DV3->DeleteLight(lpDirect3DLight));
|
| 649 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 650 | + TRACE_RET(HRESULT,23,glD3DV3->DeleteLight(lpDirect3DLight));
|
651 | 651 | }
|
652 | 652 | HRESULT WINAPI glDirect3DViewport1::GetBackground(LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid)
|
653 | 653 | {
|
654 | 654 | TRACE_ENTER(3,14,this,14,lphMat,14,lpValid);
|
655 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
656 | | - TRACE_RET(23,glD3DV3->GetBackground(lphMat,lpValid));
|
| 655 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 656 | + TRACE_RET(HRESULT,23,glD3DV3->GetBackground(lphMat,lpValid));
|
657 | 657 | }
|
658 | 658 | HRESULT WINAPI glDirect3DViewport1::GetBackgroundDepth(LPDIRECTDRAWSURFACE* lplpDDSurface, LPBOOL lpValid)
|
659 | 659 | {
|
660 | 660 | TRACE_ENTER(3,14,this,14,lplpDDSurface,14,lpValid);
|
661 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
662 | | - TRACE_RET(23,glD3DV3->GetBackgroundDepth(lplpDDSurface,lpValid));
|
| 661 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 662 | + TRACE_RET(HRESULT,23,glD3DV3->GetBackgroundDepth(lplpDDSurface,lpValid));
|
663 | 663 | }
|
664 | 664 | HRESULT WINAPI glDirect3DViewport1::GetViewport(LPD3DVIEWPORT lpData)
|
665 | 665 | {
|
666 | 666 | TRACE_ENTER(2,14,this,14,lpData);
|
667 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
668 | | - TRACE_RET(23,glD3DV3->GetViewport(lpData));
|
| 667 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 668 | + TRACE_RET(HRESULT,23,glD3DV3->GetViewport(lpData));
|
669 | 669 | }
|
670 | 670 | HRESULT WINAPI glDirect3DViewport1::Initialize(LPDIRECT3D lpDirect3D)
|
671 | 671 | {
|
672 | 672 | TRACE_ENTER(2,14,this,14,lpDirect3D);
|
673 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
674 | | - TRACE_RET(23,glD3DV3->Initialize(lpDirect3D));
|
| 673 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 674 | + TRACE_RET(HRESULT,23,glD3DV3->Initialize(lpDirect3D));
|
675 | 675 | }
|
676 | 676 | HRESULT WINAPI glDirect3DViewport1::LightElements(DWORD dwElementCount, LPD3DLIGHTDATA lpData)
|
677 | 677 | {
|
678 | 678 | TRACE_ENTER(3,14,this,8,dwElementCount,14,lpData);
|
679 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 679 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
680 | 680 | return glD3DV3->LightElements(dwElementCount,lpData);
|
681 | 681 | }
|
682 | 682 | HRESULT WINAPI glDirect3DViewport1::NextLight(LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT* lplpDirect3DLight, DWORD dwFlags)
|
683 | 683 | {
|
684 | 684 | TRACE_ENTER(4,14,this,14,lpDirect3DLight,14,lplpDirect3DLight,9,dwFlags);
|
685 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
686 | | - TRACE_RET(23,glD3DV3->NextLight(lpDirect3DLight,lplpDirect3DLight,dwFlags));
|
| 685 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 686 | + TRACE_RET(HRESULT,23,glD3DV3->NextLight(lpDirect3DLight,lplpDirect3DLight,dwFlags));
|
687 | 687 | }
|
688 | 688 | HRESULT WINAPI glDirect3DViewport1::SetBackground(D3DMATERIALHANDLE hMat)
|
689 | 689 | {
|
690 | 690 | TRACE_ENTER(2,14,this,9,hMat);
|
691 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
692 | | - TRACE_RET(23,glD3DV3->SetBackground(hMat));
|
| 691 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 692 | + TRACE_RET(HRESULT,23,glD3DV3->SetBackground(hMat));
|
693 | 693 | }
|
694 | 694 | HRESULT WINAPI glDirect3DViewport1::SetBackgroundDepth(LPDIRECTDRAWSURFACE lpDDSurface)
|
695 | 695 | {
|
696 | 696 | TRACE_ENTER(2,14,this,14,lpDDSurface);
|
697 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
698 | | - TRACE_RET(23,glD3DV3->SetBackgroundDepth(lpDDSurface));
|
| 697 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 698 | + TRACE_RET(HRESULT,23,glD3DV3->SetBackgroundDepth(lpDDSurface));
|
699 | 699 | }
|
700 | 700 | HRESULT WINAPI glDirect3DViewport1::SetViewport(LPD3DVIEWPORT lpData)
|
701 | 701 | {
|
702 | 702 | TRACE_ENTER(2,14,this,14,lpData);
|
703 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
704 | | - TRACE_RET(23,glD3DV3->SetViewport(lpData));
|
| 703 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 704 | + TRACE_RET(HRESULT,23,glD3DV3->SetViewport(lpData));
|
705 | 705 | }
|
706 | 706 | HRESULT WINAPI glDirect3DViewport1::TransformVertices(DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffscreen)
|
707 | 707 | {
|
708 | 708 | TRACE_ENTER(5,14,this,8,dwVertexCount,14,lpData,9,dwFlags,14,lpOffscreen);
|
709 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
710 | | - TRACE_RET(23,glD3DV3->TransformVertices(dwVertexCount,lpData,dwFlags,lpOffscreen));
|
| 709 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 710 | + TRACE_RET(HRESULT,23,glD3DV3->TransformVertices(dwVertexCount,lpData,dwFlags,lpOffscreen));
|
711 | 711 | }
|
Index: ddraw/glDirectDraw.cpp |
— | — | @@ -613,8 +613,8 @@ |
614 | 614 | HRESULT WINAPI glDirectDraw7::QueryInterface(REFIID riid, void** ppvObj)
|
615 | 615 | {
|
616 | 616 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
617 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
618 | | - if(!ppvObj) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 617 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 618 | + if(!ppvObj) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
619 | 619 | if(riid == IID_IUnknown)
|
620 | 620 | {
|
621 | 621 | this->AddRef();
|
— | — | @@ -745,7 +745,7 @@ |
746 | 746 | ULONG WINAPI glDirectDraw7::AddRef()
|
747 | 747 | {
|
748 | 748 | TRACE_ENTER(1,14,this);
|
749 | | - if(!this) TRACE_RET(8,0);
|
| 749 | + if(!this) TRACE_RET(ULONG,8,0);
|
750 | 750 | refcount++;
|
751 | 751 | TRACE_EXIT(8,refcount);
|
752 | 752 | return refcount;
|
— | — | @@ -753,7 +753,7 @@ |
754 | 754 | ULONG WINAPI glDirectDraw7::Release()
|
755 | 755 | {
|
756 | 756 | TRACE_ENTER(1,14,this);
|
757 | | - if(!this) TRACE_RET(8,0);
|
| 757 | + if(!this) TRACE_RET(ULONG,8,0);
|
758 | 758 | ULONG ret;
|
759 | 759 | refcount--;
|
760 | 760 | ret = refcount;
|
— | — | @@ -765,7 +765,7 @@ |
766 | 766 | HRESULT WINAPI glDirectDraw7::Compact()
|
767 | 767 | {
|
768 | 768 | TRACE_ENTER(1,14,this);
|
769 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 769 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
770 | 770 | TRACE_EXIT(23,DD_OK);
|
771 | 771 | return DD_OK;
|
772 | 772 | }
|
— | — | @@ -772,15 +772,15 @@ |
773 | 773 | HRESULT WINAPI glDirectDraw7::CreateClipper(DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter)
|
774 | 774 | {
|
775 | 775 | TRACE_ENTER(4,14,this,9,dwFlags,14,lplpDDClipper,14,pUnkOuter);
|
776 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
777 | | - if(!lplpDDClipper) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
778 | | - if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 776 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 777 | + if(!lplpDDClipper) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 778 | + if(pUnkOuter) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
779 | 779 | clippercount++;
|
780 | 780 | if(clippercount > clippercountmax)
|
781 | 781 | {
|
782 | 782 | glDirectDrawClipper **clippers2;
|
783 | 783 | clippers2 = (glDirectDrawClipper **)realloc(clippers,(clippercountmax+1024)*sizeof(glDirectDrawClipper *));
|
784 | | - if(!clippers2) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 784 | + if(!clippers2) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
785 | 785 | clippers = clippers2;
|
786 | 786 | ZeroMemory(&clippers[clippercountmax],1024*sizeof(glDirectDrawClipper *));
|
787 | 787 | clippercountmax += 1024;
|
— | — | @@ -794,9 +794,9 @@ |
795 | 795 | HRESULT WINAPI glDirectDraw7::CreatePalette(DWORD dwFlags, LPPALETTEENTRY lpDDColorArray, LPDIRECTDRAWPALETTE FAR *lplpDDPalette, IUnknown FAR *pUnkOuter)
|
796 | 796 | {
|
797 | 797 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDColorArray,14,lplpDDPalette,14,pUnkOuter);
|
798 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
799 | | - if(!lplpDDPalette) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
800 | | - if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 798 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 799 | + if(!lplpDDPalette) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 800 | + if(pUnkOuter) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
801 | 801 | glDirectDrawPalette *pal = new glDirectDrawPalette(dwFlags,lpDDColorArray,lplpDDPalette);
|
802 | 802 | TRACE_VAR("*lplpDDPalette",14,*lplpDDPalette);
|
803 | 803 | TRACE_EXIT(23,DD_OK);
|
— | — | @@ -805,9 +805,9 @@ |
806 | 806 | HRESULT WINAPI glDirectDraw7::CreateSurface(LPDDSURFACEDESC2 lpDDSurfaceDesc2, LPDIRECTDRAWSURFACE7 FAR *lplpDDSurface, IUnknown FAR *pUnkOuter)
|
807 | 807 | {
|
808 | 808 | TRACE_ENTER(4,14,this,14,lpDDSurfaceDesc2,14,lplpDDSurface,14,pUnkOuter);
|
809 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
810 | | - if(!lpDDSurfaceDesc2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
811 | | - if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 809 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 810 | + if(!lpDDSurfaceDesc2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 811 | + if(pUnkOuter) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
812 | 812 | if(primary && (lpDDSurfaceDesc2->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) && (renderer->hRC == primary->hRC) )
|
813 | 813 | {
|
814 | 814 | if(primarylost)
|
— | — | @@ -818,7 +818,7 @@ |
819 | 819 | TRACE_EXIT(23,DD_OK);
|
820 | 820 | return DD_OK;
|
821 | 821 | }
|
822 | | - else TRACE_RET(23,DDERR_PRIMARYSURFACEALREADYEXISTS);
|
| 822 | + else TRACE_RET(HRESULT,23,DDERR_PRIMARYSURFACEALREADYEXISTS);
|
823 | 823 | }
|
824 | 824 | surfacecount++;
|
825 | 825 | if(surfacecount > surfacecountmax)
|
— | — | @@ -825,7 +825,7 @@ |
826 | 826 | {
|
827 | 827 | glDirectDrawSurface7 **surfaces2;
|
828 | 828 | surfaces2 = (glDirectDrawSurface7 **)realloc(surfaces,(surfacecountmax+1024)*sizeof(glDirectDrawSurface7 *));
|
829 | | - if(!surfaces2) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 829 | + if(!surfaces2) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
830 | 830 | surfaces = surfaces2;
|
831 | 831 | ZeroMemory(&surfaces[surfacecountmax],1024*sizeof(glDirectDrawSurface7 *));
|
832 | 832 | surfacecountmax += 1024;
|
— | — | @@ -845,9 +845,9 @@ |
846 | 846 | HRESULT WINAPI glDirectDraw7::DuplicateSurface(LPDIRECTDRAWSURFACE7 lpDDSurface, LPDIRECTDRAWSURFACE7 FAR *lplpDupDDSurface)
|
847 | 847 | {
|
848 | 848 | TRACE_ENTER(3,14,this,14,lpDDSurface,14,lplpDupDDSurface);
|
849 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
850 | | - if(!lpDDSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
851 | | - if(!lplpDupDDSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 849 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 850 | + if(!lpDDSurface) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 851 | + if(!lplpDupDDSurface) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
852 | 852 | FIXME("IDirectDraw::DuplicateSurface: stub\n");
|
853 | 853 | TRACE_EXIT(23,DDERR_GENERIC);
|
854 | 854 | ERR(DDERR_GENERIC);
|
— | — | @@ -855,9 +855,9 @@ |
856 | 856 | HRESULT WINAPI glDirectDraw7::EnumDisplayModes(DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc2, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback)
|
857 | 857 | {
|
858 | 858 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDSurfaceDesc2,14,lpContext,14,lpEnumModesCallback);
|
859 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
860 | | - if(!lpDDSurfaceDesc2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
861 | | - if(!lpEnumModesCallback) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 859 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 860 | + if(!lpDDSurfaceDesc2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 861 | + if(!lpEnumModesCallback) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
862 | 862 | HRESULT ret = ::EnumDisplayModes(dwFlags,lpDDSurfaceDesc2,lpContext,lpEnumModesCallback);
|
863 | 863 | TRACE_EXIT(23,ret);
|
864 | 864 | return ret;
|
— | — | @@ -865,9 +865,9 @@ |
866 | 866 | HRESULT WINAPI glDirectDraw7::EnumSurfaces(DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD2, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback)
|
867 | 867 | {
|
868 | 868 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDSD2,14,lpContext,14,lpEnumSurfacesCallback);
|
869 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
870 | | - if(!lpDDSD2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
871 | | - if(!lpEnumSurfacesCallback) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 869 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 870 | + if(!lpDDSD2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 871 | + if(!lpEnumSurfacesCallback) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
872 | 872 | FIXME("IDirectDraw::EnumSurfaces: stub\n");
|
873 | 873 | TRACE_EXIT(23,DDERR_GENERIC);
|
874 | 874 | ERR(DDERR_GENERIC);
|
— | — | @@ -875,7 +875,7 @@ |
876 | 876 | HRESULT WINAPI glDirectDraw7::FlipToGDISurface()
|
877 | 877 | {
|
878 | 878 | TRACE_ENTER(1,14,this);
|
879 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 879 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
880 | 880 | HRESULT error = DD_OK;
|
881 | 881 | if(primary)
|
882 | 882 | {
|
— | — | @@ -890,18 +890,18 @@ |
891 | 891 | TRACE_EXIT(23,error);
|
892 | 892 | return(error);
|
893 | 893 | }
|
894 | | - else TRACE_RET(23,DDERR_NOTFOUND);
|
| 894 | + else TRACE_RET(HRESULT,23,DDERR_NOTFOUND);
|
895 | 895 | }
|
896 | 896 | HRESULT WINAPI glDirectDraw7::GetCaps(LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps)
|
897 | 897 | {
|
898 | 898 | TRACE_ENTER(3,14,this,14,lpDDDriverCaps,14,lpDDHELCaps);
|
899 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 899 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
900 | 900 | //TODO: Fill in as implemented.
|
901 | 901 | DDCAPS_DX7 ddCaps;
|
902 | 902 | ZeroMemory(&ddCaps,sizeof(DDCAPS_DX7));
|
903 | 903 | if(lpDDDriverCaps) ddCaps.dwSize = lpDDDriverCaps->dwSize;
|
904 | 904 | else if(lpDDHELCaps) ddCaps.dwSize = lpDDHELCaps->dwSize;
|
905 | | - else TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 905 | + else TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
906 | 906 | if(ddCaps.dwSize > sizeof(DDCAPS_DX7)) ddCaps.dwSize = sizeof(DDCAPS_DX7);
|
907 | 907 | ddCaps.dwCaps = DDCAPS_BLT | DDCAPS_BLTCOLORFILL | DDCAPS_BLTSTRETCH |
|
908 | 908 | DDCAPS_COLORKEY | DDCAPS_GDI | DDCAPS_PALETTE | DDCAPS_CANBLTSYSMEM |
|
— | — | @@ -932,8 +932,8 @@ |
933 | 933 | HRESULT WINAPI glDirectDraw7::GetDisplayMode(LPDDSURFACEDESC2 lpDDSurfaceDesc2)
|
934 | 934 | {
|
935 | 935 | TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc2);
|
936 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
937 | | - if(!lpDDSurfaceDesc2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 936 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 937 | + if(!lpDDSurfaceDesc2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
938 | 938 | DDSURFACEDESC2 ddsdMode;
|
939 | 939 | ZeroMemory(&ddsdMode, sizeof(DDSURFACEDESC2));
|
940 | 940 | ddsdMode.dwSize = sizeof(DDSURFACEDESC2);
|
— | — | @@ -1017,7 +1017,7 @@ |
1018 | 1018 | if(currmode.dmBitsPerPel == 15) ddsdMode.lPitch = currmode.dmPelsWidth * 2;
|
1019 | 1019 | else if(currmode.dmBitsPerPel == 4) ddsdMode.lPitch = currmode.dmPelsWidth / 2;
|
1020 | 1020 | else ddsdMode.lPitch = currmode.dmPelsWidth * (currmode.dmBitsPerPel / 8);
|
1021 | | - if(lpDDSurfaceDesc2->dwSize < sizeof(DDSURFACEDESC)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1021 | + if(lpDDSurfaceDesc2->dwSize < sizeof(DDSURFACEDESC)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1022 | 1022 | if(lpDDSurfaceDesc2->dwSize > sizeof(DDSURFACEDESC2))
|
1023 | 1023 | lpDDSurfaceDesc2->dwSize = sizeof(DDSURFACEDESC2);
|
1024 | 1024 | memcpy(lpDDSurfaceDesc2,&ddsdMode,lpDDSurfaceDesc2->dwSize);
|
— | — | @@ -1027,9 +1027,9 @@ |
1028 | 1028 | HRESULT WINAPI glDirectDraw7::GetFourCCCodes(LPDWORD lpNumCodes, LPDWORD lpCodes)
|
1029 | 1029 | {
|
1030 | 1030 | TRACE_ENTER(3,14,this,14,lpNumCodes,14,lpCodes);
|
1031 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1032 | | - if(!lpNumCodes) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1033 | | - if(!lpCodes) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1031 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1032 | + if(!lpNumCodes) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1033 | + if(!lpCodes) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1034 | 1034 | FIXME("IDirectDraw::GetFourCCCodes: stub\n");
|
1035 | 1035 | TRACE_EXIT(23,DDERR_GENERIC);
|
1036 | 1036 | ERR(DDERR_GENERIC);
|
— | — | @@ -1037,8 +1037,8 @@ |
1038 | 1038 | HRESULT WINAPI glDirectDraw7::GetGDISurface(LPDIRECTDRAWSURFACE7 FAR *lplpGDIDDSurface)
|
1039 | 1039 | {
|
1040 | 1040 | TRACE_ENTER(2,14,this,14,lplpGDIDDSurface);
|
1041 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1042 | | - if(!lplpGDIDDSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1041 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1042 | + if(!lplpGDIDDSurface) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1043 | 1043 | FIXME("IDirectDraw::GetGDISurface: stub\n");
|
1044 | 1044 | TRACE_EXIT(23,DDERR_GENERIC);
|
1045 | 1045 | ERR(DDERR_GENERIC);
|
— | — | @@ -1046,8 +1046,8 @@ |
1047 | 1047 | HRESULT WINAPI glDirectDraw7::GetMonitorFrequency(LPDWORD lpdwFrequency)
|
1048 | 1048 | {
|
1049 | 1049 | TRACE_ENTER(2,14,this,14,lpdwFrequency);
|
1050 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1051 | | - if(!lpdwFrequency) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1050 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1051 | + if(!lpdwFrequency) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1052 | 1052 | DEBUG("IDirectDraw::GetMonitorFrequency: support multi-monitor\n");
|
1053 | 1053 | DEVMODE devmode;
|
1054 | 1054 | devmode.dmSize = sizeof(DEVMODE);
|
— | — | @@ -1060,8 +1060,8 @@ |
1061 | 1061 | HRESULT WINAPI glDirectDraw7::GetScanLine(LPDWORD lpdwScanLine)
|
1062 | 1062 | {
|
1063 | 1063 | TRACE_ENTER(2,14,this,14,lpdwScanLine);
|
1064 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1065 | | - if(!lpdwScanLine) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1064 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1065 | + if(!lpdwScanLine) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1066 | 1066 | FIXME("IDirectDraw::GetScanLine: stub\n");
|
1067 | 1067 | TRACE_EXIT(23,DDERR_GENERIC);
|
1068 | 1068 | ERR(DDERR_GENERIC);
|
— | — | @@ -1069,8 +1069,8 @@ |
1070 | 1070 | HRESULT WINAPI glDirectDraw7::GetVerticalBlankStatus(LPBOOL lpbIsInVB)
|
1071 | 1071 | {
|
1072 | 1072 | TRACE_ENTER(2,14,this,14,lpbIsInVB);
|
1073 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1074 | | - if(!lpbIsInVB) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1073 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1074 | + if(!lpbIsInVB) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1075 | 1075 | FIXME("IDirectDraw::GetVerticalBlankStatus: stub\n");
|
1076 | 1076 | TRACE_EXIT(23,DDERR_GENERIC);
|
1077 | 1077 | ERR(DDERR_GENERIC);
|
— | — | @@ -1078,8 +1078,8 @@ |
1079 | 1079 | HRESULT WINAPI glDirectDraw7::Initialize(GUID FAR *lpGUID)
|
1080 | 1080 | {
|
1081 | 1081 | TRACE_ENTER(2,14,this,24,lpGUID);
|
1082 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1083 | | - if(initialized) TRACE_RET(23,DDERR_ALREADYINITIALIZED);
|
| 1082 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1083 | + if(initialized) TRACE_RET(HRESULT,23,DDERR_ALREADYINITIALIZED);
|
1084 | 1084 | primarylost = true;
|
1085 | 1085 | glD3D7 = NULL;
|
1086 | 1086 | glDD1 = NULL;
|
— | — | @@ -1095,12 +1095,12 @@ |
1096 | 1096 | timer = timeGetTime();
|
1097 | 1097 | ZeroMemory(&oldmode,sizeof(DEVMODE));
|
1098 | 1098 | surfaces = (glDirectDrawSurface7 **)malloc(1024*sizeof(glDirectDrawSurface7 *));
|
1099 | | - if(!surfaces) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 1099 | + if(!surfaces) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
1100 | 1100 | ZeroMemory(surfaces,1024*sizeof(glDirectDrawSurface7 *));
|
1101 | 1101 | surfacecount = 0;
|
1102 | 1102 | surfacecountmax = 1024;
|
1103 | 1103 | clippers = (glDirectDrawClipper **)malloc(1024*sizeof(glDirectDrawClipper *));
|
1104 | | - if(!clippers) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 1104 | + if(!clippers) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
1105 | 1105 | ZeroMemory(clippers,1024*sizeof(glDirectDrawClipper *));
|
1106 | 1106 | clippercount = 0;
|
1107 | 1107 | clippercountmax = 1024;
|
— | — | @@ -1126,7 +1126,7 @@ |
1127 | 1127 | HRESULT WINAPI glDirectDraw7::RestoreDisplayMode()
|
1128 | 1128 | {
|
1129 | 1129 | TRACE_ENTER(1,14,this);
|
1130 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1130 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1131 | 1131 | if(oldmode.dmSize != 0)
|
1132 | 1132 | {
|
1133 | 1133 | ChangeDisplaySettingsEx(NULL,&oldmode,NULL,0,NULL);
|
— | — | @@ -1137,7 +1137,7 @@ |
1138 | 1138 | HRESULT WINAPI glDirectDraw7::SetCooperativeLevel(HWND hWnd, DWORD dwFlags)
|
1139 | 1139 | {
|
1140 | 1140 | TRACE_ENTER(3,14,this,13,hWnd,9,dwFlags);
|
1141 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1141 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1142 | 1142 | this->hWnd = hWnd;
|
1143 | 1143 | winstyle = GetWindowLongPtrA(hWnd,GWL_STYLE);
|
1144 | 1144 | winstyleex = GetWindowLongPtrA(hWnd,GWL_EXSTYLE);
|
— | — | @@ -1162,7 +1162,7 @@ |
1163 | 1163 | fullscreen = true;
|
1164 | 1164 | else fullscreen = false;
|
1165 | 1165 | if(exclusive)
|
1166 | | - if(!fullscreen) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1166 | + if(!fullscreen) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1167 | 1167 | if(dwFlags & DDSCL_FPUPRESERVE)
|
1168 | 1168 | fpupreserve = true;
|
1169 | 1169 | else fpupreserve = false;
|
— | — | @@ -1173,7 +1173,7 @@ |
1174 | 1174 | threadsafe = true;
|
1175 | 1175 | else threadsafe = false;
|
1176 | 1176 | if(dwFlags & DDSCL_NORMAL)
|
1177 | | - if(exclusive) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1177 | + if(exclusive) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1178 | 1178 | if(dwFlags & DDSCL_NOWINDOWCHANGES)
|
1179 | 1179 | nowindowchanges = true;
|
1180 | 1180 | else nowindowchanges = false;
|
— | — | @@ -1275,7 +1275,7 @@ |
1276 | 1276 | HRESULT WINAPI glDirectDraw7::SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags)
|
1277 | 1277 | {
|
1278 | 1278 | TRACE_ENTER(6,14,this,8,dwWidth,8,dwHeight,8,dwBPP,8,dwRefreshRate,9,dwFlags);
|
1279 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1279 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1280 | 1280 | DEBUG("IDirectDraw::SetDisplayMode: implement multiple monitors\n");
|
1281 | 1281 | DEVMODE newmode,newmode2;
|
1282 | 1282 | DEVMODE currmode;
|
— | — | @@ -1320,23 +1320,23 @@ |
1321 | 1321 | TRACE_EXIT(23,DD_OK);
|
1322 | 1322 | return DD_OK;
|
1323 | 1323 | case DISP_CHANGE_BADMODE:
|
1324 | | - TRACE_RET(23,DDERR_INVALIDMODE);
|
| 1324 | + TRACE_RET(HRESULT,23,DDERR_INVALIDMODE);
|
1325 | 1325 | case DISP_CHANGE_BADFLAGS:
|
1326 | | - TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1326 | + TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1327 | 1327 | case DISP_CHANGE_BADDUALVIEW:
|
1328 | | - TRACE_RET(23,DDERR_GENERIC);
|
| 1328 | + TRACE_RET(HRESULT,23,DDERR_GENERIC);
|
1329 | 1329 | case DISP_CHANGE_BADPARAM:
|
1330 | | - TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1330 | + TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1331 | 1331 | case DISP_CHANGE_FAILED:
|
1332 | | - TRACE_RET(23,DDERR_GENERIC);
|
| 1332 | + TRACE_RET(HRESULT,23,DDERR_GENERIC);
|
1333 | 1333 | case DISP_CHANGE_NOTUPDATED:
|
1334 | | - TRACE_RET(23,DDERR_GENERIC);
|
| 1334 | + TRACE_RET(HRESULT,23,DDERR_GENERIC);
|
1335 | 1335 | case DISP_CHANGE_RESTART:
|
1336 | | - TRACE_RET(23,DDERR_UNSUPPORTEDMODE);
|
| 1336 | + TRACE_RET(HRESULT,23,DDERR_UNSUPPORTEDMODE);
|
1337 | 1337 | default:
|
1338 | | - TRACE_RET(23,DDERR_GENERIC);
|
| 1338 | + TRACE_RET(HRESULT,23,DDERR_GENERIC);
|
1339 | 1339 | }
|
1340 | | - TRACE_RET(23,DDERR_GENERIC);
|
| 1340 | + TRACE_RET(HRESULT,23,DDERR_GENERIC);
|
1341 | 1341 | break;
|
1342 | 1342 | case 1: // Stretch to screen
|
1343 | 1343 | primaryx = dwWidth;
|
— | — | @@ -1475,9 +1475,9 @@ |
1476 | 1476 | HRESULT WINAPI glDirectDraw7::WaitForVerticalBlank(DWORD dwFlags, HANDLE hEvent)
|
1477 | 1477 | {
|
1478 | 1478 | TRACE_ENTER(3,14,this,9,dwFlags,14,hEvent);
|
1479 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1479 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1480 | 1480 | if(dwFlags & DDWAITVB_BLOCKBEGINEVENT)
|
1481 | | - TRACE_RET(23,DDERR_UNSUPPORTED);
|
| 1481 | + TRACE_RET(HRESULT,23,DDERR_UNSUPPORTED);
|
1482 | 1482 | swapinterval=1;
|
1483 | 1483 | primary->RenderScreen(primary->texture,primary);
|
1484 | 1484 | swapinterval=0;
|
— | — | @@ -1487,7 +1487,7 @@ |
1488 | 1488 | HRESULT WINAPI glDirectDraw7::GetAvailableVidMem(LPDDSCAPS2 lpDDSCaps2, LPDWORD lpdwTotal, LPDWORD lpdwFree)
|
1489 | 1489 | {
|
1490 | 1490 | TRACE_ENTER(4,14,this,14,lpDDSCaps2,14,lpdwTotal,14,lpdwFree);
|
1491 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1491 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1492 | 1492 | if(GLEXT_NVX_gpu_memory_info)
|
1493 | 1493 | {
|
1494 | 1494 | if(lpdwTotal) glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX,(GLint*)lpdwTotal);
|
— | — | @@ -1512,7 +1512,7 @@ |
1513 | 1513 | HRESULT WINAPI glDirectDraw7::GetSurfaceFromDC(HDC hdc, LPDIRECTDRAWSURFACE7 *lpDDS)
|
1514 | 1514 | {
|
1515 | 1515 | TRACE_ENTER(3,14,this,13,hdc,14,lpDDS);
|
1516 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1516 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1517 | 1517 | FIXME("IDirectDraw::GetSurfaceFromDC: stub\n");
|
1518 | 1518 | TRACE_EXIT(23,DDERR_GENERIC);
|
1519 | 1519 | ERR(DDERR_GENERIC);
|
— | — | @@ -1520,7 +1520,7 @@ |
1521 | 1521 | HRESULT WINAPI glDirectDraw7::RestoreAllSurfaces()
|
1522 | 1522 | {
|
1523 | 1523 | TRACE_ENTER(1,14,this);
|
1524 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1524 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1525 | 1525 | FIXME("IDirectDraw::RestoreAllSurfaces: stub\n");
|
1526 | 1526 | TRACE_EXIT(23,DDERR_GENERIC);
|
1527 | 1527 | ERR(DDERR_GENERIC);
|
— | — | @@ -1528,7 +1528,7 @@ |
1529 | 1529 | HRESULT WINAPI glDirectDraw7::TestCooperativeLevel()
|
1530 | 1530 | {
|
1531 | 1531 | TRACE_ENTER(1,14,this);
|
1532 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1532 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1533 | 1533 | TRACE_EXIT(23,DD_OK);
|
1534 | 1534 | return DD_OK;
|
1535 | 1535 | }
|
— | — | @@ -1535,8 +1535,8 @@ |
1536 | 1536 | HRESULT WINAPI glDirectDraw7::GetDeviceIdentifier(LPDDDEVICEIDENTIFIER2 lpdddi, DWORD dwFlags)
|
1537 | 1537 | {
|
1538 | 1538 | TRACE_ENTER(3,14,this,14,lpdddi,9,dwFlags);
|
1539 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1540 | | - if(!lpdddi) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1539 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1540 | + if(!lpdddi) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1541 | 1541 | devid.guidDeviceIdentifier = device_template;
|
1542 | 1542 | memcpy(lpdddi,&devid,sizeof(DDDEVICEIDENTIFIER2));
|
1543 | 1543 | TRACE_EXIT(23,DD_OK);
|
— | — | @@ -1545,7 +1545,7 @@ |
1546 | 1546 | HRESULT WINAPI glDirectDraw7::StartModeTest(LPSIZE lpModesToTest, DWORD dwNumEntries, DWORD dwFlags)
|
1547 | 1547 | {
|
1548 | 1548 | TRACE_ENTER(4,14,this,25,lpModesToTest,8,dwNumEntries,9,dwFlags);
|
1549 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1549 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1550 | 1550 | FIXME("IDirectDraw::StartModeTest: stub\n");
|
1551 | 1551 | TRACE_EXIT(23,DDERR_GENERIC);
|
1552 | 1552 | ERR(DDERR_GENERIC);
|
— | — | @@ -1553,7 +1553,7 @@ |
1554 | 1554 | HRESULT WINAPI glDirectDraw7::EvaluateMode(DWORD dwFlags, DWORD *pSecondsUntilTimeout)
|
1555 | 1555 | {
|
1556 | 1556 | TRACE_ENTER(3,14,this,9,dwFlags,14,pSecondsUntilTimeout);
|
1557 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1557 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1558 | 1558 | FIXME("IDirectDraw::EvaluateMode: stub\n");
|
1559 | 1559 | TRACE_EXIT(23,DDERR_GENERIC);
|
1560 | 1560 | ERR(DDERR_GENERIC);
|
— | — | @@ -1604,7 +1604,7 @@ |
1605 | 1605 | HRESULT WINAPI glDirectDraw1::QueryInterface(REFIID riid, void** ppvObj)
|
1606 | 1606 | {
|
1607 | 1607 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
1608 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1608 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1609 | 1609 | if(riid == IID_IUnknown)
|
1610 | 1610 | {
|
1611 | 1611 | this->AddRef();
|
— | — | @@ -1620,7 +1620,7 @@ |
1621 | 1621 | ULONG WINAPI glDirectDraw1::AddRef()
|
1622 | 1622 | {
|
1623 | 1623 | TRACE_ENTER(1,14,this);
|
1624 | | - if(!this) TRACE_RET(8,0);
|
| 1624 | + if(!this) TRACE_RET(ULONG,8,0);
|
1625 | 1625 | refcount++;
|
1626 | 1626 | TRACE_EXIT(8,refcount);
|
1627 | 1627 | return refcount;
|
— | — | @@ -1628,7 +1628,7 @@ |
1629 | 1629 | ULONG WINAPI glDirectDraw1::Release()
|
1630 | 1630 | {
|
1631 | 1631 | TRACE_ENTER(1,14,this);
|
1632 | | - if(!this) TRACE_RET(8,0);
|
| 1632 | + if(!this) TRACE_RET(ULONG,8,0);
|
1633 | 1633 | ULONG ret;
|
1634 | 1634 | refcount--;
|
1635 | 1635 | ret = refcount;
|
— | — | @@ -1639,25 +1639,25 @@ |
1640 | 1640 | HRESULT WINAPI glDirectDraw1::Compact()
|
1641 | 1641 | {
|
1642 | 1642 | TRACE_ENTER(1,14,this);
|
1643 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1644 | | - TRACE_RET(23,glDD7->Compact());
|
| 1643 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1644 | + TRACE_RET(HRESULT,23,glDD7->Compact());
|
1645 | 1645 | }
|
1646 | 1646 | HRESULT WINAPI glDirectDraw1::CreateClipper(DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter)
|
1647 | 1647 | {
|
1648 | 1648 | TRACE_ENTER(4,14,this,9,dwFlags,14,lplpDDClipper,14,pUnkOuter);
|
1649 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1650 | | - TRACE_RET(23,glDD7->CreateClipper(dwFlags,lplpDDClipper,pUnkOuter));
|
| 1649 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1650 | + TRACE_RET(HRESULT,23,glDD7->CreateClipper(dwFlags,lplpDDClipper,pUnkOuter));
|
1651 | 1651 | }
|
1652 | 1652 | HRESULT WINAPI glDirectDraw1::CreatePalette(DWORD dwFlags, LPPALETTEENTRY lpDDColorArray, LPDIRECTDRAWPALETTE FAR *lplpDDPalette, IUnknown FAR *pUnkOuter)
|
1653 | 1653 | {
|
1654 | 1654 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDColorArray,14,lplpDDPalette,14,pUnkOuter);
|
1655 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1656 | | - TRACE_RET(23,glDD7->CreatePalette(dwFlags,lpDDColorArray,lplpDDPalette,pUnkOuter));
|
| 1655 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1656 | + TRACE_RET(HRESULT,23,glDD7->CreatePalette(dwFlags,lpDDColorArray,lplpDDPalette,pUnkOuter));
|
1657 | 1657 | }
|
1658 | 1658 | HRESULT WINAPI glDirectDraw1::CreateSurface(LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE FAR *lplpDDSurface, IUnknown FAR *pUnkOuter)
|
1659 | 1659 | {
|
1660 | 1660 | TRACE_ENTER(4,14,this,14,lpDDSurfaceDesc,14,lplpDDSurface,14,pUnkOuter);
|
1661 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1661 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1662 | 1662 | LPDIRECTDRAWSURFACE7 lpDDS7;
|
1663 | 1663 | HRESULT err = glDD7->CreateSurface((LPDDSURFACEDESC2)lpDDSurfaceDesc,&lpDDS7,pUnkOuter);
|
1664 | 1664 | if(err == DD_OK)
|
— | — | @@ -1674,7 +1674,7 @@ |
1675 | 1675 | HRESULT WINAPI glDirectDraw1::DuplicateSurface(LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE FAR *lplpDupDDSurface)
|
1676 | 1676 | {
|
1677 | 1677 | TRACE_ENTER(3,14,this,14,lpDDSurface,14,lplpDupDDSurface);
|
1678 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1678 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1679 | 1679 | FIXME("glDirectDraw1::DuplicateSurface: stub\n");
|
1680 | 1680 | TRACE_EXIT(23,DDERR_GENERIC);
|
1681 | 1681 | ERR(DDERR_GENERIC);
|
— | — | @@ -1682,13 +1682,13 @@ |
1683 | 1683 | HRESULT WINAPI glDirectDraw1::EnumDisplayModes(DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback)
|
1684 | 1684 | {
|
1685 | 1685 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDSurfaceDesc,14,lpContext,14,lpEnumModesCallback);
|
1686 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1687 | | - TRACE_RET(23,::EnumDisplayModes(dwFlags,lpDDSurfaceDesc,lpContext,lpEnumModesCallback));
|
| 1686 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1687 | + TRACE_RET(HRESULT,23,::EnumDisplayModes(dwFlags,lpDDSurfaceDesc,lpContext,lpEnumModesCallback));
|
1688 | 1688 | }
|
1689 | 1689 | HRESULT WINAPI glDirectDraw1::EnumSurfaces(DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback)
|
1690 | 1690 | {
|
1691 | 1691 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDSD,14,lpContext,14,lpEnumSurfacesCallback);
|
1692 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1692 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1693 | 1693 | FIXME("glDirectDraw1::EnumSurfaces: stub\n");
|
1694 | 1694 | TRACE_EXIT(23,DDERR_GENERIC);
|
1695 | 1695 | ERR(DDERR_GENERIC);
|
— | — | @@ -1696,31 +1696,31 @@ |
1697 | 1697 | HRESULT WINAPI glDirectDraw1::FlipToGDISurface()
|
1698 | 1698 | {
|
1699 | 1699 | TRACE_ENTER(1,14,this);
|
1700 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1701 | | - TRACE_RET(23,glDD7->FlipToGDISurface());
|
| 1700 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1701 | + TRACE_RET(HRESULT,23,glDD7->FlipToGDISurface());
|
1702 | 1702 | }
|
1703 | 1703 | HRESULT WINAPI glDirectDraw1::GetCaps(LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps)
|
1704 | 1704 | {
|
1705 | 1705 | TRACE_ENTER(3,14,this,14,lpDDDriverCaps,14,lpDDHELCaps);
|
1706 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1707 | | - TRACE_RET(23,glDD7->GetCaps(lpDDDriverCaps,lpDDHELCaps));
|
| 1706 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1707 | + TRACE_RET(HRESULT,23,glDD7->GetCaps(lpDDDriverCaps,lpDDHELCaps));
|
1708 | 1708 | }
|
1709 | 1709 | HRESULT WINAPI glDirectDraw1::GetDisplayMode(LPDDSURFACEDESC lpDDSurfaceDesc)
|
1710 | 1710 | {
|
1711 | 1711 | TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
1712 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1713 | | - TRACE_RET(23,glDD7->GetDisplayMode((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
| 1712 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1713 | + TRACE_RET(HRESULT,23,glDD7->GetDisplayMode((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
1714 | 1714 | }
|
1715 | 1715 | HRESULT WINAPI glDirectDraw1::GetFourCCCodes(LPDWORD lpNumCodes, LPDWORD lpCodes)
|
1716 | 1716 | {
|
1717 | 1717 | TRACE_ENTER(3,14,this,14,lpNumCodes,14,lpCodes);
|
1718 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1719 | | - TRACE_RET(23,glDD7->GetFourCCCodes(lpNumCodes,lpCodes));
|
| 1718 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1719 | + TRACE_RET(HRESULT,23,glDD7->GetFourCCCodes(lpNumCodes,lpCodes));
|
1720 | 1720 | }
|
1721 | 1721 | HRESULT WINAPI glDirectDraw1::GetGDISurface(LPDIRECTDRAWSURFACE FAR *lplpGDIDDSurface)
|
1722 | 1722 | {
|
1723 | 1723 | TRACE_ENTER(2,14,this,14,lplpGDIDDSurface);
|
1724 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1724 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1725 | 1725 | FIXME("glDirectDraw1::GetGDISurface: stub\n");
|
1726 | 1726 | TRACE_EXIT(23,DDERR_GENERIC);
|
1727 | 1727 | ERR(DDERR_GENERIC);
|
— | — | @@ -1728,50 +1728,50 @@ |
1729 | 1729 | HRESULT WINAPI glDirectDraw1::GetMonitorFrequency(LPDWORD lpdwFrequency)
|
1730 | 1730 | {
|
1731 | 1731 | TRACE_ENTER(2,14,this,14,lpdwFrequency);
|
1732 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1733 | | - TRACE_RET(23,glDD7->GetMonitorFrequency(lpdwFrequency));
|
| 1732 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1733 | + TRACE_RET(HRESULT,23,glDD7->GetMonitorFrequency(lpdwFrequency));
|
1734 | 1734 | }
|
1735 | 1735 | HRESULT WINAPI glDirectDraw1::GetScanLine(LPDWORD lpdwScanLine)
|
1736 | 1736 | {
|
1737 | 1737 | TRACE_ENTER(2,14,this,14,lpdwScanLine);
|
1738 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1739 | | - TRACE_RET(23,glDD7->GetScanLine(lpdwScanLine));
|
| 1738 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1739 | + TRACE_RET(HRESULT,23,glDD7->GetScanLine(lpdwScanLine));
|
1740 | 1740 | }
|
1741 | 1741 | HRESULT WINAPI glDirectDraw1::GetVerticalBlankStatus(LPBOOL lpbIsInVB)
|
1742 | 1742 | {
|
1743 | 1743 | TRACE_ENTER(2,14,this,14,lpbIsInVB);
|
1744 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1745 | | - TRACE_RET(23,glDD7->GetVerticalBlankStatus(lpbIsInVB));
|
| 1744 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1745 | + TRACE_RET(HRESULT,23,glDD7->GetVerticalBlankStatus(lpbIsInVB));
|
1746 | 1746 | }
|
1747 | 1747 | HRESULT WINAPI glDirectDraw1::Initialize(GUID FAR *lpGUID)
|
1748 | 1748 | {
|
1749 | 1749 | TRACE_ENTER(2,14,this,24,lpGUID);
|
1750 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1751 | | - TRACE_RET(23,glDD7->Initialize(lpGUID));
|
| 1750 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1751 | + TRACE_RET(HRESULT,23,glDD7->Initialize(lpGUID));
|
1752 | 1752 | }
|
1753 | 1753 | HRESULT WINAPI glDirectDraw1::RestoreDisplayMode()
|
1754 | 1754 | {
|
1755 | 1755 | TRACE_ENTER(1,14,this);
|
1756 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1757 | | - TRACE_RET(23,glDD7->RestoreDisplayMode());
|
| 1756 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1757 | + TRACE_RET(HRESULT,23,glDD7->RestoreDisplayMode());
|
1758 | 1758 | }
|
1759 | 1759 | HRESULT WINAPI glDirectDraw1::SetCooperativeLevel(HWND hWnd, DWORD dwFlags)
|
1760 | 1760 | {
|
1761 | 1761 | TRACE_ENTER(3,14,this,13,hWnd,9,dwFlags);
|
1762 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1763 | | - TRACE_RET(23,glDD7->SetCooperativeLevel(hWnd,dwFlags));
|
| 1762 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1763 | + TRACE_RET(HRESULT,23,glDD7->SetCooperativeLevel(hWnd,dwFlags));
|
1764 | 1764 | }
|
1765 | 1765 | HRESULT WINAPI glDirectDraw1::SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP)
|
1766 | 1766 | {
|
1767 | 1767 | TRACE_ENTER(4,14,this,8,dwWidth,8,dwHeight,8,dwBPP);
|
1768 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1769 | | - TRACE_RET(23,glDD7->SetDisplayMode(dwWidth,dwHeight,dwBPP,0,0));
|
| 1768 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1769 | + TRACE_RET(HRESULT,23,glDD7->SetDisplayMode(dwWidth,dwHeight,dwBPP,0,0));
|
1770 | 1770 | }
|
1771 | 1771 | HRESULT WINAPI glDirectDraw1::WaitForVerticalBlank(DWORD dwFlags, HANDLE hEvent)
|
1772 | 1772 | {
|
1773 | 1773 | TRACE_ENTER(3,14,this,9,dwFlags,14,hEvent);
|
1774 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1775 | | - TRACE_RET(23,glDD7->WaitForVerticalBlank(dwFlags,hEvent));
|
| 1774 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1775 | + TRACE_RET(HRESULT,23,glDD7->WaitForVerticalBlank(dwFlags,hEvent));
|
1776 | 1776 | }
|
1777 | 1777 | // DDRAW2 wrapper
|
1778 | 1778 | glDirectDraw2::glDirectDraw2(glDirectDraw7 *gl_DD7)
|
— | — | @@ -1791,7 +1791,7 @@ |
1792 | 1792 | HRESULT WINAPI glDirectDraw2::QueryInterface(REFIID riid, void** ppvObj)
|
1793 | 1793 | {
|
1794 | 1794 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
1795 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1795 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1796 | 1796 | if(riid == IID_IUnknown)
|
1797 | 1797 | {
|
1798 | 1798 | this->AddRef();
|
— | — | @@ -1800,12 +1800,12 @@ |
1801 | 1801 | TRACE_EXIT(23,DD_OK);
|
1802 | 1802 | return DD_OK;
|
1803 | 1803 | }
|
1804 | | - TRACE_RET(23,glDD7->QueryInterface(riid,ppvObj));
|
| 1804 | + TRACE_RET(HRESULT,23,glDD7->QueryInterface(riid,ppvObj));
|
1805 | 1805 | }
|
1806 | 1806 | ULONG WINAPI glDirectDraw2::AddRef()
|
1807 | 1807 | {
|
1808 | 1808 | TRACE_ENTER(1,14,this);
|
1809 | | - if(!this) TRACE_RET(8,0);
|
| 1809 | + if(!this) TRACE_RET(ULONG,8,0);
|
1810 | 1810 | refcount++;
|
1811 | 1811 | TRACE_EXIT(8,refcount);
|
1812 | 1812 | return refcount;
|
— | — | @@ -1813,7 +1813,7 @@ |
1814 | 1814 | ULONG WINAPI glDirectDraw2::Release()
|
1815 | 1815 | {
|
1816 | 1816 | TRACE_ENTER(1,14,this);
|
1817 | | - if(!this) TRACE_RET(8,0);
|
| 1817 | + if(!this) TRACE_RET(ULONG,8,0);
|
1818 | 1818 | ULONG ret;
|
1819 | 1819 | refcount--;
|
1820 | 1820 | ret = refcount;
|
— | — | @@ -1824,26 +1824,26 @@ |
1825 | 1825 | HRESULT WINAPI glDirectDraw2::Compact()
|
1826 | 1826 | {
|
1827 | 1827 | TRACE_ENTER(1,14,this);
|
1828 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1829 | | - TRACE_RET(23,glDD7->Compact());
|
| 1828 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1829 | + TRACE_RET(HRESULT,23,glDD7->Compact());
|
1830 | 1830 | }
|
1831 | 1831 | HRESULT WINAPI glDirectDraw2::CreateClipper(DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter)
|
1832 | 1832 | {
|
1833 | 1833 | TRACE_ENTER(4,14,this,9,dwFlags,14,lplpDDClipper,14,pUnkOuter);
|
1834 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1835 | | - TRACE_RET(23,glDD7->CreateClipper(dwFlags,lplpDDClipper,pUnkOuter));
|
| 1834 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1835 | + TRACE_RET(HRESULT,23,glDD7->CreateClipper(dwFlags,lplpDDClipper,pUnkOuter));
|
1836 | 1836 | }
|
1837 | 1837 | HRESULT WINAPI glDirectDraw2::CreatePalette(DWORD dwFlags, LPPALETTEENTRY lpDDColorArray, LPDIRECTDRAWPALETTE FAR *lplpDDPalette, IUnknown FAR *pUnkOuter)
|
1838 | 1838 | {
|
1839 | 1839 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDColorArray,14,lplpDDPalette,14,pUnkOuter);
|
1840 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1841 | | - TRACE_RET(23,glDD7->CreatePalette(dwFlags,lpDDColorArray,lplpDDPalette,pUnkOuter));
|
| 1840 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1841 | + TRACE_RET(HRESULT,23,glDD7->CreatePalette(dwFlags,lpDDColorArray,lplpDDPalette,pUnkOuter));
|
1842 | 1842 | }
|
1843 | 1843 | HRESULT WINAPI glDirectDraw2::CreateSurface(LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE FAR *lplpDDSurface, IUnknown FAR *pUnkOuter)
|
1844 | 1844 | {
|
1845 | 1845 | TRACE_ENTER(4,14,this,14,lpDDSurfaceDesc,14,lplpDDSurface,14,pUnkOuter);
|
1846 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1847 | | - if(!lplpDDSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1846 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1847 | + if(!lplpDDSurface) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1848 | 1848 | LPDIRECTDRAWSURFACE7 lpDDS7;
|
1849 | 1849 | HRESULT err = glDD7->CreateSurface((LPDDSURFACEDESC2)lpDDSurfaceDesc,&lpDDS7,pUnkOuter);
|
1850 | 1850 | if(err == DD_OK)
|
— | — | @@ -1859,7 +1859,7 @@ |
1860 | 1860 | HRESULT WINAPI glDirectDraw2::DuplicateSurface(LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE FAR *lplpDupDDSurface)
|
1861 | 1861 | {
|
1862 | 1862 | TRACE_ENTER(3,14,this,14,lpDDSurface,14,lplpDupDDSurface);
|
1863 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1863 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1864 | 1864 | FIXME("glDirectDraw2::DuplicateSurface: stub\n");
|
1865 | 1865 | TRACE_EXIT(23,DDERR_GENERIC);
|
1866 | 1866 | ERR(DDERR_GENERIC);
|
— | — | @@ -1867,13 +1867,13 @@ |
1868 | 1868 | HRESULT WINAPI glDirectDraw2::EnumDisplayModes(DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback)
|
1869 | 1869 | {
|
1870 | 1870 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDSurfaceDesc,14,lpContext,14,lpEnumModesCallback);
|
1871 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1872 | | - TRACE_RET(23,::EnumDisplayModes(dwFlags,lpDDSurfaceDesc,lpContext,lpEnumModesCallback));
|
| 1871 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1872 | + TRACE_RET(HRESULT,23,::EnumDisplayModes(dwFlags,lpDDSurfaceDesc,lpContext,lpEnumModesCallback));
|
1873 | 1873 | }
|
1874 | 1874 | HRESULT WINAPI glDirectDraw2::EnumSurfaces(DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback)
|
1875 | 1875 | {
|
1876 | 1876 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDSD,14,lpContext,14,lpEnumSurfacesCallback);
|
1877 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1877 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1878 | 1878 | FIXME("glDirectDraw2::EnumSurfaces: stub\n");
|
1879 | 1879 | TRACE_EXIT(23,DDERR_GENERIC);
|
1880 | 1880 | ERR(DDERR_GENERIC);
|
— | — | @@ -1881,31 +1881,31 @@ |
1882 | 1882 | HRESULT WINAPI glDirectDraw2::FlipToGDISurface()
|
1883 | 1883 | {
|
1884 | 1884 | TRACE_ENTER(1,14,this);
|
1885 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1886 | | - TRACE_RET(23,glDD7->FlipToGDISurface());
|
| 1885 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1886 | + TRACE_RET(HRESULT,23,glDD7->FlipToGDISurface());
|
1887 | 1887 | }
|
1888 | 1888 | HRESULT WINAPI glDirectDraw2::GetCaps(LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps)
|
1889 | 1889 | {
|
1890 | 1890 | TRACE_ENTER(3,14,this,14,lpDDDriverCaps,14,lpDDHELCaps);
|
1891 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1892 | | - TRACE_RET(23,glDD7->GetCaps(lpDDDriverCaps,lpDDHELCaps));
|
| 1891 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1892 | + TRACE_RET(HRESULT,23,glDD7->GetCaps(lpDDDriverCaps,lpDDHELCaps));
|
1893 | 1893 | }
|
1894 | 1894 | HRESULT WINAPI glDirectDraw2::GetDisplayMode(LPDDSURFACEDESC lpDDSurfaceDesc)
|
1895 | 1895 | {
|
1896 | 1896 | TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
1897 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1898 | | - TRACE_RET(23,glDD7->GetDisplayMode((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
| 1897 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1898 | + TRACE_RET(HRESULT,23,glDD7->GetDisplayMode((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
1899 | 1899 | }
|
1900 | 1900 | HRESULT WINAPI glDirectDraw2::GetFourCCCodes(LPDWORD lpNumCodes, LPDWORD lpCodes)
|
1901 | 1901 | {
|
1902 | 1902 | TRACE_ENTER(3,14,this,14,lpNumCodes,14,lpCodes);
|
1903 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1904 | | - TRACE_RET(23,glDD7->GetFourCCCodes(lpNumCodes,lpCodes));
|
| 1903 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1904 | + TRACE_RET(HRESULT,23,glDD7->GetFourCCCodes(lpNumCodes,lpCodes));
|
1905 | 1905 | }
|
1906 | 1906 | HRESULT WINAPI glDirectDraw2::GetGDISurface(LPDIRECTDRAWSURFACE FAR *lplpGDIDDSurface)
|
1907 | 1907 | {
|
1908 | 1908 | TRACE_ENTER(2,14,this,14,lplpGDIDDSurface);
|
1909 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1909 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1910 | 1910 | FIXME("glDirectDraw2::GetGDISurface: stub\n");
|
1911 | 1911 | TRACE_EXIT(23,DDERR_GENERIC);
|
1912 | 1912 | ERR(DDERR_GENERIC);
|
— | — | @@ -1913,55 +1913,55 @@ |
1914 | 1914 | HRESULT WINAPI glDirectDraw2::GetMonitorFrequency(LPDWORD lpdwFrequency)
|
1915 | 1915 | {
|
1916 | 1916 | TRACE_ENTER(2,14,this,14,lpdwFrequency);
|
1917 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1918 | | - TRACE_RET(23,glDD7->GetMonitorFrequency(lpdwFrequency));
|
| 1917 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1918 | + TRACE_RET(HRESULT,23,glDD7->GetMonitorFrequency(lpdwFrequency));
|
1919 | 1919 | }
|
1920 | 1920 | HRESULT WINAPI glDirectDraw2::GetScanLine(LPDWORD lpdwScanLine)
|
1921 | 1921 | {
|
1922 | 1922 | TRACE_ENTER(2,14,this,14,lpdwScanLine);
|
1923 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1924 | | - TRACE_RET(23,glDD7->GetScanLine(lpdwScanLine));
|
| 1923 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1924 | + TRACE_RET(HRESULT,23,glDD7->GetScanLine(lpdwScanLine));
|
1925 | 1925 | }
|
1926 | 1926 | HRESULT WINAPI glDirectDraw2::GetVerticalBlankStatus(LPBOOL lpbIsInVB)
|
1927 | 1927 | {
|
1928 | 1928 | TRACE_ENTER(2,14,this,14,lpbIsInVB);
|
1929 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1930 | | - TRACE_RET(23,glDD7->GetVerticalBlankStatus(lpbIsInVB));
|
| 1929 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1930 | + TRACE_RET(HRESULT,23,glDD7->GetVerticalBlankStatus(lpbIsInVB));
|
1931 | 1931 | }
|
1932 | 1932 | HRESULT WINAPI glDirectDraw2::Initialize(GUID FAR *lpGUID)
|
1933 | 1933 | {
|
1934 | 1934 | TRACE_ENTER(2,14,this,24,lpGUID);
|
1935 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1936 | | - TRACE_RET(23,glDD7->Initialize(lpGUID));
|
| 1935 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1936 | + TRACE_RET(HRESULT,23,glDD7->Initialize(lpGUID));
|
1937 | 1937 | }
|
1938 | 1938 | HRESULT WINAPI glDirectDraw2::RestoreDisplayMode()
|
1939 | 1939 | {
|
1940 | 1940 | TRACE_ENTER(1,14,this);
|
1941 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1942 | | - TRACE_RET(23,glDD7->RestoreDisplayMode());
|
| 1941 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1942 | + TRACE_RET(HRESULT,23,glDD7->RestoreDisplayMode());
|
1943 | 1943 | }
|
1944 | 1944 | HRESULT WINAPI glDirectDraw2::SetCooperativeLevel(HWND hWnd, DWORD dwFlags)
|
1945 | 1945 | {
|
1946 | 1946 | TRACE_ENTER(3,14,this,13,hWnd,9,dwFlags);
|
1947 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1948 | | - TRACE_RET(23,glDD7->SetCooperativeLevel(hWnd,dwFlags));
|
| 1947 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1948 | + TRACE_RET(HRESULT,23,glDD7->SetCooperativeLevel(hWnd,dwFlags));
|
1949 | 1949 | }
|
1950 | 1950 | HRESULT WINAPI glDirectDraw2::SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags)
|
1951 | 1951 | {
|
1952 | 1952 | TRACE_ENTER(6,14,this,8,dwWidth,8,dwHeight,8,dwBPP,8,dwRefreshRate,9,dwFlags);
|
1953 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1954 | | - TRACE_RET(23,glDD7->SetDisplayMode(dwWidth,dwHeight,dwBPP,dwRefreshRate,dwFlags));
|
| 1953 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1954 | + TRACE_RET(HRESULT,23,glDD7->SetDisplayMode(dwWidth,dwHeight,dwBPP,dwRefreshRate,dwFlags));
|
1955 | 1955 | }
|
1956 | 1956 | HRESULT WINAPI glDirectDraw2::WaitForVerticalBlank(DWORD dwFlags, HANDLE hEvent)
|
1957 | 1957 | {
|
1958 | 1958 | TRACE_ENTER(3,14,this,9,dwFlags,14,hEvent);
|
1959 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1960 | | - TRACE_RET(23,glDD7->WaitForVerticalBlank(dwFlags,hEvent));
|
| 1959 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1960 | + TRACE_RET(HRESULT,23,glDD7->WaitForVerticalBlank(dwFlags,hEvent));
|
1961 | 1961 | }
|
1962 | 1962 | HRESULT WINAPI glDirectDraw2::GetAvailableVidMem(LPDDSCAPS lpDDSCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree)
|
1963 | 1963 | {
|
1964 | 1964 | TRACE_ENTER(4,14,this,14,lpDDSCaps,14,lpdwTotal,14,lpdwFree);
|
1965 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1965 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1966 | 1966 | if(GLEXT_NVX_gpu_memory_info)
|
1967 | 1967 | {
|
1968 | 1968 | if(lpdwTotal) glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX,(GLint*)lpdwTotal);
|
— | — | @@ -2001,7 +2001,7 @@ |
2002 | 2002 | HRESULT WINAPI glDirectDraw4::QueryInterface(REFIID riid, void** ppvObj)
|
2003 | 2003 | {
|
2004 | 2004 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
2005 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2005 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2006 | 2006 | if(riid == IID_IUnknown)
|
2007 | 2007 | {
|
2008 | 2008 | this->AddRef();
|
— | — | @@ -2009,12 +2009,12 @@ |
2010 | 2010 | TRACE_EXIT(23,DD_OK);
|
2011 | 2011 | return DD_OK;
|
2012 | 2012 | }
|
2013 | | - TRACE_RET(23,glDD7->QueryInterface(riid,ppvObj));
|
| 2013 | + TRACE_RET(HRESULT,23,glDD7->QueryInterface(riid,ppvObj));
|
2014 | 2014 | }
|
2015 | 2015 | ULONG WINAPI glDirectDraw4::AddRef()
|
2016 | 2016 | {
|
2017 | 2017 | TRACE_ENTER(1,14,this);
|
2018 | | - if(!this) TRACE_RET(8,0);
|
| 2018 | + if(!this) TRACE_RET(ULONG,8,0);
|
2019 | 2019 | refcount++;
|
2020 | 2020 | TRACE_EXIT(8,refcount);
|
2021 | 2021 | return refcount;
|
— | — | @@ -2022,37 +2022,37 @@ |
2023 | 2023 | ULONG WINAPI glDirectDraw4::Release()
|
2024 | 2024 | {
|
2025 | 2025 | TRACE_ENTER(1,14,this);
|
2026 | | - if(!this) TRACE_RET(8,0);
|
| 2026 | + if(!this) TRACE_RET(ULONG,8,0);
|
2027 | 2027 | ULONG ret;
|
2028 | 2028 | refcount--;
|
2029 | 2029 | ret = refcount;
|
2030 | 2030 | if(refcount == 0) delete this;
|
2031 | | - TRACE_RET(8,ret);
|
| 2031 | + TRACE_EXIT(8,ret);
|
2032 | 2032 | return ret;
|
2033 | 2033 | }
|
2034 | 2034 | HRESULT WINAPI glDirectDraw4::Compact()
|
2035 | 2035 | {
|
2036 | 2036 | TRACE_ENTER(1,14,this);
|
2037 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2038 | | - TRACE_RET(23,glDD7->Compact());
|
| 2037 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2038 | + TRACE_RET(HRESULT,23,glDD7->Compact());
|
2039 | 2039 | }
|
2040 | 2040 | HRESULT WINAPI glDirectDraw4::CreateClipper(DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter)
|
2041 | 2041 | {
|
2042 | 2042 | TRACE_ENTER(4,14,this,9,dwFlags,14,lplpDDClipper,14,pUnkOuter);
|
2043 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2044 | | - TRACE_RET(23,glDD7->CreateClipper(dwFlags,lplpDDClipper,pUnkOuter));
|
| 2043 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2044 | + TRACE_RET(HRESULT,23,glDD7->CreateClipper(dwFlags,lplpDDClipper,pUnkOuter));
|
2045 | 2045 | }
|
2046 | 2046 | HRESULT WINAPI glDirectDraw4::CreatePalette(DWORD dwFlags, LPPALETTEENTRY lpDDColorArray, LPDIRECTDRAWPALETTE FAR *lplpDDPalette, IUnknown FAR *pUnkOuter)
|
2047 | 2047 | {
|
2048 | 2048 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDColorArray,14,lplpDDPalette,14,pUnkOuter);
|
2049 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2050 | | - TRACE_RET(23,glDD7->CreatePalette(dwFlags,lpDDColorArray,lplpDDPalette,pUnkOuter));
|
| 2049 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2050 | + TRACE_RET(HRESULT,23,glDD7->CreatePalette(dwFlags,lpDDColorArray,lplpDDPalette,pUnkOuter));
|
2051 | 2051 | }
|
2052 | 2052 | HRESULT WINAPI glDirectDraw4::CreateSurface(LPDDSURFACEDESC2 lpDDSurfaceDesc, LPDIRECTDRAWSURFACE4 FAR *lplpDDSurface, IUnknown FAR *pUnkOuter)
|
2053 | 2053 | {
|
2054 | 2054 | TRACE_ENTER(4,14,this,14,lpDDSurfaceDesc,14,lplpDDSurface,14,pUnkOuter);
|
2055 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2056 | | - if(!lplpDDSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2055 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2056 | + if(!lplpDDSurface) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
2057 | 2057 | LPDIRECTDRAWSURFACE7 lpDDS7;
|
2058 | 2058 | HRESULT err = glDD7->CreateSurface((LPDDSURFACEDESC2)lpDDSurfaceDesc,&lpDDS7,pUnkOuter);
|
2059 | 2059 | if(err == DD_OK)
|
— | — | @@ -2068,7 +2068,7 @@ |
2069 | 2069 | HRESULT WINAPI glDirectDraw4::DuplicateSurface(LPDIRECTDRAWSURFACE4 lpDDSurface, LPDIRECTDRAWSURFACE4 FAR *lplpDupDDSurface)
|
2070 | 2070 | {
|
2071 | 2071 | TRACE_ENTER(3,14,this,14,lpDDSurface,14,lplpDupDDSurface);
|
2072 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2072 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2073 | 2073 | FIXME("glDirectDraw4::DuplicateSurface: stub\n");
|
2074 | 2074 | TRACE_EXIT(23,DDERR_GENERIC);
|
2075 | 2075 | ERR(DDERR_GENERIC);
|
— | — | @@ -2076,13 +2076,13 @@ |
2077 | 2077 | HRESULT WINAPI glDirectDraw4::EnumDisplayModes(DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback)
|
2078 | 2078 | {
|
2079 | 2079 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDSurfaceDesc,14,lpContext,14,lpEnumModesCallback);
|
2080 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2081 | | - TRACE_RET(23,::EnumDisplayModes(dwFlags,lpDDSurfaceDesc,lpContext,lpEnumModesCallback));
|
| 2080 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2081 | + TRACE_RET(HRESULT,23,::EnumDisplayModes(dwFlags,lpDDSurfaceDesc,lpContext,lpEnumModesCallback));
|
2082 | 2082 | }
|
2083 | 2083 | HRESULT WINAPI glDirectDraw4::EnumSurfaces(DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpEnumSurfacesCallback)
|
2084 | 2084 | {
|
2085 | 2085 | TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDSD,14,lpContext,14,lpEnumSurfacesCallback);
|
2086 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2086 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2087 | 2087 | FIXME("glDirectDraw4::EnumSurfaces: stub\n");
|
2088 | 2088 | TRACE_EXIT(23,DDERR_GENERIC);
|
2089 | 2089 | ERR(DDERR_GENERIC);
|
— | — | @@ -2090,31 +2090,31 @@ |
2091 | 2091 | HRESULT WINAPI glDirectDraw4::FlipToGDISurface()
|
2092 | 2092 | {
|
2093 | 2093 | TRACE_ENTER(1,14,this);
|
2094 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2095 | | - TRACE_RET(23,glDD7->FlipToGDISurface());
|
| 2094 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2095 | + TRACE_RET(HRESULT,23,glDD7->FlipToGDISurface());
|
2096 | 2096 | }
|
2097 | 2097 | HRESULT WINAPI glDirectDraw4::GetCaps(LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps)
|
2098 | 2098 | {
|
2099 | 2099 | TRACE_ENTER(3,14,this,14,lpDDDriverCaps,14,lpDDHELCaps);
|
2100 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2101 | | - TRACE_RET(23,glDD7->GetCaps(lpDDDriverCaps,lpDDHELCaps));
|
| 2100 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2101 | + TRACE_RET(HRESULT,23,glDD7->GetCaps(lpDDDriverCaps,lpDDHELCaps));
|
2102 | 2102 | }
|
2103 | 2103 | HRESULT WINAPI glDirectDraw4::GetDisplayMode(LPDDSURFACEDESC2 lpDDSurfaceDesc2)
|
2104 | 2104 | {
|
2105 | 2105 | TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc2);
|
2106 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2107 | | - TRACE_RET(23,glDD7->GetDisplayMode(lpDDSurfaceDesc2));
|
| 2106 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2107 | + TRACE_RET(HRESULT,23,glDD7->GetDisplayMode(lpDDSurfaceDesc2));
|
2108 | 2108 | }
|
2109 | 2109 | HRESULT WINAPI glDirectDraw4::GetFourCCCodes(LPDWORD lpNumCodes, LPDWORD lpCodes)
|
2110 | 2110 | {
|
2111 | 2111 | TRACE_ENTER(3,14,this,14,lpNumCodes,14,lpCodes);
|
2112 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2113 | | - TRACE_RET(23,glDD7->GetFourCCCodes(lpNumCodes,lpCodes));
|
| 2112 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2113 | + TRACE_RET(HRESULT,23,glDD7->GetFourCCCodes(lpNumCodes,lpCodes));
|
2114 | 2114 | }
|
2115 | 2115 | HRESULT WINAPI glDirectDraw4::GetGDISurface(LPDIRECTDRAWSURFACE4 FAR *lplpGDIDDSurface)
|
2116 | 2116 | {
|
2117 | 2117 | TRACE_ENTER(2,14,this,14,lplpGDIDDSurface);
|
2118 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2118 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2119 | 2119 | FIXME("glDirectDraw4::GetGDISurface: stub\n");
|
2120 | 2120 | TRACE_EXIT(23,DDERR_GENERIC);
|
2121 | 2121 | ERR(DDERR_GENERIC);
|
— | — | @@ -2122,61 +2122,61 @@ |
2123 | 2123 | HRESULT WINAPI glDirectDraw4::GetMonitorFrequency(LPDWORD lpdwFrequency)
|
2124 | 2124 | {
|
2125 | 2125 | TRACE_ENTER(2,14,this,14,lpdwFrequency);
|
2126 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2127 | | - TRACE_RET(23,glDD7->GetMonitorFrequency(lpdwFrequency));
|
| 2126 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2127 | + TRACE_RET(HRESULT,23,glDD7->GetMonitorFrequency(lpdwFrequency));
|
2128 | 2128 | }
|
2129 | 2129 | HRESULT WINAPI glDirectDraw4::GetScanLine(LPDWORD lpdwScanLine)
|
2130 | 2130 | {
|
2131 | 2131 | TRACE_ENTER(2,14,this,14,lpdwScanLine);
|
2132 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2133 | | - TRACE_RET(23,glDD7->GetScanLine(lpdwScanLine));
|
| 2132 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2133 | + TRACE_RET(HRESULT,23,glDD7->GetScanLine(lpdwScanLine));
|
2134 | 2134 | }
|
2135 | 2135 | HRESULT WINAPI glDirectDraw4::GetVerticalBlankStatus(LPBOOL lpbIsInVB)
|
2136 | 2136 | {
|
2137 | 2137 | TRACE_ENTER(2,14,this,14,lpbIsInVB);
|
2138 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2139 | | - TRACE_RET(23,glDD7->GetVerticalBlankStatus(lpbIsInVB));
|
| 2138 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2139 | + TRACE_RET(HRESULT,23,glDD7->GetVerticalBlankStatus(lpbIsInVB));
|
2140 | 2140 | }
|
2141 | 2141 | HRESULT WINAPI glDirectDraw4::Initialize(GUID FAR *lpGUID)
|
2142 | 2142 | {
|
2143 | 2143 | TRACE_ENTER(2,14,this,24,lpGUID);
|
2144 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2145 | | - TRACE_RET(23,glDD7->Initialize(lpGUID));
|
| 2144 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2145 | + TRACE_RET(HRESULT,23,glDD7->Initialize(lpGUID));
|
2146 | 2146 | }
|
2147 | 2147 | HRESULT WINAPI glDirectDraw4::RestoreDisplayMode()
|
2148 | 2148 | {
|
2149 | 2149 | TRACE_ENTER(1,14,this);
|
2150 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2151 | | - TRACE_RET(23,glDD7->RestoreDisplayMode());
|
| 2150 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2151 | + TRACE_RET(HRESULT,23,glDD7->RestoreDisplayMode());
|
2152 | 2152 | }
|
2153 | 2153 | HRESULT WINAPI glDirectDraw4::SetCooperativeLevel(HWND hWnd, DWORD dwFlags)
|
2154 | 2154 | {
|
2155 | 2155 | TRACE_ENTER(3,14,this,13,hWnd,9,dwFlags);
|
2156 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2157 | | - TRACE_RET(23,glDD7->SetCooperativeLevel(hWnd,dwFlags));
|
| 2156 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2157 | + TRACE_RET(HRESULT,23,glDD7->SetCooperativeLevel(hWnd,dwFlags));
|
2158 | 2158 | }
|
2159 | 2159 | HRESULT WINAPI glDirectDraw4::SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags)
|
2160 | 2160 | {
|
2161 | 2161 | TRACE_ENTER(6,14,this,8,dwWidth,8,dwHeight,8,dwBPP,8,dwRefreshRate,9,dwFlags);
|
2162 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2163 | | - TRACE_RET(23,glDD7->SetDisplayMode(dwWidth,dwHeight,dwBPP,dwRefreshRate,dwFlags));
|
| 2162 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2163 | + TRACE_RET(HRESULT,23,glDD7->SetDisplayMode(dwWidth,dwHeight,dwBPP,dwRefreshRate,dwFlags));
|
2164 | 2164 | }
|
2165 | 2165 | HRESULT WINAPI glDirectDraw4::WaitForVerticalBlank(DWORD dwFlags, HANDLE hEvent)
|
2166 | 2166 | {
|
2167 | 2167 | TRACE_ENTER(3,14,this,9,dwFlags,14,hEvent);
|
2168 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2169 | | - TRACE_RET(23,glDD7->WaitForVerticalBlank(dwFlags,hEvent));
|
| 2168 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2169 | + TRACE_RET(HRESULT,23,glDD7->WaitForVerticalBlank(dwFlags,hEvent));
|
2170 | 2170 | }
|
2171 | 2171 | HRESULT WINAPI glDirectDraw4::GetAvailableVidMem(LPDDSCAPS2 lpDDSCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree)
|
2172 | 2172 | {
|
2173 | 2173 | TRACE_ENTER(4,14,this,14,lpDDSCaps,14,lpdwTotal,14,lpdwFree);
|
2174 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2175 | | - TRACE_RET(23,glDD7->GetAvailableVidMem(lpDDSCaps,lpdwTotal,lpdwFree));
|
| 2174 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2175 | + TRACE_RET(HRESULT,23,glDD7->GetAvailableVidMem(lpDDSCaps,lpdwTotal,lpdwFree));
|
2176 | 2176 | }
|
2177 | 2177 | HRESULT WINAPI glDirectDraw4::GetSurfaceFromDC(HDC hdc, LPDIRECTDRAWSURFACE4 *lpDDS)
|
2178 | 2178 | {
|
2179 | 2179 | TRACE_ENTER(3,14,this,13,hdc,14,lpDDS);
|
2180 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2180 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2181 | 2181 | FIXME("IDirectDraw4::GetSurfaceFromDC: stub\n");
|
2182 | 2182 | TRACE_EXIT(23,DDERR_GENERIC);
|
2183 | 2183 | ERR(DDERR_GENERIC);
|
— | — | @@ -2184,20 +2184,20 @@ |
2185 | 2185 | HRESULT WINAPI glDirectDraw4::RestoreAllSurfaces()
|
2186 | 2186 | {
|
2187 | 2187 | TRACE_ENTER(1,14,this);
|
2188 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2189 | | - TRACE_RET(23,glDD7->RestoreAllSurfaces());
|
| 2188 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2189 | + TRACE_RET(HRESULT,23,glDD7->RestoreAllSurfaces());
|
2190 | 2190 | }
|
2191 | 2191 | HRESULT WINAPI glDirectDraw4::TestCooperativeLevel()
|
2192 | 2192 | {
|
2193 | 2193 | TRACE_ENTER(1,14,this);
|
2194 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2195 | | - TRACE_RET(23,glDD7->TestCooperativeLevel());
|
| 2194 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2195 | + TRACE_RET(HRESULT,23,glDD7->TestCooperativeLevel());
|
2196 | 2196 | }
|
2197 | 2197 | HRESULT WINAPI glDirectDraw4::GetDeviceIdentifier(LPDDDEVICEIDENTIFIER lpdddi, DWORD dwFlags)
|
2198 | 2198 | {
|
2199 | 2199 | TRACE_ENTER(3,14,this,14,lpdddi,9,dwFlags);
|
2200 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2201 | | - if(!lpdddi) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2200 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2201 | + if(!lpdddi) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
2202 | 2202 | devid.guidDeviceIdentifier = device_template;
|
2203 | 2203 | memcpy(lpdddi,&devid,sizeof(DDDEVICEIDENTIFIER));
|
2204 | 2204 | TRACE_EXIT(23,DD_OK);
|
Index: ddraw/glDirectDrawClipper.cpp |
— | — | @@ -44,8 +44,8 @@ |
45 | 45 | HRESULT WINAPI glDirectDrawClipper::QueryInterface(REFIID riid, LPVOID* obp)
|
46 | 46 | {
|
47 | 47 | TRACE_ENTER(3,14,this,24,&riid,14,obp);
|
48 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
49 | | - if(!obp) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 48 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 49 | + if(!obp) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
50 | 50 | if(riid == IID_IUnknown)
|
51 | 51 | {
|
52 | 52 | this->AddRef();
|
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | ULONG WINAPI glDirectDrawClipper::AddRef()
|
70 | 70 | {
|
71 | 71 | TRACE_ENTER(1,14,this);
|
72 | | - if(!this) TRACE_RET(8,0);
|
| 72 | + if(!this) TRACE_RET(ULONG,8,0);
|
73 | 73 | refcount++;
|
74 | 74 | TRACE_EXIT(8,refcount);
|
75 | 75 | return refcount;
|
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | ULONG WINAPI glDirectDrawClipper::Release()
|
78 | 78 | {
|
79 | 79 | TRACE_ENTER(1,14,this);
|
80 | | - if(!this) TRACE_RET(8,0);
|
| 80 | + if(!this) TRACE_RET(ULONG,8,0);
|
81 | 81 | ULONG ret;
|
82 | 82 | refcount--;
|
83 | 83 | ret = refcount;
|
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | HRESULT WINAPI glDirectDrawClipper::GetClipList(LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSize)
|
89 | 89 | {
|
90 | 90 | TRACE_ENTER(4,14,this,26,lpRect,14,lpClipList,14,lpdwSize);
|
91 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 91 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
92 | 92 | FIXME("IDirectDrawClipper::GetClipList: stub");
|
93 | 93 | TRACE_EXIT(23,DDERR_GENERIC);
|
94 | 94 | ERR(DDERR_GENERIC);
|
— | — | @@ -95,8 +95,8 @@ |
96 | 96 | HRESULT WINAPI glDirectDrawClipper::GetHWnd(HWND FAR *lphWnd)
|
97 | 97 | {
|
98 | 98 | TRACE_ENTER(2,14,this,14,lphWnd);
|
99 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
100 | | - if(!hWnd) TRACE_RET(23,DDERR_NOHWND);
|
| 99 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 100 | + if(!hWnd) TRACE_RET(HRESULT,23,DDERR_NOHWND);
|
101 | 101 | *lphWnd = hWnd;
|
102 | 102 | TRACE_VAR("*lphWnd",13,*lphWnd);
|
103 | 103 | TRACE_EXIT(23,DD_OK);
|
— | — | @@ -105,8 +105,8 @@ |
106 | 106 | HRESULT WINAPI glDirectDrawClipper::Initialize(LPDIRECTDRAW lpDD, DWORD dwFlags)
|
107 | 107 | {
|
108 | 108 | TRACE_ENTER(3,14,this,14,lpDD,9,dwFlags);
|
109 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
110 | | - if(initialized) TRACE_RET(23,DDERR_ALREADYINITIALIZED);
|
| 109 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 110 | + if(initialized) TRACE_RET(HRESULT,23,DDERR_ALREADYINITIALIZED);
|
111 | 111 | glDD7 = (glDirectDraw7*)lpDD;
|
112 | 112 | if(glDD7) hasparent = true;
|
113 | 113 | else hasparent = false;
|
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | HRESULT WINAPI glDirectDrawClipper::IsClipListChanged(BOOL FAR *lpbChanged)
|
121 | 121 | {
|
122 | 122 | TRACE_ENTER(2,14,this,14,lpbChanged);
|
123 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 123 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
124 | 124 | FIXME("IDirectDrawClipper::IsClipListChanged: stub");
|
125 | 125 | TRACE_EXIT(23,DDERR_GENERIC);
|
126 | 126 | ERR(DDERR_GENERIC);
|
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | HRESULT WINAPI glDirectDrawClipper::SetClipList(LPRGNDATA lpClipList, DWORD dwFlags)
|
129 | 129 | {
|
130 | 130 | TRACE_ENTER(3,14,this,14,lpClipList,9,dwFlags);
|
131 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 131 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
132 | 132 | FIXME("IDirectDrawClipper::SetClipList: stub");
|
133 | 133 | TRACE_EXIT(23,DDERR_GENERIC);
|
134 | 134 | ERR(DDERR_GENERIC);
|
— | — | @@ -135,7 +135,7 @@ |
136 | 136 | HRESULT WINAPI glDirectDrawClipper::SetHWnd(DWORD dwFlags, HWND hWnd)
|
137 | 137 | {
|
138 | 138 | TRACE_ENTER(3,14,this,9,dwFlags,13,hWnd);
|
139 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 139 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
140 | 140 | this->hWnd = hWnd;
|
141 | 141 | TRACE_EXIT(23,DD_OK);
|
142 | 142 | return DD_OK;
|
Index: ddraw/glDirectDrawPalette.cpp |
— | — | @@ -120,8 +120,8 @@ |
121 | 121 | HRESULT WINAPI glDirectDrawPalette::QueryInterface(REFIID riid, void** ppvObj)
|
122 | 122 | {
|
123 | 123 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
124 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
125 | | - if(!ppvObj) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 124 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 125 | + if(!ppvObj) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
126 | 126 | if(riid == IID_IUnknown)
|
127 | 127 | {
|
128 | 128 | this->AddRef();
|
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | HRESULT WINAPI glDirectDrawPalette::GetCaps(LPDWORD lpdwCaps)
|
160 | 160 | {
|
161 | 161 | TRACE_ENTER(2,14,this,14,lpdwCaps);
|
162 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 162 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
163 | 163 | *lpdwCaps = flags;
|
164 | 164 | TRACE_VAR("*lpdwCaps",9,*lpdwCaps);
|
165 | 165 | TRACE_EXIT(23,DD_OK);
|
— | — | @@ -168,7 +168,7 @@ |
169 | 169 | HRESULT WINAPI glDirectDrawPalette::GetEntries(DWORD dwFlags, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries)
|
170 | 170 | {
|
171 | 171 | TRACE_ENTER(5,14,this,9,dwFlags,8,dwBase,8,dwNumEntries,14,lpEntries);
|
172 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 172 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
173 | 173 | DWORD allentries = 256;
|
174 | 174 | DWORD entrysize;
|
175 | 175 | if(flags & DDPCAPS_1BIT) allentries=2;
|
— | — | @@ -177,7 +177,7 @@ |
178 | 178 | if(flags & DDPCAPS_8BIT) allentries=256;
|
179 | 179 | if(flags & DDPCAPS_8BITENTRIES) entrysize = 1;
|
180 | 180 | else entrysize = sizeof(PALETTEENTRY);
|
181 | | - if((dwBase + dwNumEntries) > allentries) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 181 | + if((dwBase + dwNumEntries) > allentries) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
182 | 182 | memcpy(lpEntries,((char *)palette)+(dwBase*entrysize),dwNumEntries*entrysize);
|
183 | 183 | TRACE_EXIT(23,DD_OK);
|
184 | 184 | return DD_OK;
|
— | — | @@ -185,7 +185,7 @@ |
186 | 186 | HRESULT WINAPI glDirectDrawPalette::Initialize(LPDIRECTDRAW lpDD, DWORD dwFlags, LPPALETTEENTRY lpDDColorTable)
|
187 | 187 | {
|
188 | 188 | TRACE_ENTER(4,14,this,14,lpDD,9,dwFlags,14,lpDDColorTable);
|
189 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 189 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
190 | 190 | TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
191 | 191 | return DDERR_ALREADYINITIALIZED;
|
192 | 192 | }
|
— | — | @@ -192,7 +192,7 @@ |
193 | 193 | HRESULT WINAPI glDirectDrawPalette::SetEntries(DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries)
|
194 | 194 | {
|
195 | 195 | TRACE_ENTER(5,14,this,9,dwFlags,8,dwStartingEntry,8,dwCount,14,lpEntries);
|
196 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 196 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
197 | 197 | DWORD allentries = 256;
|
198 | 198 | DWORD entrysize;
|
199 | 199 | if(flags & DDPCAPS_1BIT) allentries=2;
|
— | — | @@ -201,7 +201,7 @@ |
202 | 202 | if(flags & DDPCAPS_8BIT) allentries=256;
|
203 | 203 | if(flags & DDPCAPS_8BITENTRIES) entrysize = 1;
|
204 | 204 | else entrysize = sizeof(PALETTEENTRY);
|
205 | | - if((dwStartingEntry + dwCount) > allentries) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 205 | + if((dwStartingEntry + dwCount) > allentries) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
206 | 206 | memcpy(((char *)palette)+(dwStartingEntry*entrysize),lpEntries,dwCount*entrysize);
|
207 | 207 | TRACE_EXIT(23,DD_OK);
|
208 | 208 | return DD_OK;
|
— | — | @@ -215,6 +215,6 @@ |
216 | 216 | *flags = this->flags;
|
217 | 217 | TRACE_VAR("*flags",9,*flags);
|
218 | 218 | }
|
219 | | - TRACE_RET(14,palette);
|
| 219 | + TRACE_RET(LPPALETTEENTRY,14,palette);
|
220 | 220 | return palette;
|
221 | 221 | }
|
Index: ddraw/glDirectDrawSurface.cpp |
— | — | @@ -375,8 +375,8 @@ |
376 | 376 | HRESULT WINAPI glDirectDrawSurface7::QueryInterface(REFIID riid, void** ppvObj)
|
377 | 377 | {
|
378 | 378 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
379 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
380 | | - if(!ppvObj) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 379 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 380 | + if(!ppvObj) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
381 | 381 | if(riid == IID_IUnknown)
|
382 | 382 | {
|
383 | 383 | this->AddRef();
|
— | — | @@ -522,7 +522,7 @@ |
523 | 523 | glDirect3D7 *tmpd3d;
|
524 | 524 | glDirect3DDevice7 *tmpdev;
|
525 | 525 | ddInterface->QueryInterface(IID_IDirect3D7,(void**)&tmpd3d);
|
526 | | - if(!tmpd3d) TRACE_RET(23,E_NOINTERFACE);
|
| 526 | + if(!tmpd3d) TRACE_RET(HRESULT,23,E_NOINTERFACE);
|
527 | 527 | tmpd3d->CreateDevice(riid,this,(LPDIRECT3DDEVICE7*)&tmpdev);
|
528 | 528 | if(!tmpdev)
|
529 | 529 | {
|
— | — | @@ -552,7 +552,7 @@ |
553 | 553 | ULONG WINAPI glDirectDrawSurface7::AddRef()
|
554 | 554 | {
|
555 | 555 | TRACE_ENTER(1,14,this);
|
556 | | - if(!this) TRACE_RET(8,0);
|
| 556 | + if(!this) TRACE_RET(ULONG,8,0);
|
557 | 557 | refcount++;
|
558 | 558 | TRACE_EXIT(8,refcount);
|
559 | 559 | return refcount;
|
— | — | @@ -560,7 +560,7 @@ |
561 | 561 | ULONG WINAPI glDirectDrawSurface7::Release()
|
562 | 562 | {
|
563 | 563 | TRACE_ENTER(1,14,this);
|
564 | | - if(!this) TRACE_RET(8,0);
|
| 564 | + if(!this) TRACE_RET(ULONG,8,0);
|
565 | 565 | ULONG ret;
|
566 | 566 | refcount--;
|
567 | 567 | ret = refcount;
|
— | — | @@ -571,9 +571,9 @@ |
572 | 572 | HRESULT WINAPI glDirectDrawSurface7::AddAttachedSurface(LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface)
|
573 | 573 | {
|
574 | 574 | TRACE_ENTER(2,14,this,14,lpDDSAttachedSurface);
|
575 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
576 | | - if(!lpDDSAttachedSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
577 | | - if(zbuffer) TRACE_RET(23,DDERR_SURFACEALREADYATTACHED);
|
| 575 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 576 | + if(!lpDDSAttachedSurface) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 577 | + if(zbuffer) TRACE_RET(HRESULT,23,DDERR_SURFACEALREADYATTACHED);
|
578 | 578 | glDirectDrawSurface7 *attached = (glDirectDrawSurface7 *)lpDDSAttachedSurface;
|
579 | 579 | DDSURFACEDESC2 ddsd;
|
580 | 580 | ddsd.dwSize = sizeof(DDSURFACEDESC2);
|
— | — | @@ -585,12 +585,12 @@ |
586 | 586 | TRACE_EXIT(23,DD_OK);
|
587 | 587 | return DD_OK;
|
588 | 588 | }
|
589 | | - else TRACE_RET(23,DDERR_CANNOTATTACHSURFACE);
|
| 589 | + else TRACE_RET(HRESULT,23,DDERR_CANNOTATTACHSURFACE);
|
590 | 590 | }
|
591 | 591 | HRESULT WINAPI glDirectDrawSurface7::AddOverlayDirtyRect(LPRECT lpRect)
|
592 | 592 | {
|
593 | 593 | TRACE_ENTER(2,14,this,26,lpRect);
|
594 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 594 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
595 | 595 | FIXME("glDirectDrawSurface7::AddOverlayDirtyRect: stub\n");
|
596 | 596 | TRACE_EXIT(23,DDERR_GENERIC);
|
597 | 597 | ERR(DDERR_GENERIC);
|
— | — | @@ -598,8 +598,8 @@ |
599 | 599 | HRESULT WINAPI glDirectDrawSurface7::Blt(LPRECT lpDestRect, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
600 | 600 | {
|
601 | 601 | TRACE_ENTER(6,14,this,26,lpDestRect,14,lpDDSrcSurface,26,lpSrcRect,9,dwFlags,14,lpDDBltFx);
|
602 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
603 | | - if((dwFlags & DDBLT_COLORFILL) && !lpDDBltFx) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 602 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 603 | + if((dwFlags & DDBLT_COLORFILL) && !lpDDBltFx) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
604 | 604 | glDirectDrawSurface7 *src = (glDirectDrawSurface7 *)lpDDSrcSurface;
|
605 | 605 | if(dirty & 1)
|
606 | 606 | {
|
— | — | @@ -616,12 +616,12 @@ |
617 | 617 | src->ddsd.ddpfPixelFormat.dwRGBBitCount);
|
618 | 618 | src->dirty &= ~1;
|
619 | 619 | }
|
620 | | - TRACE_RET(23,renderer->Blt(lpDestRect,src,this,lpSrcRect,dwFlags,lpDDBltFx));
|
| 620 | + TRACE_RET(HRESULT,23,renderer->Blt(lpDestRect,src,this,lpSrcRect,dwFlags,lpDDBltFx));
|
621 | 621 | }
|
622 | 622 | HRESULT WINAPI glDirectDrawSurface7::BltBatch(LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags)
|
623 | 623 | {
|
624 | 624 | TRACE_ENTER(4,14,this,14,lpDDBltBatch,8,dwCount,9,dwFlags);
|
625 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 625 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
626 | 626 | FIXME("glDirectDrawSurface7::BltBatch: stub\n");
|
627 | 627 | TRACE_EXIT(23,DDERR_GENERIC);
|
628 | 628 | ERR(DDERR_GENERIC);
|
— | — | @@ -629,7 +629,7 @@ |
630 | 630 | HRESULT WINAPI glDirectDrawSurface7::BltFast(DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans)
|
631 | 631 | {
|
632 | 632 | TRACE_ENTER(6,14,this,8,dwX,8,dwY,14,lpDDSrcSurface,26,lpSrcRect,9,dwTrans);
|
633 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 633 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
634 | 634 | DDSURFACEDESC2 ddsd;
|
635 | 635 | ddsd.dwSize = sizeof(DDSURFACEDESC2);
|
636 | 636 | lpDDSrcSurface->GetSurfaceDesc(&ddsd);
|
— | — | @@ -650,12 +650,12 @@ |
651 | 651 | if(dwTrans & DDBLTFAST_WAIT) flags |= DDBLT_WAIT;
|
652 | 652 | if(dwTrans & DDBLTFAST_DESTCOLORKEY) flags |= DDBLT_KEYDEST;
|
653 | 653 | if(dwTrans & DDBLTFAST_SRCCOLORKEY) flags |= DDBLT_KEYSRC;
|
654 | | - TRACE_RET(23,Blt(&dest,lpDDSrcSurface,lpSrcRect,flags,NULL));
|
| 654 | + TRACE_RET(HRESULT,23,Blt(&dest,lpDDSrcSurface,lpSrcRect,flags,NULL));
|
655 | 655 | }
|
656 | 656 | HRESULT WINAPI glDirectDrawSurface7::DeleteAttachedSurface(DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface)
|
657 | 657 | {
|
658 | 658 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSAttachedSurface);
|
659 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 659 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
660 | 660 | if(lpDDSAttachedSurface == (LPDIRECTDRAWSURFACE7)zbuffer)
|
661 | 661 | {
|
662 | 662 | zbuffer->Release();
|
— | — | @@ -663,12 +663,12 @@ |
664 | 664 | TRACE_EXIT(23,DD_OK);
|
665 | 665 | return DD_OK;
|
666 | 666 | }
|
667 | | - else TRACE_RET(23,DDERR_SURFACENOTATTACHED);
|
| 667 | + else TRACE_RET(HRESULT,23,DDERR_SURFACENOTATTACHED);
|
668 | 668 | }
|
669 | 669 | HRESULT WINAPI glDirectDrawSurface7::EnumAttachedSurfaces(LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback)
|
670 | 670 | {
|
671 | 671 | TRACE_ENTER(3,14,this,14,lpContext,14,lpEnumSurfacesCallback);
|
672 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 672 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
673 | 673 | FIXME("glDirectDrawSurface7::EnumAttachedSurfaces: stub\n");
|
674 | 674 | TRACE_EXIT(23,DDERR_GENERIC);
|
675 | 675 | ERR(DDERR_GENERIC);
|
— | — | @@ -676,7 +676,7 @@ |
677 | 677 | HRESULT WINAPI glDirectDrawSurface7::EnumOverlayZOrders(DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpfnCallback)
|
678 | 678 | {
|
679 | 679 | TRACE_ENTER(4,14,this,9,dwFlags,14,lpContext,14,lpfnCallback);
|
680 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 680 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
681 | 681 | FIXME("glDirectDrawSurface7::EnumOverlayZOrders: stub\n");
|
682 | 682 | TRACE_EXIT(23,DDERR_GENERIC);
|
683 | 683 | ERR(DDERR_GENERIC);
|
— | — | @@ -684,7 +684,7 @@ |
685 | 685 | HRESULT WINAPI glDirectDrawSurface7::Flip(LPDIRECTDRAWSURFACE7 lpDDSurfaceTargetOverride, DWORD dwFlags)
|
686 | 686 | {
|
687 | 687 | TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
688 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 688 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
689 | 689 | HRESULT ret = Flip2(lpDDSurfaceTargetOverride,dwFlags);
|
690 | 690 | if(ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) RenderScreen(texture,this);
|
691 | 691 | TRACE_EXIT(23,ret);
|
— | — | @@ -693,7 +693,7 @@ |
694 | 694 | HRESULT glDirectDrawSurface7::Flip2(LPDIRECTDRAWSURFACE7 lpDDSurfaceTargetOverride, DWORD dwFlags)
|
695 | 695 | {
|
696 | 696 | TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
697 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 697 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
698 | 698 | DWORD i;
|
699 | 699 | glDirectDrawSurface7 *tmp;
|
700 | 700 | if(dwFlags & DDFLIP_NOVSYNC) swapinterval=0;
|
— | — | @@ -708,7 +708,7 @@ |
709 | 709 | if(lpDDSurfaceTargetOverride)
|
710 | 710 | {
|
711 | 711 | bool success = false;
|
712 | | - if(lpDDSurfaceTargetOverride == this) TRACE_RET(23,DD_OK);
|
| 712 | + if(lpDDSurfaceTargetOverride == this) TRACE_RET(HRESULT,23,DD_OK);
|
713 | 713 | tmp = this;
|
714 | 714 | for(i = 0; i < ddsd.dwBackBufferCount; i++)
|
715 | 715 | {
|
— | — | @@ -720,16 +720,16 @@ |
721 | 721 | break;
|
722 | 722 | }
|
723 | 723 | }
|
724 | | - if(!success) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 724 | + if(!success) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
725 | 725 | for(DWORD x = 0; x < i; x++)
|
726 | 726 | {
|
727 | | - if(x == i-1) {TRACE_RET(23,Flip2(NULL,dwFlags));}
|
| 727 | + if(x == i-1) {TRACE_RET(HRESULT,23,Flip2(NULL,dwFlags));}
|
728 | 728 | else Flip2(NULL,0);
|
729 | 729 | }
|
730 | 730 | }
|
731 | 731 | if(ddsd.ddsCaps.dwCaps & DDSCAPS_FLIP)
|
732 | 732 | {
|
733 | | - if(ddsd.ddsCaps.dwCaps & DDSCAPS_BACKBUFFER) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 733 | + if(ddsd.ddsCaps.dwCaps & DDSCAPS_BACKBUFFER) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
734 | 734 | TEXTURE **textures = new TEXTURE*[ddsd.dwBackBufferCount+1];
|
735 | 735 | textures[0] = texture;
|
736 | 736 | tmp = this;
|
— | — | @@ -766,7 +766,7 @@ |
767 | 767 | }
|
768 | 768 | delete[] textures;
|
769 | 769 | }
|
770 | | - else TRACE_RET(23,DDERR_NOTFLIPPABLE);
|
| 770 | + else TRACE_RET(HRESULT,23,DDERR_NOTFLIPPABLE);
|
771 | 771 | flipcount+=flips;
|
772 | 772 | if(flipcount > ddsd.dwBackBufferCount) flipcount -= (ddsd.dwBackBufferCount+1);
|
773 | 773 | TRACE_EXIT(23,DD_OK);
|
— | — | @@ -775,7 +775,7 @@ |
776 | 776 | HRESULT WINAPI glDirectDrawSurface7::GetAttachedSurface(LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE7 FAR *lplpDDAttachedSurface)
|
777 | 777 | {
|
778 | 778 | TRACE_ENTER(3,14,this,14,lpDDSCaps,14,lplpDDAttachedSurface);
|
779 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 779 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
780 | 780 | DDSCAPS2 ddsComp;
|
781 | 781 | backbuffer->GetCaps(&ddsComp);
|
782 | 782 | unsigned __int64 comp1,comp2;
|
— | — | @@ -809,7 +809,7 @@ |
810 | 810 | HRESULT WINAPI glDirectDrawSurface7::GetBltStatus(DWORD dwFlags)
|
811 | 811 | {
|
812 | 812 | TRACE_ENTER(2,14,this,9,dwFlags);
|
813 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 813 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
814 | 814 | FIXME("glDirectDrawSurface7::GetBltStatus: stub\n");
|
815 | 815 | TRACE_EXIT(23,DDERR_GENERIC);
|
816 | 816 | ERR(DDERR_GENERIC);
|
— | — | @@ -817,8 +817,8 @@ |
818 | 818 | HRESULT WINAPI glDirectDrawSurface7::GetCaps(LPDDSCAPS2 lpDDSCaps)
|
819 | 819 | {
|
820 | 820 | TRACE_ENTER(2,14,this,14,lpDDSCaps);
|
821 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
822 | | - if(!lpDDSCaps) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 821 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 822 | + if(!lpDDSCaps) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
823 | 823 | memcpy(lpDDSCaps,&ddsd.ddsCaps,sizeof(DDSCAPS2));
|
824 | 824 | TRACE_EXIT(23,DD_OK);
|
825 | 825 | return DD_OK;
|
— | — | @@ -826,7 +826,7 @@ |
827 | 827 | HRESULT WINAPI glDirectDrawSurface7::GetClipper(LPDIRECTDRAWCLIPPER FAR *lplpDDClipper)
|
828 | 828 | {
|
829 | 829 | TRACE_ENTER(2,14,this,14,lplpDDClipper);
|
830 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 830 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
831 | 831 | FIXME("glDirectDrawSurface7::GetClipper: stub\n");
|
832 | 832 | TRACE_EXIT(23,DDERR_GENERIC);
|
833 | 833 | ERR(DDERR_GENERIC);
|
— | — | @@ -834,8 +834,8 @@ |
835 | 835 | HRESULT WINAPI glDirectDrawSurface7::GetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
836 | 836 | {
|
837 | 837 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
838 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
839 | | - if(!lpDDColorKey) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 838 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 839 | + if(!lpDDColorKey) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
840 | 840 | if(dwFlags == DDCKEY_SRCBLT)
|
841 | 841 | {
|
842 | 842 | if(colorkey[0].enabled)
|
— | — | @@ -844,7 +844,7 @@ |
845 | 845 | TRACE_EXIT(23,DD_OK);
|
846 | 846 | return DD_OK;
|
847 | 847 | }
|
848 | | - else TRACE_RET(23,DDERR_NOCOLORKEY);
|
| 848 | + else TRACE_RET(HRESULT,23,DDERR_NOCOLORKEY);
|
849 | 849 | }
|
850 | 850 | if(dwFlags == DDCKEY_DESTBLT)
|
851 | 851 | {
|
— | — | @@ -854,7 +854,7 @@ |
855 | 855 | TRACE_EXIT(23,DD_OK);
|
856 | 856 | return DD_OK;
|
857 | 857 | }
|
858 | | - else TRACE_RET(23,DDERR_NOCOLORKEY);
|
| 858 | + else TRACE_RET(HRESULT,23,DDERR_NOCOLORKEY);
|
859 | 859 | }
|
860 | 860 | if(dwFlags == DDCKEY_SRCOVERLAY)
|
861 | 861 | {
|
— | — | @@ -864,7 +864,7 @@ |
865 | 865 | TRACE_EXIT(23,DD_OK);
|
866 | 866 | return DD_OK;
|
867 | 867 | }
|
868 | | - else TRACE_RET(23,DDERR_NOCOLORKEY);
|
| 868 | + else TRACE_RET(HRESULT,23,DDERR_NOCOLORKEY);
|
869 | 869 | }
|
870 | 870 | if(dwFlags == DDCKEY_DESTOVERLAY)
|
871 | 871 | {
|
— | — | @@ -874,7 +874,7 @@ |
875 | 875 | TRACE_EXIT(23,DD_OK);
|
876 | 876 | return DD_OK;
|
877 | 877 | }
|
878 | | - else TRACE_RET(23,DDERR_NOCOLORKEY);
|
| 878 | + else TRACE_RET(HRESULT,23,DDERR_NOCOLORKEY);
|
879 | 879 | }
|
880 | 880 | TRACE_EXIT(23,DDERR_INVALIDPARAMS);
|
881 | 881 | return DDERR_INVALIDPARAMS;
|
— | — | @@ -882,15 +882,15 @@ |
883 | 883 | HRESULT WINAPI glDirectDrawSurface7::GetDC(HDC FAR *lphDC)
|
884 | 884 | {
|
885 | 885 | TRACE_ENTER(2,14,this,14,lphDC);
|
886 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
887 | | - if(!lphDC) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
888 | | - if(hdc) TRACE_RET(23,DDERR_DCALREADYCREATED);
|
| 886 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 887 | + if(!lphDC) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 888 | + if(hdc) TRACE_RET(HRESULT,23,DDERR_DCALREADYCREATED);
|
889 | 889 | glDirectDrawPalette *pal;
|
890 | 890 | DWORD colors[256];
|
891 | 891 | HRESULT error;
|
892 | 892 | LPVOID surface;
|
893 | 893 | error = this->Lock(NULL,&ddsd,0,NULL);
|
894 | | - if(error != DD_OK) TRACE_RET(23,error);
|
| 894 | + if(error != DD_OK) TRACE_RET(HRESULT,23,error);
|
895 | 895 | hdc = CreateCompatibleDC(NULL);
|
896 | 896 | bitmapinfo->bmiHeader.biWidth = ddsd.lPitch / (bitmapinfo->bmiHeader.biBitCount / 8);
|
897 | 897 | if(ddsd.ddpfPixelFormat.dwRGBBitCount == 8)
|
— | — | @@ -916,17 +916,17 @@ |
917 | 917 | HRESULT WINAPI glDirectDrawSurface7::GetFlipStatus(DWORD dwFlags)
|
918 | 918 | {
|
919 | 919 | TRACE_ENTER(2,14,this,9,dwFlags);
|
920 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 920 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
921 | 921 | TRACE_EXIT(23,DD_OK);
|
922 | 922 | return DD_OK;
|
923 | 923 | FIXME("glDirectDrawSurface7::GetFlipStatus: stub\n");
|
924 | | - TRACE_RET(23,DDERR_GENERIC);
|
| 924 | + TRACE_RET(HRESULT,23,DDERR_GENERIC);
|
925 | 925 | ERR(DDERR_GENERIC);
|
926 | 926 | }
|
927 | 927 | HRESULT WINAPI glDirectDrawSurface7::GetOverlayPosition(LPLONG lplX, LPLONG lplY)
|
928 | 928 | {
|
929 | 929 | TRACE_ENTER(3,14,this,14,lplX,14,lplY);
|
930 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 930 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
931 | 931 | FIXME("glDirectDrawSurface7::GetOverlayPosition: stub\n");
|
932 | 932 | TRACE_EXIT(23,DDERR_GENERIC);
|
933 | 933 | ERR(DDERR_GENERIC);
|
— | — | @@ -934,7 +934,7 @@ |
935 | 935 | HRESULT WINAPI glDirectDrawSurface7::GetPalette(LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
936 | 936 | {
|
937 | 937 | TRACE_ENTER(2,14,this,14,lplpDDPalette);
|
938 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 938 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
939 | 939 | HRESULT err;
|
940 | 940 | if(palette)
|
941 | 941 | {
|
— | — | @@ -954,8 +954,8 @@ |
955 | 955 | HRESULT WINAPI glDirectDrawSurface7::GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat)
|
956 | 956 | {
|
957 | 957 | TRACE_ENTER(2,14,this,14,lpDDPixelFormat);
|
958 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
959 | | - if(!lpDDPixelFormat) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 958 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 959 | + if(!lpDDPixelFormat) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
960 | 960 | *lpDDPixelFormat = ddsd.ddpfPixelFormat;
|
961 | 961 | TRACE_EXIT(23,DD_OK);
|
962 | 962 | return DD_OK;
|
— | — | @@ -963,8 +963,8 @@ |
964 | 964 | HRESULT WINAPI glDirectDrawSurface7::GetSurfaceDesc(LPDDSURFACEDESC2 lpDDSurfaceDesc)
|
965 | 965 | {
|
966 | 966 | TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
967 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
968 | | - if(!lpDDSurfaceDesc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 967 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 968 | + if(!lpDDSurfaceDesc) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
969 | 969 | memcpy(lpDDSurfaceDesc,&ddsd,lpDDSurfaceDesc->dwSize);
|
970 | 970 | TRACE_EXIT(23,DD_OK);
|
971 | 971 | return DD_OK;
|
— | — | @@ -972,7 +972,7 @@ |
973 | 973 | HRESULT WINAPI glDirectDrawSurface7::Initialize(LPDIRECTDRAW lpDD, LPDDSURFACEDESC2 lpDDSurfaceDesc)
|
974 | 974 | {
|
975 | 975 | TRACE_ENTER(3,14,this,14,lpDD,14,lpDDSurfaceDesc);
|
976 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 976 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
977 | 977 | TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
978 | 978 | return DDERR_ALREADYINITIALIZED;
|
979 | 979 | }
|
— | — | @@ -979,16 +979,16 @@ |
980 | 980 | HRESULT WINAPI glDirectDrawSurface7::IsLost()
|
981 | 981 | {
|
982 | 982 | TRACE_ENTER(1,14,this);
|
983 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
984 | | - if(hRC == renderer->hRC) {TRACE_RET(23,DD_OK);}
|
985 | | - else TRACE_RET(23,DDERR_SURFACELOST);
|
| 983 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 984 | + if(hRC == renderer->hRC) {TRACE_RET(HRESULT,23,DD_OK);}
|
| 985 | + else TRACE_RET(HRESULT,23,DDERR_SURFACELOST);
|
986 | 986 | }
|
987 | 987 |
|
988 | 988 | HRESULT WINAPI glDirectDrawSurface7::Lock(LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
989 | 989 | {
|
990 | 990 | TRACE_ENTER(5,14,this,26,lpDestRect,14,lpDDSurfaceDesc,9,dwFlags,14,hEvent);
|
991 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
992 | | - if(locked) TRACE_RET(23,DDERR_SURFACEBUSY);
|
| 991 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 992 | + if(locked) TRACE_RET(HRESULT,23,DDERR_SURFACEBUSY);
|
993 | 993 | dirty |= 1;
|
994 | 994 | retry:
|
995 | 995 | switch(surfacetype)
|
— | — | @@ -1035,9 +1035,9 @@ |
1036 | 1036 | HRESULT WINAPI glDirectDrawSurface7::ReleaseDC(HDC hDC)
|
1037 | 1037 | {
|
1038 | 1038 | TRACE_ENTER(2,14,this,14,hDC);
|
1039 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1040 | | - if(!hdc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1041 | | - if(hDC != hdc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1039 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1040 | + if(!hdc) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1041 | + if(hDC != hdc) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1042 | 1042 | GetDIBits(hDC,hbitmap,0,ddsd.dwHeight,ddsd.lpSurface,bitmapinfo,DIB_RGB_COLORS);
|
1043 | 1043 | Unlock(NULL);
|
1044 | 1044 | DeleteObject(hbitmap);
|
— | — | @@ -1086,9 +1086,9 @@ |
1087 | 1087 | HRESULT WINAPI glDirectDrawSurface7::Restore()
|
1088 | 1088 | {
|
1089 | 1089 | TRACE_ENTER(1,14,this);
|
1090 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1090 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1091 | 1091 | LONG sizes[6];
|
1092 | | - if(!renderer) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1092 | + if(!renderer) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1093 | 1093 | if(hRC != renderer->hRC)
|
1094 | 1094 | {
|
1095 | 1095 | if(ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
— | — | @@ -1129,12 +1129,12 @@ |
1130 | 1130 | TRACE_EXIT(23,DD_OK);
|
1131 | 1131 | return DD_OK;
|
1132 | 1132 | }
|
1133 | | - else TRACE_RET(23,DD_OK);
|
| 1133 | + else TRACE_RET(HRESULT,23,DD_OK);
|
1134 | 1134 | }
|
1135 | 1135 | HRESULT WINAPI glDirectDrawSurface7::SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper)
|
1136 | 1136 | {
|
1137 | 1137 | TRACE_ENTER(2,14,this,14,lpDDClipper);
|
1138 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1138 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1139 | 1139 | if(clipper) clipper->Release();
|
1140 | 1140 | clipper = (glDirectDrawClipper *)lpDDClipper;
|
1141 | 1141 | if(clipper)clipper->AddRef();
|
— | — | @@ -1144,8 +1144,8 @@ |
1145 | 1145 | HRESULT WINAPI glDirectDrawSurface7::SetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1146 | 1146 | {
|
1147 | 1147 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
1148 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1149 | | - if(!lpDDColorKey) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1148 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1149 | + if(!lpDDColorKey) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1150 | 1150 | CKEY key;
|
1151 | 1151 | key.enabled = true;
|
1152 | 1152 | if(dwFlags & DDCKEY_COLORSPACE) key.colorspace = true;
|
— | — | @@ -1177,7 +1177,7 @@ |
1178 | 1178 | HRESULT WINAPI glDirectDrawSurface7::SetOverlayPosition(LONG lX, LONG lY)
|
1179 | 1179 | {
|
1180 | 1180 | TRACE_ENTER(3,14,this,7,lX,7,lY);
|
1181 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1181 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1182 | 1182 | FIXME("glDirectDrawSurface7::SetOverlayPosition: stub\n");
|
1183 | 1183 | TRACE_EXIT(23,DDERR_GENERIC);
|
1184 | 1184 | ERR(DDERR_GENERIC);
|
— | — | @@ -1185,7 +1185,7 @@ |
1186 | 1186 | HRESULT WINAPI glDirectDrawSurface7::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
1187 | 1187 | {
|
1188 | 1188 | TRACE_ENTER(2,14,this,14,lpDDPalette);
|
1189 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1189 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1190 | 1190 | if(palette)
|
1191 | 1191 | {
|
1192 | 1192 | palette->Release();
|
— | — | @@ -1203,8 +1203,8 @@ |
1204 | 1204 | HRESULT WINAPI glDirectDrawSurface7::Unlock(LPRECT lpRect)
|
1205 | 1205 | {
|
1206 | 1206 | TRACE_ENTER(2,14,this,26,lpRect);
|
1207 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1208 | | - if(!locked) TRACE_RET(23,DDERR_NOTLOCKED);
|
| 1207 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1208 | + if(!locked) TRACE_RET(HRESULT,23,DDERR_NOTLOCKED);
|
1209 | 1209 | locked--;
|
1210 | 1210 | ddsd.lpSurface = NULL;
|
1211 | 1211 | if(((ddsd.ddsCaps.dwCaps & (DDSCAPS_FRONTBUFFER)) &&
|
— | — | @@ -1217,7 +1217,7 @@ |
1218 | 1218 | HRESULT WINAPI glDirectDrawSurface7::UpdateOverlay(LPRECT lpSrcRect, LPDIRECTDRAWSURFACE7 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx)
|
1219 | 1219 | {
|
1220 | 1220 | TRACE_ENTER(6,14,this,26,lpSrcRect,14,lpDDDestSurface,26,lpDestRect,9,dwFlags,14,lpDDOverlayFx);
|
1221 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1221 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1222 | 1222 | FIXME("glDirectDrawSurface7::UpdateOverlay: stub\n");
|
1223 | 1223 | TRACE_EXIT(23,DDERR_GENERIC);
|
1224 | 1224 | ERR(DDERR_GENERIC);
|
— | — | @@ -1225,7 +1225,7 @@ |
1226 | 1226 | HRESULT WINAPI glDirectDrawSurface7::UpdateOverlayDisplay(DWORD dwFlags)
|
1227 | 1227 | {
|
1228 | 1228 | TRACE_ENTER(2,14,this,9,dwFlags);
|
1229 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1229 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1230 | 1230 | FIXME("glDirectDrawSurface7::UpdateOverlayDisplay: stub\n");
|
1231 | 1231 | TRACE_EXIT(23,DDERR_GENERIC);
|
1232 | 1232 | ERR(DDERR_GENERIC);
|
— | — | @@ -1233,7 +1233,7 @@ |
1234 | 1234 | HRESULT WINAPI glDirectDrawSurface7::UpdateOverlayZOrder(DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSReference)
|
1235 | 1235 | {
|
1236 | 1236 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSReference);
|
1237 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1237 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1238 | 1238 | FIXME("glDirectDrawSurface7::UpdateOverlayZOrder: stub\n");
|
1239 | 1239 | TRACE_EXIT(23,DDERR_GENERIC);
|
1240 | 1240 | ERR(DDERR_GENERIC);
|
— | — | @@ -1249,7 +1249,7 @@ |
1250 | 1250 | HRESULT WINAPI glDirectDrawSurface7::GetDDInterface(LPVOID FAR *lplpDD)
|
1251 | 1251 | {
|
1252 | 1252 | TRACE_ENTER(2,14,this,14,lplpDD);
|
1253 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1253 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1254 | 1254 | ddInterface->AddRef();
|
1255 | 1255 | *lplpDD = ddInterface;
|
1256 | 1256 | TRACE_VAR("*lplpDD",14,*lplpDD);
|
— | — | @@ -1259,7 +1259,7 @@ |
1260 | 1260 | HRESULT WINAPI glDirectDrawSurface7::PageLock(DWORD dwFlags)
|
1261 | 1261 | {
|
1262 | 1262 | TRACE_ENTER(2,14,this,9,dwFlags);
|
1263 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1263 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1264 | 1264 | pagelocked++;
|
1265 | 1265 | TRACE_EXIT(23,DD_OK);
|
1266 | 1266 | return DD_OK;
|
— | — | @@ -1267,8 +1267,8 @@ |
1268 | 1268 | HRESULT WINAPI glDirectDrawSurface7::PageUnlock(DWORD dwFlags)
|
1269 | 1269 | {
|
1270 | 1270 | TRACE_ENTER(2,14,this,9,dwFlags);
|
1271 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1272 | | - if(!pagelocked) TRACE_RET(23,DDERR_NOTPAGELOCKED);
|
| 1271 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1272 | + if(!pagelocked) TRACE_RET(HRESULT,23,DDERR_NOTPAGELOCKED);
|
1273 | 1273 | pagelocked--;
|
1274 | 1274 | TRACE_EXIT(23,DD_OK);
|
1275 | 1275 | return DD_OK;
|
— | — | @@ -1277,7 +1277,7 @@ |
1278 | 1278 | HRESULT WINAPI glDirectDrawSurface7::SetSurfaceDesc(LPDDSURFACEDESC2 lpddsd2, DWORD dwFlags)
|
1279 | 1279 | {
|
1280 | 1280 | TRACE_ENTER(3,14,this,14,lpddsd2,9,dwFlags);
|
1281 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1281 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1282 | 1282 | FIXME("glDirectDrawSurface7::SetSurfaceDesc: stub\n");
|
1283 | 1283 | TRACE_EXIT(23,DDERR_GENERIC);
|
1284 | 1284 | ERR(DDERR_GENERIC);
|
— | — | @@ -1286,7 +1286,7 @@ |
1287 | 1287 | HRESULT WINAPI glDirectDrawSurface7::SetPrivateData(REFGUID guidTag, LPVOID lpData, DWORD cbSize, DWORD dwFlags)
|
1288 | 1288 | {
|
1289 | 1289 | TRACE_ENTER(5,14,this,24,&guidTag,14,lpData,8,cbSize,9,dwFlags);
|
1290 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1290 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1291 | 1291 | FIXME("glDirectDrawSurface7::SetPrivateData: stub\n");
|
1292 | 1292 | TRACE_EXIT(23,DDERR_GENERIC);
|
1293 | 1293 | ERR(DDERR_GENERIC);
|
— | — | @@ -1294,7 +1294,7 @@ |
1295 | 1295 | HRESULT WINAPI glDirectDrawSurface7::GetPrivateData(REFGUID guidTag, LPVOID lpBuffer, LPDWORD lpcbBufferSize)
|
1296 | 1296 | {
|
1297 | 1297 | TRACE_ENTER(4,14,this,24,&guidTag,14,lpBuffer,14,lpcbBufferSize);
|
1298 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1298 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1299 | 1299 | FIXME("glDirectDrawSurface7::GetPrivateData: stub\n");
|
1300 | 1300 | TRACE_EXIT(23,DDERR_GENERIC);
|
1301 | 1301 | ERR(DDERR_GENERIC);
|
— | — | @@ -1302,7 +1302,7 @@ |
1303 | 1303 | HRESULT WINAPI glDirectDrawSurface7::FreePrivateData(REFGUID guidTag)
|
1304 | 1304 | {
|
1305 | 1305 | TRACE_ENTER(2,14,this,24,&guidTag);
|
1306 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1306 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1307 | 1307 | FIXME("glDirectDrawSurface7::FreePrivateData: stub\n");
|
1308 | 1308 | TRACE_EXIT(23,DDERR_GENERIC);
|
1309 | 1309 | ERR(DDERR_GENERIC);
|
— | — | @@ -1310,7 +1310,7 @@ |
1311 | 1311 | HRESULT WINAPI glDirectDrawSurface7::GetUniquenessValue(LPDWORD lpValue)
|
1312 | 1312 | {
|
1313 | 1313 | TRACE_ENTER(2,14,this,14,lpValue);
|
1314 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1314 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1315 | 1315 | FIXME("glDirectDrawSurface7::GetUniquenessValue: stub\n");
|
1316 | 1316 | TRACE_EXIT(23,DDERR_GENERIC);
|
1317 | 1317 | ERR(DDERR_GENERIC);
|
— | — | @@ -1318,7 +1318,7 @@ |
1319 | 1319 | HRESULT WINAPI glDirectDrawSurface7::ChangeUniquenessValue()
|
1320 | 1320 | {
|
1321 | 1321 | TRACE_ENTER(1,14,this);
|
1322 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1322 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1323 | 1323 | FIXME("glDirectDrawSurface7::ChangeUniquenessValue: stub\n");
|
1324 | 1324 | TRACE_EXIT(23,DDERR_GENERIC);
|
1325 | 1325 | ERR(DDERR_GENERIC);
|
— | — | @@ -1327,7 +1327,7 @@ |
1328 | 1328 | HRESULT WINAPI glDirectDrawSurface7::SetPriority(DWORD dwPriority)
|
1329 | 1329 | {
|
1330 | 1330 | TRACE_ENTER(2,14,this,8,dwPriority);
|
1331 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1331 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1332 | 1332 | FIXME("glDirectDrawSurface7::SetPriority: stub\n");
|
1333 | 1333 | TRACE_EXIT(23,DDERR_GENERIC);
|
1334 | 1334 | ERR(DDERR_GENERIC);
|
— | — | @@ -1335,7 +1335,7 @@ |
1336 | 1336 | HRESULT WINAPI glDirectDrawSurface7::GetPriority(LPDWORD lpdwPriority)
|
1337 | 1337 | {
|
1338 | 1338 | TRACE_ENTER(2,14,this,14,lpdwPriority);
|
1339 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1339 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1340 | 1340 | FIXME("glDirectDrawSurface7::GetPriority: stub\n");
|
1341 | 1341 | TRACE_EXIT(23,DDERR_GENERIC);
|
1342 | 1342 | ERR(DDERR_GENERIC);
|
— | — | @@ -1343,7 +1343,7 @@ |
1344 | 1344 | HRESULT WINAPI glDirectDrawSurface7::SetLOD(DWORD dwMaxLOD)
|
1345 | 1345 | {
|
1346 | 1346 | TRACE_ENTER(2,14,this,8,dwMaxLOD);
|
1347 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1347 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1348 | 1348 | FIXME("glDirectDrawSurface7::SetLOD: stub\n");
|
1349 | 1349 | TRACE_EXIT(23,DDERR_GENERIC);
|
1350 | 1350 | ERR(DDERR_GENERIC);
|
— | — | @@ -1351,7 +1351,7 @@ |
1352 | 1352 | HRESULT WINAPI glDirectDrawSurface7::GetLOD(LPDWORD lpdwMaxLOD)
|
1353 | 1353 | {
|
1354 | 1354 | TRACE_ENTER(2,14,this,14,lpdwMaxLOD);
|
1355 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1355 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1356 | 1356 | FIXME("glDirectDrawSurface7::GetLOD: stub\n");
|
1357 | 1357 | TRACE_EXIT(23,DDERR_GENERIC);
|
1358 | 1358 | ERR(DDERR_GENERIC);
|
— | — | @@ -1359,8 +1359,8 @@ |
1360 | 1360 | HRESULT WINAPI glDirectDrawSurface7::Unlock2(LPVOID lpSurfaceData)
|
1361 | 1361 | {
|
1362 | 1362 | TRACE_ENTER(2,14,this,14,lpSurfaceData);
|
1363 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1364 | | - TRACE_RET(23,Unlock((LPRECT)lpSurfaceData));
|
| 1363 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1364 | + TRACE_RET(HRESULT,23,Unlock((LPRECT)lpSurfaceData));
|
1365 | 1365 | }
|
1366 | 1366 | void glDirectDrawSurface7::SetFilter(int level, GLint mag, GLint min)
|
1367 | 1367 | {
|
— | — | @@ -1410,11 +1410,11 @@ |
1411 | 1411 | HRESULT glDirectDrawSurface7::GetHandle(glDirect3DDevice7 *glD3DDev7, LPD3DTEXTUREHANDLE lpHandle)
|
1412 | 1412 | {
|
1413 | 1413 | TRACE_ENTER(3,14,this,14,glD3DDev7,14,lpHandle);
|
1414 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1415 | | - if(!glD3DDev7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1414 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1415 | + if(!glD3DDev7) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1416 | 1416 | if(handle)
|
1417 | 1417 | {
|
1418 | | - if(device != glD3DDev7) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1418 | + if(device != glD3DDev7) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1419 | 1419 | *lpHandle = handle;
|
1420 | 1420 | TRACE_EXIT(23,D3D_OK);
|
1421 | 1421 | return D3D_OK;
|
— | — | @@ -1421,7 +1421,7 @@ |
1422 | 1422 | }
|
1423 | 1423 | device = glD3DDev7;
|
1424 | 1424 | handle = device->AddTexture(this);
|
1425 | | - if(handle == -1) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 1425 | + if(handle == -1) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
|
1426 | 1426 | device->AddRef();
|
1427 | 1427 | *lpHandle = handle;
|
1428 | 1428 | TRACE_VAR("*lpHandle",9,*lpHandle);
|
— | — | @@ -1432,8 +1432,8 @@ |
1433 | 1433 | HRESULT glDirectDrawSurface7::Load(glDirectDrawSurface7 *src)
|
1434 | 1434 | {
|
1435 | 1435 | TRACE_ENTER(2,14,this,14,src);
|
1436 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1437 | | - if(!src) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1436 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1437 | + if(!src) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1438 | 1438 | this->Blt(NULL,src,NULL,DDBLT_WAIT,NULL);
|
1439 | 1439 | ddsd.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;
|
1440 | 1440 | TRACE_EXIT(23,D3D_OK);
|
— | — | @@ -1459,7 +1459,7 @@ |
1460 | 1460 | HRESULT WINAPI glDirectDrawSurface1::QueryInterface(REFIID riid, void** ppvObj)
|
1461 | 1461 | {
|
1462 | 1462 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
1463 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1463 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1464 | 1464 | if(riid == IID_IUnknown)
|
1465 | 1465 | {
|
1466 | 1466 | this->AddRef();
|
— | — | @@ -1468,12 +1468,12 @@ |
1469 | 1469 | TRACE_EXIT(23,DD_OK);
|
1470 | 1470 | return DD_OK;
|
1471 | 1471 | }
|
1472 | | - TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
| 1472 | + TRACE_RET(HRESULT,23,glDDS7->QueryInterface(riid,ppvObj));
|
1473 | 1473 | }
|
1474 | 1474 | ULONG WINAPI glDirectDrawSurface1::AddRef()
|
1475 | 1475 | {
|
1476 | 1476 | TRACE_ENTER(1,14,this);
|
1477 | | - if(!this) TRACE_RET(8,0);
|
| 1477 | + if(!this) TRACE_RET(ULONG,8,0);
|
1478 | 1478 | refcount++;
|
1479 | 1479 | TRACE_EXIT(8,refcount);
|
1480 | 1480 | return refcount;
|
— | — | @@ -1481,7 +1481,7 @@ |
1482 | 1482 | ULONG WINAPI glDirectDrawSurface1::Release()
|
1483 | 1483 | {
|
1484 | 1484 | TRACE_ENTER(1,14,this);
|
1485 | | - if(!this) TRACE_RET(8,0);
|
| 1485 | + if(!this) TRACE_RET(ULONG,8,0);
|
1486 | 1486 | ULONG ret;
|
1487 | 1487 | refcount--;
|
1488 | 1488 | ret = refcount;
|
— | — | @@ -1492,66 +1492,66 @@ |
1493 | 1493 | HRESULT WINAPI glDirectDrawSurface1::AddAttachedSurface(LPDIRECTDRAWSURFACE lpDDSAttachedSurface)
|
1494 | 1494 | {
|
1495 | 1495 | TRACE_ENTER(2,14,this,14,lpDDSAttachedSurface);
|
1496 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1497 | | - if(!lpDDSAttachedSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1498 | | - TRACE_RET(23,glDDS7->AddAttachedSurface(((glDirectDrawSurface1*)lpDDSAttachedSurface)->GetDDS7()));
|
| 1496 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1497 | + if(!lpDDSAttachedSurface) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1498 | + TRACE_RET(HRESULT,23,glDDS7->AddAttachedSurface(((glDirectDrawSurface1*)lpDDSAttachedSurface)->GetDDS7()));
|
1499 | 1499 | }
|
1500 | 1500 | HRESULT WINAPI glDirectDrawSurface1::AddOverlayDirtyRect(LPRECT lpRect)
|
1501 | 1501 | {
|
1502 | 1502 | TRACE_ENTER(2,14,this,26,lpRect);
|
1503 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1504 | | - TRACE_RET(23,glDDS7->AddOverlayDirtyRect(lpRect));
|
| 1503 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1504 | + TRACE_RET(HRESULT,23,glDDS7->AddOverlayDirtyRect(lpRect));
|
1505 | 1505 | }
|
1506 | 1506 | HRESULT WINAPI glDirectDrawSurface1::Blt(LPRECT lpDestRect, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
1507 | 1507 | {
|
1508 | 1508 | TRACE_ENTER(6,14,this,26,lpDestRect,14,lpDDSrcSurface,14,lpSrcRect,9,dwFlags,14,lpDDBltFx);
|
1509 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1510 | | - if(lpDDSrcSurface) {TRACE_RET(23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface1*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx))}
|
1511 | | - else TRACE_RET(23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
| 1509 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1510 | + if(lpDDSrcSurface) {TRACE_RET(HRESULT,23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface1*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx))}
|
| 1511 | + else TRACE_RET(HRESULT,23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
1512 | 1512 | }
|
1513 | 1513 | HRESULT WINAPI glDirectDrawSurface1::BltBatch(LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags)
|
1514 | 1514 | {
|
1515 | 1515 | TRACE_ENTER(4,14,this,14,lpDDBltBatch,8,dwCount,9,dwFlags);
|
1516 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1517 | | - TRACE_RET(23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
| 1516 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1517 | + TRACE_RET(HRESULT,23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
1518 | 1518 | }
|
1519 | 1519 | HRESULT WINAPI glDirectDrawSurface1::BltFast(DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans)
|
1520 | 1520 | {
|
1521 | 1521 | TRACE_ENTER(6,14,this,8,dwX,8,dwY,14,lpDDSrcSurface,26,lpSrcRect,9,dwTrans);
|
1522 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1523 | | - TRACE_RET(23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface1*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
| 1522 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1523 | + TRACE_RET(HRESULT,23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface1*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
1524 | 1524 | }
|
1525 | 1525 | HRESULT WINAPI glDirectDrawSurface1::DeleteAttachedSurface(DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSAttachedSurface)
|
1526 | 1526 | {
|
1527 | 1527 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSAttachedSurface);
|
1528 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1529 | | - TRACE_RET(23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
| 1528 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1529 | + TRACE_RET(HRESULT,23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
1530 | 1530 | }
|
1531 | 1531 | HRESULT WINAPI glDirectDrawSurface1::EnumAttachedSurfaces(LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback)
|
1532 | 1532 | {
|
1533 | 1533 | TRACE_ENTER(3,14,this,14,lpContext,14,lpEnumSurfacesCallback);
|
1534 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1535 | | - TRACE_RET(23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
| 1534 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1535 | + TRACE_RET(HRESULT,23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
1536 | 1536 | }
|
1537 | 1537 | HRESULT WINAPI glDirectDrawSurface1::EnumOverlayZOrders(DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback)
|
1538 | 1538 | {
|
1539 | 1539 | TRACE_ENTER(4,14,this,9,dwFlags,14,lpContext,14,lpfnCallback);
|
1540 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1541 | | - TRACE_RET(23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
| 1540 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1541 | + TRACE_RET(HRESULT,23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
1542 | 1542 | }
|
1543 | 1543 | HRESULT WINAPI glDirectDrawSurface1::Flip(LPDIRECTDRAWSURFACE lpDDSurfaceTargetOverride, DWORD dwFlags)
|
1544 | 1544 | {
|
1545 | 1545 | TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
1546 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1546 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1547 | 1547 | if(lpDDSurfaceTargetOverride)
|
1548 | | - {TRACE_RET(23,glDDS7->Flip(((glDirectDrawSurface1*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
1549 | | - else TRACE_RET(23,glDDS7->Flip(NULL,dwFlags));
|
| 1548 | + {TRACE_RET(HRESULT,23,glDDS7->Flip(((glDirectDrawSurface1*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
| 1549 | + else TRACE_RET(HRESULT,23,glDDS7->Flip(NULL,dwFlags));
|
1550 | 1550 | }
|
1551 | 1551 | HRESULT WINAPI glDirectDrawSurface1::GetAttachedSurface(LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE FAR *lplpDDAttachedSurface)
|
1552 | 1552 | {
|
1553 | 1553 | TRACE_ENTER(3,14,this,14,lpDDSCaps,14,lplpDDAttachedSurface);
|
1554 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1555 | | - if(!lpDDSCaps) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1554 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1555 | + if(!lpDDSCaps) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1556 | 1556 | HRESULT error;
|
1557 | 1557 | glDirectDrawSurface7 *attachedsurface;
|
1558 | 1558 | glDirectDrawSurface1 *attached1;
|
— | — | @@ -1572,14 +1572,14 @@ |
1573 | 1573 | HRESULT WINAPI glDirectDrawSurface1::GetBltStatus(DWORD dwFlags)
|
1574 | 1574 | {
|
1575 | 1575 | TRACE_ENTER(2,14,this,9,dwFlags);
|
1576 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1577 | | - TRACE_RET(23,glDDS7->GetBltStatus(dwFlags));
|
| 1576 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1577 | + TRACE_RET(HRESULT,23,glDDS7->GetBltStatus(dwFlags));
|
1578 | 1578 | }
|
1579 | 1579 | HRESULT WINAPI glDirectDrawSurface1::GetCaps(LPDDSCAPS lpDDSCaps)
|
1580 | 1580 | {
|
1581 | 1581 | TRACE_ENTER(2,14,this,14,lpDDSCaps);
|
1582 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1583 | | - if(!lpDDSCaps) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1582 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1583 | + if(!lpDDSCaps) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1584 | 1584 | HRESULT error;
|
1585 | 1585 | DDSCAPS2 ddsCaps1;
|
1586 | 1586 | error = glDDS7->GetCaps(&ddsCaps1);
|
— | — | @@ -1591,55 +1591,55 @@ |
1592 | 1592 | HRESULT WINAPI glDirectDrawSurface1::GetClipper(LPDIRECTDRAWCLIPPER FAR *lplpDDClipper)
|
1593 | 1593 | {
|
1594 | 1594 | TRACE_ENTER(2,14,this,14,lplpDDClipper);
|
1595 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1596 | | - TRACE_RET(23,glDDS7->GetClipper(lplpDDClipper));
|
| 1595 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1596 | + TRACE_RET(HRESULT,23,glDDS7->GetClipper(lplpDDClipper));
|
1597 | 1597 | }
|
1598 | 1598 | HRESULT WINAPI glDirectDrawSurface1::GetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1599 | 1599 | {
|
1600 | 1600 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
1601 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1602 | | - TRACE_RET(23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
| 1601 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1602 | + TRACE_RET(HRESULT,23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
1603 | 1603 | }
|
1604 | 1604 | HRESULT WINAPI glDirectDrawSurface1::GetDC(HDC FAR *lphDC)
|
1605 | 1605 | {
|
1606 | 1606 | TRACE_ENTER(2,14,this,14,lphDC);
|
1607 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1608 | | - TRACE_RET(23,glDDS7->GetDC(lphDC));
|
| 1607 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1608 | + TRACE_RET(HRESULT,23,glDDS7->GetDC(lphDC));
|
1609 | 1609 | }
|
1610 | 1610 | HRESULT WINAPI glDirectDrawSurface1::GetFlipStatus(DWORD dwFlags)
|
1611 | 1611 | {
|
1612 | 1612 | TRACE_ENTER(2,14,this,9,dwFlags);
|
1613 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1614 | | - TRACE_RET(23,glDDS7->GetFlipStatus(dwFlags));
|
| 1613 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1614 | + TRACE_RET(HRESULT,23,glDDS7->GetFlipStatus(dwFlags));
|
1615 | 1615 | }
|
1616 | 1616 | HRESULT WINAPI glDirectDrawSurface1::GetOverlayPosition(LPLONG lplX, LPLONG lplY)
|
1617 | 1617 | {
|
1618 | 1618 | TRACE_ENTER(3,14,this,14,lplX,14,lplY);
|
1619 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1620 | | - TRACE_RET(23,glDDS7->GetOverlayPosition(lplX,lplY));
|
| 1619 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1620 | + TRACE_RET(HRESULT,23,glDDS7->GetOverlayPosition(lplX,lplY));
|
1621 | 1621 | }
|
1622 | 1622 | HRESULT WINAPI glDirectDrawSurface1::GetPalette(LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
1623 | 1623 | {
|
1624 | 1624 | TRACE_ENTER(2,14,this,14,lplpDDPalette);
|
1625 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1626 | | - TRACE_RET(23,glDDS7->GetPalette(lplpDDPalette));
|
| 1625 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1626 | + TRACE_RET(HRESULT,23,glDDS7->GetPalette(lplpDDPalette));
|
1627 | 1627 | }
|
1628 | 1628 | HRESULT WINAPI glDirectDrawSurface1::GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat)
|
1629 | 1629 | {
|
1630 | 1630 | TRACE_ENTER(2,14,this,14,lpDDPixelFormat);
|
1631 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1632 | | - TRACE_RET(23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
| 1631 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1632 | + TRACE_RET(HRESULT,23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
1633 | 1633 | }
|
1634 | 1634 | HRESULT WINAPI glDirectDrawSurface1::GetSurfaceDesc(LPDDSURFACEDESC lpDDSurfaceDesc)
|
1635 | 1635 | {
|
1636 | 1636 | TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
1637 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1638 | | - TRACE_RET(23,glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
| 1637 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1638 | + TRACE_RET(HRESULT,23,glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
1639 | 1639 | }
|
1640 | 1640 | HRESULT WINAPI glDirectDrawSurface1::Initialize(LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc)
|
1641 | 1641 | {
|
1642 | 1642 | TRACE_ENTER(3,14,this,14,lpDD,14,lpDDSurfaceDesc);
|
1643 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1643 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1644 | 1644 | TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
1645 | 1645 | return DDERR_ALREADYINITIALIZED;
|
1646 | 1646 | }
|
— | — | @@ -1646,74 +1646,74 @@ |
1647 | 1647 | HRESULT WINAPI glDirectDrawSurface1::IsLost()
|
1648 | 1648 | {
|
1649 | 1649 | TRACE_ENTER(1,14,this);
|
1650 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1651 | | - TRACE_RET(23,glDDS7->IsLost());
|
| 1650 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1651 | + TRACE_RET(HRESULT,23,glDDS7->IsLost());
|
1652 | 1652 | }
|
1653 | 1653 | HRESULT WINAPI glDirectDrawSurface1::Lock(LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
1654 | 1654 | {
|
1655 | 1655 | TRACE_ENTER(5,14,this,26,lpDestRect,14,lpDDSurfaceDesc,9,dwFlags,14,hEvent);
|
1656 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1657 | | - TRACE_RET(23,glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent));
|
| 1656 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1657 | + TRACE_RET(HRESULT,23,glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent));
|
1658 | 1658 | }
|
1659 | 1659 | HRESULT WINAPI glDirectDrawSurface1::ReleaseDC(HDC hDC)
|
1660 | 1660 | {
|
1661 | 1661 | TRACE_ENTER(2,14,this,14,hDC);
|
1662 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1663 | | - TRACE_RET(23,glDDS7->ReleaseDC(hDC));
|
| 1662 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1663 | + TRACE_RET(HRESULT,23,glDDS7->ReleaseDC(hDC));
|
1664 | 1664 | }
|
1665 | 1665 | HRESULT WINAPI glDirectDrawSurface1::Restore()
|
1666 | 1666 | {
|
1667 | 1667 | TRACE_ENTER(1,14,this);
|
1668 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1669 | | - TRACE_RET(23,glDDS7->Restore());
|
| 1668 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1669 | + TRACE_RET(HRESULT,23,glDDS7->Restore());
|
1670 | 1670 | }
|
1671 | 1671 | HRESULT WINAPI glDirectDrawSurface1::SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper)
|
1672 | 1672 | {
|
1673 | 1673 | TRACE_ENTER(2,14,this,14,lpDDClipper);
|
1674 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1675 | | - TRACE_RET(23,glDDS7->SetClipper(lpDDClipper));
|
| 1674 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1675 | + TRACE_RET(HRESULT,23,glDDS7->SetClipper(lpDDClipper));
|
1676 | 1676 | }
|
1677 | 1677 | HRESULT WINAPI glDirectDrawSurface1::SetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1678 | 1678 | {
|
1679 | 1679 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
1680 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1681 | | - TRACE_RET(23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
| 1680 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1681 | + TRACE_RET(HRESULT,23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
1682 | 1682 | }
|
1683 | 1683 | HRESULT WINAPI glDirectDrawSurface1::SetOverlayPosition(LONG lX, LONG lY)
|
1684 | 1684 | {
|
1685 | 1685 | TRACE_ENTER(3,14,this,7,lX,7,lY);
|
1686 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1687 | | - TRACE_RET(23,glDDS7->SetOverlayPosition(lX,lY));
|
| 1686 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1687 | + TRACE_RET(HRESULT,23,glDDS7->SetOverlayPosition(lX,lY));
|
1688 | 1688 | }
|
1689 | 1689 | HRESULT WINAPI glDirectDrawSurface1::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
1690 | 1690 | {
|
1691 | 1691 | TRACE_ENTER(2,14,this,14,lpDDPalette);
|
1692 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1693 | | - TRACE_RET(23,glDDS7->SetPalette(lpDDPalette));
|
| 1692 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1693 | + TRACE_RET(HRESULT,23,glDDS7->SetPalette(lpDDPalette));
|
1694 | 1694 | }
|
1695 | 1695 | HRESULT WINAPI glDirectDrawSurface1::Unlock(LPVOID lpSurfaceData)
|
1696 | 1696 | {
|
1697 | 1697 | TRACE_ENTER(2,14,this,14,lpSurfaceData);
|
1698 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1699 | | - TRACE_RET(23,glDDS7->Unlock2(lpSurfaceData));
|
| 1698 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1699 | + TRACE_RET(HRESULT,23,glDDS7->Unlock2(lpSurfaceData));
|
1700 | 1700 | }
|
1701 | 1701 | HRESULT WINAPI glDirectDrawSurface1::UpdateOverlay(LPRECT lpSrcRect, LPDIRECTDRAWSURFACE lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx)
|
1702 | 1702 | {
|
1703 | 1703 | TRACE_ENTER(6,14,this,26,lpSrcRect,14,lpDDDestSurface,26,lpDestRect,9,dwFlags,14,lpDDOverlayFx);
|
1704 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1705 | | - TRACE_RET(23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
| 1704 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1705 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
1706 | 1706 | }
|
1707 | 1707 | HRESULT WINAPI glDirectDrawSurface1::UpdateOverlayDisplay(DWORD dwFlags)
|
1708 | 1708 | {
|
1709 | 1709 | TRACE_ENTER(2,14,this,9,dwFlags);
|
1710 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1711 | | - TRACE_RET(23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
| 1710 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1711 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
1712 | 1712 | }
|
1713 | 1713 | HRESULT WINAPI glDirectDrawSurface1::UpdateOverlayZOrder(DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSReference)
|
1714 | 1714 | {
|
1715 | 1715 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSReference);
|
1716 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1717 | | - TRACE_RET(23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
| 1716 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1717 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
1718 | 1718 | }
|
1719 | 1719 |
|
1720 | 1720 | // DDRAW2 wrapper
|
— | — | @@ -1734,7 +1734,7 @@ |
1735 | 1735 | HRESULT WINAPI glDirectDrawSurface2::QueryInterface(REFIID riid, void** ppvObj)
|
1736 | 1736 | {
|
1737 | 1737 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
1738 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1738 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1739 | 1739 | if(riid == IID_IUnknown)
|
1740 | 1740 | {
|
1741 | 1741 | this->AddRef();
|
— | — | @@ -1742,12 +1742,12 @@ |
1743 | 1743 | TRACE_EXIT(23,DD_OK);
|
1744 | 1744 | return DD_OK;
|
1745 | 1745 | }
|
1746 | | - TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
| 1746 | + TRACE_RET(HRESULT,23,glDDS7->QueryInterface(riid,ppvObj));
|
1747 | 1747 | }
|
1748 | 1748 | ULONG WINAPI glDirectDrawSurface2::AddRef()
|
1749 | 1749 | {
|
1750 | 1750 | TRACE_ENTER(1,14,this);
|
1751 | | - if(!this) TRACE_RET(8,0);
|
| 1751 | + if(!this) TRACE_RET(ULONG,8,0);
|
1752 | 1752 | refcount++;
|
1753 | 1753 | TRACE_EXIT(8,refcount);
|
1754 | 1754 | return refcount;
|
— | — | @@ -1755,7 +1755,7 @@ |
1756 | 1756 | ULONG WINAPI glDirectDrawSurface2::Release()
|
1757 | 1757 | {
|
1758 | 1758 | TRACE_ENTER(1,14,this);
|
1759 | | - if(!this) TRACE_RET(8,0);
|
| 1759 | + if(!this) TRACE_RET(ULONG,8,0);
|
1760 | 1760 | ULONG ret;
|
1761 | 1761 | refcount--;
|
1762 | 1762 | ret = refcount;
|
— | — | @@ -1766,65 +1766,65 @@ |
1767 | 1767 | HRESULT WINAPI glDirectDrawSurface2::AddAttachedSurface(LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface)
|
1768 | 1768 | {
|
1769 | 1769 | TRACE_ENTER(2,14,this,14,lpDDSAttachedSurface);
|
1770 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1771 | | - if(!lpDDSAttachedSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1772 | | - TRACE_RET(23,glDDS7->AddAttachedSurface(((glDirectDrawSurface2*)lpDDSAttachedSurface)->GetDDS7()));
|
| 1770 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1771 | + if(!lpDDSAttachedSurface) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1772 | + TRACE_RET(HRESULT,23,glDDS7->AddAttachedSurface(((glDirectDrawSurface2*)lpDDSAttachedSurface)->GetDDS7()));
|
1773 | 1773 | }
|
1774 | 1774 | HRESULT WINAPI glDirectDrawSurface2::AddOverlayDirtyRect(LPRECT lpRect)
|
1775 | 1775 | {
|
1776 | 1776 | TRACE_ENTER(2,14,this,26,lpRect);
|
1777 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1778 | | - TRACE_RET(23,glDDS7->AddOverlayDirtyRect(lpRect));
|
| 1777 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1778 | + TRACE_RET(HRESULT,23,glDDS7->AddOverlayDirtyRect(lpRect));
|
1779 | 1779 | }
|
1780 | 1780 | HRESULT WINAPI glDirectDrawSurface2::Blt(LPRECT lpDestRect, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
1781 | 1781 | {
|
1782 | 1782 | TRACE_ENTER(6,14,this,26,lpDestRect,14,lpDDSrcSurface,26,lpSrcRect,9,dwFlags,14,lpDDBltFx);
|
1783 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1784 | | - if(lpDDSrcSurface) {TRACE_RET(23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface2*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx));}
|
1785 | | - else TRACE_RET(23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
| 1783 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1784 | + if(lpDDSrcSurface) {TRACE_RET(HRESULT,23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface2*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx));}
|
| 1785 | + else TRACE_RET(HRESULT,23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
1786 | 1786 | }
|
1787 | 1787 | HRESULT WINAPI glDirectDrawSurface2::BltBatch(LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags)
|
1788 | 1788 | {
|
1789 | 1789 | TRACE_ENTER(4,14,this,14,lpDDBltBatch,8,dwCount,9,dwFlags);
|
1790 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1791 | | - TRACE_RET(23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
| 1790 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1791 | + TRACE_RET(HRESULT,23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
1792 | 1792 | }
|
1793 | 1793 | HRESULT WINAPI glDirectDrawSurface2::BltFast(DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans)
|
1794 | 1794 | {
|
1795 | 1795 | TRACE_ENTER(6,14,this,8,dwX,8,dwY,4,lpDDSrcSurface,26,lpSrcRect,9,dwTrans);
|
1796 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1797 | | - TRACE_RET(23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface2*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
| 1796 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1797 | + TRACE_RET(HRESULT,23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface2*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
1798 | 1798 | }
|
1799 | 1799 | HRESULT WINAPI glDirectDrawSurface2::DeleteAttachedSurface(DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface)
|
1800 | 1800 | {
|
1801 | 1801 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSAttachedSurface);
|
1802 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1803 | | - TRACE_RET(23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
| 1802 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1803 | + TRACE_RET(HRESULT,23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
1804 | 1804 | }
|
1805 | 1805 | HRESULT WINAPI glDirectDrawSurface2::EnumAttachedSurfaces(LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback)
|
1806 | 1806 | {
|
1807 | 1807 | TRACE_ENTER(3,14,this,14,lpContext,14,lpEnumSurfacesCallback);
|
1808 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1809 | | - TRACE_RET(23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
| 1808 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1809 | + TRACE_RET(HRESULT,23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
1810 | 1810 | }
|
1811 | 1811 | HRESULT WINAPI glDirectDrawSurface2::EnumOverlayZOrders(DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback)
|
1812 | 1812 | {
|
1813 | 1813 | TRACE_ENTER(4,14,this,9,dwFlags,14,lpContext,14,lpfnCallback);
|
1814 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1815 | | - TRACE_RET(23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
| 1814 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1815 | + TRACE_RET(HRESULT,23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
1816 | 1816 | }
|
1817 | 1817 | HRESULT WINAPI glDirectDrawSurface2::Flip(LPDIRECTDRAWSURFACE2 lpDDSurfaceTargetOverride, DWORD dwFlags)
|
1818 | 1818 | {
|
1819 | 1819 | TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
1820 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1820 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1821 | 1821 | if(lpDDSurfaceTargetOverride)
|
1822 | | - {TRACE_RET(23,glDDS7->Flip(((glDirectDrawSurface2*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
1823 | | - else TRACE_RET(23,glDDS7->Flip(NULL,dwFlags));
|
| 1822 | + {TRACE_RET(HRESULT,23,glDDS7->Flip(((glDirectDrawSurface2*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
| 1823 | + else TRACE_RET(HRESULT,23,glDDS7->Flip(NULL,dwFlags));
|
1824 | 1824 | }
|
1825 | 1825 | HRESULT WINAPI glDirectDrawSurface2::GetAttachedSurface(LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE2 FAR *lplpDDAttachedSurface)
|
1826 | 1826 | {
|
1827 | 1827 | TRACE_ENTER(3,14,this,14,lpDDSCaps,14,lplpDDAttachedSurface);
|
1828 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1828 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1829 | 1829 | HRESULT error;
|
1830 | 1830 | glDirectDrawSurface7 *attachedsurface;
|
1831 | 1831 | glDirectDrawSurface2 *attached1;
|
— | — | @@ -1845,14 +1845,14 @@ |
1846 | 1846 | HRESULT WINAPI glDirectDrawSurface2::GetBltStatus(DWORD dwFlags)
|
1847 | 1847 | {
|
1848 | 1848 | TRACE_ENTER(2,14,this,9,dwFlags);
|
1849 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1850 | | - TRACE_RET(23,glDDS7->GetBltStatus(dwFlags));
|
| 1849 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1850 | + TRACE_RET(HRESULT,23,glDDS7->GetBltStatus(dwFlags));
|
1851 | 1851 | }
|
1852 | 1852 | HRESULT WINAPI glDirectDrawSurface2::GetCaps(LPDDSCAPS lpDDSCaps)
|
1853 | 1853 | {
|
1854 | 1854 | TRACE_ENTER(2,14,this,14,lpDDSCaps);
|
1855 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1856 | | - if(!lpDDSCaps) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1855 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1856 | + if(!lpDDSCaps) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1857 | 1857 | HRESULT error;
|
1858 | 1858 | DDSCAPS2 ddsCaps1;
|
1859 | 1859 | error = glDDS7->GetCaps(&ddsCaps1);
|
— | — | @@ -1864,55 +1864,55 @@ |
1865 | 1865 | HRESULT WINAPI glDirectDrawSurface2::GetClipper(LPDIRECTDRAWCLIPPER FAR *lplpDDClipper)
|
1866 | 1866 | {
|
1867 | 1867 | TRACE_ENTER(2,14,this,14,lplpDDClipper);
|
1868 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1869 | | - TRACE_RET(23,glDDS7->GetClipper(lplpDDClipper));
|
| 1868 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1869 | + TRACE_RET(HRESULT,23,glDDS7->GetClipper(lplpDDClipper));
|
1870 | 1870 | }
|
1871 | 1871 | HRESULT WINAPI glDirectDrawSurface2::GetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1872 | 1872 | {
|
1873 | 1873 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
1874 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1875 | | - TRACE_RET(23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
| 1874 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1875 | + TRACE_RET(HRESULT,23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
1876 | 1876 | }
|
1877 | 1877 | HRESULT WINAPI glDirectDrawSurface2::GetDC(HDC FAR *lphDC)
|
1878 | 1878 | {
|
1879 | 1879 | TRACE_ENTER(2,14,this,14,lphDC);
|
1880 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1881 | | - TRACE_RET(23,glDDS7->GetDC(lphDC));
|
| 1880 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1881 | + TRACE_RET(HRESULT,23,glDDS7->GetDC(lphDC));
|
1882 | 1882 | }
|
1883 | 1883 | HRESULT WINAPI glDirectDrawSurface2::GetFlipStatus(DWORD dwFlags)
|
1884 | 1884 | {
|
1885 | 1885 | TRACE_ENTER(2,14,this,9,dwFlags);
|
1886 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1887 | | - TRACE_RET(23,glDDS7->GetFlipStatus(dwFlags));
|
| 1886 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1887 | + TRACE_RET(HRESULT,23,glDDS7->GetFlipStatus(dwFlags));
|
1888 | 1888 | }
|
1889 | 1889 | HRESULT WINAPI glDirectDrawSurface2::GetOverlayPosition(LPLONG lplX, LPLONG lplY)
|
1890 | 1890 | {
|
1891 | 1891 | TRACE_ENTER(3,14,this,14,lplX,14,lplY);
|
1892 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1893 | | - TRACE_RET(23,glDDS7->GetOverlayPosition(lplX,lplY));
|
| 1892 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1893 | + TRACE_RET(HRESULT,23,glDDS7->GetOverlayPosition(lplX,lplY));
|
1894 | 1894 | }
|
1895 | 1895 | HRESULT WINAPI glDirectDrawSurface2::GetPalette(LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
1896 | 1896 | {
|
1897 | 1897 | TRACE_ENTER(2,14,this,14,lplpDDPalette);
|
1898 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1899 | | - TRACE_RET(23,glDDS7->GetPalette(lplpDDPalette));
|
| 1898 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1899 | + TRACE_RET(HRESULT,23,glDDS7->GetPalette(lplpDDPalette));
|
1900 | 1900 | }
|
1901 | 1901 | HRESULT WINAPI glDirectDrawSurface2::GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat)
|
1902 | 1902 | {
|
1903 | 1903 | TRACE_ENTER(2,14,this,14,lpDDPixelFormat);
|
1904 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1905 | | - TRACE_RET(23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
| 1904 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1905 | + TRACE_RET(HRESULT,23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
1906 | 1906 | }
|
1907 | 1907 | HRESULT WINAPI glDirectDrawSurface2::GetSurfaceDesc(LPDDSURFACEDESC lpDDSurfaceDesc)
|
1908 | 1908 | {
|
1909 | 1909 | TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
1910 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1911 | | - TRACE_RET(23,glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
| 1910 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1911 | + TRACE_RET(HRESULT,23,glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
1912 | 1912 | }
|
1913 | 1913 | HRESULT WINAPI glDirectDrawSurface2::Initialize(LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc)
|
1914 | 1914 | {
|
1915 | 1915 | TRACE_ENTER(3,14,this,14,lpDD,14,lpDDSurfaceDesc);
|
1916 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1916 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1917 | 1917 | TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
1918 | 1918 | return DDERR_ALREADYINITIALIZED;
|
1919 | 1919 | }
|
— | — | @@ -1919,98 +1919,98 @@ |
1920 | 1920 | HRESULT WINAPI glDirectDrawSurface2::IsLost()
|
1921 | 1921 | {
|
1922 | 1922 | TRACE_ENTER(1,14,this);
|
1923 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1924 | | - TRACE_RET(23,glDDS7->IsLost());
|
| 1923 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1924 | + TRACE_RET(HRESULT,23,glDDS7->IsLost());
|
1925 | 1925 | }
|
1926 | 1926 | HRESULT WINAPI glDirectDrawSurface2::Lock(LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
1927 | 1927 | {
|
1928 | 1928 | TRACE_ENTER(5,14,this,26,lpDestRect,14,lpDDSurfaceDesc,9,dwFlags,14,hEvent);
|
1929 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1930 | | - TRACE_RET(23,glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent));
|
| 1929 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1930 | + TRACE_RET(HRESULT,23,glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent));
|
1931 | 1931 | }
|
1932 | 1932 | HRESULT WINAPI glDirectDrawSurface2::ReleaseDC(HDC hDC)
|
1933 | 1933 | {
|
1934 | 1934 | TRACE_ENTER(2,14,this,14,hDC);
|
1935 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1936 | | - TRACE_RET(23,glDDS7->ReleaseDC(hDC));
|
| 1935 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1936 | + TRACE_RET(HRESULT,23,glDDS7->ReleaseDC(hDC));
|
1937 | 1937 | }
|
1938 | 1938 | HRESULT WINAPI glDirectDrawSurface2::Restore()
|
1939 | 1939 | {
|
1940 | 1940 | TRACE_ENTER(1,14,this);
|
1941 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1942 | | - TRACE_RET(23,glDDS7->Restore());
|
| 1941 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1942 | + TRACE_RET(HRESULT,23,glDDS7->Restore());
|
1943 | 1943 | }
|
1944 | 1944 | HRESULT WINAPI glDirectDrawSurface2::SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper)
|
1945 | 1945 | {
|
1946 | 1946 | TRACE_ENTER(2,14,this,14,lpDDClipper);
|
1947 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1948 | | - TRACE_RET(23,glDDS7->SetClipper(lpDDClipper));
|
| 1947 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1948 | + TRACE_RET(HRESULT,23,glDDS7->SetClipper(lpDDClipper));
|
1949 | 1949 | }
|
1950 | 1950 | HRESULT WINAPI glDirectDrawSurface2::SetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1951 | 1951 | {
|
1952 | 1952 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
1953 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1954 | | - TRACE_RET(23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
| 1953 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1954 | + TRACE_RET(HRESULT,23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
1955 | 1955 | }
|
1956 | 1956 | HRESULT WINAPI glDirectDrawSurface2::SetOverlayPosition(LONG lX, LONG lY)
|
1957 | 1957 | {
|
1958 | 1958 | TRACE_ENTER(3,14,this,7,lX,7,lY);
|
1959 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1960 | | - TRACE_RET(23,glDDS7->SetOverlayPosition(lX,lY));
|
| 1959 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1960 | + TRACE_RET(HRESULT,23,glDDS7->SetOverlayPosition(lX,lY));
|
1961 | 1961 | }
|
1962 | 1962 | HRESULT WINAPI glDirectDrawSurface2::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
1963 | 1963 | {
|
1964 | 1964 | TRACE_ENTER(2,14,this,14,lpDDPalette);
|
1965 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1966 | | - TRACE_RET(23,glDDS7->SetPalette(lpDDPalette));
|
| 1965 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1966 | + TRACE_RET(HRESULT,23,glDDS7->SetPalette(lpDDPalette));
|
1967 | 1967 | }
|
1968 | 1968 | HRESULT WINAPI glDirectDrawSurface2::Unlock(LPVOID lpSurfaceData)
|
1969 | 1969 | {
|
1970 | 1970 | TRACE_ENTER(2,14,this,14,lpSurfaceData);
|
1971 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1972 | | - TRACE_RET(23,glDDS7->Unlock2(lpSurfaceData));
|
| 1971 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1972 | + TRACE_RET(HRESULT,23,glDDS7->Unlock2(lpSurfaceData));
|
1973 | 1973 | }
|
1974 | 1974 | HRESULT WINAPI glDirectDrawSurface2::UpdateOverlay(LPRECT lpSrcRect, LPDIRECTDRAWSURFACE2 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx)
|
1975 | 1975 | {
|
1976 | 1976 | TRACE_ENTER(6,14,this,26,lpSrcRect,14,lpDDDestSurface,26,lpDestRect,9,dwFlags,14,lpDDOverlayFx);
|
1977 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1978 | | - TRACE_RET(23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
| 1977 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1978 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
1979 | 1979 | }
|
1980 | 1980 | HRESULT WINAPI glDirectDrawSurface2::UpdateOverlayDisplay(DWORD dwFlags)
|
1981 | 1981 | {
|
1982 | 1982 | TRACE_ENTER(2,14,this,9,dwFlags);
|
1983 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1984 | | - TRACE_RET(23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
| 1983 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1984 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
1985 | 1985 | }
|
1986 | 1986 | HRESULT WINAPI glDirectDrawSurface2::UpdateOverlayZOrder(DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSReference)
|
1987 | 1987 | {
|
1988 | 1988 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSReference);
|
1989 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1990 | | - TRACE_RET(23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
| 1989 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1990 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
1991 | 1991 | }
|
1992 | 1992 | HRESULT WINAPI glDirectDrawSurface2::GetDDInterface(LPVOID FAR *lplpDD)
|
1993 | 1993 | {
|
1994 | 1994 | TRACE_ENTER(2,14,this,14,lplpDD);
|
1995 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1995 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1996 | 1996 | glDirectDraw7 *glDD7;
|
1997 | 1997 | HRESULT ret = glDDS7->GetDDInterface((void**)&glDD7);
|
1998 | | - if(ret != DD_OK) TRACE_RET(23,ret);
|
| 1998 | + if(ret != DD_OK) TRACE_RET(HRESULT,23,ret);
|
1999 | 1999 | glDD7->QueryInterface(IID_IDirectDraw,lplpDD);
|
2000 | 2000 | glDD7->Release();
|
2001 | 2001 | TRACE_VAR("*lplpDD",14,*lplpDD);
|
2002 | | - TRACE_RET(23,ret);
|
| 2002 | + TRACE_RET(HRESULT,23,ret);
|
2003 | 2003 | }
|
2004 | 2004 | HRESULT WINAPI glDirectDrawSurface2::PageLock(DWORD dwFlags)
|
2005 | 2005 | {
|
2006 | 2006 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2007 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2008 | | - TRACE_RET(23,glDDS7->PageLock(dwFlags));
|
| 2007 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2008 | + TRACE_RET(HRESULT,23,glDDS7->PageLock(dwFlags));
|
2009 | 2009 | }
|
2010 | 2010 | HRESULT WINAPI glDirectDrawSurface2::PageUnlock(DWORD dwFlags)
|
2011 | 2011 | {
|
2012 | 2012 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2013 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2014 | | - TRACE_RET(23,glDDS7->PageUnlock(dwFlags));
|
| 2013 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2014 | + TRACE_RET(HRESULT,23,glDDS7->PageUnlock(dwFlags));
|
2015 | 2015 | }
|
2016 | 2016 |
|
2017 | 2017 | // DDRAW3 wrapper
|
— | — | @@ -2031,7 +2031,7 @@ |
2032 | 2032 | HRESULT WINAPI glDirectDrawSurface3::QueryInterface(REFIID riid, void** ppvObj)
|
2033 | 2033 | {
|
2034 | 2034 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
2035 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2035 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2036 | 2036 | if(riid == IID_IUnknown)
|
2037 | 2037 | {
|
2038 | 2038 | this->AddRef();
|
— | — | @@ -2040,7 +2040,7 @@ |
2041 | 2041 | TRACE_EXIT(23,DD_OK);
|
2042 | 2042 | return DD_OK;
|
2043 | 2043 | }
|
2044 | | - TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
| 2044 | + TRACE_RET(HRESULT,23,glDDS7->QueryInterface(riid,ppvObj));
|
2045 | 2045 | }
|
2046 | 2046 | ULONG WINAPI glDirectDrawSurface3::AddRef()
|
2047 | 2047 | {
|
— | — | @@ -2064,65 +2064,65 @@ |
2065 | 2065 | HRESULT WINAPI glDirectDrawSurface3::AddAttachedSurface(LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface)
|
2066 | 2066 | {
|
2067 | 2067 | TRACE_ENTER(2,14,this,14,lpDDSAttachedSurface);
|
2068 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2069 | | - if(!lpDDSAttachedSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2070 | | - TRACE_RET(23,glDDS7->AddAttachedSurface(((glDirectDrawSurface3*)lpDDSAttachedSurface)->GetDDS7()));
|
| 2068 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2069 | + if(!lpDDSAttachedSurface) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 2070 | + TRACE_RET(HRESULT,23,glDDS7->AddAttachedSurface(((glDirectDrawSurface3*)lpDDSAttachedSurface)->GetDDS7()));
|
2071 | 2071 | }
|
2072 | 2072 | HRESULT WINAPI glDirectDrawSurface3::AddOverlayDirtyRect(LPRECT lpRect)
|
2073 | 2073 | {
|
2074 | 2074 | TRACE_ENTER(2,14,this,26,lpRect);
|
2075 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2076 | | - TRACE_RET(23,glDDS7->AddOverlayDirtyRect(lpRect));
|
| 2075 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2076 | + TRACE_RET(HRESULT,23,glDDS7->AddOverlayDirtyRect(lpRect));
|
2077 | 2077 | }
|
2078 | 2078 | HRESULT WINAPI glDirectDrawSurface3::Blt(LPRECT lpDestRect, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
2079 | 2079 | {
|
2080 | 2080 | TRACE_ENTER(6,14,this,26,lpDestRect,14,lpDDSrcSurface,26,lpSrcRect,9,dwFlags,14,lpDDBltFx);
|
2081 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2082 | | - if(lpDDSrcSurface) {TRACE_RET(23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface3*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx));}
|
2083 | | - else TRACE_RET(23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
| 2081 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2082 | + if(lpDDSrcSurface) {TRACE_RET(HRESULT,23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface3*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx));}
|
| 2083 | + else TRACE_RET(HRESULT,23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
2084 | 2084 | }
|
2085 | 2085 | HRESULT WINAPI glDirectDrawSurface3::BltBatch(LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags)
|
2086 | 2086 | {
|
2087 | 2087 | TRACE_ENTER(4,14,this,14,lpDDBltBatch,8,dwCount,9,dwFlags);
|
2088 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2089 | | - TRACE_RET(23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
| 2088 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2089 | + TRACE_RET(HRESULT,23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
2090 | 2090 | }
|
2091 | 2091 | HRESULT WINAPI glDirectDrawSurface3::BltFast(DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans)
|
2092 | 2092 | {
|
2093 | 2093 | TRACE_ENTER(6,14,this,8,dwX,8,dwY,14,lpDDSrcSurface,26,lpSrcRect,9,dwTrans);
|
2094 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2095 | | - TRACE_RET(23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface3*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
| 2094 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2095 | + TRACE_RET(HRESULT,23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface3*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
2096 | 2096 | }
|
2097 | 2097 | HRESULT WINAPI glDirectDrawSurface3::DeleteAttachedSurface(DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface)
|
2098 | 2098 | {
|
2099 | 2099 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSAttachedSurface);
|
2100 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2101 | | - TRACE_RET(23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
| 2100 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2101 | + TRACE_RET(HRESULT,23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
2102 | 2102 | }
|
2103 | 2103 | HRESULT WINAPI glDirectDrawSurface3::EnumAttachedSurfaces(LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback)
|
2104 | 2104 | {
|
2105 | 2105 | TRACE_ENTER(3,14,this,14,lpContext,14,lpEnumSurfacesCallback);
|
2106 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2107 | | - TRACE_RET(23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
| 2106 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2107 | + TRACE_RET(HRESULT,23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
2108 | 2108 | }
|
2109 | 2109 | HRESULT WINAPI glDirectDrawSurface3::EnumOverlayZOrders(DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback)
|
2110 | 2110 | {
|
2111 | 2111 | TRACE_ENTER(4,14,this,9,dwFlags,14,lpContext,14,lpfnCallback);
|
2112 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2113 | | - TRACE_RET(23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
| 2112 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2113 | + TRACE_RET(HRESULT,23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
2114 | 2114 | }
|
2115 | 2115 | HRESULT WINAPI glDirectDrawSurface3::Flip(LPDIRECTDRAWSURFACE3 lpDDSurfaceTargetOverride, DWORD dwFlags)
|
2116 | 2116 | {
|
2117 | 2117 | TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
2118 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2118 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2119 | 2119 | if(lpDDSurfaceTargetOverride)
|
2120 | | - {TRACE_RET(23,glDDS7->Flip(((glDirectDrawSurface3*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
2121 | | - else TRACE_RET(23,glDDS7->Flip(NULL,dwFlags));
|
| 2120 | + {TRACE_RET(HRESULT,23,glDDS7->Flip(((glDirectDrawSurface3*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
| 2121 | + else TRACE_RET(HRESULT,23,glDDS7->Flip(NULL,dwFlags));
|
2122 | 2122 | }
|
2123 | 2123 | HRESULT WINAPI glDirectDrawSurface3::GetAttachedSurface(LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE3 FAR *lplpDDAttachedSurface)
|
2124 | 2124 | {
|
2125 | 2125 | TRACE_ENTER(3,14,this,14,lpDDSCaps,14,lplpDDAttachedSurface);
|
2126 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2126 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2127 | 2127 | HRESULT error;
|
2128 | 2128 | glDirectDrawSurface7 *attachedsurface;
|
2129 | 2129 | glDirectDrawSurface3 *attached1;
|
— | — | @@ -2143,14 +2143,14 @@ |
2144 | 2144 | HRESULT WINAPI glDirectDrawSurface3::GetBltStatus(DWORD dwFlags)
|
2145 | 2145 | {
|
2146 | 2146 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2147 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2148 | | - TRACE_RET(23,glDDS7->GetBltStatus(dwFlags));
|
| 2147 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2148 | + TRACE_RET(HRESULT,23,glDDS7->GetBltStatus(dwFlags));
|
2149 | 2149 | }
|
2150 | 2150 | HRESULT WINAPI glDirectDrawSurface3::GetCaps(LPDDSCAPS lpDDSCaps)
|
2151 | 2151 | {
|
2152 | 2152 | TRACE_ENTER(2,14,this,14,lpDDSCaps);
|
2153 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2154 | | - if(!lpDDSCaps) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2153 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2154 | + if(!lpDDSCaps) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
2155 | 2155 | HRESULT error;
|
2156 | 2156 | DDSCAPS2 ddsCaps1;
|
2157 | 2157 | error = glDDS7->GetCaps(&ddsCaps1);
|
— | — | @@ -2162,55 +2162,55 @@ |
2163 | 2163 | HRESULT WINAPI glDirectDrawSurface3::GetClipper(LPDIRECTDRAWCLIPPER FAR *lplpDDClipper)
|
2164 | 2164 | {
|
2165 | 2165 | TRACE_ENTER(2,14,this,14,lplpDDClipper);
|
2166 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2167 | | - TRACE_RET(23,glDDS7->GetClipper(lplpDDClipper));
|
| 2166 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2167 | + TRACE_RET(HRESULT,23,glDDS7->GetClipper(lplpDDClipper));
|
2168 | 2168 | }
|
2169 | 2169 | HRESULT WINAPI glDirectDrawSurface3::GetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
2170 | 2170 | {
|
2171 | 2171 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
2172 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2173 | | - TRACE_RET(23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
| 2172 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2173 | + TRACE_RET(HRESULT,23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
2174 | 2174 | }
|
2175 | 2175 | HRESULT WINAPI glDirectDrawSurface3::GetDC(HDC FAR *lphDC)
|
2176 | 2176 | {
|
2177 | 2177 | TRACE_ENTER(2,14,this,14,lphDC);
|
2178 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2179 | | - TRACE_RET(23,glDDS7->GetDC(lphDC));
|
| 2178 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2179 | + TRACE_RET(HRESULT,23,glDDS7->GetDC(lphDC));
|
2180 | 2180 | }
|
2181 | 2181 | HRESULT WINAPI glDirectDrawSurface3::GetFlipStatus(DWORD dwFlags)
|
2182 | 2182 | {
|
2183 | 2183 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2184 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2185 | | - TRACE_RET(23,glDDS7->GetFlipStatus(dwFlags));
|
| 2184 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2185 | + TRACE_RET(HRESULT,23,glDDS7->GetFlipStatus(dwFlags));
|
2186 | 2186 | }
|
2187 | 2187 | HRESULT WINAPI glDirectDrawSurface3::GetOverlayPosition(LPLONG lplX, LPLONG lplY)
|
2188 | 2188 | {
|
2189 | 2189 | TRACE_ENTER(3,14,this,14,lplX,14,lplY);
|
2190 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2191 | | - TRACE_RET(23,glDDS7->GetOverlayPosition(lplX,lplY));
|
| 2190 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2191 | + TRACE_RET(HRESULT,23,glDDS7->GetOverlayPosition(lplX,lplY));
|
2192 | 2192 | }
|
2193 | 2193 | HRESULT WINAPI glDirectDrawSurface3::GetPalette(LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
2194 | 2194 | {
|
2195 | 2195 | TRACE_ENTER(2,14,this,14,lplpDDPalette);
|
2196 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2197 | | - TRACE_RET(23,glDDS7->GetPalette(lplpDDPalette));
|
| 2196 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2197 | + TRACE_RET(HRESULT,23,glDDS7->GetPalette(lplpDDPalette));
|
2198 | 2198 | }
|
2199 | 2199 | HRESULT WINAPI glDirectDrawSurface3::GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat)
|
2200 | 2200 | {
|
2201 | 2201 | TRACE_ENTER(2,14,this,14,lpDDPixelFormat);
|
2202 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2203 | | - TRACE_RET(23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
| 2202 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2203 | + TRACE_RET(HRESULT,23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
2204 | 2204 | }
|
2205 | 2205 | HRESULT WINAPI glDirectDrawSurface3::GetSurfaceDesc(LPDDSURFACEDESC lpDDSurfaceDesc)
|
2206 | 2206 | {
|
2207 | 2207 | TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
2208 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2209 | | - TRACE_RET(23,glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
| 2208 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2209 | + TRACE_RET(HRESULT,23,glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
2210 | 2210 | }
|
2211 | 2211 | HRESULT WINAPI glDirectDrawSurface3::Initialize(LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc)
|
2212 | 2212 | {
|
2213 | 2213 | TRACE_ENTER(3,14,this,14,lpDD,14,lpDDSurfaceDesc);
|
2214 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2214 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2215 | 2215 | TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
2216 | 2216 | return DDERR_ALREADYINITIALIZED;
|
2217 | 2217 | }
|
— | — | @@ -2217,82 +2217,82 @@ |
2218 | 2218 | HRESULT WINAPI glDirectDrawSurface3::IsLost()
|
2219 | 2219 | {
|
2220 | 2220 | TRACE_ENTER(1,14,this);
|
2221 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2222 | | - TRACE_RET(23,glDDS7->IsLost());
|
| 2221 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2222 | + TRACE_RET(HRESULT,23,glDDS7->IsLost());
|
2223 | 2223 | }
|
2224 | 2224 | HRESULT WINAPI glDirectDrawSurface3::Lock(LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
2225 | 2225 | {
|
2226 | 2226 | TRACE_ENTER(5,14,this,26,lpDestRect,14,lpDDSurfaceDesc,9,dwFlags,14,hEvent);
|
2227 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2228 | | - TRACE_RET(23,glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent));
|
| 2227 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2228 | + TRACE_RET(HRESULT,23,glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent));
|
2229 | 2229 | }
|
2230 | 2230 | HRESULT WINAPI glDirectDrawSurface3::ReleaseDC(HDC hDC)
|
2231 | 2231 | {
|
2232 | 2232 | TRACE_ENTER(2,14,this,14,hDC);
|
2233 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2234 | | - TRACE_RET(23,glDDS7->ReleaseDC(hDC));
|
| 2233 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2234 | + TRACE_RET(HRESULT,23,glDDS7->ReleaseDC(hDC));
|
2235 | 2235 | }
|
2236 | 2236 | HRESULT WINAPI glDirectDrawSurface3::Restore()
|
2237 | 2237 | {
|
2238 | 2238 | TRACE_ENTER(1,14,this);
|
2239 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2240 | | - TRACE_RET(23,glDDS7->Restore());
|
| 2239 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2240 | + TRACE_RET(HRESULT,23,glDDS7->Restore());
|
2241 | 2241 | }
|
2242 | 2242 | HRESULT WINAPI glDirectDrawSurface3::SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper)
|
2243 | 2243 | {
|
2244 | 2244 | TRACE_ENTER(2,14,this,14,lpDDClipper);
|
2245 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2246 | | - TRACE_RET(23,glDDS7->SetClipper(lpDDClipper));
|
| 2245 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2246 | + TRACE_RET(HRESULT,23,glDDS7->SetClipper(lpDDClipper));
|
2247 | 2247 | }
|
2248 | 2248 | HRESULT WINAPI glDirectDrawSurface3::SetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
2249 | 2249 | {
|
2250 | 2250 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
2251 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2252 | | - TRACE_RET(23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
| 2251 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2252 | + TRACE_RET(HRESULT,23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
2253 | 2253 | }
|
2254 | 2254 | HRESULT WINAPI glDirectDrawSurface3::SetOverlayPosition(LONG lX, LONG lY)
|
2255 | 2255 | {
|
2256 | 2256 | TRACE_ENTER(3,14,this,7,lX,7,lY);
|
2257 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2258 | | - TRACE_RET(23,glDDS7->SetOverlayPosition(lX,lY));
|
| 2257 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2258 | + TRACE_RET(HRESULT,23,glDDS7->SetOverlayPosition(lX,lY));
|
2259 | 2259 | }
|
2260 | 2260 | HRESULT WINAPI glDirectDrawSurface3::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
2261 | 2261 | {
|
2262 | 2262 | TRACE_ENTER(2,14,this,14,lpDDPalette);
|
2263 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2264 | | - TRACE_RET(23,glDDS7->SetPalette(lpDDPalette));
|
| 2263 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2264 | + TRACE_RET(HRESULT,23,glDDS7->SetPalette(lpDDPalette));
|
2265 | 2265 | }
|
2266 | 2266 | HRESULT WINAPI glDirectDrawSurface3::Unlock(LPVOID lpSurfaceData)
|
2267 | 2267 | {
|
2268 | 2268 | TRACE_ENTER(2,14,this,14,lpSurfaceData);
|
2269 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2270 | | - TRACE_RET(23,glDDS7->Unlock2(lpSurfaceData));
|
| 2269 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2270 | + TRACE_RET(HRESULT,23,glDDS7->Unlock2(lpSurfaceData));
|
2271 | 2271 | }
|
2272 | 2272 | HRESULT WINAPI glDirectDrawSurface3::UpdateOverlay(LPRECT lpSrcRect, LPDIRECTDRAWSURFACE3 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx)
|
2273 | 2273 | {
|
2274 | 2274 | TRACE_ENTER(6,14,this,26,lpSrcRect,14,lpDDDestSurface,26,lpDestRect,9,dwFlags,14,lpDDOverlayFx);
|
2275 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2276 | | - TRACE_RET(23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
| 2275 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2276 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
2277 | 2277 | }
|
2278 | 2278 | HRESULT WINAPI glDirectDrawSurface3::UpdateOverlayDisplay(DWORD dwFlags)
|
2279 | 2279 | {
|
2280 | 2280 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2281 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2282 | | - TRACE_RET(23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
| 2281 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2282 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
2283 | 2283 | }
|
2284 | 2284 | HRESULT WINAPI glDirectDrawSurface3::UpdateOverlayZOrder(DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSReference)
|
2285 | 2285 | {
|
2286 | 2286 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSReference);
|
2287 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2288 | | - TRACE_RET(23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
| 2287 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2288 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
2289 | 2289 | }
|
2290 | 2290 | HRESULT WINAPI glDirectDrawSurface3::GetDDInterface(LPVOID FAR *lplpDD)
|
2291 | 2291 | {
|
2292 | 2292 | TRACE_ENTER(2,14,this,14,lplpDD);
|
2293 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2293 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2294 | 2294 | glDirectDraw7 *glDD7;
|
2295 | 2295 | HRESULT ret = glDDS7->GetDDInterface((void**)&glDD7);
|
2296 | | - if(ret != DD_OK) TRACE_RET(23,ret);
|
| 2296 | + if(ret != DD_OK) TRACE_RET(HRESULT,23,ret);
|
2297 | 2297 | glDD7->QueryInterface(IID_IDirectDraw,lplpDD);
|
2298 | 2298 | glDD7->Release();
|
2299 | 2299 | TRACE_VAR("*lplpDD",14,*lplpDD);
|
— | — | @@ -2302,20 +2302,20 @@ |
2303 | 2303 | HRESULT WINAPI glDirectDrawSurface3::PageLock(DWORD dwFlags)
|
2304 | 2304 | {
|
2305 | 2305 | TRACE_ENTER(2,14,this,14,dwFlags);
|
2306 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2307 | | - TRACE_RET(23,glDDS7->PageLock(dwFlags));
|
| 2306 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2307 | + TRACE_RET(HRESULT,23,glDDS7->PageLock(dwFlags));
|
2308 | 2308 | }
|
2309 | 2309 | HRESULT WINAPI glDirectDrawSurface3::PageUnlock(DWORD dwFlags)
|
2310 | 2310 | {
|
2311 | 2311 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2312 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2313 | | - TRACE_RET(23,glDDS7->PageUnlock(dwFlags));
|
| 2312 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2313 | + TRACE_RET(HRESULT,23,glDDS7->PageUnlock(dwFlags));
|
2314 | 2314 | }
|
2315 | 2315 | HRESULT WINAPI glDirectDrawSurface3::SetSurfaceDesc(LPDDSURFACEDESC lpddsd, DWORD dwFlags)
|
2316 | 2316 | {
|
2317 | 2317 | TRACE_ENTER(3,14,this,14,lpddsd,9,dwFlags);
|
2318 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2319 | | - TRACE_RET(23,glDDS7->SetSurfaceDesc((LPDDSURFACEDESC2)lpddsd,dwFlags));
|
| 2318 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2319 | + TRACE_RET(HRESULT,23,glDDS7->SetSurfaceDesc((LPDDSURFACEDESC2)lpddsd,dwFlags));
|
2320 | 2320 | }
|
2321 | 2321 |
|
2322 | 2322 | // DDRAW4 wrapper
|
— | — | @@ -2336,7 +2336,7 @@ |
2337 | 2337 | HRESULT WINAPI glDirectDrawSurface4::QueryInterface(REFIID riid, void** ppvObj)
|
2338 | 2338 | {
|
2339 | 2339 | TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
2340 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2340 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2341 | 2341 | if(riid == IID_IUnknown)
|
2342 | 2342 | {
|
2343 | 2343 | this->AddRef();
|
— | — | @@ -2345,12 +2345,12 @@ |
2346 | 2346 | TRACE_EXIT(23,DD_OK);
|
2347 | 2347 | return DD_OK;
|
2348 | 2348 | }
|
2349 | | - TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
| 2349 | + TRACE_RET(HRESULT,23,glDDS7->QueryInterface(riid,ppvObj));
|
2350 | 2350 | }
|
2351 | 2351 | ULONG WINAPI glDirectDrawSurface4::AddRef()
|
2352 | 2352 | {
|
2353 | 2353 | TRACE_ENTER(1,14,this);
|
2354 | | - if(!this) TRACE_RET(8,0);
|
| 2354 | + if(!this) TRACE_RET(ULONG,8,0);
|
2355 | 2355 | refcount++;
|
2356 | 2356 | TRACE_EXIT(8,refcount);
|
2357 | 2357 | return refcount;
|
— | — | @@ -2358,7 +2358,7 @@ |
2359 | 2359 | ULONG WINAPI glDirectDrawSurface4::Release()
|
2360 | 2360 | {
|
2361 | 2361 | TRACE_ENTER(1,14,this);
|
2362 | | - if(!this) TRACE_RET(8,0);
|
| 2362 | + if(!this) TRACE_RET(ULONG,8,0);
|
2363 | 2363 | ULONG ret;
|
2364 | 2364 | refcount--;
|
2365 | 2365 | ret = refcount;
|
— | — | @@ -2369,64 +2369,64 @@ |
2370 | 2370 | HRESULT WINAPI glDirectDrawSurface4::AddAttachedSurface(LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface)
|
2371 | 2371 | {
|
2372 | 2372 | TRACE_ENTER(2,14,this,14,lpDDSAttachedSurface);
|
2373 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2374 | | - TRACE_RET(23,glDDS7->AddAttachedSurface(((glDirectDrawSurface4*)lpDDSAttachedSurface)->GetDDS7()));
|
| 2373 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2374 | + TRACE_RET(HRESULT,23,glDDS7->AddAttachedSurface(((glDirectDrawSurface4*)lpDDSAttachedSurface)->GetDDS7()));
|
2375 | 2375 | }
|
2376 | 2376 | HRESULT WINAPI glDirectDrawSurface4::AddOverlayDirtyRect(LPRECT lpRect)
|
2377 | 2377 | {
|
2378 | 2378 | TRACE_ENTER(2,14,this,26,lpRect);
|
2379 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2380 | | - TRACE_RET(23,glDDS7->AddOverlayDirtyRect(lpRect));
|
| 2379 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2380 | + TRACE_RET(HRESULT,23,glDDS7->AddOverlayDirtyRect(lpRect));
|
2381 | 2381 | }
|
2382 | 2382 | HRESULT WINAPI glDirectDrawSurface4::Blt(LPRECT lpDestRect, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
2383 | 2383 | {
|
2384 | 2384 | TRACE_ENTER(6,14,this,26,lpDestRect,14,lpDDSrcSurface,26,lpSrcRect,9,dwFlags,14,lpDDBltFx);
|
2385 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2386 | | - if(lpDDSrcSurface) {TRACE_RET(23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface4*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx));}
|
2387 | | - else TRACE_RET(23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
| 2385 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2386 | + if(lpDDSrcSurface) {TRACE_RET(HRESULT,23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface4*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx));}
|
| 2387 | + else TRACE_RET(HRESULT,23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
2388 | 2388 | }
|
2389 | 2389 | HRESULT WINAPI glDirectDrawSurface4::BltBatch(LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags)
|
2390 | 2390 | {
|
2391 | 2391 | TRACE_ENTER(4,14,this,14,lpDDBltBatch,8,dwCount,9,dwFlags);
|
2392 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2393 | | - TRACE_RET(23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
| 2392 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2393 | + TRACE_RET(HRESULT,23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
2394 | 2394 | }
|
2395 | 2395 | HRESULT WINAPI glDirectDrawSurface4::BltFast(DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans)
|
2396 | 2396 | {
|
2397 | 2397 | TRACE_ENTER(6,14,this,8,dwX,8,dwY,14,lpDDSrcSurface,26,lpSrcRect,9,dwTrans);
|
2398 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2399 | | - TRACE_RET(23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface4*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
| 2398 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2399 | + TRACE_RET(HRESULT,23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface4*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
2400 | 2400 | }
|
2401 | 2401 | HRESULT WINAPI glDirectDrawSurface4::DeleteAttachedSurface(DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface)
|
2402 | 2402 | {
|
2403 | 2403 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSAttachedSurface);
|
2404 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2405 | | - TRACE_RET(23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
| 2404 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2405 | + TRACE_RET(HRESULT,23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
2406 | 2406 | }
|
2407 | 2407 | HRESULT WINAPI glDirectDrawSurface4::EnumAttachedSurfaces(LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpEnumSurfacesCallback)
|
2408 | 2408 | {
|
2409 | 2409 | TRACE_ENTER(3,14,this,14,lpContext,14,lpEnumSurfacesCallback);
|
2410 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2411 | | - TRACE_RET(23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
| 2410 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2411 | + TRACE_RET(HRESULT,23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
2412 | 2412 | }
|
2413 | 2413 | HRESULT WINAPI glDirectDrawSurface4::EnumOverlayZOrders(DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpfnCallback)
|
2414 | 2414 | {
|
2415 | 2415 | TRACE_ENTER(4,14,this,9,dwFlags,14,lpContext,14,lpfnCallback);
|
2416 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2417 | | - TRACE_RET(23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
| 2416 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2417 | + TRACE_RET(HRESULT,23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
2418 | 2418 | }
|
2419 | 2419 | HRESULT WINAPI glDirectDrawSurface4::Flip(LPDIRECTDRAWSURFACE4 lpDDSurfaceTargetOverride, DWORD dwFlags)
|
2420 | 2420 | {
|
2421 | 2421 | TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
2422 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2422 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2423 | 2423 | if(lpDDSurfaceTargetOverride)
|
2424 | | - {TRACE_RET(23,glDDS7->Flip(((glDirectDrawSurface4*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
2425 | | - else TRACE_RET(23,glDDS7->Flip(NULL,dwFlags));
|
| 2424 | + {TRACE_RET(HRESULT,23,glDDS7->Flip(((glDirectDrawSurface4*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
| 2425 | + else TRACE_RET(HRESULT,23,glDDS7->Flip(NULL,dwFlags));
|
2426 | 2426 | }
|
2427 | 2427 | HRESULT WINAPI glDirectDrawSurface4::GetAttachedSurface(LPDDSCAPS2 lpDDSCaps2, LPDIRECTDRAWSURFACE4 FAR *lplpDDAttachedSurface)
|
2428 | 2428 | {
|
2429 | 2429 | TRACE_ENTER(3,14,this,14,lpDDSCaps2,14,lplpDDAttachedSurface);
|
2430 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2430 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2431 | 2431 | HRESULT error;
|
2432 | 2432 | glDirectDrawSurface7 *attachedsurface;
|
2433 | 2433 | glDirectDrawSurface4 *attached1;
|
— | — | @@ -2444,67 +2444,67 @@ |
2445 | 2445 | HRESULT WINAPI glDirectDrawSurface4::GetBltStatus(DWORD dwFlags)
|
2446 | 2446 | {
|
2447 | 2447 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2448 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2449 | | - TRACE_RET(23,glDDS7->GetBltStatus(dwFlags));
|
| 2448 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2449 | + TRACE_RET(HRESULT,23,glDDS7->GetBltStatus(dwFlags));
|
2450 | 2450 | }
|
2451 | 2451 | HRESULT WINAPI glDirectDrawSurface4::GetCaps(LPDDSCAPS2 lpDDSCaps)
|
2452 | 2452 | {
|
2453 | 2453 | TRACE_ENTER(2,14,this,14,lpDDSCaps);
|
2454 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2455 | | - TRACE_RET(23,glDDS7->GetCaps(lpDDSCaps));
|
| 2454 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2455 | + TRACE_RET(HRESULT,23,glDDS7->GetCaps(lpDDSCaps));
|
2456 | 2456 | }
|
2457 | 2457 | HRESULT WINAPI glDirectDrawSurface4::GetClipper(LPDIRECTDRAWCLIPPER FAR *lplpDDClipper)
|
2458 | 2458 | {
|
2459 | 2459 | TRACE_ENTER(2,14,this,14,lplpDDClipper);
|
2460 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2461 | | - TRACE_RET(23,glDDS7->GetClipper(lplpDDClipper));
|
| 2460 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2461 | + TRACE_RET(HRESULT,23,glDDS7->GetClipper(lplpDDClipper));
|
2462 | 2462 | }
|
2463 | 2463 | HRESULT WINAPI glDirectDrawSurface4::GetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
2464 | 2464 | {
|
2465 | 2465 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
2466 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2467 | | - TRACE_RET(23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
| 2466 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2467 | + TRACE_RET(HRESULT,23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
2468 | 2468 | }
|
2469 | 2469 | HRESULT WINAPI glDirectDrawSurface4::GetDC(HDC FAR *lphDC)
|
2470 | 2470 | {
|
2471 | 2471 | TRACE_ENTER(2,14,this,14,lphDC);
|
2472 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2473 | | - TRACE_RET(23,glDDS7->GetDC(lphDC));
|
| 2472 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2473 | + TRACE_RET(HRESULT,23,glDDS7->GetDC(lphDC));
|
2474 | 2474 | }
|
2475 | 2475 | HRESULT WINAPI glDirectDrawSurface4::GetFlipStatus(DWORD dwFlags)
|
2476 | 2476 | {
|
2477 | 2477 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2478 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2479 | | - TRACE_RET(23,glDDS7->GetFlipStatus(dwFlags));
|
| 2478 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2479 | + TRACE_RET(HRESULT,23,glDDS7->GetFlipStatus(dwFlags));
|
2480 | 2480 | }
|
2481 | 2481 | HRESULT WINAPI glDirectDrawSurface4::GetOverlayPosition(LPLONG lplX, LPLONG lplY)
|
2482 | 2482 | {
|
2483 | 2483 | TRACE_ENTER(3,14,this,14,lplX,14,lplY);
|
2484 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2485 | | - TRACE_RET(23,glDDS7->GetOverlayPosition(lplX,lplY));
|
| 2484 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2485 | + TRACE_RET(HRESULT,23,glDDS7->GetOverlayPosition(lplX,lplY));
|
2486 | 2486 | }
|
2487 | 2487 | HRESULT WINAPI glDirectDrawSurface4::GetPalette(LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
2488 | 2488 | {
|
2489 | 2489 | TRACE_ENTER(2,14,this,14,lplpDDPalette);
|
2490 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2491 | | - TRACE_RET(23,glDDS7->GetPalette(lplpDDPalette));
|
| 2490 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2491 | + TRACE_RET(HRESULT,23,glDDS7->GetPalette(lplpDDPalette));
|
2492 | 2492 | }
|
2493 | 2493 | HRESULT WINAPI glDirectDrawSurface4::GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat)
|
2494 | 2494 | {
|
2495 | 2495 | TRACE_ENTER(2,14,this,14,lpDDPixelFormat);
|
2496 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2497 | | - TRACE_RET(23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
| 2496 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2497 | + TRACE_RET(HRESULT,23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
2498 | 2498 | }
|
2499 | 2499 | HRESULT WINAPI glDirectDrawSurface4::GetSurfaceDesc(LPDDSURFACEDESC2 lpDDSurfaceDesc)
|
2500 | 2500 | {
|
2501 | 2501 | TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
2502 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2503 | | - TRACE_RET(23,glDDS7->GetSurfaceDesc(lpDDSurfaceDesc));
|
| 2502 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2503 | + TRACE_RET(HRESULT,23,glDDS7->GetSurfaceDesc(lpDDSurfaceDesc));
|
2504 | 2504 | }
|
2505 | 2505 | HRESULT WINAPI glDirectDrawSurface4::Initialize(LPDIRECTDRAW lpDD, LPDDSURFACEDESC2 lpDDSurfaceDesc)
|
2506 | 2506 | {
|
2507 | 2507 | TRACE_ENTER(3,14,this,14,lpDD,14,lpDDSurfaceDesc);
|
2508 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2508 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
2509 | 2509 | TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
2510 | 2510 | return DDERR_ALREADYINITIALIZED;
|
2511 | 2511 | }
|
— | — | @@ -2511,126 +2511,126 @@ |
2512 | 2512 | HRESULT WINAPI glDirectDrawSurface4::IsLost()
|
2513 | 2513 | {
|
2514 | 2514 | TRACE_ENTER(1,14,this);
|
2515 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2516 | | - TRACE_RET(23,glDDS7->IsLost());
|
| 2515 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2516 | + TRACE_RET(HRESULT,23,glDDS7->IsLost());
|
2517 | 2517 | }
|
2518 | 2518 | HRESULT WINAPI glDirectDrawSurface4::Lock(LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
2519 | 2519 | {
|
2520 | 2520 | TRACE_ENTER(5,14,this,26,lpDestRect,14,lpDDSurfaceDesc,9,dwFlags,14,hEvent);
|
2521 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2522 | | - TRACE_RET(23,glDDS7->Lock(lpDestRect,lpDDSurfaceDesc,dwFlags,hEvent));
|
| 2521 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2522 | + TRACE_RET(HRESULT,23,glDDS7->Lock(lpDestRect,lpDDSurfaceDesc,dwFlags,hEvent));
|
2523 | 2523 | }
|
2524 | 2524 | HRESULT WINAPI glDirectDrawSurface4::ReleaseDC(HDC hDC)
|
2525 | 2525 | {
|
2526 | 2526 | TRACE_ENTER(2,14,this,14,hDC);
|
2527 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2528 | | - TRACE_RET(23,glDDS7->ReleaseDC(hDC));
|
| 2527 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2528 | + TRACE_RET(HRESULT,23,glDDS7->ReleaseDC(hDC));
|
2529 | 2529 | }
|
2530 | 2530 | HRESULT WINAPI glDirectDrawSurface4::Restore()
|
2531 | 2531 | {
|
2532 | 2532 | TRACE_ENTER(1,14,this);
|
2533 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2534 | | - TRACE_RET(23,glDDS7->Restore());
|
| 2533 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2534 | + TRACE_RET(HRESULT,23,glDDS7->Restore());
|
2535 | 2535 | }
|
2536 | 2536 | HRESULT WINAPI glDirectDrawSurface4::SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper)
|
2537 | 2537 | {
|
2538 | 2538 | TRACE_ENTER(2,14,this,14,lpDDClipper);
|
2539 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2540 | | - TRACE_RET(23,glDDS7->SetClipper(lpDDClipper));
|
| 2539 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2540 | + TRACE_RET(HRESULT,23,glDDS7->SetClipper(lpDDClipper));
|
2541 | 2541 | }
|
2542 | 2542 | HRESULT WINAPI glDirectDrawSurface4::SetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
2543 | 2543 | {
|
2544 | 2544 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
2545 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2546 | | - TRACE_RET(23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
| 2545 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2546 | + TRACE_RET(HRESULT,23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
2547 | 2547 | }
|
2548 | 2548 | HRESULT WINAPI glDirectDrawSurface4::SetOverlayPosition(LONG lX, LONG lY)
|
2549 | 2549 | {
|
2550 | 2550 | TRACE_ENTER(3,14,this,7,lX,7,lY);
|
2551 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2552 | | - TRACE_RET(23,glDDS7->SetOverlayPosition(lX,lY));
|
| 2551 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2552 | + TRACE_RET(HRESULT,23,glDDS7->SetOverlayPosition(lX,lY));
|
2553 | 2553 | }
|
2554 | 2554 | HRESULT WINAPI glDirectDrawSurface4::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
2555 | 2555 | {
|
2556 | 2556 | TRACE_ENTER(2,14,this,14,lpDDPalette);
|
2557 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2558 | | - TRACE_RET(23,glDDS7->SetPalette(lpDDPalette));
|
| 2557 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2558 | + TRACE_RET(HRESULT,23,glDDS7->SetPalette(lpDDPalette));
|
2559 | 2559 | }
|
2560 | 2560 | HRESULT WINAPI glDirectDrawSurface4::Unlock(LPRECT lpRect)
|
2561 | 2561 | {
|
2562 | 2562 | TRACE_ENTER(2,14,this,26,lpRect);
|
2563 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2564 | | - TRACE_RET(23,glDDS7->Unlock2(lpRect));
|
| 2563 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2564 | + TRACE_RET(HRESULT,23,glDDS7->Unlock2(lpRect));
|
2565 | 2565 | }
|
2566 | 2566 | HRESULT WINAPI glDirectDrawSurface4::UpdateOverlay(LPRECT lpSrcRect, LPDIRECTDRAWSURFACE4 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx)
|
2567 | 2567 | {
|
2568 | 2568 | TRACE_ENTER(6,14,this,26,lpSrcRect,14,lpDDDestSurface,26,lpDestRect,9,dwFlags,14,lpDDOverlayFx);
|
2569 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2570 | | - TRACE_RET(23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
| 2569 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2570 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
2571 | 2571 | }
|
2572 | 2572 | HRESULT WINAPI glDirectDrawSurface4::UpdateOverlayDisplay(DWORD dwFlags)
|
2573 | 2573 | {
|
2574 | 2574 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2575 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2576 | | - TRACE_RET(23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
| 2575 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2576 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
2577 | 2577 | }
|
2578 | 2578 | HRESULT WINAPI glDirectDrawSurface4::UpdateOverlayZOrder(DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSReference)
|
2579 | 2579 | {
|
2580 | 2580 | TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSReference);
|
2581 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2582 | | - TRACE_RET(23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
| 2581 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2582 | + TRACE_RET(HRESULT,23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
2583 | 2583 | }
|
2584 | 2584 | HRESULT WINAPI glDirectDrawSurface4::GetDDInterface(LPVOID FAR *lplpDD)
|
2585 | 2585 | {
|
2586 | 2586 | TRACE_ENTER(2,14,this,14,lplpDD);
|
2587 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2588 | | - TRACE_RET(23,glDDS7->GetDDInterface(lplpDD));
|
| 2587 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2588 | + TRACE_RET(HRESULT,23,glDDS7->GetDDInterface(lplpDD));
|
2589 | 2589 | }
|
2590 | 2590 | HRESULT WINAPI glDirectDrawSurface4::PageLock(DWORD dwFlags)
|
2591 | 2591 | {
|
2592 | 2592 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2593 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2594 | | - TRACE_RET(23,glDDS7->PageLock(dwFlags));
|
| 2593 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2594 | + TRACE_RET(HRESULT,23,glDDS7->PageLock(dwFlags));
|
2595 | 2595 | }
|
2596 | 2596 | HRESULT WINAPI glDirectDrawSurface4::PageUnlock(DWORD dwFlags)
|
2597 | 2597 | {
|
2598 | 2598 | TRACE_ENTER(2,14,this,9,dwFlags);
|
2599 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2600 | | - TRACE_RET(23,glDDS7->PageUnlock(dwFlags));
|
| 2599 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2600 | + TRACE_RET(HRESULT,23,glDDS7->PageUnlock(dwFlags));
|
2601 | 2601 | }
|
2602 | 2602 | HRESULT WINAPI glDirectDrawSurface4::SetSurfaceDesc(LPDDSURFACEDESC2 lpddsd, DWORD dwFlags)
|
2603 | 2603 | {
|
2604 | 2604 | TRACE_ENTER(3,14,this,14,lpddsd,9,dwFlags);
|
2605 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2606 | | - TRACE_RET(23,glDDS7->SetSurfaceDesc(lpddsd,dwFlags));
|
| 2605 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2606 | + TRACE_RET(HRESULT,23,glDDS7->SetSurfaceDesc(lpddsd,dwFlags));
|
2607 | 2607 | }
|
2608 | 2608 | HRESULT WINAPI glDirectDrawSurface4::SetPrivateData(REFGUID guidTag, LPVOID lpData, DWORD cbSize, DWORD dwFlags)
|
2609 | 2609 | {
|
2610 | 2610 | TRACE_ENTER(5,14,this,24,&guidTag,14,lpData,8,cbSize,9,dwFlags);
|
2611 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2612 | | - TRACE_RET(23,glDDS7->SetPrivateData(guidTag,lpData,cbSize,dwFlags));
|
| 2611 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2612 | + TRACE_RET(HRESULT,23,glDDS7->SetPrivateData(guidTag,lpData,cbSize,dwFlags));
|
2613 | 2613 | }
|
2614 | 2614 | HRESULT WINAPI glDirectDrawSurface4::GetPrivateData(REFGUID guidTag, LPVOID lpBuffer, LPDWORD lpcbBufferSize)
|
2615 | 2615 | {
|
2616 | 2616 | TRACE_ENTER(4,14,this,24,&guidTag,14,lpBuffer,14,lpcbBufferSize);
|
2617 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2618 | | - TRACE_RET(23,glDDS7->GetPrivateData(guidTag,lpBuffer,lpcbBufferSize));
|
| 2617 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2618 | + TRACE_RET(HRESULT,23,glDDS7->GetPrivateData(guidTag,lpBuffer,lpcbBufferSize));
|
2619 | 2619 | }
|
2620 | 2620 | HRESULT WINAPI glDirectDrawSurface4::FreePrivateData(REFGUID guidTag)
|
2621 | 2621 | {
|
2622 | 2622 | TRACE_ENTER(2,14,this,24,&guidTag);
|
2623 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2624 | | - TRACE_RET(23,glDDS7->FreePrivateData(guidTag));
|
| 2623 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2624 | + TRACE_RET(HRESULT,23,glDDS7->FreePrivateData(guidTag));
|
2625 | 2625 | }
|
2626 | 2626 | HRESULT WINAPI glDirectDrawSurface4::GetUniquenessValue(LPDWORD lpValue)
|
2627 | 2627 | {
|
2628 | 2628 | TRACE_ENTER(2,14,this,14,lpValue);
|
2629 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2630 | | - TRACE_RET(23,glDDS7->GetUniquenessValue(lpValue));
|
| 2629 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2630 | + TRACE_RET(HRESULT,23,glDDS7->GetUniquenessValue(lpValue));
|
2631 | 2631 | }
|
2632 | 2632 | HRESULT WINAPI glDirectDrawSurface4::ChangeUniquenessValue()
|
2633 | 2633 | {
|
2634 | 2634 | TRACE_ENTER(1,14,this);
|
2635 | | - if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2636 | | - TRACE_RET(23,glDDS7->ChangeUniquenessValue());
|
| 2635 | + if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 2636 | + TRACE_RET(HRESULT,23,glDDS7->ChangeUniquenessValue());
|
2637 | 2637 | }
|
Index: ddraw/trace.cpp |
— | — | @@ -1080,6 +1080,11 @@ |
1081 | 1081 | WriteFile(outfile,"\r\n",2,&byteswritten,NULL);
|
1082 | 1082 | LeaveCriticalSection(&trace_cs);
|
1083 | 1083 | }
|
| 1084 | +void *trace_ret(const char *function, int argtype, void *arg)
|
| 1085 | +{
|
| 1086 | + trace_exit(function,argtype,arg);
|
| 1087 | + return arg;
|
| 1088 | +}
|
1084 | 1089 | void trace_var(const char *function, const char *var, int argtype, void *arg)
|
1085 | 1090 | {
|
1086 | 1091 | if(trace_fail) return;
|
Index: ddraw/trace.h |
— | — | @@ -27,18 +27,15 @@ |
28 | 28 | #define TRACE_SYSINFO() trace_sysinfo() // Must be in thread used by OpenGL.
|
29 | 29 | void trace_enter(const char *function, int paramcount, ...);
|
30 | 30 | void trace_exit(const char *function, int argtype, void *arg);
|
| 31 | +void *trace_ret(const char *function, int argtype, void *arg);
|
31 | 32 | void trace_var(const char *function, const char *var, int argtype, void *arg);
|
32 | 33 | void trace_sysinfo();
|
33 | | -#define TRACE_RET(argtype, arg) \
|
34 | | -{\
|
35 | | - trace_exit(__FUNCTION__,argtype,(void*)arg);\
|
36 | | - return arg;\
|
37 | | -}
|
| 34 | +#define TRACE_RET(type, argtype, arg) return (type)trace_ret(__FUNCTION__,argtype,(void*)arg);
|
38 | 35 | #else
|
39 | 36 | #define TRACE_ENTER(a,...)
|
40 | 37 | #define TRACE_EXIT(a,b)
|
41 | 38 | #define TRACE_VAR(a,b,c)
|
42 | | -#define TRACE_RET(argtype, arg) return arg;
|
| 39 | +#define TRACE_RET(type, argtype, arg) return arg;
|
43 | 40 | #define TRACE_SYSINFO()
|
44 | 41 | #endif
|
45 | 42 |
|