Index: ddraw/glDirectDrawPalette.h |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | HRESULT WINAPI SetEntries(DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries);
|
36 | 36 |
|
37 | 37 | // Internal function
|
38 | | - //LPPALETTEENTRY GetPalette(DWORD *flags);
|
| 38 | + LPPALETTEENTRY GetPalette(DWORD *flags);
|
39 | 39 | private:
|
40 | 40 | PALETTEENTRY palette[256];
|
41 | 41 | DWORD flags;
|
Index: ddraw/glDirectDrawSurface.cpp |
— | — | @@ -39,6 +39,7 @@ |
40 | 40 | // DDRAW7 routines
|
41 | 41 | glDirectDrawSurface7::glDirectDrawSurface7(LPDIRECTDRAW7 lpDD7, LPDDSURFACEDESC2 lpDDSurfaceDesc2, LPDIRECTDRAWSURFACE7 *lplpDDSurface7, HRESULT *error, bool copysurface, glDirectDrawPalette *palettein)
|
42 | 42 | {
|
| 43 | + TRACE_ENTER(7,14,this,14,lpDD7,14,lpDDSurfaceDesc2,14,lplpDDSurface7,14,error,21,copysurface,14,palettein);
|
43 | 44 | hasstencil = false;
|
44 | 45 | dirty = 2;
|
45 | 46 | handle = 0;
|
— | — | @@ -69,6 +70,8 @@ |
70 | 71 | {
|
71 | 72 | FIXME("glDirectDrawSurface7::glDirectDrawSurface7: copy surface stub\n");
|
72 | 73 | *error = DDERR_GENERIC;
|
| 74 | + TRACE_VAR("*error",23,DDERR_GENERIC);
|
| 75 | + TRACE_EXIT(-1,0);
|
73 | 76 | return;
|
74 | 77 | }
|
75 | 78 | else
|
— | — | @@ -86,6 +89,8 @@ |
87 | 90 | || (ddsd.dwFlags & DDSD_PIXELFORMAT)) && !(ddsd.ddsCaps.dwCaps & DDSCAPS_BACKBUFFER))
|
88 | 91 | {
|
89 | 92 | *error = DDERR_INVALIDPARAMS;
|
| 93 | + TRACE_VAR("*error",23,DDERR_INVALIDPARAMS);
|
| 94 | + TRACE_EXIT(-1,0);
|
90 | 95 | return;
|
91 | 96 | }
|
92 | 97 | else
|
— | — | @@ -146,6 +151,8 @@ |
147 | 152 | else
|
148 | 153 | {
|
149 | 154 | *error = DDERR_INVALIDPARAMS;
|
| 155 | + TRACE_VAR("*error",23,DDERR_INVALIDPARAMS);
|
| 156 | + TRACE_EXIT(-1,0);
|
150 | 157 | return;
|
151 | 158 | }
|
152 | 159 | }
|
— | — | @@ -284,6 +291,8 @@ |
285 | 292 | break;
|
286 | 293 | default:
|
287 | 294 | *error = DDERR_INVALIDPIXELFORMAT;
|
| 295 | + TRACE_VAR("*error",23,DDERR_INVALIDPIXELFORMAT);
|
| 296 | + TRACE_EXIT(-1,0);
|
288 | 297 | return;
|
289 | 298 | }
|
290 | 299 | }
|
— | — | @@ -331,9 +340,13 @@ |
332 | 341 | else *error = DDERR_INVALIDPARAMS;
|
333 | 342 | }
|
334 | 343 | }
|
| 344 | + TRACE_VAR("*lplpDDSurface7",14,*lplpDDSurface7);
|
| 345 | + TRACE_VAR("*error",23,*error);
|
| 346 | + TRACE_EXIT(-1,0);
|
335 | 347 | }
|
336 | 348 | glDirectDrawSurface7::~glDirectDrawSurface7()
|
337 | 349 | {
|
| 350 | + TRACE_ENTER(1,14,this);
|
338 | 351 | AddRef();
|
339 | 352 | if(dds1) dds1->Release();
|
340 | 353 | if(dds2) dds2->Release();
|
— | — | @@ -357,15 +370,19 @@ |
358 | 371 | if(zbuffer) zbuffer->Release();
|
359 | 372 | if(device) device->Release();
|
360 | 373 | ddInterface->DeleteSurface(this);
|
| 374 | + TRACE_EXIT(-1,0);
|
361 | 375 | }
|
362 | 376 | HRESULT WINAPI glDirectDrawSurface7::QueryInterface(REFIID riid, void** ppvObj)
|
363 | 377 | {
|
364 | | - if(!this) return DDERR_INVALIDOBJECT;
|
365 | | - if(!ppvObj) return DDERR_INVALIDPARAMS;
|
| 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);
|
366 | 381 | if(riid == IID_IUnknown)
|
367 | 382 | {
|
368 | 383 | this->AddRef();
|
369 | 384 | *ppvObj = this;
|
| 385 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 386 | + TRACE_EXIT(23,DD_OK);
|
370 | 387 | return DD_OK;
|
371 | 388 | }
|
372 | 389 | if(riid == IID_IDirectDrawSurface7)
|
— | — | @@ -372,6 +389,8 @@ |
373 | 390 | {
|
374 | 391 | this->AddRef();
|
375 | 392 | *ppvObj = this;
|
| 393 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 394 | + TRACE_EXIT(23,DD_OK);
|
376 | 395 | return DD_OK;
|
377 | 396 | }
|
378 | 397 | if(riid == IID_IDirectDrawSurface4)
|
— | — | @@ -380,6 +399,8 @@ |
381 | 400 | {
|
382 | 401 | *ppvObj = dds4;
|
383 | 402 | dds4->AddRef();
|
| 403 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 404 | + TRACE_EXIT(23,DD_OK);
|
384 | 405 | return DD_OK;
|
385 | 406 | }
|
386 | 407 | else
|
— | — | @@ -387,6 +408,8 @@ |
388 | 409 | this->AddRef();
|
389 | 410 | *ppvObj = new glDirectDrawSurface4(this);
|
390 | 411 | dds4 = (glDirectDrawSurface4*)*ppvObj;
|
| 412 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 413 | + TRACE_EXIT(23,DD_OK);
|
391 | 414 | return DD_OK;
|
392 | 415 | }
|
393 | 416 | }
|
— | — | @@ -396,6 +419,8 @@ |
397 | 420 | {
|
398 | 421 | *ppvObj = dds3;
|
399 | 422 | dds3->AddRef();
|
| 423 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 424 | + TRACE_EXIT(23,DD_OK);
|
400 | 425 | return DD_OK;
|
401 | 426 | }
|
402 | 427 | else
|
— | — | @@ -403,6 +428,8 @@ |
404 | 429 | this->AddRef();
|
405 | 430 | *ppvObj = new glDirectDrawSurface3(this);
|
406 | 431 | dds3 = (glDirectDrawSurface3*)*ppvObj;
|
| 432 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 433 | + TRACE_EXIT(23,DD_OK);
|
407 | 434 | return DD_OK;
|
408 | 435 | }
|
409 | 436 | }
|
— | — | @@ -412,6 +439,8 @@ |
413 | 440 | {
|
414 | 441 | *ppvObj = dds2;
|
415 | 442 | dds2->AddRef();
|
| 443 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 444 | + TRACE_EXIT(23,DD_OK);
|
416 | 445 | return DD_OK;
|
417 | 446 | }
|
418 | 447 | else
|
— | — | @@ -419,6 +448,8 @@ |
420 | 449 | this->AddRef();
|
421 | 450 | *ppvObj = new glDirectDrawSurface2(this);
|
422 | 451 | dds2 = (glDirectDrawSurface2*)*ppvObj;
|
| 452 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 453 | + TRACE_EXIT(23,DD_OK);
|
423 | 454 | return DD_OK;
|
424 | 455 | }
|
425 | 456 | }
|
— | — | @@ -428,6 +459,8 @@ |
429 | 460 | {
|
430 | 461 | *ppvObj = dds1;
|
431 | 462 | dds1->AddRef();
|
| 463 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 464 | + TRACE_EXIT(23,DD_OK);
|
432 | 465 | return DD_OK;
|
433 | 466 | }
|
434 | 467 | else
|
— | — | @@ -435,6 +468,8 @@ |
436 | 469 | this->AddRef();
|
437 | 470 | *ppvObj = new glDirectDrawSurface1(this);
|
438 | 471 | dds1 = (glDirectDrawSurface1*)*ppvObj;
|
| 472 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 473 | + TRACE_EXIT(23,DD_OK);
|
439 | 474 | return DD_OK;
|
440 | 475 | }
|
441 | 476 | }
|
— | — | @@ -444,6 +479,8 @@ |
445 | 480 | {
|
446 | 481 | *ppvObj = d3dt2;
|
447 | 482 | d3dt2->AddRef();
|
| 483 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 484 | + TRACE_EXIT(23,DD_OK);
|
448 | 485 | return DD_OK;
|
449 | 486 | }
|
450 | 487 | else
|
— | — | @@ -451,6 +488,8 @@ |
452 | 489 | this->AddRef();
|
453 | 490 | *ppvObj = new glDirect3DTexture2(this);
|
454 | 491 | d3dt2 = (glDirect3DTexture2*)*ppvObj;
|
| 492 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 493 | + TRACE_EXIT(23,DD_OK);
|
455 | 494 | return DD_OK;
|
456 | 495 | }
|
457 | 496 | }
|
— | — | @@ -460,6 +499,8 @@ |
461 | 500 | {
|
462 | 501 | *ppvObj = d3dt1;
|
463 | 502 | d3dt1->AddRef();
|
| 503 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 504 | + TRACE_EXIT(23,DD_OK);
|
464 | 505 | return DD_OK;
|
465 | 506 | }
|
466 | 507 | else
|
— | — | @@ -467,6 +508,8 @@ |
468 | 509 | this->AddRef();
|
469 | 510 | *ppvObj = new glDirect3DTexture1(this);
|
470 | 511 | d3dt1 = (glDirect3DTexture1*)*ppvObj;
|
| 512 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 513 | + TRACE_EXIT(23,DD_OK);
|
471 | 514 | return DD_OK;
|
472 | 515 | }
|
473 | 516 | }
|
— | — | @@ -479,11 +522,12 @@ |
480 | 523 | glDirect3D7 *tmpd3d;
|
481 | 524 | glDirect3DDevice7 *tmpdev;
|
482 | 525 | ddInterface->QueryInterface(IID_IDirect3D7,(void**)&tmpd3d);
|
483 | | - if(!tmpd3d) return E_NOINTERFACE;
|
| 526 | + if(!tmpd3d) TRACE_RET(23,E_NOINTERFACE);
|
484 | 527 | tmpd3d->CreateDevice(riid,this,(LPDIRECT3DDEVICE7*)&tmpdev);
|
485 | 528 | if(!tmpdev)
|
486 | 529 | {
|
487 | 530 | tmpdev->Release();
|
| 531 | + TRACE_EXIT(23,E_NOINTERFACE);
|
488 | 532 | return E_NOINTERFACE;
|
489 | 533 | }
|
490 | 534 | HRESULT ret = tmpdev->QueryInterface(IID_IDirect3DDevice,ppvObj);
|
— | — | @@ -490,35 +534,46 @@ |
491 | 535 | tmpdev->SetRenderTarget(this,0);
|
492 | 536 | tmpdev->Release();
|
493 | 537 | tmpd3d->Release();
|
| 538 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 539 | + TRACE_EXIT(23,ret);
|
494 | 540 | return ret;
|
495 | 541 | }
|
496 | 542 | else
|
497 | 543 | {
|
498 | | - return device->QueryInterface(IID_IDirect3DDevice,ppvObj);
|
| 544 | + HRESULT ret = device->QueryInterface(IID_IDirect3DDevice,ppvObj);
|
| 545 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 546 | + TRACE_EXIT(23,ret);
|
| 547 | + return ret;
|
499 | 548 | }
|
500 | 549 | }
|
| 550 | + TRACE_EXIT(23,E_NOINTERFACE);
|
501 | 551 | return E_NOINTERFACE;
|
502 | 552 | }
|
503 | 553 | ULONG WINAPI glDirectDrawSurface7::AddRef()
|
504 | 554 | {
|
505 | | - if(!this) return 0;
|
| 555 | + TRACE_ENTER(1,14,this);
|
| 556 | + if(!this) TRACE_RET(8,0);
|
506 | 557 | refcount++;
|
| 558 | + TRACE_EXIT(8,refcount);
|
507 | 559 | return refcount;
|
508 | 560 | }
|
509 | 561 | ULONG WINAPI glDirectDrawSurface7::Release()
|
510 | 562 | {
|
511 | | - if(!this) return 0;
|
| 563 | + TRACE_ENTER(1,14,this);
|
| 564 | + if(!this) TRACE_RET(8,0);
|
512 | 565 | ULONG ret;
|
513 | 566 | refcount--;
|
514 | 567 | ret = refcount;
|
515 | 568 | if(refcount == 0) delete this;
|
| 569 | + TRACE_EXIT(23,ret);
|
516 | 570 | return ret;
|
517 | 571 | }
|
518 | 572 | HRESULT WINAPI glDirectDrawSurface7::AddAttachedSurface(LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface)
|
519 | 573 | {
|
520 | | - if(!this) return DDERR_INVALIDOBJECT;
|
521 | | - if(!lpDDSAttachedSurface) return DDERR_INVALIDPARAMS;
|
522 | | - if(zbuffer) ERR(DDERR_SURFACEALREADYATTACHED);
|
| 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);
|
523 | 578 | glDirectDrawSurface7 *attached = (glDirectDrawSurface7 *)lpDDSAttachedSurface;
|
524 | 579 | DDSURFACEDESC2 ddsd;
|
525 | 580 | ddsd.dwSize = sizeof(DDSURFACEDESC2);
|
— | — | @@ -527,20 +582,24 @@ |
528 | 583 | {
|
529 | 584 | attached->AddRef();
|
530 | 585 | zbuffer = attached;
|
| 586 | + TRACE_EXIT(23,DD_OK);
|
531 | 587 | return DD_OK;
|
532 | 588 | }
|
533 | | - else return DDERR_CANNOTATTACHSURFACE;
|
| 589 | + else TRACE_RET(23,DDERR_CANNOTATTACHSURFACE);
|
534 | 590 | }
|
535 | 591 | HRESULT WINAPI glDirectDrawSurface7::AddOverlayDirtyRect(LPRECT lpRect)
|
536 | 592 | {
|
537 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 593 | + TRACE_ENTER(2,14,this,26,lpRect);
|
| 594 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
538 | 595 | FIXME("glDirectDrawSurface7::AddOverlayDirtyRect: stub\n");
|
| 596 | + TRACE_EXIT(23,DDERR_GENERIC);
|
539 | 597 | ERR(DDERR_GENERIC);
|
540 | 598 | }
|
541 | 599 | HRESULT WINAPI glDirectDrawSurface7::Blt(LPRECT lpDestRect, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
542 | 600 | {
|
543 | | - if(!this) return DDERR_INVALIDOBJECT;
|
544 | | - if((dwFlags & DDBLT_COLORFILL) && !lpDDBltFx) return DDERR_INVALIDPARAMS;
|
| 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);
|
545 | 604 | glDirectDrawSurface7 *src = (glDirectDrawSurface7 *)lpDDSrcSurface;
|
546 | 605 | if(dirty & 1)
|
547 | 606 | {
|
— | — | @@ -557,17 +616,20 @@ |
558 | 617 | src->ddsd.ddpfPixelFormat.dwRGBBitCount);
|
559 | 618 | src->dirty &= ~1;
|
560 | 619 | }
|
561 | | - return renderer->Blt(lpDestRect,src,this,lpSrcRect,dwFlags,lpDDBltFx);
|
| 620 | + TRACE_RET(23,renderer->Blt(lpDestRect,src,this,lpSrcRect,dwFlags,lpDDBltFx));
|
562 | 621 | }
|
563 | 622 | HRESULT WINAPI glDirectDrawSurface7::BltBatch(LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags)
|
564 | 623 | {
|
565 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 624 | + TRACE_ENTER(4,14,this,14,lpDDBltBatch,8,dwCount,9,dwFlags);
|
| 625 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
566 | 626 | FIXME("glDirectDrawSurface7::BltBatch: stub\n");
|
| 627 | + TRACE_EXIT(23,DDERR_GENERIC);
|
567 | 628 | ERR(DDERR_GENERIC);
|
568 | 629 | }
|
569 | 630 | HRESULT WINAPI glDirectDrawSurface7::BltFast(DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans)
|
570 | 631 | {
|
571 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 632 | + TRACE_ENTER(6,14,this,8,dwX,8,dwY,14,lpDDSrcSurface,26,lpSrcRect,9,dwTrans);
|
| 633 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
572 | 634 | DDSURFACEDESC2 ddsd;
|
573 | 635 | ddsd.dwSize = sizeof(DDSURFACEDESC2);
|
574 | 636 | lpDDSrcSurface->GetSurfaceDesc(&ddsd);
|
— | — | @@ -588,41 +650,50 @@ |
589 | 651 | if(dwTrans & DDBLTFAST_WAIT) flags |= DDBLT_WAIT;
|
590 | 652 | if(dwTrans & DDBLTFAST_DESTCOLORKEY) flags |= DDBLT_KEYDEST;
|
591 | 653 | if(dwTrans & DDBLTFAST_SRCCOLORKEY) flags |= DDBLT_KEYSRC;
|
592 | | - return this->Blt(&dest,lpDDSrcSurface,lpSrcRect,flags,NULL);
|
| 654 | + TRACE_RET(23,Blt(&dest,lpDDSrcSurface,lpSrcRect,flags,NULL));
|
593 | 655 | }
|
594 | 656 | HRESULT WINAPI glDirectDrawSurface7::DeleteAttachedSurface(DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface)
|
595 | 657 | {
|
596 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 658 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSAttachedSurface);
|
| 659 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
597 | 660 | if(lpDDSAttachedSurface == (LPDIRECTDRAWSURFACE7)zbuffer)
|
598 | 661 | {
|
599 | 662 | zbuffer->Release();
|
600 | 663 | zbuffer = NULL;
|
| 664 | + TRACE_EXIT(23,DD_OK);
|
601 | 665 | return DD_OK;
|
602 | 666 | }
|
603 | | - else ERR(DDERR_SURFACENOTATTACHED);
|
| 667 | + else TRACE_RET(23,DDERR_SURFACENOTATTACHED);
|
604 | 668 | }
|
605 | 669 | HRESULT WINAPI glDirectDrawSurface7::EnumAttachedSurfaces(LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback)
|
606 | 670 | {
|
607 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 671 | + TRACE_ENTER(3,14,this,14,lpContext,14,lpEnumSurfacesCallback);
|
| 672 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
608 | 673 | FIXME("glDirectDrawSurface7::EnumAttachedSurfaces: stub\n");
|
| 674 | + TRACE_EXIT(23,DDERR_GENERIC);
|
609 | 675 | ERR(DDERR_GENERIC);
|
610 | 676 | }
|
611 | 677 | HRESULT WINAPI glDirectDrawSurface7::EnumOverlayZOrders(DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpfnCallback)
|
612 | 678 | {
|
613 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 679 | + TRACE_ENTER(4,14,this,9,dwFlags,14,lpContext,14,lpfnCallback);
|
| 680 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
614 | 681 | FIXME("glDirectDrawSurface7::EnumOverlayZOrders: stub\n");
|
| 682 | + TRACE_EXIT(23,DDERR_GENERIC);
|
615 | 683 | ERR(DDERR_GENERIC);
|
616 | 684 | }
|
617 | 685 | HRESULT WINAPI glDirectDrawSurface7::Flip(LPDIRECTDRAWSURFACE7 lpDDSurfaceTargetOverride, DWORD dwFlags)
|
618 | 686 | {
|
619 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 687 | + TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
| 688 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
620 | 689 | HRESULT ret = Flip2(lpDDSurfaceTargetOverride,dwFlags);
|
621 | 690 | if(ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) RenderScreen(texture,this);
|
| 691 | + TRACE_EXIT(23,ret);
|
622 | 692 | return ret;
|
623 | 693 | }
|
624 | 694 | HRESULT glDirectDrawSurface7::Flip2(LPDIRECTDRAWSURFACE7 lpDDSurfaceTargetOverride, DWORD dwFlags)
|
625 | 695 | {
|
626 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 696 | + TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
| 697 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
627 | 698 | DWORD i;
|
628 | 699 | glDirectDrawSurface7 *tmp;
|
629 | 700 | if(dwFlags & DDFLIP_NOVSYNC) swapinterval=0;
|
— | — | @@ -637,7 +708,7 @@ |
638 | 709 | if(lpDDSurfaceTargetOverride)
|
639 | 710 | {
|
640 | 711 | bool success = false;
|
641 | | - if(lpDDSurfaceTargetOverride == this) return DD_OK;
|
| 712 | + if(lpDDSurfaceTargetOverride == this) TRACE_RET(23,DD_OK);
|
642 | 713 | tmp = this;
|
643 | 714 | for(i = 0; i < ddsd.dwBackBufferCount; i++)
|
644 | 715 | {
|
— | — | @@ -649,16 +720,16 @@ |
650 | 721 | break;
|
651 | 722 | }
|
652 | 723 | }
|
653 | | - if(!success) return DDERR_INVALIDPARAMS;
|
| 724 | + if(!success) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
654 | 725 | for(DWORD x = 0; x < i; x++)
|
655 | 726 | {
|
656 | | - if(x == i-1) return Flip2(NULL,dwFlags);
|
| 727 | + if(x == i-1) {TRACE_RET(23,Flip2(NULL,dwFlags));}
|
657 | 728 | else Flip2(NULL,0);
|
658 | 729 | }
|
659 | 730 | }
|
660 | 731 | if(ddsd.ddsCaps.dwCaps & DDSCAPS_FLIP)
|
661 | 732 | {
|
662 | | - if(ddsd.ddsCaps.dwCaps & DDSCAPS_BACKBUFFER) return DDERR_INVALIDOBJECT;
|
| 733 | + if(ddsd.ddsCaps.dwCaps & DDSCAPS_BACKBUFFER) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
663 | 734 | TEXTURE **textures = new TEXTURE*[ddsd.dwBackBufferCount+1];
|
664 | 735 | textures[0] = texture;
|
665 | 736 | tmp = this;
|
— | — | @@ -695,14 +766,16 @@ |
696 | 767 | }
|
697 | 768 | delete[] textures;
|
698 | 769 | }
|
699 | | - else return DDERR_NOTFLIPPABLE;
|
| 770 | + else TRACE_RET(23,DDERR_NOTFLIPPABLE);
|
700 | 771 | flipcount+=flips;
|
701 | 772 | if(flipcount > ddsd.dwBackBufferCount) flipcount -= (ddsd.dwBackBufferCount+1);
|
| 773 | + TRACE_EXIT(23,DD_OK);
|
702 | 774 | return DD_OK;
|
703 | 775 | }
|
704 | 776 | HRESULT WINAPI glDirectDrawSurface7::GetAttachedSurface(LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE7 FAR *lplpDDAttachedSurface)
|
705 | 777 | {
|
706 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 778 | + TRACE_ENTER(3,14,this,14,lpDDSCaps,14,lplpDDAttachedSurface);
|
| 779 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
707 | 780 | DDSCAPS2 ddsComp;
|
708 | 781 | backbuffer->GetCaps(&ddsComp);
|
709 | 782 | unsigned __int64 comp1,comp2;
|
— | — | @@ -712,6 +785,8 @@ |
713 | 786 | {
|
714 | 787 | *lplpDDAttachedSurface = backbuffer;
|
715 | 788 | backbuffer->AddRef();
|
| 789 | + TRACE_VAR("*lplpDDAttachedSurface",14,*lplpDDAttachedSurface);
|
| 790 | + TRACE_EXIT(23,DD_OK);
|
716 | 791 | return DD_OK;
|
717 | 792 | }
|
718 | 793 | else if(zbuffer)
|
— | — | @@ -723,42 +798,53 @@ |
724 | 799 | {
|
725 | 800 | *lplpDDAttachedSurface = zbuffer;
|
726 | 801 | zbuffer->AddRef();
|
| 802 | + TRACE_VAR("*lplpDDAttachedSurface",14,*lplpDDAttachedSurface);
|
| 803 | + TRACE_EXIT(23,DD_OK);
|
727 | 804 | return DD_OK;
|
728 | 805 | }
|
729 | 806 | }
|
| 807 | + TRACE_EXIT(23,DDERR_NOTFOUND);
|
730 | 808 | ERR(DDERR_NOTFOUND);
|
731 | 809 | }
|
732 | 810 | HRESULT WINAPI glDirectDrawSurface7::GetBltStatus(DWORD dwFlags)
|
733 | 811 | {
|
734 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 812 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 813 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
735 | 814 | FIXME("glDirectDrawSurface7::GetBltStatus: stub\n");
|
| 815 | + TRACE_EXIT(23,DDERR_GENERIC);
|
736 | 816 | ERR(DDERR_GENERIC);
|
737 | 817 | }
|
738 | 818 | HRESULT WINAPI glDirectDrawSurface7::GetCaps(LPDDSCAPS2 lpDDSCaps)
|
739 | 819 | {
|
740 | | - if(!this) return DDERR_INVALIDOBJECT;
|
741 | | - if(!lpDDSCaps) return DDERR_INVALIDPARAMS;
|
| 820 | + TRACE_ENTER(2,14,this,14,lpDDSCaps);
|
| 821 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 822 | + if(!lpDDSCaps) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
742 | 823 | memcpy(lpDDSCaps,&ddsd.ddsCaps,sizeof(DDSCAPS2));
|
| 824 | + TRACE_EXIT(23,DD_OK);
|
743 | 825 | return DD_OK;
|
744 | 826 | }
|
745 | 827 | HRESULT WINAPI glDirectDrawSurface7::GetClipper(LPDIRECTDRAWCLIPPER FAR *lplpDDClipper)
|
746 | 828 | {
|
747 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 829 | + TRACE_ENTER(2,14,this,14,lplpDDClipper);
|
| 830 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
748 | 831 | FIXME("glDirectDrawSurface7::GetClipper: stub\n");
|
| 832 | + TRACE_EXIT(23,DDERR_GENERIC);
|
749 | 833 | ERR(DDERR_GENERIC);
|
750 | 834 | }
|
751 | 835 | HRESULT WINAPI glDirectDrawSurface7::GetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
752 | 836 | {
|
753 | | - if(!this) return DDERR_INVALIDOBJECT;
|
754 | | - if(!lpDDColorKey) return DDERR_INVALIDPARAMS;
|
| 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);
|
755 | 840 | if(dwFlags == DDCKEY_SRCBLT)
|
756 | 841 | {
|
757 | 842 | if(colorkey[0].enabled)
|
758 | 843 | {
|
759 | 844 | memcpy(lpDDColorKey,&colorkey[0].key,sizeof(DDCOLORKEY));
|
| 845 | + TRACE_EXIT(23,DD_OK);
|
760 | 846 | return DD_OK;
|
761 | 847 | }
|
762 | | - else return DDERR_NOCOLORKEY;
|
| 848 | + else TRACE_RET(23,DDERR_NOCOLORKEY);
|
763 | 849 | }
|
764 | 850 | if(dwFlags == DDCKEY_DESTBLT)
|
765 | 851 | {
|
— | — | @@ -765,9 +851,10 @@ |
766 | 852 | if(colorkey[1].enabled)
|
767 | 853 | {
|
768 | 854 | memcpy(lpDDColorKey,&colorkey[1].key,sizeof(DDCOLORKEY));
|
| 855 | + TRACE_EXIT(23,DD_OK);
|
769 | 856 | return DD_OK;
|
770 | 857 | }
|
771 | | - else return DDERR_NOCOLORKEY;
|
| 858 | + else TRACE_RET(23,DDERR_NOCOLORKEY);
|
772 | 859 | }
|
773 | 860 | if(dwFlags == DDCKEY_SRCOVERLAY)
|
774 | 861 | {
|
— | — | @@ -774,9 +861,10 @@ |
775 | 862 | if(colorkey[2].enabled)
|
776 | 863 | {
|
777 | 864 | memcpy(lpDDColorKey,&colorkey[2].key,sizeof(DDCOLORKEY));
|
| 865 | + TRACE_EXIT(23,DD_OK);
|
778 | 866 | return DD_OK;
|
779 | 867 | }
|
780 | | - else return DDERR_NOCOLORKEY;
|
| 868 | + else TRACE_RET(23,DDERR_NOCOLORKEY);
|
781 | 869 | }
|
782 | 870 | if(dwFlags == DDCKEY_DESTOVERLAY)
|
783 | 871 | {
|
— | — | @@ -783,23 +871,26 @@ |
784 | 872 | if(colorkey[3].enabled)
|
785 | 873 | {
|
786 | 874 | memcpy(lpDDColorKey,&colorkey[3].key,sizeof(DDCOLORKEY));
|
| 875 | + TRACE_EXIT(23,DD_OK);
|
787 | 876 | return DD_OK;
|
788 | 877 | }
|
789 | | - else return DDERR_NOCOLORKEY;
|
| 878 | + else TRACE_RET(23,DDERR_NOCOLORKEY);
|
790 | 879 | }
|
| 880 | + TRACE_EXIT(23,DDERR_INVALIDPARAMS);
|
791 | 881 | return DDERR_INVALIDPARAMS;
|
792 | 882 | }
|
793 | 883 | HRESULT WINAPI glDirectDrawSurface7::GetDC(HDC FAR *lphDC)
|
794 | 884 | {
|
795 | | - if(!this) return DDERR_INVALIDOBJECT;
|
796 | | - if(!lphDC) return DDERR_INVALIDPARAMS;
|
797 | | - if(hdc) ERR(DDERR_DCALREADYCREATED);
|
| 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);
|
798 | 889 | glDirectDrawPalette *pal;
|
799 | 890 | DWORD colors[256];
|
800 | 891 | HRESULT error;
|
801 | 892 | LPVOID surface;
|
802 | 893 | error = this->Lock(NULL,&ddsd,0,NULL);
|
803 | | - if(error != DD_OK) return error;
|
| 894 | + if(error != DD_OK) TRACE_RET(23,error);
|
804 | 895 | hdc = CreateCompatibleDC(NULL);
|
805 | 896 | bitmapinfo->bmiHeader.biWidth = ddsd.lPitch / (bitmapinfo->bmiHeader.biBitCount / 8);
|
806 | 897 | if(ddsd.ddpfPixelFormat.dwRGBBitCount == 8)
|
— | — | @@ -818,29 +909,38 @@ |
819 | 910 | HGDIOBJ temp = SelectObject(hdc,hbitmap);
|
820 | 911 | DeleteObject(temp);
|
821 | 912 | *lphDC = hdc;
|
| 913 | + TRACE_VAR("*lphDC",14,*lphDC);
|
| 914 | + TRACE_EXIT(23,DD_OK);
|
822 | 915 | return DD_OK;
|
823 | 916 | }
|
824 | 917 | HRESULT WINAPI glDirectDrawSurface7::GetFlipStatus(DWORD dwFlags)
|
825 | 918 | {
|
826 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 919 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 920 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 921 | + TRACE_EXIT(23,DD_OK);
|
827 | 922 | return DD_OK;
|
828 | 923 | FIXME("glDirectDrawSurface7::GetFlipStatus: stub\n");
|
| 924 | + TRACE_RET(23,DDERR_GENERIC);
|
829 | 925 | ERR(DDERR_GENERIC);
|
830 | 926 | }
|
831 | 927 | HRESULT WINAPI glDirectDrawSurface7::GetOverlayPosition(LPLONG lplX, LPLONG lplY)
|
832 | 928 | {
|
833 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 929 | + TRACE_ENTER(3,14,this,14,lplX,14,lplY);
|
| 930 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
834 | 931 | FIXME("glDirectDrawSurface7::GetOverlayPosition: stub\n");
|
| 932 | + TRACE_EXIT(23,DDERR_GENERIC);
|
835 | 933 | ERR(DDERR_GENERIC);
|
836 | 934 | }
|
837 | 935 | HRESULT WINAPI glDirectDrawSurface7::GetPalette(LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
838 | 936 | {
|
839 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 937 | + TRACE_ENTER(2,14,this,14,lplpDDPalette);
|
| 938 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
840 | 939 | HRESULT err;
|
841 | 940 | if(palette)
|
842 | 941 | {
|
843 | 942 | palette->AddRef();
|
844 | 943 | *lplpDDPalette = palette;
|
| 944 | + TRACE_EXIT(23,DD_OK);
|
845 | 945 | err = DD_OK;
|
846 | 946 | }
|
847 | 947 | else
|
— | — | @@ -847,44 +947,55 @@ |
848 | 948 | {
|
849 | 949 | err = DDERR_NOPALETTEATTACHED;
|
850 | 950 | *lplpDDPalette = NULL;
|
| 951 | + TRACE_VAR("*lplpDDPalette",14,*lplpDDPalette);
|
851 | 952 | }
|
| 953 | + TRACE_EXIT(23,err);
|
852 | 954 | return err;
|
853 | 955 | }
|
854 | 956 | HRESULT WINAPI glDirectDrawSurface7::GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat)
|
855 | 957 | {
|
856 | | - if(!this) return DDERR_INVALIDOBJECT;
|
857 | | - if(!lpDDPixelFormat) return DDERR_INVALIDPARAMS;
|
| 958 | + TRACE_ENTER(2,14,this,14,lpDDPixelFormat);
|
| 959 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 960 | + if(!lpDDPixelFormat) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
858 | 961 | *lpDDPixelFormat = ddsd.ddpfPixelFormat;
|
| 962 | + TRACE_EXIT(23,DD_OK);
|
859 | 963 | return DD_OK;
|
860 | 964 | }
|
861 | 965 | HRESULT WINAPI glDirectDrawSurface7::GetSurfaceDesc(LPDDSURFACEDESC2 lpDDSurfaceDesc)
|
862 | 966 | {
|
863 | | - if(!this) return DDERR_INVALIDOBJECT;
|
864 | | - if(!lpDDSurfaceDesc) return DDERR_INVALIDPARAMS;
|
| 967 | + TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
| 968 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 969 | + if(!lpDDSurfaceDesc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
865 | 970 | memcpy(lpDDSurfaceDesc,&ddsd,lpDDSurfaceDesc->dwSize);
|
| 971 | + TRACE_EXIT(23,DD_OK);
|
866 | 972 | return DD_OK;
|
867 | 973 | }
|
868 | 974 | HRESULT WINAPI glDirectDrawSurface7::Initialize(LPDIRECTDRAW lpDD, LPDDSURFACEDESC2 lpDDSurfaceDesc)
|
869 | 975 | {
|
870 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 976 | + TRACE_ENTER(3,14,this,14,lpDD,14,lpDDSurfaceDesc);
|
| 977 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 978 | + TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
871 | 979 | return DDERR_ALREADYINITIALIZED;
|
872 | 980 | }
|
873 | 981 | HRESULT WINAPI glDirectDrawSurface7::IsLost()
|
874 | 982 | {
|
875 | | - if(!this) return DDERR_INVALIDOBJECT;
|
876 | | - if(hRC == renderer->hRC) return DD_OK;
|
877 | | - else return DDERR_SURFACELOST;
|
| 983 | + TRACE_ENTER(1,14,this);
|
| 984 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 985 | + if(hRC == renderer->hRC) {TRACE_RET(23,DD_OK);}
|
| 986 | + else TRACE_RET(23,DDERR_SURFACELOST);
|
878 | 987 | }
|
879 | 988 |
|
880 | 989 | HRESULT WINAPI glDirectDrawSurface7::Lock(LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
881 | 990 | {
|
882 | | - if(!this) return DDERR_INVALIDOBJECT;
|
883 | | - if(locked) ERR(DDERR_SURFACEBUSY);
|
| 991 | + TRACE_ENTER(5,14,this,26,lpDestRect,14,lpDDSurfaceDesc,9,dwFlags,14,hEvent);
|
| 992 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 993 | + if(locked) TRACE_RET(23,DDERR_SURFACEBUSY);
|
884 | 994 | dirty |= 1;
|
885 | 995 | retry:
|
886 | 996 | switch(surfacetype)
|
887 | 997 | {
|
888 | 998 | default:
|
| 999 | + TRACE_EXIT(23,DDERR_GENERIC);
|
889 | 1000 | ERR(DDERR_GENERIC);
|
890 | 1001 | break;
|
891 | 1002 | case 0:
|
— | — | @@ -896,6 +1007,7 @@ |
897 | 1008 | break;
|
898 | 1009 | case 1:
|
899 | 1010 | FIXME("glDirectDrawSurface7::Lock: surface type 1 not supported yet");
|
| 1011 | + TRACE_EXIT(23,DDERR_GENERIC);
|
900 | 1012 | ERR(DDERR_UNSUPPORTED);
|
901 | 1013 | break;
|
902 | 1014 | case 2:
|
— | — | @@ -918,13 +1030,15 @@ |
919 | 1031 | }
|
920 | 1032 | memcpy(lpDDSurfaceDesc,&ddsd,lpDDSurfaceDesc->dwSize);
|
921 | 1033 | locked++;
|
| 1034 | + TRACE_EXIT(23,DD_OK);
|
922 | 1035 | return DD_OK;
|
923 | 1036 | }
|
924 | 1037 | HRESULT WINAPI glDirectDrawSurface7::ReleaseDC(HDC hDC)
|
925 | 1038 | {
|
926 | | - if(!this) return DDERR_INVALIDOBJECT;
|
927 | | - if(!hdc) return DDERR_INVALIDOBJECT;
|
928 | | - if(hDC != hdc) return DDERR_INVALIDOBJECT;
|
| 1039 | + TRACE_ENTER(2,14,this,14,hDC);
|
| 1040 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1041 | + if(!hdc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1042 | + if(hDC != hdc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
929 | 1043 | GetDIBits(hDC,hbitmap,0,ddsd.dwHeight,ddsd.lpSurface,bitmapinfo,DIB_RGB_COLORS);
|
930 | 1044 | Unlock(NULL);
|
931 | 1045 | DeleteObject(hbitmap);
|
— | — | @@ -931,10 +1045,12 @@ |
932 | 1046 | hbitmap = NULL;
|
933 | 1047 | DeleteDC(hdc);
|
934 | 1048 | hdc = NULL;
|
| 1049 | + TRACE_EXIT(23,DD_OK);
|
935 | 1050 | return DD_OK;
|
936 | 1051 | }
|
937 | 1052 | void glDirectDrawSurface7::Restore2()
|
938 | 1053 | {
|
| 1054 | + TRACE_ENTER(1,14,this);
|
939 | 1055 | LONG sizes[6];
|
940 | 1056 | if(hRC != renderer->hRC)
|
941 | 1057 | {
|
— | — | @@ -966,12 +1082,14 @@ |
967 | 1083 | if(paltex) renderer->MakeTexture(paltex,256,1);
|
968 | 1084 | renderer->MakeTexture(texture,fakex,fakey);
|
969 | 1085 | }
|
| 1086 | + TRACE_EXIT(0,0);
|
970 | 1087 | }
|
971 | 1088 | HRESULT WINAPI glDirectDrawSurface7::Restore()
|
972 | 1089 | {
|
973 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1090 | + TRACE_ENTER(1,14,this);
|
| 1091 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
974 | 1092 | LONG sizes[6];
|
975 | | - if(!renderer) return DDERR_INVALIDOBJECT;
|
| 1093 | + if(!renderer) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
976 | 1094 | if(hRC != renderer->hRC)
|
977 | 1095 | {
|
978 | 1096 | if(ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
— | — | @@ -1009,22 +1127,26 @@ |
1010 | 1128 | }
|
1011 | 1129 | if(paltex) renderer->MakeTexture(paltex,256,1);
|
1012 | 1130 | renderer->MakeTexture(texture,fakex,fakey);
|
| 1131 | + TRACE_EXIT(23,DD_OK);
|
1013 | 1132 | return DD_OK;
|
1014 | 1133 | }
|
1015 | | - else return DD_OK;
|
| 1134 | + else TRACE_RET(23,DD_OK);
|
1016 | 1135 | }
|
1017 | 1136 | HRESULT WINAPI glDirectDrawSurface7::SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper)
|
1018 | 1137 | {
|
1019 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1138 | + TRACE_ENTER(2,14,this,14,lpDDClipper);
|
| 1139 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1020 | 1140 | if(clipper) clipper->Release();
|
1021 | 1141 | clipper = (glDirectDrawClipper *)lpDDClipper;
|
1022 | 1142 | if(clipper)clipper->AddRef();
|
| 1143 | + TRACE_EXIT(23,DD_OK);
|
1023 | 1144 | return DD_OK;
|
1024 | 1145 | }
|
1025 | 1146 | HRESULT WINAPI glDirectDrawSurface7::SetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1026 | 1147 | {
|
1027 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1028 | | - if(!lpDDColorKey) ERR(DDERR_GENERIC);
|
| 1148 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
| 1149 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1150 | + if(!lpDDColorKey) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1029 | 1151 | CKEY key;
|
1030 | 1152 | key.enabled = true;
|
1031 | 1153 | if(dwFlags & DDCKEY_COLORSPACE) key.colorspace = true;
|
— | — | @@ -1050,17 +1172,21 @@ |
1051 | 1173 | ddsd.dwFlags |= DDSD_CKDESTOVERLAY;
|
1052 | 1174 | colorkey[3] = key;
|
1053 | 1175 | }
|
| 1176 | + TRACE_EXIT(23,DD_OK);
|
1054 | 1177 | return DD_OK;
|
1055 | 1178 | }
|
1056 | 1179 | HRESULT WINAPI glDirectDrawSurface7::SetOverlayPosition(LONG lX, LONG lY)
|
1057 | 1180 | {
|
1058 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1181 | + TRACE_ENTER(3,14,this,7,lX,7,lY);
|
| 1182 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1059 | 1183 | FIXME("glDirectDrawSurface7::SetOverlayPosition: stub\n");
|
| 1184 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1060 | 1185 | ERR(DDERR_GENERIC);
|
1061 | 1186 | }
|
1062 | 1187 | HRESULT WINAPI glDirectDrawSurface7::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
1063 | 1188 | {
|
1064 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1189 | + TRACE_ENTER(2,14,this,14,lpDDPalette);
|
| 1190 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1065 | 1191 | if(palette)
|
1066 | 1192 | {
|
1067 | 1193 | palette->Release();
|
— | — | @@ -1071,13 +1197,15 @@ |
1072 | 1198 | palette = (glDirectDrawPalette *)lpDDPalette;
|
1073 | 1199 | palette->AddRef();
|
1074 | 1200 | }
|
| 1201 | + TRACE_EXIT(23,DD_OK);
|
1075 | 1202 | return DD_OK;
|
1076 | 1203 | }
|
1077 | 1204 |
|
1078 | 1205 | HRESULT WINAPI glDirectDrawSurface7::Unlock(LPRECT lpRect)
|
1079 | 1206 | {
|
1080 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1081 | | - if(!locked) return DDERR_NOTLOCKED;
|
| 1207 | + TRACE_ENTER(2,14,this,26,lpRect);
|
| 1208 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1209 | + if(!locked) TRACE_RET(23,DDERR_NOTLOCKED);
|
1082 | 1210 | locked--;
|
1083 | 1211 | ddsd.lpSurface = NULL;
|
1084 | 1212 | if(((ddsd.ddsCaps.dwCaps & (DDSCAPS_FRONTBUFFER)) &&
|
— | — | @@ -1084,122 +1212,160 @@ |
1085 | 1213 | (ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)) ||
|
1086 | 1214 | ((ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) &&
|
1087 | 1215 | !(ddsd.ddsCaps.dwCaps & DDSCAPS_FLIP))) RenderScreen(texture,this);
|
| 1216 | + TRACE_EXIT(23,DD_OK);
|
1088 | 1217 | return DD_OK;
|
1089 | 1218 | }
|
1090 | 1219 | HRESULT WINAPI glDirectDrawSurface7::UpdateOverlay(LPRECT lpSrcRect, LPDIRECTDRAWSURFACE7 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx)
|
1091 | 1220 | {
|
1092 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1221 | + TRACE_ENTER(6,14,this,26,lpSrcRect,14,lpDDDestSurface,26,lpDestRect,9,dwFlags,14,lpDDOverlayFx);
|
| 1222 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1093 | 1223 | FIXME("glDirectDrawSurface7::UpdateOverlay: stub\n");
|
| 1224 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1094 | 1225 | ERR(DDERR_GENERIC);
|
1095 | 1226 | }
|
1096 | 1227 | HRESULT WINAPI glDirectDrawSurface7::UpdateOverlayDisplay(DWORD dwFlags)
|
1097 | 1228 | {
|
1098 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1229 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 1230 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1099 | 1231 | FIXME("glDirectDrawSurface7::UpdateOverlayDisplay: stub\n");
|
| 1232 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1100 | 1233 | ERR(DDERR_GENERIC);
|
1101 | 1234 | }
|
1102 | 1235 | HRESULT WINAPI glDirectDrawSurface7::UpdateOverlayZOrder(DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSReference)
|
1103 | 1236 | {
|
1104 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1237 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSReference);
|
| 1238 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1105 | 1239 | FIXME("glDirectDrawSurface7::UpdateOverlayZOrder: stub\n");
|
| 1240 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1106 | 1241 | ERR(DDERR_GENERIC);
|
1107 | 1242 | }
|
1108 | 1243 |
|
1109 | 1244 | void glDirectDrawSurface7::RenderScreen(TEXTURE *texture, glDirectDrawSurface7 *surface)
|
1110 | 1245 | {
|
| 1246 | + TRACE_ENTER(3,14,this,14,texture,14,surface);
|
1111 | 1247 | renderer->DrawScreen(texture,paltex,this,surface);
|
| 1248 | + TRACE_EXIT(0,0);
|
1112 | 1249 | }
|
1113 | 1250 | // ddraw 2+ api
|
1114 | 1251 | HRESULT WINAPI glDirectDrawSurface7::GetDDInterface(LPVOID FAR *lplpDD)
|
1115 | 1252 | {
|
1116 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1253 | + TRACE_ENTER(2,14,this,14,lplpDD);
|
| 1254 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1117 | 1255 | ddInterface->AddRef();
|
1118 | 1256 | *lplpDD = ddInterface;
|
| 1257 | + TRACE_VAR("*lplpDD",14,*lplpDD);
|
| 1258 | + TRACE_EXIT(23,DD_OK);
|
1119 | 1259 | return DD_OK;
|
1120 | 1260 | }
|
1121 | 1261 | HRESULT WINAPI glDirectDrawSurface7::PageLock(DWORD dwFlags)
|
1122 | 1262 | {
|
1123 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1263 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 1264 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1124 | 1265 | pagelocked++;
|
| 1266 | + TRACE_EXIT(23,DD_OK);
|
1125 | 1267 | return DD_OK;
|
1126 | 1268 | }
|
1127 | 1269 | HRESULT WINAPI glDirectDrawSurface7::PageUnlock(DWORD dwFlags)
|
1128 | 1270 | {
|
1129 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1130 | | - if(!pagelocked) ERR(DDERR_NOTPAGELOCKED);
|
| 1271 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 1272 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1273 | + if(!pagelocked) TRACE_RET(23,DDERR_NOTPAGELOCKED);
|
1131 | 1274 | pagelocked--;
|
| 1275 | + TRACE_EXIT(23,DD_OK);
|
1132 | 1276 | return DD_OK;
|
1133 | 1277 | }
|
1134 | 1278 | // ddraw 3+ api
|
1135 | 1279 | HRESULT WINAPI glDirectDrawSurface7::SetSurfaceDesc(LPDDSURFACEDESC2 lpddsd2, DWORD dwFlags)
|
1136 | 1280 | {
|
1137 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1281 | + TRACE_ENTER(3,14,this,14,lpddsd2,9,dwFlags);
|
| 1282 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1138 | 1283 | FIXME("glDirectDrawSurface7::SetSurfaceDesc: stub\n");
|
| 1284 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1139 | 1285 | ERR(DDERR_GENERIC);
|
1140 | 1286 | }
|
1141 | 1287 | // ddraw 4+ api
|
1142 | | -HRESULT WINAPI glDirectDrawSurface7::SetPrivateData(REFGUID guidTag, LPVOID lpData, DWORD cbSize, DWORD dwFlags)
|
| 1288 | +HRESULT WINAPI glDirectDrawSurface7::SetPrivateData(REFGUID guidTag, LPVOID lpData, DWORD cbSize, DWORD dwFlags)
|
1143 | 1289 | {
|
1144 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1290 | + TRACE_ENTER(5,14,this,24,&guidTag,14,lpData,8,cbSize,9,dwFlags);
|
| 1291 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1145 | 1292 | FIXME("glDirectDrawSurface7::SetPrivateData: stub\n");
|
| 1293 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1146 | 1294 | ERR(DDERR_GENERIC);
|
1147 | 1295 | }
|
1148 | | -HRESULT WINAPI glDirectDrawSurface7::GetPrivateData(REFGUID guidTag, LPVOID lpBuffer, LPDWORD lpcbBufferSize)
|
| 1296 | +HRESULT WINAPI glDirectDrawSurface7::GetPrivateData(REFGUID guidTag, LPVOID lpBuffer, LPDWORD lpcbBufferSize)
|
1149 | 1297 | {
|
1150 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1298 | + TRACE_ENTER(4,14,this,24,&guidTag,14,lpBuffer,14,lpcbBufferSize);
|
| 1299 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1151 | 1300 | FIXME("glDirectDrawSurface7::GetPrivateData: stub\n");
|
| 1301 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1152 | 1302 | ERR(DDERR_GENERIC);
|
1153 | 1303 | }
|
1154 | 1304 | HRESULT WINAPI glDirectDrawSurface7::FreePrivateData(REFGUID guidTag)
|
1155 | 1305 | {
|
1156 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1306 | + TRACE_ENTER(2,14,this,24,&guidTag);
|
| 1307 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1157 | 1308 | FIXME("glDirectDrawSurface7::FreePrivateData: stub\n");
|
| 1309 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1158 | 1310 | ERR(DDERR_GENERIC);
|
1159 | 1311 | }
|
1160 | 1312 | HRESULT WINAPI glDirectDrawSurface7::GetUniquenessValue(LPDWORD lpValue)
|
1161 | 1313 | {
|
1162 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1314 | + TRACE_ENTER(2,14,this,14,lpValue);
|
| 1315 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1163 | 1316 | FIXME("glDirectDrawSurface7::GetUniquenessValue: stub\n");
|
| 1317 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1164 | 1318 | ERR(DDERR_GENERIC);
|
1165 | 1319 | }
|
1166 | 1320 | HRESULT WINAPI glDirectDrawSurface7::ChangeUniquenessValue()
|
1167 | 1321 | {
|
1168 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1322 | + TRACE_ENTER(1,14,this);
|
| 1323 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1169 | 1324 | FIXME("glDirectDrawSurface7::ChangeUniquenessValue: stub\n");
|
| 1325 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1170 | 1326 | ERR(DDERR_GENERIC);
|
1171 | 1327 | }
|
1172 | 1328 | // ddraw 7 api
|
1173 | 1329 | HRESULT WINAPI glDirectDrawSurface7::SetPriority(DWORD dwPriority)
|
1174 | 1330 | {
|
1175 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1331 | + TRACE_ENTER(2,14,this,8,dwPriority);
|
| 1332 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1176 | 1333 | FIXME("glDirectDrawSurface7::SetPriority: stub\n");
|
| 1334 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1177 | 1335 | ERR(DDERR_GENERIC);
|
1178 | 1336 | }
|
1179 | 1337 | HRESULT WINAPI glDirectDrawSurface7::GetPriority(LPDWORD lpdwPriority)
|
1180 | 1338 | {
|
1181 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1339 | + TRACE_ENTER(2,14,this,14,lpdwPriority);
|
| 1340 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1182 | 1341 | FIXME("glDirectDrawSurface7::GetPriority: stub\n");
|
| 1342 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1183 | 1343 | ERR(DDERR_GENERIC);
|
1184 | 1344 | }
|
1185 | 1345 | HRESULT WINAPI glDirectDrawSurface7::SetLOD(DWORD dwMaxLOD)
|
1186 | 1346 | {
|
1187 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1347 | + TRACE_ENTER(2,14,this,8,dwMaxLOD);
|
| 1348 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1188 | 1349 | FIXME("glDirectDrawSurface7::SetLOD: stub\n");
|
| 1350 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1189 | 1351 | ERR(DDERR_GENERIC);
|
1190 | 1352 | }
|
1191 | 1353 | HRESULT WINAPI glDirectDrawSurface7::GetLOD(LPDWORD lpdwMaxLOD)
|
1192 | 1354 | {
|
1193 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1355 | + TRACE_ENTER(2,14,this,14,lpdwMaxLOD);
|
| 1356 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1194 | 1357 | FIXME("glDirectDrawSurface7::GetLOD: stub\n");
|
| 1358 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1195 | 1359 | ERR(DDERR_GENERIC);
|
1196 | 1360 | }
|
1197 | 1361 | HRESULT WINAPI glDirectDrawSurface7::Unlock2(LPVOID lpSurfaceData)
|
1198 | 1362 | {
|
1199 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1200 | | - return Unlock((LPRECT)lpSurfaceData);
|
| 1363 | + TRACE_ENTER(2,14,this,14,lpSurfaceData);
|
| 1364 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1365 | + TRACE_RET(23,Unlock((LPRECT)lpSurfaceData));
|
1201 | 1366 | }
|
1202 | 1367 | void glDirectDrawSurface7::SetFilter(int level, GLint mag, GLint min)
|
1203 | 1368 | {
|
| 1369 | + TRACE_ENTER(4,14,this,11,level,11,mag,11,min);
|
1204 | 1370 | switch(dxglcfg.texfilter)
|
1205 | 1371 | {
|
1206 | 1372 | default:
|
— | — | @@ -1239,32 +1405,39 @@ |
1240 | 1406 | glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,min);
|
1241 | 1407 | minfilter = min;
|
1242 | 1408 | //}
|
| 1409 | + TRACE_EXIT(0,0);
|
1243 | 1410 | }
|
1244 | 1411 |
|
1245 | 1412 | HRESULT glDirectDrawSurface7::GetHandle(glDirect3DDevice7 *glD3DDev7, LPD3DTEXTUREHANDLE lpHandle)
|
1246 | 1413 | {
|
1247 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1248 | | - if(!glD3DDev7) return DDERR_INVALIDPARAMS;
|
| 1414 | + TRACE_ENTER(3,14,this,14,glD3DDev7,14,lpHandle);
|
| 1415 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1416 | + if(!glD3DDev7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1249 | 1417 | if(handle)
|
1250 | 1418 | {
|
1251 | | - if(device != glD3DDev7) return DDERR_INVALIDOBJECT;
|
| 1419 | + if(device != glD3DDev7) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1252 | 1420 | *lpHandle = handle;
|
| 1421 | + TRACE_EXIT(23,D3D_OK);
|
1253 | 1422 | return D3D_OK;
|
1254 | 1423 | }
|
1255 | 1424 | device = glD3DDev7;
|
1256 | 1425 | handle = device->AddTexture(this);
|
1257 | | - if(handle == -1) return DDERR_OUTOFMEMORY;
|
| 1426 | + if(handle == -1) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
1258 | 1427 | device->AddRef();
|
1259 | 1428 | *lpHandle = handle;
|
| 1429 | + TRACE_VAR("*lpHandle",9,*lpHandle);
|
| 1430 | + TRACE_EXIT(23,D3D_OK);
|
1260 | 1431 | return D3D_OK;
|
1261 | 1432 | }
|
1262 | 1433 |
|
1263 | 1434 | HRESULT glDirectDrawSurface7::Load(glDirectDrawSurface7 *src)
|
1264 | 1435 | {
|
1265 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1266 | | - if(!src) return DDERR_INVALIDPARAMS;
|
| 1436 | + TRACE_ENTER(2,14,this,14,src);
|
| 1437 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1438 | + if(!src) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1267 | 1439 | this->Blt(NULL,src,NULL,DDBLT_WAIT,NULL);
|
1268 | 1440 | ddsd.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;
|
| 1441 | + TRACE_EXIT(23,D3D_OK);
|
1269 | 1442 | return D3D_OK;
|
1270 | 1443 | }
|
1271 | 1444 |
|
— | — | @@ -1272,93 +1445,114 @@ |
1273 | 1446 | // DDRAW1 wrapper
|
1274 | 1447 | glDirectDrawSurface1::glDirectDrawSurface1(glDirectDrawSurface7 *gl_DDS7)
|
1275 | 1448 | {
|
| 1449 | + TRACE_ENTER(2,14,this,14,gl_DDS7);
|
1276 | 1450 | glDDS7 = gl_DDS7;
|
1277 | 1451 | refcount = 1;
|
| 1452 | + TRACE_EXIT(-1,0);
|
1278 | 1453 | }
|
1279 | 1454 | glDirectDrawSurface1::~glDirectDrawSurface1()
|
1280 | 1455 | {
|
| 1456 | + TRACE_ENTER(1,14,this);
|
1281 | 1457 | glDDS7->dds1 = NULL;
|
1282 | 1458 | glDDS7->Release();
|
| 1459 | + TRACE_EXIT(-1,0);
|
1283 | 1460 | }
|
1284 | 1461 | HRESULT WINAPI glDirectDrawSurface1::QueryInterface(REFIID riid, void** ppvObj)
|
1285 | 1462 | {
|
1286 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1463 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 1464 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1287 | 1465 | if(riid == IID_IUnknown)
|
1288 | 1466 | {
|
1289 | 1467 | this->AddRef();
|
1290 | 1468 | *ppvObj = this;
|
| 1469 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 1470 | + TRACE_EXIT(23,DD_OK);
|
1291 | 1471 | return DD_OK;
|
1292 | 1472 | }
|
1293 | | - return glDDS7->QueryInterface(riid,ppvObj);
|
| 1473 | + TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
1294 | 1474 | }
|
1295 | 1475 | ULONG WINAPI glDirectDrawSurface1::AddRef()
|
1296 | 1476 | {
|
1297 | | - if(!this) return 0;
|
| 1477 | + TRACE_ENTER(1,14,this);
|
| 1478 | + if(!this) TRACE_RET(8,0);
|
1298 | 1479 | refcount++;
|
| 1480 | + TRACE_EXIT(8,refcount);
|
1299 | 1481 | return refcount;
|
1300 | 1482 | }
|
1301 | 1483 | ULONG WINAPI glDirectDrawSurface1::Release()
|
1302 | 1484 | {
|
1303 | | - if(!this) return 0;
|
| 1485 | + TRACE_ENTER(1,14,this);
|
| 1486 | + if(!this) TRACE_RET(8,0);
|
1304 | 1487 | ULONG ret;
|
1305 | 1488 | refcount--;
|
1306 | 1489 | ret = refcount;
|
1307 | 1490 | if(refcount == 0) delete this;
|
| 1491 | + TRACE_EXIT(8,ret);
|
1308 | 1492 | return ret;
|
1309 | 1493 | }
|
1310 | 1494 | HRESULT WINAPI glDirectDrawSurface1::AddAttachedSurface(LPDIRECTDRAWSURFACE lpDDSAttachedSurface)
|
1311 | 1495 | {
|
1312 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1313 | | - if(!lpDDSAttachedSurface) return DDERR_INVALIDPARAMS;
|
1314 | | - return glDDS7->AddAttachedSurface(((glDirectDrawSurface1*)lpDDSAttachedSurface)->GetDDS7());
|
| 1496 | + TRACE_ENTER(2,14,this,14,lpDDSAttachedSurface);
|
| 1497 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1498 | + if(!lpDDSAttachedSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1499 | + TRACE_RET(23,glDDS7->AddAttachedSurface(((glDirectDrawSurface1*)lpDDSAttachedSurface)->GetDDS7()));
|
1315 | 1500 | }
|
1316 | 1501 | HRESULT WINAPI glDirectDrawSurface1::AddOverlayDirtyRect(LPRECT lpRect)
|
1317 | 1502 | {
|
1318 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1319 | | - return glDDS7->AddOverlayDirtyRect(lpRect);
|
| 1503 | + TRACE_ENTER(2,14,this,26,lpRect);
|
| 1504 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1505 | + TRACE_RET(23,glDDS7->AddOverlayDirtyRect(lpRect));
|
1320 | 1506 | }
|
1321 | 1507 | HRESULT WINAPI glDirectDrawSurface1::Blt(LPRECT lpDestRect, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
1322 | 1508 | {
|
1323 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1324 | | - if(lpDDSrcSurface) return glDDS7->Blt(lpDestRect,((glDirectDrawSurface1*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx);
|
1325 | | - else return glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx);
|
| 1509 | + TRACE_ENTER(6,14,this,26,lpDestRect,14,lpDDSrcSurface,14,lpSrcRect,9,dwFlags,14,lpDDBltFx);
|
| 1510 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1511 | + if(lpDDSrcSurface) {TRACE_RET(23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface1*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx))}
|
| 1512 | + else TRACE_RET(23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
1326 | 1513 | }
|
1327 | 1514 | HRESULT WINAPI glDirectDrawSurface1::BltBatch(LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags)
|
1328 | 1515 | {
|
1329 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1330 | | - return glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags);
|
| 1516 | + TRACE_ENTER(4,14,this,14,lpDDBltBatch,8,dwCount,9,dwFlags);
|
| 1517 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1518 | + TRACE_RET(23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
1331 | 1519 | }
|
1332 | 1520 | HRESULT WINAPI glDirectDrawSurface1::BltFast(DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans)
|
1333 | 1521 | {
|
1334 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1335 | | - return glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface1*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans);
|
| 1522 | + TRACE_ENTER(6,14,this,8,dwX,8,dwY,14,lpDDSrcSurface,26,lpSrcRect,9,dwTrans);
|
| 1523 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1524 | + TRACE_RET(23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface1*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
1336 | 1525 | }
|
1337 | 1526 | HRESULT WINAPI glDirectDrawSurface1::DeleteAttachedSurface(DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSAttachedSurface)
|
1338 | 1527 | {
|
1339 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1340 | | - return glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface);
|
| 1528 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSAttachedSurface);
|
| 1529 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1530 | + TRACE_RET(23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
1341 | 1531 | }
|
1342 | 1532 | HRESULT WINAPI glDirectDrawSurface1::EnumAttachedSurfaces(LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback)
|
1343 | 1533 | {
|
1344 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1345 | | - return glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback);
|
| 1534 | + TRACE_ENTER(3,14,this,14,lpContext,14,lpEnumSurfacesCallback);
|
| 1535 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1536 | + TRACE_RET(23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
1346 | 1537 | }
|
1347 | 1538 | HRESULT WINAPI glDirectDrawSurface1::EnumOverlayZOrders(DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback)
|
1348 | 1539 | {
|
1349 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1350 | | - return glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback);
|
| 1540 | + TRACE_ENTER(4,14,this,9,dwFlags,14,lpContext,14,lpfnCallback);
|
| 1541 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1542 | + TRACE_RET(23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
1351 | 1543 | }
|
1352 | 1544 | HRESULT WINAPI glDirectDrawSurface1::Flip(LPDIRECTDRAWSURFACE lpDDSurfaceTargetOverride, DWORD dwFlags)
|
1353 | 1545 | {
|
1354 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1546 | + TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
| 1547 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1355 | 1548 | if(lpDDSurfaceTargetOverride)
|
1356 | | - return glDDS7->Flip(((glDirectDrawSurface1*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags);
|
1357 | | - else return glDDS7->Flip(NULL,dwFlags);
|
| 1549 | + {TRACE_RET(23,glDDS7->Flip(((glDirectDrawSurface1*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
| 1550 | + else TRACE_RET(23,glDDS7->Flip(NULL,dwFlags));
|
1358 | 1551 | }
|
1359 | 1552 | HRESULT WINAPI glDirectDrawSurface1::GetAttachedSurface(LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE FAR *lplpDDAttachedSurface)
|
1360 | 1553 | {
|
1361 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1362 | | - if(!lpDDSCaps) return DDERR_INVALIDPARAMS;
|
| 1554 | + TRACE_ENTER(3,14,this,14,lpDDSCaps,14,lplpDDAttachedSurface);
|
| 1555 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1556 | + if(!lpDDSCaps) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1363 | 1557 | HRESULT error;
|
1364 | 1558 | glDirectDrawSurface7 *attachedsurface;
|
1365 | 1559 | glDirectDrawSurface1 *attached1;
|
— | — | @@ -1371,220 +1565,267 @@ |
1372 | 1566 | attachedsurface->QueryInterface(IID_IDirectDrawSurface,(void **)&attached1);
|
1373 | 1567 | attachedsurface->Release();
|
1374 | 1568 | *lplpDDAttachedSurface = attached1;
|
| 1569 | + TRACE_VAR("*lplpDDAttachedSurface",14,*lplpDDAttachedSurface);
|
1375 | 1570 | }
|
| 1571 | + TRACE_EXIT(23,error);
|
1376 | 1572 | return error;
|
1377 | 1573 | }
|
1378 | 1574 | HRESULT WINAPI glDirectDrawSurface1::GetBltStatus(DWORD dwFlags)
|
1379 | 1575 | {
|
1380 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1381 | | - return glDDS7->GetBltStatus(dwFlags);
|
| 1576 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 1577 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1578 | + TRACE_RET(23,glDDS7->GetBltStatus(dwFlags));
|
1382 | 1579 | }
|
1383 | 1580 | HRESULT WINAPI glDirectDrawSurface1::GetCaps(LPDDSCAPS lpDDSCaps)
|
1384 | 1581 | {
|
1385 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1386 | | - if(!lpDDSCaps) return DDERR_INVALIDPARAMS;
|
| 1582 | + TRACE_ENTER(2,14,this,14,lpDDSCaps);
|
| 1583 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1584 | + if(!lpDDSCaps) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1387 | 1585 | HRESULT error;
|
1388 | 1586 | DDSCAPS2 ddsCaps1;
|
1389 | 1587 | error = glDDS7->GetCaps(&ddsCaps1);
|
1390 | 1588 | ZeroMemory(&ddsCaps1,sizeof(DDSCAPS2));
|
1391 | 1589 | memcpy(lpDDSCaps,&ddsCaps1,sizeof(DDSCAPS));
|
| 1590 | + TRACE_EXIT(23,error);
|
1392 | 1591 | return error;
|
1393 | 1592 | }
|
1394 | 1593 | HRESULT WINAPI glDirectDrawSurface1::GetClipper(LPDIRECTDRAWCLIPPER FAR *lplpDDClipper)
|
1395 | 1594 | {
|
1396 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1397 | | - return glDDS7->GetClipper(lplpDDClipper);
|
| 1595 | + TRACE_ENTER(2,14,this,14,lplpDDClipper);
|
| 1596 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1597 | + TRACE_RET(23,glDDS7->GetClipper(lplpDDClipper));
|
1398 | 1598 | }
|
1399 | 1599 | HRESULT WINAPI glDirectDrawSurface1::GetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1400 | 1600 | {
|
1401 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1402 | | - return glDDS7->GetColorKey(dwFlags,lpDDColorKey);
|
| 1601 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
| 1602 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1603 | + TRACE_RET(23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
1403 | 1604 | }
|
1404 | 1605 | HRESULT WINAPI glDirectDrawSurface1::GetDC(HDC FAR *lphDC)
|
1405 | 1606 | {
|
1406 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1407 | | - return glDDS7->GetDC(lphDC);
|
| 1607 | + TRACE_ENTER(2,14,this,14,lphDC);
|
| 1608 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1609 | + TRACE_RET(23,glDDS7->GetDC(lphDC));
|
1408 | 1610 | }
|
1409 | 1611 | HRESULT WINAPI glDirectDrawSurface1::GetFlipStatus(DWORD dwFlags)
|
1410 | 1612 | {
|
1411 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1412 | | - return glDDS7->GetFlipStatus(dwFlags);
|
| 1613 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 1614 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1615 | + TRACE_RET(23,glDDS7->GetFlipStatus(dwFlags));
|
1413 | 1616 | }
|
1414 | 1617 | HRESULT WINAPI glDirectDrawSurface1::GetOverlayPosition(LPLONG lplX, LPLONG lplY)
|
1415 | 1618 | {
|
1416 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1417 | | - return glDDS7->GetOverlayPosition(lplX,lplY);
|
| 1619 | + TRACE_ENTER(3,14,this,14,lplX,14,lplY);
|
| 1620 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1621 | + TRACE_RET(23,glDDS7->GetOverlayPosition(lplX,lplY));
|
1418 | 1622 | }
|
1419 | 1623 | HRESULT WINAPI glDirectDrawSurface1::GetPalette(LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
1420 | 1624 | {
|
1421 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1422 | | - return glDDS7->GetPalette(lplpDDPalette);
|
| 1625 | + TRACE_ENTER(2,14,this,14,lplpDDPalette);
|
| 1626 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1627 | + TRACE_RET(23,glDDS7->GetPalette(lplpDDPalette));
|
1423 | 1628 | }
|
1424 | 1629 | HRESULT WINAPI glDirectDrawSurface1::GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat)
|
1425 | 1630 | {
|
1426 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1427 | | - return glDDS7->GetPixelFormat(lpDDPixelFormat);
|
| 1631 | + TRACE_ENTER(2,14,this,14,lpDDPixelFormat);
|
| 1632 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1633 | + TRACE_RET(23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
1428 | 1634 | }
|
1429 | 1635 | HRESULT WINAPI glDirectDrawSurface1::GetSurfaceDesc(LPDDSURFACEDESC lpDDSurfaceDesc)
|
1430 | 1636 | {
|
1431 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1432 | | - return glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc);
|
| 1637 | + TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
| 1638 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1639 | + TRACE_RET(23,glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
1433 | 1640 | }
|
1434 | 1641 | HRESULT WINAPI glDirectDrawSurface1::Initialize(LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc)
|
1435 | 1642 | {
|
1436 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1643 | + TRACE_ENTER(3,14,this,14,lpDD,14,lpDDSurfaceDesc);
|
| 1644 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1645 | + TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
1437 | 1646 | return DDERR_ALREADYINITIALIZED;
|
1438 | 1647 | }
|
1439 | 1648 | HRESULT WINAPI glDirectDrawSurface1::IsLost()
|
1440 | 1649 | {
|
1441 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1442 | | - return glDDS7->IsLost();
|
| 1650 | + TRACE_ENTER(1,14,this);
|
| 1651 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1652 | + TRACE_RET(23,glDDS7->IsLost());
|
1443 | 1653 | }
|
1444 | 1654 | HRESULT WINAPI glDirectDrawSurface1::Lock(LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
1445 | 1655 | {
|
1446 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1447 | | - return glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent);
|
| 1656 | + TRACE_ENTER(5,14,this,26,lpDestRect,14,lpDDSurfaceDesc,9,dwFlags,14,hEvent);
|
| 1657 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1658 | + TRACE_RET(23,glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent));
|
1448 | 1659 | }
|
1449 | 1660 | HRESULT WINAPI glDirectDrawSurface1::ReleaseDC(HDC hDC)
|
1450 | 1661 | {
|
1451 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1452 | | - return glDDS7->ReleaseDC(hDC);
|
| 1662 | + TRACE_ENTER(2,14,this,14,hDC);
|
| 1663 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1664 | + TRACE_RET(23,glDDS7->ReleaseDC(hDC));
|
1453 | 1665 | }
|
1454 | 1666 | HRESULT WINAPI glDirectDrawSurface1::Restore()
|
1455 | 1667 | {
|
1456 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1457 | | - return glDDS7->Restore();
|
| 1668 | + TRACE_ENTER(1,14,this);
|
| 1669 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1670 | + TRACE_RET(23,glDDS7->Restore());
|
1458 | 1671 | }
|
1459 | 1672 | HRESULT WINAPI glDirectDrawSurface1::SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper)
|
1460 | 1673 | {
|
1461 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1462 | | - return glDDS7->SetClipper(lpDDClipper);
|
| 1674 | + TRACE_ENTER(2,14,this,14,lpDDClipper);
|
| 1675 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1676 | + TRACE_RET(23,glDDS7->SetClipper(lpDDClipper));
|
1463 | 1677 | }
|
1464 | 1678 | HRESULT WINAPI glDirectDrawSurface1::SetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1465 | 1679 | {
|
1466 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1467 | | - return glDDS7->SetColorKey(dwFlags,lpDDColorKey);
|
| 1680 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
| 1681 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1682 | + TRACE_RET(23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
1468 | 1683 | }
|
1469 | 1684 | HRESULT WINAPI glDirectDrawSurface1::SetOverlayPosition(LONG lX, LONG lY)
|
1470 | 1685 | {
|
1471 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1472 | | - return glDDS7->SetOverlayPosition(lX,lY);
|
| 1686 | + TRACE_ENTER(3,14,this,7,lX,7,lY);
|
| 1687 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1688 | + TRACE_RET(23,glDDS7->SetOverlayPosition(lX,lY));
|
1473 | 1689 | }
|
1474 | 1690 | HRESULT WINAPI glDirectDrawSurface1::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
1475 | 1691 | {
|
1476 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1477 | | - return glDDS7->SetPalette(lpDDPalette);
|
| 1692 | + TRACE_ENTER(2,14,this,14,lpDDPalette);
|
| 1693 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1694 | + TRACE_RET(23,glDDS7->SetPalette(lpDDPalette));
|
1478 | 1695 | }
|
1479 | 1696 | HRESULT WINAPI glDirectDrawSurface1::Unlock(LPVOID lpSurfaceData)
|
1480 | 1697 | {
|
1481 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1482 | | - return glDDS7->Unlock2(lpSurfaceData);
|
| 1698 | + TRACE_ENTER(2,14,this,14,lpSurfaceData);
|
| 1699 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1700 | + TRACE_RET(23,glDDS7->Unlock2(lpSurfaceData));
|
1483 | 1701 | }
|
1484 | 1702 | HRESULT WINAPI glDirectDrawSurface1::UpdateOverlay(LPRECT lpSrcRect, LPDIRECTDRAWSURFACE lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx)
|
1485 | 1703 | {
|
1486 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1487 | | - return glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx);
|
| 1704 | + TRACE_ENTER(6,14,this,26,lpSrcRect,14,lpDDDestSurface,26,lpDestRect,9,dwFlags,14,lpDDOverlayFx);
|
| 1705 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1706 | + TRACE_RET(23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
1488 | 1707 | }
|
1489 | 1708 | HRESULT WINAPI glDirectDrawSurface1::UpdateOverlayDisplay(DWORD dwFlags)
|
1490 | 1709 | {
|
1491 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1492 | | - return glDDS7->UpdateOverlayDisplay(dwFlags);
|
| 1710 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 1711 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1712 | + TRACE_RET(23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
1493 | 1713 | }
|
1494 | 1714 | HRESULT WINAPI glDirectDrawSurface1::UpdateOverlayZOrder(DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSReference)
|
1495 | 1715 | {
|
1496 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1497 | | - return glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference);
|
| 1716 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSReference);
|
| 1717 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1718 | + TRACE_RET(23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
1498 | 1719 | }
|
1499 | 1720 |
|
1500 | 1721 | // DDRAW2 wrapper
|
1501 | 1722 | glDirectDrawSurface2::glDirectDrawSurface2(glDirectDrawSurface7 *gl_DDS7)
|
1502 | 1723 | {
|
| 1724 | + TRACE_ENTER(2,14,this,14,gl_DDS7);
|
1503 | 1725 | glDDS7 = gl_DDS7;
|
1504 | 1726 | refcount = 1;
|
| 1727 | + TRACE_EXIT(-1,0);
|
1505 | 1728 | }
|
1506 | 1729 | glDirectDrawSurface2::~glDirectDrawSurface2()
|
1507 | 1730 | {
|
| 1731 | + TRACE_ENTER(1,14,this);
|
1508 | 1732 | glDDS7->dds2 = NULL;
|
1509 | 1733 | glDDS7->Release();
|
| 1734 | + TRACE_EXIT(-1,0);
|
1510 | 1735 | }
|
1511 | 1736 | HRESULT WINAPI glDirectDrawSurface2::QueryInterface(REFIID riid, void** ppvObj)
|
1512 | 1737 | {
|
1513 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1738 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 1739 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1514 | 1740 | if(riid == IID_IUnknown)
|
1515 | 1741 | {
|
1516 | 1742 | this->AddRef();
|
1517 | 1743 | *ppvObj = this;
|
| 1744 | + TRACE_EXIT(23,DD_OK);
|
1518 | 1745 | return DD_OK;
|
1519 | 1746 | }
|
1520 | | - return glDDS7->QueryInterface(riid,ppvObj);
|
| 1747 | + TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
1521 | 1748 | }
|
1522 | 1749 | ULONG WINAPI glDirectDrawSurface2::AddRef()
|
1523 | 1750 | {
|
1524 | | - if(!this) return 0;
|
| 1751 | + TRACE_ENTER(1,14,this);
|
| 1752 | + if(!this) TRACE_RET(8,0);
|
1525 | 1753 | refcount++;
|
| 1754 | + TRACE_EXIT(8,refcount);
|
1526 | 1755 | return refcount;
|
1527 | 1756 | }
|
1528 | 1757 | ULONG WINAPI glDirectDrawSurface2::Release()
|
1529 | 1758 | {
|
1530 | | - if(!this) return 0;
|
| 1759 | + TRACE_ENTER(1,14,this);
|
| 1760 | + if(!this) TRACE_RET(8,0);
|
1531 | 1761 | ULONG ret;
|
1532 | 1762 | refcount--;
|
1533 | 1763 | ret = refcount;
|
1534 | 1764 | if(refcount == 0) delete this;
|
| 1765 | + TRACE_EXIT(8,ret);
|
1535 | 1766 | return ret;
|
1536 | 1767 | }
|
1537 | 1768 | HRESULT WINAPI glDirectDrawSurface2::AddAttachedSurface(LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface)
|
1538 | 1769 | {
|
1539 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1540 | | - if(!lpDDSAttachedSurface) return DDERR_INVALIDPARAMS;
|
1541 | | - return glDDS7->AddAttachedSurface(((glDirectDrawSurface2*)lpDDSAttachedSurface)->GetDDS7());
|
| 1770 | + TRACE_ENTER(2,14,this,14,lpDDSAttachedSurface);
|
| 1771 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1772 | + if(!lpDDSAttachedSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1773 | + TRACE_RET(23,glDDS7->AddAttachedSurface(((glDirectDrawSurface2*)lpDDSAttachedSurface)->GetDDS7()));
|
1542 | 1774 | }
|
1543 | 1775 | HRESULT WINAPI glDirectDrawSurface2::AddOverlayDirtyRect(LPRECT lpRect)
|
1544 | 1776 | {
|
1545 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1546 | | - return glDDS7->AddOverlayDirtyRect(lpRect);
|
| 1777 | + TRACE_ENTER(2,14,this,26,lpRect);
|
| 1778 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1779 | + TRACE_RET(23,glDDS7->AddOverlayDirtyRect(lpRect));
|
1547 | 1780 | }
|
1548 | 1781 | HRESULT WINAPI glDirectDrawSurface2::Blt(LPRECT lpDestRect, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
1549 | 1782 | {
|
1550 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1551 | | - if(lpDDSrcSurface) return glDDS7->Blt(lpDestRect,((glDirectDrawSurface2*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx);
|
1552 | | - else return glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx);
|
| 1783 | + TRACE_ENTER(6,14,this,26,lpDestRect,14,lpDDSrcSurface,26,lpSrcRect,9,dwFlags,14,lpDDBltFx);
|
| 1784 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1785 | + if(lpDDSrcSurface) {TRACE_RET(23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface2*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx));}
|
| 1786 | + else TRACE_RET(23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
1553 | 1787 | }
|
1554 | 1788 | HRESULT WINAPI glDirectDrawSurface2::BltBatch(LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags)
|
1555 | 1789 | {
|
1556 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1557 | | - return glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags);
|
| 1790 | + TRACE_ENTER(4,14,this,14,lpDDBltBatch,8,dwCount,9,dwFlags);
|
| 1791 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1792 | + TRACE_RET(23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
1558 | 1793 | }
|
1559 | 1794 | HRESULT WINAPI glDirectDrawSurface2::BltFast(DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans)
|
1560 | 1795 | {
|
1561 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1562 | | - return glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface2*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans);
|
| 1796 | + TRACE_ENTER(6,14,this,8,dwX,8,dwY,4,lpDDSrcSurface,26,lpSrcRect,9,dwTrans);
|
| 1797 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1798 | + TRACE_RET(23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface2*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
1563 | 1799 | }
|
1564 | 1800 | HRESULT WINAPI glDirectDrawSurface2::DeleteAttachedSurface(DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface)
|
1565 | 1801 | {
|
1566 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1567 | | - return glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface);
|
| 1802 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSAttachedSurface);
|
| 1803 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1804 | + TRACE_RET(23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
1568 | 1805 | }
|
1569 | 1806 | HRESULT WINAPI glDirectDrawSurface2::EnumAttachedSurfaces(LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback)
|
1570 | 1807 | {
|
1571 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1572 | | - return glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback);
|
| 1808 | + TRACE_ENTER(3,14,this,14,lpContext,14,lpEnumSurfacesCallback);
|
| 1809 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1810 | + TRACE_RET(23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
1573 | 1811 | }
|
1574 | 1812 | HRESULT WINAPI glDirectDrawSurface2::EnumOverlayZOrders(DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback)
|
1575 | 1813 | {
|
1576 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1577 | | - return glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback);
|
| 1814 | + TRACE_ENTER(4,14,this,9,dwFlags,14,lpContext,14,lpfnCallback);
|
| 1815 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1816 | + TRACE_RET(23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
1578 | 1817 | }
|
1579 | 1818 | HRESULT WINAPI glDirectDrawSurface2::Flip(LPDIRECTDRAWSURFACE2 lpDDSurfaceTargetOverride, DWORD dwFlags)
|
1580 | 1819 | {
|
1581 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1820 | + TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
| 1821 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1582 | 1822 | if(lpDDSurfaceTargetOverride)
|
1583 | | - return glDDS7->Flip(((glDirectDrawSurface2*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags);
|
1584 | | - else return glDDS7->Flip(NULL,dwFlags);
|
| 1823 | + {TRACE_RET(23,glDDS7->Flip(((glDirectDrawSurface2*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
| 1824 | + else TRACE_RET(23,glDDS7->Flip(NULL,dwFlags));
|
1585 | 1825 | }
|
1586 | 1826 | HRESULT WINAPI glDirectDrawSurface2::GetAttachedSurface(LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE2 FAR *lplpDDAttachedSurface)
|
1587 | 1827 | {
|
1588 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1828 | + TRACE_ENTER(3,14,this,14,lpDDSCaps,14,lplpDDAttachedSurface);
|
| 1829 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1589 | 1830 | HRESULT error;
|
1590 | 1831 | glDirectDrawSurface7 *attachedsurface;
|
1591 | 1832 | glDirectDrawSurface2 *attached1;
|
— | — | @@ -1597,240 +1838,292 @@ |
1598 | 1839 | attachedsurface->QueryInterface(IID_IDirectDrawSurface2,(void **)&attached1);
|
1599 | 1840 | attachedsurface->Release();
|
1600 | 1841 | *lplpDDAttachedSurface = attached1;
|
| 1842 | + TRACE_VAR("*lplpDDAttachedSurface",14,*lplpDDAttachedSurface);
|
1601 | 1843 | }
|
| 1844 | + TRACE_EXIT(23,error);
|
1602 | 1845 | return error;
|
1603 | 1846 | }
|
1604 | 1847 | HRESULT WINAPI glDirectDrawSurface2::GetBltStatus(DWORD dwFlags)
|
1605 | 1848 | {
|
1606 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1607 | | - return glDDS7->GetBltStatus(dwFlags);
|
| 1849 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 1850 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1851 | + TRACE_RET(23,glDDS7->GetBltStatus(dwFlags));
|
1608 | 1852 | }
|
1609 | 1853 | HRESULT WINAPI glDirectDrawSurface2::GetCaps(LPDDSCAPS lpDDSCaps)
|
1610 | 1854 | {
|
1611 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1612 | | - if(!lpDDSCaps) return DDERR_INVALIDPARAMS;
|
| 1855 | + TRACE_ENTER(2,14,this,14,lpDDSCaps);
|
| 1856 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1857 | + if(!lpDDSCaps) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1613 | 1858 | HRESULT error;
|
1614 | 1859 | DDSCAPS2 ddsCaps1;
|
1615 | 1860 | error = glDDS7->GetCaps(&ddsCaps1);
|
1616 | 1861 | ZeroMemory(&ddsCaps1,sizeof(DDSCAPS2));
|
1617 | 1862 | memcpy(lpDDSCaps,&ddsCaps1,sizeof(DDSCAPS));
|
| 1863 | + TRACE_EXIT(23,error);
|
1618 | 1864 | return error;
|
1619 | 1865 | }
|
1620 | 1866 | HRESULT WINAPI glDirectDrawSurface2::GetClipper(LPDIRECTDRAWCLIPPER FAR *lplpDDClipper)
|
1621 | 1867 | {
|
1622 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1623 | | - return glDDS7->GetClipper(lplpDDClipper);
|
| 1868 | + TRACE_ENTER(2,14,this,14,lplpDDClipper);
|
| 1869 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1870 | + TRACE_RET(23,glDDS7->GetClipper(lplpDDClipper));
|
1624 | 1871 | }
|
1625 | 1872 | HRESULT WINAPI glDirectDrawSurface2::GetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1626 | 1873 | {
|
1627 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1628 | | - return glDDS7->GetColorKey(dwFlags,lpDDColorKey);
|
| 1874 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
| 1875 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1876 | + TRACE_RET(23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
1629 | 1877 | }
|
1630 | 1878 | HRESULT WINAPI glDirectDrawSurface2::GetDC(HDC FAR *lphDC)
|
1631 | 1879 | {
|
1632 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1633 | | - return glDDS7->GetDC(lphDC);
|
| 1880 | + TRACE_ENTER(2,14,this,14,lphDC);
|
| 1881 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1882 | + TRACE_RET(23,glDDS7->GetDC(lphDC));
|
1634 | 1883 | }
|
1635 | 1884 | HRESULT WINAPI glDirectDrawSurface2::GetFlipStatus(DWORD dwFlags)
|
1636 | 1885 | {
|
1637 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1638 | | - return glDDS7->GetFlipStatus(dwFlags);
|
| 1886 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 1887 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1888 | + TRACE_RET(23,glDDS7->GetFlipStatus(dwFlags));
|
1639 | 1889 | }
|
1640 | 1890 | HRESULT WINAPI glDirectDrawSurface2::GetOverlayPosition(LPLONG lplX, LPLONG lplY)
|
1641 | 1891 | {
|
1642 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1643 | | - return glDDS7->GetOverlayPosition(lplX,lplY);
|
| 1892 | + TRACE_ENTER(3,14,this,14,lplX,14,lplY);
|
| 1893 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1894 | + TRACE_RET(23,glDDS7->GetOverlayPosition(lplX,lplY));
|
1644 | 1895 | }
|
1645 | 1896 | HRESULT WINAPI glDirectDrawSurface2::GetPalette(LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
1646 | 1897 | {
|
1647 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1648 | | - return glDDS7->GetPalette(lplpDDPalette);
|
| 1898 | + TRACE_ENTER(2,14,this,14,lplpDDPalette);
|
| 1899 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1900 | + TRACE_RET(23,glDDS7->GetPalette(lplpDDPalette));
|
1649 | 1901 | }
|
1650 | 1902 | HRESULT WINAPI glDirectDrawSurface2::GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat)
|
1651 | 1903 | {
|
1652 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1653 | | - return glDDS7->GetPixelFormat(lpDDPixelFormat);
|
| 1904 | + TRACE_ENTER(2,14,this,14,lpDDPixelFormat);
|
| 1905 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1906 | + TRACE_RET(23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
1654 | 1907 | }
|
1655 | 1908 | HRESULT WINAPI glDirectDrawSurface2::GetSurfaceDesc(LPDDSURFACEDESC lpDDSurfaceDesc)
|
1656 | 1909 | {
|
1657 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1658 | | - return glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc);
|
| 1910 | + TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
| 1911 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1912 | + TRACE_RET(23,glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
1659 | 1913 | }
|
1660 | 1914 | HRESULT WINAPI glDirectDrawSurface2::Initialize(LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc)
|
1661 | 1915 | {
|
1662 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1916 | + TRACE_ENTER(3,14,this,14,lpDD,14,lpDDSurfaceDesc);
|
| 1917 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1918 | + TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
1663 | 1919 | return DDERR_ALREADYINITIALIZED;
|
1664 | 1920 | }
|
1665 | 1921 | HRESULT WINAPI glDirectDrawSurface2::IsLost()
|
1666 | 1922 | {
|
1667 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1668 | | - return glDDS7->IsLost();
|
| 1923 | + TRACE_ENTER(1,14,this);
|
| 1924 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1925 | + TRACE_RET(23,glDDS7->IsLost());
|
1669 | 1926 | }
|
1670 | 1927 | HRESULT WINAPI glDirectDrawSurface2::Lock(LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
1671 | 1928 | {
|
1672 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1673 | | - return glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent);
|
| 1929 | + TRACE_ENTER(5,14,this,26,lpDestRect,14,lpDDSurfaceDesc,9,dwFlags,14,hEvent);
|
| 1930 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1931 | + TRACE_RET(23,glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent));
|
1674 | 1932 | }
|
1675 | 1933 | HRESULT WINAPI glDirectDrawSurface2::ReleaseDC(HDC hDC)
|
1676 | 1934 | {
|
1677 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1678 | | - return glDDS7->ReleaseDC(hDC);
|
| 1935 | + TRACE_ENTER(2,14,this,14,hDC);
|
| 1936 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1937 | + TRACE_RET(23,glDDS7->ReleaseDC(hDC));
|
1679 | 1938 | }
|
1680 | 1939 | HRESULT WINAPI glDirectDrawSurface2::Restore()
|
1681 | 1940 | {
|
1682 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1683 | | - return glDDS7->Restore();
|
| 1941 | + TRACE_ENTER(1,14,this);
|
| 1942 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1943 | + TRACE_RET(23,glDDS7->Restore());
|
1684 | 1944 | }
|
1685 | 1945 | HRESULT WINAPI glDirectDrawSurface2::SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper)
|
1686 | 1946 | {
|
1687 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1688 | | - return glDDS7->SetClipper(lpDDClipper);
|
| 1947 | + TRACE_ENTER(2,14,this,14,lpDDClipper);
|
| 1948 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1949 | + TRACE_RET(23,glDDS7->SetClipper(lpDDClipper));
|
1689 | 1950 | }
|
1690 | 1951 | HRESULT WINAPI glDirectDrawSurface2::SetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1691 | 1952 | {
|
1692 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1693 | | - return glDDS7->SetColorKey(dwFlags,lpDDColorKey);
|
| 1953 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
| 1954 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1955 | + TRACE_RET(23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
1694 | 1956 | }
|
1695 | 1957 | HRESULT WINAPI glDirectDrawSurface2::SetOverlayPosition(LONG lX, LONG lY)
|
1696 | 1958 | {
|
1697 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1698 | | - return glDDS7->SetOverlayPosition(lX,lY);
|
| 1959 | + TRACE_ENTER(3,14,this,7,lX,7,lY);
|
| 1960 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1961 | + TRACE_RET(23,glDDS7->SetOverlayPosition(lX,lY));
|
1699 | 1962 | }
|
1700 | 1963 | HRESULT WINAPI glDirectDrawSurface2::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
1701 | 1964 | {
|
1702 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1703 | | - return glDDS7->SetPalette(lpDDPalette);
|
| 1965 | + TRACE_ENTER(2,14,this,14,lpDDPalette);
|
| 1966 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1967 | + TRACE_RET(23,glDDS7->SetPalette(lpDDPalette));
|
1704 | 1968 | }
|
1705 | 1969 | HRESULT WINAPI glDirectDrawSurface2::Unlock(LPVOID lpSurfaceData)
|
1706 | 1970 | {
|
1707 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1708 | | - return glDDS7->Unlock2(lpSurfaceData);
|
| 1971 | + TRACE_ENTER(2,14,this,14,lpSurfaceData);
|
| 1972 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1973 | + TRACE_RET(23,glDDS7->Unlock2(lpSurfaceData));
|
1709 | 1974 | }
|
1710 | 1975 | HRESULT WINAPI glDirectDrawSurface2::UpdateOverlay(LPRECT lpSrcRect, LPDIRECTDRAWSURFACE2 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx)
|
1711 | 1976 | {
|
1712 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1713 | | - return glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx);
|
| 1977 | + TRACE_ENTER(6,14,this,26,lpSrcRect,14,lpDDDestSurface,26,lpDestRect,9,dwFlags,14,lpDDOverlayFx);
|
| 1978 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1979 | + TRACE_RET(23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
1714 | 1980 | }
|
1715 | 1981 | HRESULT WINAPI glDirectDrawSurface2::UpdateOverlayDisplay(DWORD dwFlags)
|
1716 | 1982 | {
|
1717 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1718 | | - return glDDS7->UpdateOverlayDisplay(dwFlags);
|
| 1983 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 1984 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1985 | + TRACE_RET(23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
1719 | 1986 | }
|
1720 | 1987 | HRESULT WINAPI glDirectDrawSurface2::UpdateOverlayZOrder(DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSReference)
|
1721 | 1988 | {
|
1722 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1723 | | - return glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference);
|
| 1989 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSReference);
|
| 1990 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1991 | + TRACE_RET(23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
1724 | 1992 | }
|
1725 | 1993 | HRESULT WINAPI glDirectDrawSurface2::GetDDInterface(LPVOID FAR *lplpDD)
|
1726 | 1994 | {
|
1727 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1995 | + TRACE_ENTER(2,14,this,14,lplpDD);
|
| 1996 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1728 | 1997 | glDirectDraw7 *glDD7;
|
1729 | 1998 | HRESULT ret = glDDS7->GetDDInterface((void**)&glDD7);
|
1730 | | - if(ret != DD_OK) return ret;
|
| 1999 | + if(ret != DD_OK) TRACE_RET(23,ret);
|
1731 | 2000 | glDD7->QueryInterface(IID_IDirectDraw,lplpDD);
|
1732 | 2001 | glDD7->Release();
|
1733 | | - return ret;
|
| 2002 | + TRACE_VAR("*lplpDD",14,*lplpDD);
|
| 2003 | + TRACE_RET(23,ret);
|
1734 | 2004 | }
|
1735 | 2005 | HRESULT WINAPI glDirectDrawSurface2::PageLock(DWORD dwFlags)
|
1736 | 2006 | {
|
1737 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1738 | | - return glDDS7->PageLock(dwFlags);
|
| 2007 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2008 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2009 | + TRACE_RET(23,glDDS7->PageLock(dwFlags));
|
1739 | 2010 | }
|
1740 | 2011 | HRESULT WINAPI glDirectDrawSurface2::PageUnlock(DWORD dwFlags)
|
1741 | 2012 | {
|
1742 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1743 | | - return glDDS7->PageUnlock(dwFlags);
|
| 2013 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2014 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2015 | + TRACE_RET(23,glDDS7->PageUnlock(dwFlags));
|
1744 | 2016 | }
|
1745 | 2017 |
|
1746 | 2018 | // DDRAW3 wrapper
|
1747 | 2019 | glDirectDrawSurface3::glDirectDrawSurface3(glDirectDrawSurface7 *gl_DDS7)
|
1748 | 2020 | {
|
| 2021 | + TRACE_ENTER(2,14,this,14,gl_DDS7);
|
1749 | 2022 | glDDS7 = gl_DDS7;
|
1750 | 2023 | refcount = 1;
|
| 2024 | + TRACE_EXIT(-1,0);
|
1751 | 2025 | }
|
1752 | 2026 | glDirectDrawSurface3::~glDirectDrawSurface3()
|
1753 | 2027 | {
|
| 2028 | + TRACE_ENTER(1,14,this);
|
1754 | 2029 | glDDS7->dds3 = NULL;
|
1755 | 2030 | glDDS7->Release();
|
| 2031 | + TRACE_EXIT(-1,0);
|
1756 | 2032 | }
|
1757 | 2033 | HRESULT WINAPI glDirectDrawSurface3::QueryInterface(REFIID riid, void** ppvObj)
|
1758 | 2034 | {
|
1759 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2035 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 2036 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1760 | 2037 | if(riid == IID_IUnknown)
|
1761 | 2038 | {
|
1762 | 2039 | this->AddRef();
|
1763 | 2040 | *ppvObj = this;
|
| 2041 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 2042 | + TRACE_EXIT(23,DD_OK);
|
1764 | 2043 | return DD_OK;
|
1765 | 2044 | }
|
1766 | | - return glDDS7->QueryInterface(riid,ppvObj);
|
| 2045 | + TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
1767 | 2046 | }
|
1768 | 2047 | ULONG WINAPI glDirectDrawSurface3::AddRef()
|
1769 | 2048 | {
|
| 2049 | + TRACE_ENTER(1,14,this);
|
1770 | 2050 | if(!this) return 0;
|
1771 | 2051 | refcount++;
|
| 2052 | + TRACE_EXIT(23,refcount);
|
1772 | 2053 | return refcount;
|
1773 | 2054 | }
|
1774 | 2055 | ULONG WINAPI glDirectDrawSurface3::Release()
|
1775 | 2056 | {
|
| 2057 | + TRACE_ENTER(1,14,this);
|
1776 | 2058 | if(!this) return 0;
|
1777 | 2059 | ULONG ret;
|
1778 | 2060 | refcount--;
|
1779 | 2061 | ret = refcount;
|
1780 | 2062 | if(refcount == 0) delete this;
|
| 2063 | + TRACE_EXIT(23,ret);
|
1781 | 2064 | return ret;
|
1782 | 2065 | }
|
1783 | 2066 | HRESULT WINAPI glDirectDrawSurface3::AddAttachedSurface(LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface)
|
1784 | 2067 | {
|
1785 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1786 | | - if(!lpDDSAttachedSurface) return DDERR_INVALIDPARAMS;
|
1787 | | - return glDDS7->AddAttachedSurface(((glDirectDrawSurface3*)lpDDSAttachedSurface)->GetDDS7());
|
| 2068 | + TRACE_ENTER(2,14,this,14,lpDDSAttachedSurface);
|
| 2069 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2070 | + if(!lpDDSAttachedSurface) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2071 | + TRACE_RET(23,glDDS7->AddAttachedSurface(((glDirectDrawSurface3*)lpDDSAttachedSurface)->GetDDS7()));
|
1788 | 2072 | }
|
1789 | 2073 | HRESULT WINAPI glDirectDrawSurface3::AddOverlayDirtyRect(LPRECT lpRect)
|
1790 | 2074 | {
|
1791 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1792 | | - return glDDS7->AddOverlayDirtyRect(lpRect);
|
| 2075 | + TRACE_ENTER(2,14,this,26,lpRect);
|
| 2076 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2077 | + TRACE_RET(23,glDDS7->AddOverlayDirtyRect(lpRect));
|
1793 | 2078 | }
|
1794 | 2079 | HRESULT WINAPI glDirectDrawSurface3::Blt(LPRECT lpDestRect, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
1795 | 2080 | {
|
1796 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1797 | | - if(lpDDSrcSurface) return glDDS7->Blt(lpDestRect,((glDirectDrawSurface3*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx);
|
1798 | | - else return glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx);
|
| 2081 | + TRACE_ENTER(6,14,this,26,lpDestRect,14,lpDDSrcSurface,26,lpSrcRect,9,dwFlags,14,lpDDBltFx);
|
| 2082 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2083 | + if(lpDDSrcSurface) {TRACE_RET(23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface3*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx));}
|
| 2084 | + else TRACE_RET(23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
1799 | 2085 | }
|
1800 | 2086 | HRESULT WINAPI glDirectDrawSurface3::BltBatch(LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags)
|
1801 | 2087 | {
|
1802 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1803 | | - return glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags);
|
| 2088 | + TRACE_ENTER(4,14,this,14,lpDDBltBatch,8,dwCount,9,dwFlags);
|
| 2089 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2090 | + TRACE_RET(23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
1804 | 2091 | }
|
1805 | 2092 | HRESULT WINAPI glDirectDrawSurface3::BltFast(DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans)
|
1806 | 2093 | {
|
1807 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1808 | | - return glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface3*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans);
|
| 2094 | + TRACE_ENTER(6,14,this,8,dwX,8,dwY,14,lpDDSrcSurface,26,lpSrcRect,9,dwTrans);
|
| 2095 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2096 | + TRACE_RET(23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface3*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
1809 | 2097 | }
|
1810 | 2098 | HRESULT WINAPI glDirectDrawSurface3::DeleteAttachedSurface(DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface)
|
1811 | 2099 | {
|
1812 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1813 | | - return glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface);
|
| 2100 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSAttachedSurface);
|
| 2101 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2102 | + TRACE_RET(23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
1814 | 2103 | }
|
1815 | 2104 | HRESULT WINAPI glDirectDrawSurface3::EnumAttachedSurfaces(LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback)
|
1816 | 2105 | {
|
1817 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1818 | | - return glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback);
|
| 2106 | + TRACE_ENTER(3,14,this,14,lpContext,14,lpEnumSurfacesCallback);
|
| 2107 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2108 | + TRACE_RET(23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
1819 | 2109 | }
|
1820 | 2110 | HRESULT WINAPI glDirectDrawSurface3::EnumOverlayZOrders(DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback)
|
1821 | 2111 | {
|
1822 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1823 | | - return glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback);
|
| 2112 | + TRACE_ENTER(4,14,this,9,dwFlags,14,lpContext,14,lpfnCallback);
|
| 2113 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2114 | + TRACE_RET(23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
1824 | 2115 | }
|
1825 | 2116 | HRESULT WINAPI glDirectDrawSurface3::Flip(LPDIRECTDRAWSURFACE3 lpDDSurfaceTargetOverride, DWORD dwFlags)
|
1826 | 2117 | {
|
1827 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2118 | + TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
| 2119 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1828 | 2120 | if(lpDDSurfaceTargetOverride)
|
1829 | | - return glDDS7->Flip(((glDirectDrawSurface3*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags);
|
1830 | | - else return glDDS7->Flip(NULL,dwFlags);
|
| 2121 | + {TRACE_RET(23,glDDS7->Flip(((glDirectDrawSurface3*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
| 2122 | + else TRACE_RET(23,glDDS7->Flip(NULL,dwFlags));
|
1831 | 2123 | }
|
1832 | 2124 | HRESULT WINAPI glDirectDrawSurface3::GetAttachedSurface(LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE3 FAR *lplpDDAttachedSurface)
|
1833 | 2125 | {
|
1834 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2126 | + TRACE_ENTER(3,14,this,14,lpDDSCaps,14,lplpDDAttachedSurface);
|
| 2127 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1835 | 2128 | HRESULT error;
|
1836 | 2129 | glDirectDrawSurface7 *attachedsurface;
|
1837 | 2130 | glDirectDrawSurface3 *attached1;
|
— | — | @@ -1843,244 +2136,298 @@ |
1844 | 2137 | attachedsurface->QueryInterface(IID_IDirectDrawSurface3,(void **)&attached1);
|
1845 | 2138 | attachedsurface->Release();
|
1846 | 2139 | *lplpDDAttachedSurface = attached1;
|
| 2140 | + TRACE_VAR("*lplpDDAttachedSurface",14,*lplpDDAttachedSurface);
|
1847 | 2141 | }
|
| 2142 | + TRACE_EXIT(23,error);
|
1848 | 2143 | return error;
|
1849 | 2144 | }
|
1850 | 2145 | HRESULT WINAPI glDirectDrawSurface3::GetBltStatus(DWORD dwFlags)
|
1851 | 2146 | {
|
1852 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1853 | | - return glDDS7->GetBltStatus(dwFlags);
|
| 2147 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2148 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2149 | + TRACE_RET(23,glDDS7->GetBltStatus(dwFlags));
|
1854 | 2150 | }
|
1855 | 2151 | HRESULT WINAPI glDirectDrawSurface3::GetCaps(LPDDSCAPS lpDDSCaps)
|
1856 | 2152 | {
|
1857 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1858 | | - if(!lpDDSCaps) return DDERR_INVALIDPARAMS;
|
| 2153 | + TRACE_ENTER(2,14,this,14,lpDDSCaps);
|
| 2154 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2155 | + if(!lpDDSCaps) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1859 | 2156 | HRESULT error;
|
1860 | 2157 | DDSCAPS2 ddsCaps1;
|
1861 | 2158 | error = glDDS7->GetCaps(&ddsCaps1);
|
1862 | 2159 | ZeroMemory(&ddsCaps1,sizeof(DDSCAPS2));
|
1863 | 2160 | memcpy(lpDDSCaps,&ddsCaps1,sizeof(DDSCAPS));
|
| 2161 | + TRACE_EXIT(23,error);
|
1864 | 2162 | return error;
|
1865 | 2163 | }
|
1866 | 2164 | HRESULT WINAPI glDirectDrawSurface3::GetClipper(LPDIRECTDRAWCLIPPER FAR *lplpDDClipper)
|
1867 | 2165 | {
|
1868 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1869 | | - return glDDS7->GetClipper(lplpDDClipper);
|
| 2166 | + TRACE_ENTER(2,14,this,14,lplpDDClipper);
|
| 2167 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2168 | + TRACE_RET(23,glDDS7->GetClipper(lplpDDClipper));
|
1870 | 2169 | }
|
1871 | 2170 | HRESULT WINAPI glDirectDrawSurface3::GetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1872 | 2171 | {
|
1873 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1874 | | - return glDDS7->GetColorKey(dwFlags,lpDDColorKey);
|
| 2172 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
| 2173 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2174 | + TRACE_RET(23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
1875 | 2175 | }
|
1876 | 2176 | HRESULT WINAPI glDirectDrawSurface3::GetDC(HDC FAR *lphDC)
|
1877 | 2177 | {
|
1878 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1879 | | - return glDDS7->GetDC(lphDC);
|
| 2178 | + TRACE_ENTER(2,14,this,14,lphDC);
|
| 2179 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2180 | + TRACE_RET(23,glDDS7->GetDC(lphDC));
|
1880 | 2181 | }
|
1881 | 2182 | HRESULT WINAPI glDirectDrawSurface3::GetFlipStatus(DWORD dwFlags)
|
1882 | 2183 | {
|
1883 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1884 | | - return glDDS7->GetFlipStatus(dwFlags);
|
| 2184 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2185 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2186 | + TRACE_RET(23,glDDS7->GetFlipStatus(dwFlags));
|
1885 | 2187 | }
|
1886 | 2188 | HRESULT WINAPI glDirectDrawSurface3::GetOverlayPosition(LPLONG lplX, LPLONG lplY)
|
1887 | 2189 | {
|
1888 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1889 | | - return glDDS7->GetOverlayPosition(lplX,lplY);
|
| 2190 | + TRACE_ENTER(3,14,this,14,lplX,14,lplY);
|
| 2191 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2192 | + TRACE_RET(23,glDDS7->GetOverlayPosition(lplX,lplY));
|
1890 | 2193 | }
|
1891 | 2194 | HRESULT WINAPI glDirectDrawSurface3::GetPalette(LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
1892 | 2195 | {
|
1893 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1894 | | - return glDDS7->GetPalette(lplpDDPalette);
|
| 2196 | + TRACE_ENTER(2,14,this,14,lplpDDPalette);
|
| 2197 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2198 | + TRACE_RET(23,glDDS7->GetPalette(lplpDDPalette));
|
1895 | 2199 | }
|
1896 | 2200 | HRESULT WINAPI glDirectDrawSurface3::GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat)
|
1897 | 2201 | {
|
1898 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1899 | | - return glDDS7->GetPixelFormat(lpDDPixelFormat);
|
| 2202 | + TRACE_ENTER(2,14,this,14,lpDDPixelFormat);
|
| 2203 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2204 | + TRACE_RET(23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
1900 | 2205 | }
|
1901 | 2206 | HRESULT WINAPI glDirectDrawSurface3::GetSurfaceDesc(LPDDSURFACEDESC lpDDSurfaceDesc)
|
1902 | 2207 | {
|
1903 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1904 | | - return glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc);
|
| 2208 | + TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
| 2209 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2210 | + TRACE_RET(23,glDDS7->GetSurfaceDesc((LPDDSURFACEDESC2)lpDDSurfaceDesc));
|
1905 | 2211 | }
|
1906 | 2212 | HRESULT WINAPI glDirectDrawSurface3::Initialize(LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc)
|
1907 | 2213 | {
|
1908 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2214 | + TRACE_ENTER(3,14,this,14,lpDD,14,lpDDSurfaceDesc);
|
| 2215 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2216 | + TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
1909 | 2217 | return DDERR_ALREADYINITIALIZED;
|
1910 | 2218 | }
|
1911 | 2219 | HRESULT WINAPI glDirectDrawSurface3::IsLost()
|
1912 | 2220 | {
|
1913 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1914 | | - return glDDS7->IsLost();
|
| 2221 | + TRACE_ENTER(1,14,this);
|
| 2222 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2223 | + TRACE_RET(23,glDDS7->IsLost());
|
1915 | 2224 | }
|
1916 | 2225 | HRESULT WINAPI glDirectDrawSurface3::Lock(LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
1917 | 2226 | {
|
1918 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1919 | | - return glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent);
|
| 2227 | + TRACE_ENTER(5,14,this,26,lpDestRect,14,lpDDSurfaceDesc,9,dwFlags,14,hEvent);
|
| 2228 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2229 | + TRACE_RET(23,glDDS7->Lock(lpDestRect,(LPDDSURFACEDESC2)lpDDSurfaceDesc,dwFlags,hEvent));
|
1920 | 2230 | }
|
1921 | 2231 | HRESULT WINAPI glDirectDrawSurface3::ReleaseDC(HDC hDC)
|
1922 | 2232 | {
|
1923 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1924 | | - return glDDS7->ReleaseDC(hDC);
|
| 2233 | + TRACE_ENTER(2,14,this,14,hDC);
|
| 2234 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2235 | + TRACE_RET(23,glDDS7->ReleaseDC(hDC));
|
1925 | 2236 | }
|
1926 | 2237 | HRESULT WINAPI glDirectDrawSurface3::Restore()
|
1927 | 2238 | {
|
1928 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1929 | | - return glDDS7->Restore();
|
| 2239 | + TRACE_ENTER(1,14,this);
|
| 2240 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2241 | + TRACE_RET(23,glDDS7->Restore());
|
1930 | 2242 | }
|
1931 | 2243 | HRESULT WINAPI glDirectDrawSurface3::SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper)
|
1932 | 2244 | {
|
1933 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1934 | | - return glDDS7->SetClipper(lpDDClipper);
|
| 2245 | + TRACE_ENTER(2,14,this,14,lpDDClipper);
|
| 2246 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2247 | + TRACE_RET(23,glDDS7->SetClipper(lpDDClipper));
|
1935 | 2248 | }
|
1936 | 2249 | HRESULT WINAPI glDirectDrawSurface3::SetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
1937 | 2250 | {
|
1938 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1939 | | - return glDDS7->SetColorKey(dwFlags,lpDDColorKey);
|
| 2251 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
| 2252 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2253 | + TRACE_RET(23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
1940 | 2254 | }
|
1941 | 2255 | HRESULT WINAPI glDirectDrawSurface3::SetOverlayPosition(LONG lX, LONG lY)
|
1942 | 2256 | {
|
1943 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1944 | | - return glDDS7->SetOverlayPosition(lX,lY);
|
| 2257 | + TRACE_ENTER(3,14,this,7,lX,7,lY);
|
| 2258 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2259 | + TRACE_RET(23,glDDS7->SetOverlayPosition(lX,lY));
|
1945 | 2260 | }
|
1946 | 2261 | HRESULT WINAPI glDirectDrawSurface3::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
1947 | 2262 | {
|
1948 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1949 | | - return glDDS7->SetPalette(lpDDPalette);
|
| 2263 | + TRACE_ENTER(2,14,this,14,lpDDPalette);
|
| 2264 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2265 | + TRACE_RET(23,glDDS7->SetPalette(lpDDPalette));
|
1950 | 2266 | }
|
1951 | 2267 | HRESULT WINAPI glDirectDrawSurface3::Unlock(LPVOID lpSurfaceData)
|
1952 | 2268 | {
|
1953 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1954 | | - return glDDS7->Unlock2(lpSurfaceData);
|
| 2269 | + TRACE_ENTER(2,14,this,14,lpSurfaceData);
|
| 2270 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2271 | + TRACE_RET(23,glDDS7->Unlock2(lpSurfaceData));
|
1955 | 2272 | }
|
1956 | 2273 | HRESULT WINAPI glDirectDrawSurface3::UpdateOverlay(LPRECT lpSrcRect, LPDIRECTDRAWSURFACE3 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx)
|
1957 | 2274 | {
|
1958 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1959 | | - return glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx);
|
| 2275 | + TRACE_ENTER(6,14,this,26,lpSrcRect,14,lpDDDestSurface,26,lpDestRect,9,dwFlags,14,lpDDOverlayFx);
|
| 2276 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2277 | + TRACE_RET(23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
1960 | 2278 | }
|
1961 | 2279 | HRESULT WINAPI glDirectDrawSurface3::UpdateOverlayDisplay(DWORD dwFlags)
|
1962 | 2280 | {
|
1963 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1964 | | - return glDDS7->UpdateOverlayDisplay(dwFlags);
|
| 2281 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2282 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2283 | + TRACE_RET(23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
1965 | 2284 | }
|
1966 | 2285 | HRESULT WINAPI glDirectDrawSurface3::UpdateOverlayZOrder(DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSReference)
|
1967 | 2286 | {
|
1968 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1969 | | - return glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference);
|
| 2287 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSReference);
|
| 2288 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2289 | + TRACE_RET(23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
1970 | 2290 | }
|
1971 | 2291 | HRESULT WINAPI glDirectDrawSurface3::GetDDInterface(LPVOID FAR *lplpDD)
|
1972 | 2292 | {
|
1973 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2293 | + TRACE_ENTER(2,14,this,14,lplpDD);
|
| 2294 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1974 | 2295 | glDirectDraw7 *glDD7;
|
1975 | 2296 | HRESULT ret = glDDS7->GetDDInterface((void**)&glDD7);
|
1976 | | - if(ret != DD_OK) return ret;
|
| 2297 | + if(ret != DD_OK) TRACE_RET(23,ret);
|
1977 | 2298 | glDD7->QueryInterface(IID_IDirectDraw,lplpDD);
|
1978 | 2299 | glDD7->Release();
|
| 2300 | + TRACE_VAR("*lplpDD",14,*lplpDD);
|
| 2301 | + TRACE_EXIT(23,ret);
|
1979 | 2302 | return ret;
|
1980 | 2303 | }
|
1981 | 2304 | HRESULT WINAPI glDirectDrawSurface3::PageLock(DWORD dwFlags)
|
1982 | 2305 | {
|
1983 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1984 | | - return glDDS7->PageLock(dwFlags);
|
| 2306 | + TRACE_ENTER(2,14,this,14,dwFlags);
|
| 2307 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2308 | + TRACE_RET(23,glDDS7->PageLock(dwFlags));
|
1985 | 2309 | }
|
1986 | 2310 | HRESULT WINAPI glDirectDrawSurface3::PageUnlock(DWORD dwFlags)
|
1987 | 2311 | {
|
1988 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1989 | | - return glDDS7->PageUnlock(dwFlags);
|
| 2312 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2313 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2314 | + TRACE_RET(23,glDDS7->PageUnlock(dwFlags));
|
1990 | 2315 | }
|
1991 | 2316 | HRESULT WINAPI glDirectDrawSurface3::SetSurfaceDesc(LPDDSURFACEDESC lpddsd, DWORD dwFlags)
|
1992 | 2317 | {
|
1993 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1994 | | - return glDDS7->SetSurfaceDesc((LPDDSURFACEDESC2)lpddsd,dwFlags);
|
| 2318 | + TRACE_ENTER(3,14,this,14,lpddsd,9,dwFlags);
|
| 2319 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2320 | + TRACE_RET(23,glDDS7->SetSurfaceDesc((LPDDSURFACEDESC2)lpddsd,dwFlags));
|
1995 | 2321 | }
|
1996 | 2322 |
|
1997 | 2323 | // DDRAW4 wrapper
|
1998 | 2324 | glDirectDrawSurface4::glDirectDrawSurface4(glDirectDrawSurface7 *gl_DDS7)
|
1999 | 2325 | {
|
| 2326 | + TRACE_ENTER(2,14,this,14,gl_DDS7);
|
2000 | 2327 | glDDS7 = gl_DDS7;
|
2001 | 2328 | refcount = 1;
|
| 2329 | + TRACE_EXIT(-1,0);
|
2002 | 2330 | }
|
2003 | 2331 | glDirectDrawSurface4::~glDirectDrawSurface4()
|
2004 | 2332 | {
|
| 2333 | + TRACE_ENTER(1,14,this);
|
2005 | 2334 | glDDS7->dds4 = NULL;
|
2006 | 2335 | glDDS7->Release();
|
| 2336 | + TRACE_EXIT(-1,0);
|
2007 | 2337 | }
|
2008 | 2338 | HRESULT WINAPI glDirectDrawSurface4::QueryInterface(REFIID riid, void** ppvObj)
|
2009 | 2339 | {
|
2010 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2340 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 2341 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2011 | 2342 | if(riid == IID_IUnknown)
|
2012 | 2343 | {
|
2013 | 2344 | this->AddRef();
|
2014 | 2345 | *ppvObj = this;
|
| 2346 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 2347 | + TRACE_EXIT(23,DD_OK);
|
2015 | 2348 | return DD_OK;
|
2016 | 2349 | }
|
2017 | | - return glDDS7->QueryInterface(riid,ppvObj);
|
| 2350 | + TRACE_RET(23,glDDS7->QueryInterface(riid,ppvObj));
|
2018 | 2351 | }
|
2019 | 2352 | ULONG WINAPI glDirectDrawSurface4::AddRef()
|
2020 | 2353 | {
|
2021 | | - if(!this) return 0;
|
| 2354 | + TRACE_ENTER(1,14,this);
|
| 2355 | + if(!this) TRACE_RET(8,0);
|
2022 | 2356 | refcount++;
|
| 2357 | + TRACE_EXIT(8,refcount);
|
2023 | 2358 | return refcount;
|
2024 | 2359 | }
|
2025 | 2360 | ULONG WINAPI glDirectDrawSurface4::Release()
|
2026 | 2361 | {
|
2027 | | - if(!this) return 0;
|
| 2362 | + TRACE_ENTER(1,14,this);
|
| 2363 | + if(!this) TRACE_RET(8,0);
|
2028 | 2364 | ULONG ret;
|
2029 | 2365 | refcount--;
|
2030 | 2366 | ret = refcount;
|
2031 | 2367 | if(refcount == 0) delete this;
|
| 2368 | + TRACE_EXIT(8,ret);
|
2032 | 2369 | return ret;
|
2033 | 2370 | }
|
2034 | 2371 | HRESULT WINAPI glDirectDrawSurface4::AddAttachedSurface(LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface)
|
2035 | 2372 | {
|
2036 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2037 | | - return glDDS7->AddAttachedSurface(((glDirectDrawSurface4*)lpDDSAttachedSurface)->GetDDS7());
|
| 2373 | + TRACE_ENTER(2,14,this,14,lpDDSAttachedSurface);
|
| 2374 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2375 | + TRACE_RET(23,glDDS7->AddAttachedSurface(((glDirectDrawSurface4*)lpDDSAttachedSurface)->GetDDS7()));
|
2038 | 2376 | }
|
2039 | 2377 | HRESULT WINAPI glDirectDrawSurface4::AddOverlayDirtyRect(LPRECT lpRect)
|
2040 | 2378 | {
|
2041 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2042 | | - return glDDS7->AddOverlayDirtyRect(lpRect);
|
| 2379 | + TRACE_ENTER(2,14,this,26,lpRect);
|
| 2380 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2381 | + TRACE_RET(23,glDDS7->AddOverlayDirtyRect(lpRect));
|
2043 | 2382 | }
|
2044 | 2383 | HRESULT WINAPI glDirectDrawSurface4::Blt(LPRECT lpDestRect, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
2045 | 2384 | {
|
2046 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2047 | | - if(lpDDSrcSurface) return glDDS7->Blt(lpDestRect,((glDirectDrawSurface4*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx);
|
2048 | | - else return glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx);
|
| 2385 | + TRACE_ENTER(6,14,this,26,lpDestRect,14,lpDDSrcSurface,26,lpSrcRect,9,dwFlags,14,lpDDBltFx);
|
| 2386 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2387 | + if(lpDDSrcSurface) {TRACE_RET(23,glDDS7->Blt(lpDestRect,((glDirectDrawSurface4*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwFlags,lpDDBltFx));}
|
| 2388 | + else TRACE_RET(23,glDDS7->Blt(lpDestRect,NULL,lpSrcRect,dwFlags,lpDDBltFx));
|
2049 | 2389 | }
|
2050 | 2390 | HRESULT WINAPI glDirectDrawSurface4::BltBatch(LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags)
|
2051 | 2391 | {
|
2052 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2053 | | - return glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags);
|
| 2392 | + TRACE_ENTER(4,14,this,14,lpDDBltBatch,8,dwCount,9,dwFlags);
|
| 2393 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2394 | + TRACE_RET(23,glDDS7->BltBatch(lpDDBltBatch,dwCount,dwFlags));
|
2054 | 2395 | }
|
2055 | 2396 | HRESULT WINAPI glDirectDrawSurface4::BltFast(DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans)
|
2056 | 2397 | {
|
2057 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2058 | | - return glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface4*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans);
|
| 2398 | + TRACE_ENTER(6,14,this,8,dwX,8,dwY,14,lpDDSrcSurface,26,lpSrcRect,9,dwTrans);
|
| 2399 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2400 | + TRACE_RET(23,glDDS7->BltFast(dwX,dwY,((glDirectDrawSurface4*)lpDDSrcSurface)->GetDDS7(),lpSrcRect,dwTrans));
|
2059 | 2401 | }
|
2060 | 2402 | HRESULT WINAPI glDirectDrawSurface4::DeleteAttachedSurface(DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface)
|
2061 | 2403 | {
|
2062 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2063 | | - return glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface);
|
| 2404 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSAttachedSurface);
|
| 2405 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2406 | + TRACE_RET(23,glDDS7->DeleteAttachedSurface(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSAttachedSurface));
|
2064 | 2407 | }
|
2065 | 2408 | HRESULT WINAPI glDirectDrawSurface4::EnumAttachedSurfaces(LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpEnumSurfacesCallback)
|
2066 | 2409 | {
|
2067 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2068 | | - return glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback);
|
| 2410 | + TRACE_ENTER(3,14,this,14,lpContext,14,lpEnumSurfacesCallback);
|
| 2411 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2412 | + TRACE_RET(23,glDDS7->EnumAttachedSurfaces(lpContext,(LPDDENUMSURFACESCALLBACK7)lpEnumSurfacesCallback));
|
2069 | 2413 | }
|
2070 | 2414 | HRESULT WINAPI glDirectDrawSurface4::EnumOverlayZOrders(DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpfnCallback)
|
2071 | 2415 | {
|
2072 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2073 | | - return glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback);
|
| 2416 | + TRACE_ENTER(4,14,this,9,dwFlags,14,lpContext,14,lpfnCallback);
|
| 2417 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2418 | + TRACE_RET(23,glDDS7->EnumOverlayZOrders(dwFlags,lpContext,(LPDDENUMSURFACESCALLBACK7)lpfnCallback));
|
2074 | 2419 | }
|
2075 | 2420 | HRESULT WINAPI glDirectDrawSurface4::Flip(LPDIRECTDRAWSURFACE4 lpDDSurfaceTargetOverride, DWORD dwFlags)
|
2076 | 2421 | {
|
2077 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2422 | + TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
| 2423 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2078 | 2424 | if(lpDDSurfaceTargetOverride)
|
2079 | | - return glDDS7->Flip(((glDirectDrawSurface4*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags);
|
2080 | | - else return glDDS7->Flip(NULL,dwFlags);
|
| 2425 | + {TRACE_RET(23,glDDS7->Flip(((glDirectDrawSurface4*)lpDDSurfaceTargetOverride)->GetDDS7(),dwFlags));}
|
| 2426 | + else TRACE_RET(23,glDDS7->Flip(NULL,dwFlags));
|
2081 | 2427 | }
|
2082 | 2428 | HRESULT WINAPI glDirectDrawSurface4::GetAttachedSurface(LPDDSCAPS2 lpDDSCaps2, LPDIRECTDRAWSURFACE4 FAR *lplpDDAttachedSurface)
|
2083 | 2429 | {
|
2084 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2430 | + TRACE_ENTER(3,14,this,14,lpDDSCaps2,14,lplpDDAttachedSurface);
|
| 2431 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2085 | 2432 | HRESULT error;
|
2086 | 2433 | glDirectDrawSurface7 *attachedsurface;
|
2087 | 2434 | glDirectDrawSurface4 *attached1;
|
— | — | @@ -2090,166 +2437,201 @@ |
2091 | 2438 | attachedsurface->QueryInterface(IID_IDirectDrawSurface4,(void **)&attached1);
|
2092 | 2439 | attachedsurface->Release();
|
2093 | 2440 | *lplpDDAttachedSurface = attached1;
|
| 2441 | + TRACE_VAR("*lplpDDAttachedSurface",14,*lplpDDAttachedSurface);
|
2094 | 2442 | }
|
| 2443 | + TRACE_EXIT(23,error);
|
2095 | 2444 | return error;
|
2096 | 2445 | }
|
2097 | 2446 | HRESULT WINAPI glDirectDrawSurface4::GetBltStatus(DWORD dwFlags)
|
2098 | 2447 | {
|
2099 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2100 | | - return glDDS7->GetBltStatus(dwFlags);
|
| 2448 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2449 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2450 | + TRACE_RET(23,glDDS7->GetBltStatus(dwFlags));
|
2101 | 2451 | }
|
2102 | 2452 | HRESULT WINAPI glDirectDrawSurface4::GetCaps(LPDDSCAPS2 lpDDSCaps)
|
2103 | 2453 | {
|
2104 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2105 | | - return glDDS7->GetCaps(lpDDSCaps);
|
| 2454 | + TRACE_ENTER(2,14,this,14,lpDDSCaps);
|
| 2455 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2456 | + TRACE_RET(23,glDDS7->GetCaps(lpDDSCaps));
|
2106 | 2457 | }
|
2107 | 2458 | HRESULT WINAPI glDirectDrawSurface4::GetClipper(LPDIRECTDRAWCLIPPER FAR *lplpDDClipper)
|
2108 | 2459 | {
|
2109 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2110 | | - return glDDS7->GetClipper(lplpDDClipper);
|
| 2460 | + TRACE_ENTER(2,14,this,14,lplpDDClipper);
|
| 2461 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2462 | + TRACE_RET(23,glDDS7->GetClipper(lplpDDClipper));
|
2111 | 2463 | }
|
2112 | 2464 | HRESULT WINAPI glDirectDrawSurface4::GetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
2113 | 2465 | {
|
2114 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2115 | | - return glDDS7->GetColorKey(dwFlags,lpDDColorKey);
|
| 2466 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
| 2467 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2468 | + TRACE_RET(23,glDDS7->GetColorKey(dwFlags,lpDDColorKey));
|
2116 | 2469 | }
|
2117 | 2470 | HRESULT WINAPI glDirectDrawSurface4::GetDC(HDC FAR *lphDC)
|
2118 | 2471 | {
|
2119 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2120 | | - return glDDS7->GetDC(lphDC);
|
| 2472 | + TRACE_ENTER(2,14,this,14,lphDC);
|
| 2473 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2474 | + TRACE_RET(23,glDDS7->GetDC(lphDC));
|
2121 | 2475 | }
|
2122 | 2476 | HRESULT WINAPI glDirectDrawSurface4::GetFlipStatus(DWORD dwFlags)
|
2123 | 2477 | {
|
2124 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2125 | | - return glDDS7->GetFlipStatus(dwFlags);
|
| 2478 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2479 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2480 | + TRACE_RET(23,glDDS7->GetFlipStatus(dwFlags));
|
2126 | 2481 | }
|
2127 | 2482 | HRESULT WINAPI glDirectDrawSurface4::GetOverlayPosition(LPLONG lplX, LPLONG lplY)
|
2128 | 2483 | {
|
2129 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2130 | | - return glDDS7->GetOverlayPosition(lplX,lplY);
|
| 2484 | + TRACE_ENTER(3,14,this,14,lplX,14,lplY);
|
| 2485 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2486 | + TRACE_RET(23,glDDS7->GetOverlayPosition(lplX,lplY));
|
2131 | 2487 | }
|
2132 | 2488 | HRESULT WINAPI glDirectDrawSurface4::GetPalette(LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
2133 | 2489 | {
|
2134 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2135 | | - return glDDS7->GetPalette(lplpDDPalette);
|
| 2490 | + TRACE_ENTER(2,14,this,14,lplpDDPalette);
|
| 2491 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2492 | + TRACE_RET(23,glDDS7->GetPalette(lplpDDPalette));
|
2136 | 2493 | }
|
2137 | 2494 | HRESULT WINAPI glDirectDrawSurface4::GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat)
|
2138 | 2495 | {
|
2139 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2140 | | - return glDDS7->GetPixelFormat(lpDDPixelFormat);
|
| 2496 | + TRACE_ENTER(2,14,this,14,lpDDPixelFormat);
|
| 2497 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2498 | + TRACE_RET(23,glDDS7->GetPixelFormat(lpDDPixelFormat));
|
2141 | 2499 | }
|
2142 | 2500 | HRESULT WINAPI glDirectDrawSurface4::GetSurfaceDesc(LPDDSURFACEDESC2 lpDDSurfaceDesc)
|
2143 | 2501 | {
|
2144 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2145 | | - return glDDS7->GetSurfaceDesc(lpDDSurfaceDesc);
|
| 2502 | + TRACE_ENTER(2,14,this,14,lpDDSurfaceDesc);
|
| 2503 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2504 | + TRACE_RET(23,glDDS7->GetSurfaceDesc(lpDDSurfaceDesc));
|
2146 | 2505 | }
|
2147 | 2506 | HRESULT WINAPI glDirectDrawSurface4::Initialize(LPDIRECTDRAW lpDD, LPDDSURFACEDESC2 lpDDSurfaceDesc)
|
2148 | 2507 | {
|
2149 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2508 | + TRACE_ENTER(3,14,this,14,lpDD,14,lpDDSurfaceDesc);
|
| 2509 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2510 | + TRACE_EXIT(23,DDERR_ALREADYINITIALIZED);
|
2150 | 2511 | return DDERR_ALREADYINITIALIZED;
|
2151 | 2512 | }
|
2152 | 2513 | HRESULT WINAPI glDirectDrawSurface4::IsLost()
|
2153 | 2514 | {
|
2154 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2155 | | - return glDDS7->IsLost();
|
| 2515 | + TRACE_ENTER(1,14,this);
|
| 2516 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2517 | + TRACE_RET(23,glDDS7->IsLost());
|
2156 | 2518 | }
|
2157 | 2519 | HRESULT WINAPI glDirectDrawSurface4::Lock(LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
2158 | 2520 | {
|
2159 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2160 | | - return glDDS7->Lock(lpDestRect,lpDDSurfaceDesc,dwFlags,hEvent);
|
| 2521 | + TRACE_ENTER(5,14,this,26,lpDestRect,14,lpDDSurfaceDesc,9,dwFlags,14,hEvent);
|
| 2522 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2523 | + TRACE_RET(23,glDDS7->Lock(lpDestRect,lpDDSurfaceDesc,dwFlags,hEvent));
|
2161 | 2524 | }
|
2162 | 2525 | HRESULT WINAPI glDirectDrawSurface4::ReleaseDC(HDC hDC)
|
2163 | 2526 | {
|
2164 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2165 | | - return glDDS7->ReleaseDC(hDC);
|
| 2527 | + TRACE_ENTER(2,14,this,14,hDC);
|
| 2528 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2529 | + TRACE_RET(23,glDDS7->ReleaseDC(hDC));
|
2166 | 2530 | }
|
2167 | 2531 | HRESULT WINAPI glDirectDrawSurface4::Restore()
|
2168 | 2532 | {
|
2169 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2170 | | - return glDDS7->Restore();
|
| 2533 | + TRACE_ENTER(1,14,this);
|
| 2534 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2535 | + TRACE_RET(23,glDDS7->Restore());
|
2171 | 2536 | }
|
2172 | 2537 | HRESULT WINAPI glDirectDrawSurface4::SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper)
|
2173 | 2538 | {
|
2174 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2175 | | - return glDDS7->SetClipper(lpDDClipper);
|
| 2539 | + TRACE_ENTER(2,14,this,14,lpDDClipper);
|
| 2540 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2541 | + TRACE_RET(23,glDDS7->SetClipper(lpDDClipper));
|
2176 | 2542 | }
|
2177 | 2543 | HRESULT WINAPI glDirectDrawSurface4::SetColorKey(DWORD dwFlags, LPDDCOLORKEY lpDDColorKey)
|
2178 | 2544 | {
|
2179 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2180 | | - return glDDS7->SetColorKey(dwFlags,lpDDColorKey);
|
| 2545 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDColorKey);
|
| 2546 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2547 | + TRACE_RET(23,glDDS7->SetColorKey(dwFlags,lpDDColorKey));
|
2181 | 2548 | }
|
2182 | 2549 | HRESULT WINAPI glDirectDrawSurface4::SetOverlayPosition(LONG lX, LONG lY)
|
2183 | 2550 | {
|
2184 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2185 | | - return glDDS7->SetOverlayPosition(lX,lY);
|
| 2551 | + TRACE_ENTER(3,14,this,7,lX,7,lY);
|
| 2552 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2553 | + TRACE_RET(23,glDDS7->SetOverlayPosition(lX,lY));
|
2186 | 2554 | }
|
2187 | 2555 | HRESULT WINAPI glDirectDrawSurface4::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
2188 | 2556 | {
|
2189 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2190 | | - return glDDS7->SetPalette(lpDDPalette);
|
| 2557 | + TRACE_ENTER(2,14,this,14,lpDDPalette);
|
| 2558 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2559 | + TRACE_RET(23,glDDS7->SetPalette(lpDDPalette));
|
2191 | 2560 | }
|
2192 | 2561 | HRESULT WINAPI glDirectDrawSurface4::Unlock(LPRECT lpRect)
|
2193 | 2562 | {
|
2194 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2195 | | - return glDDS7->Unlock2(lpRect);
|
| 2563 | + TRACE_ENTER(2,14,this,26,lpRect);
|
| 2564 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2565 | + TRACE_RET(23,glDDS7->Unlock2(lpRect));
|
2196 | 2566 | }
|
2197 | 2567 | HRESULT WINAPI glDirectDrawSurface4::UpdateOverlay(LPRECT lpSrcRect, LPDIRECTDRAWSURFACE4 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx)
|
2198 | 2568 | {
|
2199 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2200 | | - return glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx);
|
| 2569 | + TRACE_ENTER(6,14,this,26,lpSrcRect,14,lpDDDestSurface,26,lpDestRect,9,dwFlags,14,lpDDOverlayFx);
|
| 2570 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2571 | + TRACE_RET(23,glDDS7->UpdateOverlay(lpSrcRect,(LPDIRECTDRAWSURFACE7)lpDDDestSurface,lpDestRect,dwFlags,lpDDOverlayFx));
|
2201 | 2572 | }
|
2202 | 2573 | HRESULT WINAPI glDirectDrawSurface4::UpdateOverlayDisplay(DWORD dwFlags)
|
2203 | 2574 | {
|
2204 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2205 | | - return glDDS7->UpdateOverlayDisplay(dwFlags);
|
| 2575 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2576 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2577 | + TRACE_RET(23,glDDS7->UpdateOverlayDisplay(dwFlags));
|
2206 | 2578 | }
|
2207 | 2579 | HRESULT WINAPI glDirectDrawSurface4::UpdateOverlayZOrder(DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSReference)
|
2208 | 2580 | {
|
2209 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2210 | | - return glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference);
|
| 2581 | + TRACE_ENTER(3,14,this,9,dwFlags,14,lpDDSReference);
|
| 2582 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2583 | + TRACE_RET(23,glDDS7->UpdateOverlayZOrder(dwFlags,(LPDIRECTDRAWSURFACE7)lpDDSReference));
|
2211 | 2584 | }
|
2212 | 2585 | HRESULT WINAPI glDirectDrawSurface4::GetDDInterface(LPVOID FAR *lplpDD)
|
2213 | 2586 | {
|
2214 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2215 | | - return glDDS7->GetDDInterface(lplpDD);
|
| 2587 | + TRACE_ENTER(2,14,this,14,lplpDD);
|
| 2588 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2589 | + TRACE_RET(23,glDDS7->GetDDInterface(lplpDD));
|
2216 | 2590 | }
|
2217 | 2591 | HRESULT WINAPI glDirectDrawSurface4::PageLock(DWORD dwFlags)
|
2218 | 2592 | {
|
2219 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2220 | | - return glDDS7->PageLock(dwFlags);
|
| 2593 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2594 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2595 | + TRACE_RET(23,glDDS7->PageLock(dwFlags));
|
2221 | 2596 | }
|
2222 | 2597 | HRESULT WINAPI glDirectDrawSurface4::PageUnlock(DWORD dwFlags)
|
2223 | 2598 | {
|
2224 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2225 | | - return glDDS7->PageUnlock(dwFlags);
|
| 2599 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2600 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2601 | + TRACE_RET(23,glDDS7->PageUnlock(dwFlags));
|
2226 | 2602 | }
|
2227 | 2603 | HRESULT WINAPI glDirectDrawSurface4::SetSurfaceDesc(LPDDSURFACEDESC2 lpddsd, DWORD dwFlags)
|
2228 | 2604 | {
|
2229 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2230 | | - return glDDS7->SetSurfaceDesc(lpddsd,dwFlags);
|
| 2605 | + TRACE_ENTER(3,14,this,14,lpddsd,9,dwFlags);
|
| 2606 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2607 | + TRACE_RET(23,glDDS7->SetSurfaceDesc(lpddsd,dwFlags));
|
2231 | 2608 | }
|
2232 | | -HRESULT WINAPI glDirectDrawSurface4::SetPrivateData(REFGUID guidTag, LPVOID lpData, DWORD cbSize, DWORD dwFlags)
|
| 2609 | +HRESULT WINAPI glDirectDrawSurface4::SetPrivateData(REFGUID guidTag, LPVOID lpData, DWORD cbSize, DWORD dwFlags)
|
2233 | 2610 | {
|
2234 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2235 | | - return glDDS7->SetPrivateData(guidTag,lpData,cbSize,dwFlags);
|
| 2611 | + TRACE_ENTER(5,14,this,24,&guidTag,14,lpData,8,cbSize,9,dwFlags);
|
| 2612 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2613 | + TRACE_RET(23,glDDS7->SetPrivateData(guidTag,lpData,cbSize,dwFlags));
|
2236 | 2614 | }
|
2237 | | -HRESULT WINAPI glDirectDrawSurface4::GetPrivateData(REFGUID guidTag, LPVOID lpBuffer, LPDWORD lpcbBufferSize)
|
| 2615 | +HRESULT WINAPI glDirectDrawSurface4::GetPrivateData(REFGUID guidTag, LPVOID lpBuffer, LPDWORD lpcbBufferSize)
|
2238 | 2616 | {
|
2239 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2240 | | - return glDDS7->GetPrivateData(guidTag,lpBuffer,lpcbBufferSize);
|
| 2617 | + TRACE_ENTER(4,14,this,24,&guidTag,14,lpBuffer,14,lpcbBufferSize);
|
| 2618 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2619 | + TRACE_RET(23,glDDS7->GetPrivateData(guidTag,lpBuffer,lpcbBufferSize));
|
2241 | 2620 | }
|
2242 | 2621 | HRESULT WINAPI glDirectDrawSurface4::FreePrivateData(REFGUID guidTag)
|
2243 | 2622 | {
|
2244 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2245 | | - return glDDS7->FreePrivateData(guidTag);
|
| 2623 | + TRACE_ENTER(2,14,this,24,&guidTag);
|
| 2624 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2625 | + TRACE_RET(23,glDDS7->FreePrivateData(guidTag));
|
2246 | 2626 | }
|
2247 | 2627 | HRESULT WINAPI glDirectDrawSurface4::GetUniquenessValue(LPDWORD lpValue)
|
2248 | 2628 | {
|
2249 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2250 | | - return glDDS7->GetUniquenessValue(lpValue);
|
| 2629 | + TRACE_ENTER(2,14,this,14,lpValue);
|
| 2630 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2631 | + TRACE_RET(23,glDDS7->GetUniquenessValue(lpValue));
|
2251 | 2632 | }
|
2252 | 2633 | HRESULT WINAPI glDirectDrawSurface4::ChangeUniquenessValue()
|
2253 | 2634 | {
|
2254 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2255 | | - return glDDS7->ChangeUniquenessValue();
|
| 2635 | + TRACE_ENTER(1,14,this);
|
| 2636 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2637 | + TRACE_RET(23,glDDS7->ChangeUniquenessValue());
|
2256 | 2638 | }
|