Index: ddraw/glDirect3DDevice.cpp |
— | — | @@ -274,6 +274,7 @@ |
275 | 275 |
|
276 | 276 | glDirect3DDevice7::glDirect3DDevice7(REFCLSID rclsid, glDirect3D7 *glD3D7, glDirectDrawSurface7 *glDDS7)
|
277 | 277 | {
|
| 278 | + TRACE_ENTER(4,14,this,24,&rclsid,14,glD3D7,14,glDDS7);
|
278 | 279 | int zbuffer = 0;
|
279 | 280 | glD3DDev3 = NULL;
|
280 | 281 | glD3DDev2 = NULL;
|
— | — | @@ -283,6 +284,7 @@ |
284 | 285 | if(!materials)
|
285 | 286 | {
|
286 | 287 | error = DDERR_OUTOFMEMORY;
|
| 288 | + TRACE_EXIT(-1,0);
|
287 | 289 | return;
|
288 | 290 | }
|
289 | 291 | materialcount = 1;
|
— | — | @@ -294,6 +296,7 @@ |
295 | 297 | {
|
296 | 298 | free(materials);
|
297 | 299 | error = DDERR_OUTOFMEMORY;
|
| 300 | + TRACE_EXIT(-1,0);
|
298 | 301 | return;
|
299 | 302 | }
|
300 | 303 | texturecount = 1;
|
— | — | @@ -307,6 +310,7 @@ |
308 | 311 | free(materials);
|
309 | 312 | free(textures);
|
310 | 313 | error = DDERR_OUTOFMEMORY;
|
| 314 | + TRACE_EXIT(-1,0);
|
311 | 315 | return;
|
312 | 316 | }
|
313 | 317 | ZeroMemory(viewports,32*sizeof(glDirect3DViewport3*));
|
— | — | @@ -346,6 +350,7 @@ |
347 | 351 | free(textures);
|
348 | 352 | free(viewports);
|
349 | 353 | error = DDERR_OUTOFMEMORY;
|
| 354 | + TRACE_EXIT(-1,0);
|
350 | 355 | return;
|
351 | 356 | }
|
352 | 357 | ZeroMemory(lights,16*sizeof(glDirect3DLight*));
|
— | — | @@ -361,9 +366,11 @@ |
362 | 367 | mhWorld = mhView = mhProjection = 0;
|
363 | 368 | renderer->InitD3D(zbuffer);
|
364 | 369 | error = D3D_OK;
|
| 370 | + TRACE_EXIT(-1,0);
|
365 | 371 | }
|
366 | 372 | glDirect3DDevice7::~glDirect3DDevice7()
|
367 | 373 | {
|
| 374 | + TRACE_ENTER(1,14,this);
|
368 | 375 | for(int i = 0; i < lightsmax; i++)
|
369 | 376 | if(lights[i]) delete lights[i];
|
370 | 377 | delete lights;
|
— | — | @@ -391,6 +398,7 @@ |
392 | 399 | if(matrices) free(matrices);
|
393 | 400 | glD3D7->Release();
|
394 | 401 | glDDS7->Release();
|
| 402 | + TRACE_EXIT(-1,0);
|
395 | 403 | }
|
396 | 404 |
|
397 | 405 | int ExpandLightBuffer(glDirect3DLight ***lights, DWORD *maxlights, DWORD newmax)
|
— | — | @@ -407,12 +415,15 @@ |
408 | 416 |
|
409 | 417 | HRESULT WINAPI glDirect3DDevice7::QueryInterface(REFIID riid, void** ppvObj)
|
410 | 418 | {
|
411 | | - if(!this) return DDERR_INVALIDOBJECT;
|
412 | | - if(!ppvObj) return DDERR_INVALIDPARAMS;
|
| 419 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 420 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 421 | + if(!ppvObj) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
413 | 422 | if(riid == IID_IUnknown)
|
414 | 423 | {
|
415 | 424 | this->AddRef();
|
416 | 425 | *ppvObj = this;
|
| 426 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 427 | + TRACE_EXIT(23,D3D_OK);
|
417 | 428 | return D3D_OK;
|
418 | 429 | }
|
419 | 430 | if(riid == IID_IDirect3DDevice7)
|
— | — | @@ -419,6 +430,8 @@ |
420 | 431 | {
|
421 | 432 | this->AddRef();
|
422 | 433 | *ppvObj = this;
|
| 434 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 435 | + TRACE_EXIT(23,D3D_OK);
|
423 | 436 | return D3D_OK;
|
424 | 437 | }
|
425 | 438 | if(riid == IID_IDirect3DDevice3)
|
— | — | @@ -427,6 +440,8 @@ |
428 | 441 | {
|
429 | 442 | *ppvObj = glD3DDev3;
|
430 | 443 | glD3DDev3->AddRef();
|
| 444 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 445 | + TRACE_EXIT(23,D3D_OK);
|
431 | 446 | return D3D_OK;
|
432 | 447 | }
|
433 | 448 | else
|
— | — | @@ -434,6 +449,8 @@ |
435 | 450 | this->AddRef();
|
436 | 451 | *ppvObj = new glDirect3DDevice3(this);
|
437 | 452 | glD3DDev3 = (glDirect3DDevice3*)*ppvObj;
|
| 453 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 454 | + TRACE_EXIT(23,D3D_OK);
|
438 | 455 | return D3D_OK;
|
439 | 456 | }
|
440 | 457 | }
|
— | — | @@ -443,6 +460,8 @@ |
444 | 461 | {
|
445 | 462 | *ppvObj = glD3DDev2;
|
446 | 463 | glD3DDev2->AddRef();
|
| 464 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 465 | + TRACE_EXIT(23,D3D_OK);
|
447 | 466 | return D3D_OK;
|
448 | 467 | }
|
449 | 468 | else
|
— | — | @@ -450,6 +469,8 @@ |
451 | 470 | this->AddRef();
|
452 | 471 | *ppvObj = new glDirect3DDevice2(this);
|
453 | 472 | glD3DDev2 = (glDirect3DDevice2*)*ppvObj;
|
| 473 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 474 | + TRACE_EXIT(23,D3D_OK);
|
454 | 475 | return D3D_OK;
|
455 | 476 | }
|
456 | 477 | }
|
— | — | @@ -459,6 +480,8 @@ |
460 | 481 | {
|
461 | 482 | *ppvObj = glD3DDev1;
|
462 | 483 | glD3DDev1->AddRef();
|
| 484 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 485 | + TRACE_EXIT(23,D3D_OK);
|
463 | 486 | return D3D_OK;
|
464 | 487 | }
|
465 | 488 | else
|
— | — | @@ -466,89 +489,114 @@ |
467 | 490 | this->AddRef();
|
468 | 491 | *ppvObj = new glDirect3DDevice1(this);
|
469 | 492 | glD3DDev1 = (glDirect3DDevice1*)*ppvObj;
|
| 493 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 494 | + TRACE_EXIT(23,D3D_OK);
|
470 | 495 | return D3D_OK;
|
471 | 496 | }
|
472 | 497 | }
|
| 498 | + TRACE_EXIT(23,E_NOINTERFACE);
|
473 | 499 | return E_NOINTERFACE;
|
474 | 500 | }
|
475 | 501 |
|
476 | 502 | ULONG WINAPI glDirect3DDevice7::AddRef()
|
477 | 503 | {
|
478 | | - if(!this) return 0;
|
| 504 | + TRACE_ENTER(1,14,this);
|
| 505 | + if(!this) TRACE_RET(8,0);
|
479 | 506 | refcount++;
|
| 507 | + TRACE_EXIT(8,refcount);
|
480 | 508 | return refcount;
|
481 | 509 | }
|
482 | 510 | ULONG WINAPI glDirect3DDevice7::Release()
|
483 | 511 | {
|
484 | | - if(!this) return 0;
|
| 512 | + TRACE_ENTER(1,14,this);
|
| 513 | + if(!this) TRACE_RET(8,0);
|
485 | 514 | ULONG ret;
|
486 | 515 | refcount--;
|
487 | 516 | ret = refcount;
|
488 | 517 | if(refcount == 0) delete this;
|
| 518 | + TRACE_EXIT(8,ret);
|
489 | 519 | return ret;
|
490 | 520 | }
|
491 | 521 |
|
492 | 522 | HRESULT WINAPI glDirect3DDevice7::ApplyStateBlock(DWORD dwBlockHandle)
|
493 | 523 | {
|
494 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 524 | + TRACE_ENTER(2,14,this,9,dwBlockHandle);
|
| 525 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
495 | 526 | FIXME("glDirect3DDevice7::ApplyStateBlock: stub");
|
| 527 | + TRACE_EXIT(23,DDERR_GENERIC);
|
496 | 528 | ERR(DDERR_GENERIC);
|
497 | 529 | }
|
498 | 530 | HRESULT WINAPI glDirect3DDevice7::BeginScene()
|
499 | 531 | {
|
500 | | - if(!this) return DDERR_INVALIDOBJECT;
|
501 | | - if(inscene) return D3DERR_SCENE_IN_SCENE;
|
| 532 | + TRACE_ENTER(1,14,this);
|
| 533 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 534 | + if(inscene) TRACE_RET(23,D3DERR_SCENE_IN_SCENE);
|
502 | 535 | inscene = true;
|
| 536 | + TRACE_EXIT(23,D3D_OK);
|
503 | 537 | return D3D_OK;
|
504 | 538 | }
|
505 | 539 | HRESULT WINAPI glDirect3DDevice7::BeginStateBlock()
|
506 | 540 | {
|
507 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 541 | + TRACE_ENTER(1,14,this);
|
| 542 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
508 | 543 | FIXME("glDirect3DDevice7::BeginStateBlock: stub");
|
| 544 | + TRACE_EXIT(23,D3D_OK);
|
509 | 545 | ERR(DDERR_GENERIC);
|
510 | 546 | }
|
511 | 547 | HRESULT WINAPI glDirect3DDevice7::CaptureStateBlock(DWORD dwBlockHandle)
|
512 | 548 | {
|
513 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 549 | + TRACE_ENTER(2,14,this,9,dwBlockHandle);
|
| 550 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
514 | 551 | FIXME("glDirect3DDevice7::CaptureStateBlock: stub");
|
| 552 | + TRACE_EXIT(23,D3D_OK);
|
515 | 553 | ERR(DDERR_GENERIC);
|
516 | 554 | }
|
517 | 555 | HRESULT WINAPI glDirect3DDevice7::CreateStateBlock(D3DSTATEBLOCKTYPE d3dsbtype, LPDWORD lpdwBlockHandle)
|
518 | 556 | {
|
519 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 557 | + TRACE_ENTER(3,14,this,9,d3dsbtype,14,lpdwBlockHandle);
|
| 558 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
520 | 559 | FIXME("glDirect3DDevice7::CreateStateBlock: stub");
|
| 560 | + TRACE_EXIT(23,D3D_OK);
|
521 | 561 | ERR(DDERR_GENERIC);
|
522 | 562 | }
|
523 | 563 | HRESULT WINAPI glDirect3DDevice7::Clear(DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags, DWORD dwColor, D3DVALUE dvZ, DWORD dwStencil)
|
524 | 564 | {
|
525 | | - if(!this) return DDERR_INVALIDOBJECT;
|
526 | | - if(dwCount && !lpRects) return DDERR_INVALIDPARAMS;
|
527 | | - return renderer->Clear(glDDS7,dwCount,lpRects,dwFlags,dwColor,dvZ,dwStencil);
|
| 565 | + TRACE_ENTER(7,14,this,8,dwCount,14,lpRects,9,dwFlags,9,dwColor,19,&dvZ,9,dwStencil);
|
| 566 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 567 | + if(dwCount && !lpRects) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 568 | + TRACE_RET(23,renderer->Clear(glDDS7,dwCount,lpRects,dwFlags,dwColor,dvZ,dwStencil));
|
528 | 569 | }
|
529 | 570 | HRESULT WINAPI glDirect3DDevice7::ComputeSphereVisibility(LPD3DVECTOR lpCenters, LPD3DVALUE lpRadii, DWORD dwNumSpheres,
|
530 | 571 | DWORD dwFlags, LPDWORD lpdwReturnValues)
|
531 | 572 | {
|
532 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 573 | + TRACE_ENTER(6,14,this,14,lpCenters,14,lpRadii,8,dwNumSpheres,9,dwFlags,14,lpdwReturnValues);
|
| 574 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
533 | 575 | FIXME("glDirect3DDevice7::ComputeSphereVisibility: stub");
|
| 576 | + TRACE_EXIT(23,DDERR_GENERIC);
|
534 | 577 | ERR(DDERR_GENERIC);
|
535 | 578 | }
|
536 | 579 | HRESULT WINAPI glDirect3DDevice7::DeleteStateBlock(DWORD dwBlockHandle)
|
537 | 580 | {
|
538 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 581 | + TRACE_ENTER(2,14,this,9,dwBlockHandle);
|
| 582 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
539 | 583 | FIXME("glDirect3DDevice7::DeleteStateBlock: stub");
|
| 584 | + TRACE_EXIT(23,DDERR_GENERIC);
|
540 | 585 | ERR(DDERR_GENERIC);
|
541 | 586 | }
|
542 | 587 |
|
543 | 588 | void glDirect3DDevice7::SetArraySize(DWORD size, DWORD vertex, DWORD texcoord)
|
544 | 589 | {
|
| 590 | + TRACE_ENTER(4,14,this,8,size,8,vertex,8,texcoord);
|
545 | 591 | if(!vertices) vertices = (GLfloat*)malloc(size*4*sizeof(GLfloat));
|
546 | 592 | else if(size > maxarray) vertices = (GLfloat*)realloc(vertices,size*4*sizeof(GLfloat));
|
547 | 593 | if(!normals) normals = (GLfloat*)malloc(size*4*sizeof(GLfloat));
|
548 | 594 | else if(size > maxarray) normals = (GLfloat*)realloc(normals,size*4*sizeof(GLfloat));
|
| 595 | + TRACE_EXIT(0,0);
|
549 | 596 | }
|
550 | 597 |
|
551 | 598 | __int64 glDirect3DDevice7::SelectShader(GLVERTEX *VertexType)
|
552 | 599 | {
|
| 600 | + TRACE_ENTER(2,14,this,14,VertexType);
|
553 | 601 | int i;
|
554 | 602 | __int64 shader = 0;
|
555 | 603 | switch(renderstate[D3DRENDERSTATE_SHADEMODE])
|
— | — | @@ -650,15 +698,17 @@ |
651 | 699 | if(texstages[i].texture->ddsd.dwFlags & DDSD_CKSRCBLT) texstages[i].shaderid |= 1i64 << 60;
|
652 | 700 | }
|
653 | 701 | }
|
| 702 | + TRACE_EXIT(10,&shader);
|
654 | 703 | return shader;
|
655 | 704 | }
|
656 | 705 |
|
657 | 706 | HRESULT glDirect3DDevice7::fvftoglvertex(DWORD dwVertexTypeDesc,LPDWORD vertptr)
|
658 | 707 | {
|
| 708 | + TRACE_ENTER(3,14,this,9,dwVertexTypeDesc,14,vertptr);
|
659 | 709 | int i;
|
660 | 710 | int ptr = 0;
|
661 | 711 | if((dwVertexTypeDesc & D3DFVF_XYZ) && (dwVertexTypeDesc & D3DFVF_XYZRHW))
|
662 | | - return DDERR_INVALIDPARAMS;
|
| 712 | + TRACE_RET(23,DDERR_INVALIDPARAMS);
|
663 | 713 | if(dwVertexTypeDesc & D3DFVF_XYZ)
|
664 | 714 | {
|
665 | 715 | vertdata[0].data = vertptr;
|
— | — | @@ -672,7 +722,7 @@ |
673 | 723 | vertdata[1].data = &vertptr[3];
|
674 | 724 | ptr += 4;
|
675 | 725 | }
|
676 | | - else return DDERR_INVALIDPARAMS;
|
| 726 | + else TRACE_RET(23,DDERR_INVALIDPARAMS);
|
677 | 727 | for(i = 0; i < 5; i++)
|
678 | 728 | vertdata[i+2].data = NULL;
|
679 | 729 | if(((dwVertexTypeDesc >> 1) & 7) >= 3)
|
— | — | @@ -728,6 +778,7 @@ |
729 | 779 | int stride = NextMultipleOf8(ptr*4);
|
730 | 780 | for(i = 0; i < 17; i++)
|
731 | 781 | vertdata[i].stride = stride;
|
| 782 | + TRACE_EXIT(23,D3D_OK);
|
732 | 783 | return D3D_OK;
|
733 | 784 | }
|
734 | 785 |
|
— | — | @@ -734,67 +785,82 @@ |
735 | 786 | HRESULT WINAPI glDirect3DDevice7::DrawIndexedPrimitive(D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD dwVertexTypeDesc,
|
736 | 787 | LPVOID lpvVertices, DWORD dwVertexCount, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
737 | 788 | {
|
738 | | - if(!this) return DDERR_INVALIDOBJECT;
|
739 | | - if(!inscene) return D3DERR_SCENE_NOT_IN_SCENE;
|
| 789 | + TRACE_ENTER(8,9,d3dptPrimitiveType,9,dwVertexTypeDesc,14,lpvVertices,8,dwVertexCount,14,lpwIndices,8,dwIndexCount,9,dwFlags);
|
| 790 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 791 | + if(!inscene) TRACE_RET(23,D3DERR_SCENE_NOT_IN_SCENE);
|
740 | 792 | HRESULT err = fvftoglvertex(dwVertexTypeDesc,(LPDWORD)lpvVertices);
|
741 | 793 | if(lpwIndices) AddStats(d3dptPrimitiveType,dwIndexCount,&stats);
|
742 | 794 | else AddStats(d3dptPrimitiveType,dwVertexCount,&stats);
|
743 | | - if(err != D3D_OK) return err;
|
744 | | - return renderer->DrawPrimitives(this,setdrawmode(d3dptPrimitiveType),vertdata,texformats,
|
745 | | - dwVertexCount,lpwIndices,dwIndexCount,dwFlags);
|
| 795 | + if(err != D3D_OK) TRACE_RET(23,err);
|
| 796 | + TRACE_RET(23,renderer->DrawPrimitives(this,setdrawmode(d3dptPrimitiveType),vertdata,texformats,
|
| 797 | + dwVertexCount,lpwIndices,dwIndexCount,dwFlags));
|
746 | 798 | }
|
747 | 799 | HRESULT WINAPI glDirect3DDevice7::DrawIndexedPrimitiveStrided(D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD dwVertexTypeDesc,
|
748 | | - LPD3DDRAWPRIMITIVESTRIDEDDATA lpvVerticexArray, DWORD dwVertexCount, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
| 800 | + LPD3DDRAWPRIMITIVESTRIDEDDATA lpvVertexArray, DWORD dwVertexCount, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
749 | 801 | {
|
750 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 802 | + TRACE_ENTER(8,14,this,9,d3dptPrimitiveType,9,dwVertexTypeDesc,14,lpvVertexArray,8,dwVertexCount,14,lpwIndices,8,dwIndexCount,9,dwFlags);
|
| 803 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
751 | 804 | FIXME("glDirect3DDevice7::DrawIndexedPrimitiveStrided: stub");
|
| 805 | + TRACE_EXIT(23,DDERR_GENERIC);
|
752 | 806 | ERR(DDERR_GENERIC);
|
753 | 807 | }
|
754 | 808 | HRESULT WINAPI glDirect3DDevice7::DrawIndexedPrimitiveVB(D3DPRIMITIVETYPE d3dptPrimitiveType, LPDIRECT3DVERTEXBUFFER7 lpd3dVertexBuffer,
|
755 | 809 | DWORD dwStartVertex, DWORD dwNumVertices, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
756 | 810 | {
|
757 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 811 | + TRACE_ENTER(8,14,this,9,d3dptPrimitiveType,14,lpd3dVertexBuffer,8,dwStartVertex,8,dwNumVertices,9,lpwIndices,8,dwIndexCount,9,dwFlags);
|
| 812 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
758 | 813 | FIXME("glDirect3DDevice7::DrawIndexedPrimitiveVB: stub");
|
| 814 | + TRACE_EXIT(23,DDERR_GENERIC);
|
759 | 815 | ERR(DDERR_GENERIC);
|
760 | 816 | }
|
761 | 817 | HRESULT WINAPI glDirect3DDevice7::DrawPrimitive(D3DPRIMITIVETYPE dptPrimitiveType, DWORD dwVertexTypeDesc, LPVOID lpVertices,
|
762 | 818 | DWORD dwVertexCount, DWORD dwFlags)
|
763 | 819 | {
|
764 | | - if(!this) return DDERR_INVALIDOBJECT;
|
765 | | - return DrawIndexedPrimitive(dptPrimitiveType,dwVertexTypeDesc,lpVertices,dwVertexCount,NULL,0,dwFlags);
|
| 820 | + TRACE_ENTER(6,14,this,9,dptPrimitiveType,9,dwVertexTypeDesc,14,lpVertices,8,dwVertexCount,9,dwFlags);
|
| 821 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 822 | + TRACE_RET(23,DrawIndexedPrimitive(dptPrimitiveType,dwVertexTypeDesc,lpVertices,dwVertexCount,NULL,0,dwFlags));
|
766 | 823 | }
|
767 | 824 | HRESULT WINAPI glDirect3DDevice7::DrawPrimitiveStrided(D3DPRIMITIVETYPE dptPrimitiveType, DWORD dwVertexTypeDesc,
|
768 | 825 | LPD3DDRAWPRIMITIVESTRIDEDDATA lpVertexArray, DWORD dwVertexCount, DWORD dwFlags)
|
769 | 826 | {
|
770 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 827 | + TRACE_ENTER(6,14,this,9,dptPrimitiveType,9,dwVertexTypeDesc,14,lpVertexArray,8,dwVertexCount,9,dwFlags);
|
| 828 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
771 | 829 | FIXME("glDirect3DDevice7::DrawPrimitiveStrided: stub");
|
| 830 | + TRACE_EXIT(23,DDERR_GENERIC);
|
772 | 831 | ERR(DDERR_GENERIC);
|
773 | 832 | }
|
774 | 833 | HRESULT WINAPI glDirect3DDevice7::DrawPrimitiveVB(D3DPRIMITIVETYPE d3dptPrimitiveType, LPDIRECT3DVERTEXBUFFER7 lpd3dVertexBuffer,
|
775 | 834 | DWORD dwStartVertex, DWORD dwNumVertices, DWORD dwFlags)
|
776 | 835 | {
|
777 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 836 | + TRACE_ENTER(5,14,this,9,d3dptPrimitiveType,14,lpd3dVertexBuffer,8,dwStartVertex,8,dwNumVertices,9,dwFlags);
|
| 837 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
778 | 838 | FIXME("glDirect3DDevice7::DrawPrimitiveVB: stub");
|
| 839 | + TRACE_EXIT(23,DDERR_GENERIC);
|
779 | 840 | ERR(DDERR_GENERIC);
|
780 | 841 | }
|
781 | 842 | HRESULT WINAPI glDirect3DDevice7::EndScene()
|
782 | 843 | {
|
783 | | - if(!this) return DDERR_INVALIDOBJECT;
|
784 | | - if(!inscene) return D3DERR_SCENE_NOT_IN_SCENE;
|
| 844 | + TRACE_ENTER(1,14,this);
|
| 845 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 846 | + if(!inscene) TRACE_RET(23,D3DERR_SCENE_NOT_IN_SCENE);
|
785 | 847 | inscene = false;
|
786 | 848 | renderer->Flush();
|
| 849 | + TRACE_EXIT(23,D3D_OK);
|
787 | 850 | return D3D_OK;
|
788 | 851 | }
|
789 | 852 | HRESULT WINAPI glDirect3DDevice7::EndStateBlock(LPDWORD lpdwBlockHandle)
|
790 | 853 | {
|
791 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 854 | + TRACE_ENTER(2,14,this,14,lpdwBlockHandle);
|
| 855 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
792 | 856 | FIXME("glDirect3DDevice7::EndStateBlock: stub");
|
| 857 | + TRACE_EXIT(23,DDERR_GENERIC);
|
793 | 858 | ERR(DDERR_GENERIC);
|
794 | 859 | }
|
795 | 860 |
|
796 | 861 | HRESULT WINAPI glDirect3DDevice7::EnumTextureFormats(LPD3DENUMPIXELFORMATSCALLBACK lpd3dEnumPixelProc, LPVOID lpArg)
|
797 | 862 | {
|
798 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 863 | + TRACE_ENTER(3,14,this,14,lpd3dEnumPixelProc,14,lpArg);
|
| 864 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
799 | 865 | HRESULT result;
|
800 | 866 | DDPIXELFORMAT fmt;
|
801 | 867 | for(int i = 0; i < numtexformats; i++)
|
— | — | @@ -803,226 +869,264 @@ |
804 | 870 | if(::texformats[i].dwFlags & DDPF_PALETTEINDEXED8) continue;
|
805 | 871 | memcpy(&fmt,&::texformats[i],sizeof(DDPIXELFORMAT));
|
806 | 872 | result = lpd3dEnumPixelProc(&fmt,lpArg);
|
807 | | - if(result != D3DENUMRET_OK) return D3D_OK;
|
| 873 | + if(result != D3DENUMRET_OK) TRACE_RET(23,D3D_OK);
|
808 | 874 | }
|
| 875 | + TRACE_EXIT(23,D3D_OK);
|
809 | 876 | return D3D_OK;
|
810 | 877 | }
|
811 | 878 | HRESULT WINAPI glDirect3DDevice7::GetCaps(LPD3DDEVICEDESC7 lpD3DDevDesc)
|
812 | 879 | {
|
813 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 880 | + TRACE_ENTER(2,14,this,14,lpD3DDevDesc);
|
| 881 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
814 | 882 | D3DDEVICEDESC7 desc = d3ddesc;
|
815 | 883 | desc.dwDevCaps |= D3DDEVCAPS_HWRASTERIZATION | D3DDEVCAPS_HWTRANSFORMANDLIGHT;
|
816 | 884 | desc.deviceGUID = IID_IDirect3DTnLHalDevice;
|
817 | 885 | memcpy(lpD3DDevDesc,&desc,sizeof(D3DDEVICEDESC7));
|
| 886 | + TRACE_EXIT(23,D3D_OK);
|
818 | 887 | return D3D_OK;
|
819 | 888 | }
|
820 | 889 | HRESULT WINAPI glDirect3DDevice7::GetClipPlane(DWORD dwIndex, D3DVALUE *pPlaneEquation)
|
821 | 890 | {
|
822 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 891 | + TRACE_ENTER(3,14,this,8,dwIndex,9,pPlaneEquation);
|
| 892 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
823 | 893 | FIXME("glDirect3DDevice7::GetClipPlane: stub");
|
| 894 | + TRACE_EXIT(23,DDERR_GENERIC);
|
824 | 895 | ERR(DDERR_GENERIC);
|
825 | 896 | }
|
826 | 897 | HRESULT WINAPI glDirect3DDevice7::GetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
827 | 898 | {
|
828 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 899 | + TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
| 900 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
829 | 901 | FIXME("glDirect3DDevice7::GetClipStatus: stub");
|
| 902 | + TRACE_EXIT(23,DDERR_GENERIC);
|
830 | 903 | ERR(DDERR_GENERIC);
|
831 | 904 | }
|
832 | 905 | HRESULT WINAPI glDirect3DDevice7::GetDirect3D(LPDIRECT3D7 *lplpD3D)
|
833 | 906 | {
|
834 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 907 | + TRACE_ENTER(2,14,this,14,lplpD3D);
|
| 908 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 909 | + if(!lplpD3D) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
835 | 910 | *lplpD3D = glD3D7;
|
836 | 911 | glD3D7->AddRef();
|
| 912 | + TRACE_VAR("*lplpD3D",14,*lplpD3D);
|
| 913 | + TRACE_EXIT(23,D3D_OK);
|
837 | 914 | return D3D_OK;
|
838 | 915 | }
|
839 | 916 | HRESULT WINAPI glDirect3DDevice7::GetInfo(DWORD dwDevInfoID, LPVOID pDevInfoStruct, DWORD dwSize)
|
840 | 917 | {
|
841 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 918 | + TRACE_ENTER(4,14,this,9,dwDevInfoID,14,pDevInfoStruct,8,dwSize);
|
| 919 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
842 | 920 | FIXME("glDirect3DDevice7::GetInfo: stub");
|
| 921 | + TRACE_EXIT(23,DDERR_GENERIC);
|
843 | 922 | ERR(DDERR_GENERIC);
|
844 | 923 | }
|
845 | 924 | HRESULT WINAPI glDirect3DDevice7::GetLight(DWORD dwLightIndex, LPD3DLIGHT7 lpLight)
|
846 | 925 | {
|
847 | | - if(!this) return DDERR_INVALIDOBJECT;
|
848 | | - if(!lpLight) return DDERR_INVALIDPARAMS;
|
849 | | - if(dwLightIndex >= lightsmax) ERR(DDERR_INVALIDOBJECT);
|
850 | | - if(!lights[dwLightIndex]) ERR(DDERR_INVALIDOBJECT);
|
| 926 | + TRACE_ENTER(3,14,this,8,dwLightIndex,14,lpLight);
|
| 927 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 928 | + if(!lpLight) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 929 | + if(dwLightIndex >= lightsmax) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 930 | + if(!lights[dwLightIndex]) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
851 | 931 | lights[dwLightIndex]->GetLight7(lpLight);
|
| 932 | + TRACE_EXIT(23,D3D_OK);
|
852 | 933 | return D3D_OK;
|
853 | 934 | }
|
854 | 935 | HRESULT WINAPI glDirect3DDevice7::GetLightEnable(DWORD dwLightIndex, BOOL* pbEnable)
|
855 | 936 | {
|
856 | | - if(!this) return DDERR_INVALIDOBJECT;
|
857 | | - if(dwLightIndex >= lightsmax) ERR(DDERR_INVALIDOBJECT);
|
858 | | - if(!lights[dwLightIndex]) ERR(DDERR_INVALIDOBJECT);
|
859 | | - if(!pbEnable) return DDERR_INVALIDPARAMS;
|
| 937 | + TRACE_ENTER(3,14,this,8,dwLightIndex,14,pbEnable);
|
| 938 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 939 | + if(dwLightIndex >= lightsmax) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 940 | + if(!lights[dwLightIndex]) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 941 | + if(!pbEnable) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
860 | 942 | *pbEnable = FALSE;
|
861 | 943 | for(int i = 0; i < 8; i++)
|
862 | 944 | if(gllights[i] == dwLightIndex) *pbEnable = TRUE;
|
| 945 | + TRACE_VAR("*pbEnable",22,*pbEnable);
|
| 946 | + TRACE_EXIT(23,D3D_OK);
|
863 | 947 | return D3D_OK;
|
864 | 948 | }
|
865 | 949 | HRESULT WINAPI glDirect3DDevice7::GetMaterial(LPD3DMATERIAL7 lpMaterial)
|
866 | 950 | {
|
867 | | - if(!this) return DDERR_INVALIDOBJECT;
|
868 | | - if(!lpMaterial) return DDERR_INVALIDPARAMS;
|
| 951 | + TRACE_ENTER(2,14,this,14,lpMaterial);
|
| 952 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 953 | + if(!lpMaterial) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
869 | 954 | memcpy(lpMaterial,&material,sizeof(D3DMATERIAL7));
|
| 955 | + TRACE_EXIT(23,D3D_OK);
|
870 | 956 | return D3D_OK;
|
871 | 957 | }
|
872 | 958 | HRESULT WINAPI glDirect3DDevice7::GetRenderState(D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState)
|
873 | 959 | {
|
874 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 960 | + TRACE_ENTER(3,14,this,27,dwRenderStateType,14,lpdwRenderState);
|
| 961 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
875 | 962 | if(dwRenderStateType <= 152)
|
876 | 963 | {
|
877 | 964 | *lpdwRenderState = renderstate[dwRenderStateType];
|
| 965 | + TRACE_VAR("*lpdwRenderState",9,*lpdwRenderState);
|
| 966 | + TRACE_EXIT(23,D3D_OK);
|
878 | 967 | return D3D_OK;
|
879 | 968 | }
|
| 969 | + TRACE_EXIT(23,DDERR_INVALIDPARAMS);
|
880 | 970 | return DDERR_INVALIDPARAMS;
|
881 | 971 | }
|
882 | 972 | HRESULT WINAPI glDirect3DDevice7::GetRenderTarget(LPDIRECTDRAWSURFACE7 *lplpRenderTarget)
|
883 | 973 | {
|
884 | | - if(!this) return DDERR_INVALIDOBJECT;
|
885 | | - if(!lplpRenderTarget) return DDERR_INVALIDPARAMS;
|
| 974 | + TRACE_ENTER(2,14,this,14,lplpRenderTarget);
|
| 975 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 976 | + if(!lplpRenderTarget) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
886 | 977 | glDDS7->AddRef();
|
887 | 978 | *lplpRenderTarget = glDDS7;
|
| 979 | + TRACE_VAR("*lplpRenderTarger",14,*lplpRenderTarget);
|
| 980 | + TRACE_EXIT(23,D3D_OK);
|
888 | 981 | return D3D_OK;
|
889 | 982 | }
|
890 | 983 | HRESULT WINAPI glDirect3DDevice7::GetStateData(DWORD dwState, LPVOID* lplpStateData)
|
891 | 984 | {
|
892 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 985 | + TRACE_ENTER(3,14,this,9,dwState,14,lplpStateData);
|
| 986 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
893 | 987 | FIXME("glDirect3DDevice7::GetStateData: stub");
|
| 988 | + TRACE_EXIT(23,DDERR_GENERIC);
|
894 | 989 | ERR(DDERR_GENERIC);
|
895 | 990 | }
|
896 | 991 | HRESULT WINAPI glDirect3DDevice7::GetTexture(DWORD dwStage, LPDIRECTDRAWSURFACE7 *lplpTexture)
|
897 | 992 | {
|
898 | | - if(!lplpTexture) return DDERR_INVALIDPARAMS;
|
899 | | - if(!this) return DDERR_INVALIDOBJECT;
|
900 | | - if(dwStage > 7) return DDERR_INVALIDPARAMS;
|
901 | | - if(!texstages[dwStage].texture) return DDERR_INVALIDOBJECT;
|
| 993 | + TRACE_ENTER(3,14,this,8,dwStage,14,lplpTexture);
|
| 994 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 995 | + if(!lplpTexture) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 996 | + if(dwStage > 7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 997 | + if(!texstages[dwStage].texture) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
902 | 998 | *lplpTexture = texstages[dwStage].texture;
|
903 | 999 | texstages[dwStage].texture->AddRef();
|
| 1000 | + TRACE_VAR("*lplpTexture",14,*lplpTexture);
|
| 1001 | + TRACE_EXIT(23,D3D_OK);
|
904 | 1002 | return D3D_OK;
|
905 | 1003 | }
|
906 | 1004 | HRESULT WINAPI glDirect3DDevice7::GetTextureStageState(DWORD dwStage, D3DTEXTURESTAGESTATETYPE dwState, LPDWORD lpdwValue)
|
907 | 1005 | {
|
908 | | - if(dwStage > 7) return DDERR_INVALIDPARAMS;
|
909 | | - if(!lpdwValue) return DDERR_INVALIDPARAMS;
|
910 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1006 | + TRACE_ENTER(4,14,this,8,dwStage,28,dwState,14,lpdwValue);
|
| 1007 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1008 | + if(dwStage > 7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1009 | + if(!lpdwValue) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
911 | 1010 | switch(dwState)
|
912 | 1011 | {
|
913 | 1012 | case D3DTSS_COLOROP:
|
914 | 1013 | *lpdwValue = texstages[dwStage].colorop;
|
915 | | - return D3D_OK;
|
| 1014 | + TRACE_RET(23,D3D_OK);
|
916 | 1015 | case D3DTSS_COLORARG1:
|
917 | 1016 | *lpdwValue = texstages[dwStage].colorarg1;
|
918 | | - return D3D_OK;
|
| 1017 | + TRACE_RET(23,D3D_OK);
|
919 | 1018 | case D3DTSS_COLORARG2:
|
920 | 1019 | *lpdwValue = texstages[dwStage].colorarg2;
|
921 | | - return D3D_OK;
|
| 1020 | + TRACE_RET(23,D3D_OK);
|
922 | 1021 | case D3DTSS_ALPHAOP:
|
923 | 1022 | *lpdwValue = texstages[dwStage].alphaop;
|
924 | | - return D3D_OK;
|
| 1023 | + TRACE_RET(23,D3D_OK);
|
925 | 1024 | case D3DTSS_ALPHAARG1:
|
926 | 1025 | *lpdwValue = texstages[dwStage].alphaarg1;
|
927 | | - return D3D_OK;
|
| 1026 | + TRACE_RET(23,D3D_OK);
|
928 | 1027 | case D3DTSS_ALPHAARG2:
|
929 | 1028 | *lpdwValue = texstages[dwStage].alphaarg2;
|
930 | | - return D3D_OK;
|
| 1029 | + TRACE_RET(23,D3D_OK);
|
931 | 1030 | case D3DTSS_BUMPENVMAT00:
|
932 | 1031 | memcpy(lpdwValue,&texstages[dwStage].bumpenv00,sizeof(D3DVALUE));
|
933 | | - return D3D_OK;
|
| 1032 | + TRACE_RET(23,D3D_OK);
|
934 | 1033 | case D3DTSS_BUMPENVMAT01:
|
935 | 1034 | memcpy(lpdwValue,&texstages[dwStage].bumpenv01,sizeof(D3DVALUE));
|
936 | | - return D3D_OK;
|
| 1035 | + TRACE_RET(23,D3D_OK);
|
937 | 1036 | case D3DTSS_BUMPENVMAT10:
|
938 | 1037 | memcpy(lpdwValue,&texstages[dwStage].bumpenv10,sizeof(D3DVALUE));
|
939 | | - return D3D_OK;
|
| 1038 | + TRACE_RET(23,D3D_OK);
|
940 | 1039 | case D3DTSS_BUMPENVMAT11:
|
941 | 1040 | memcpy(lpdwValue,&texstages[dwStage].bumpenv11,sizeof(D3DVALUE));
|
942 | | - return D3D_OK;
|
| 1041 | + TRACE_RET(23,D3D_OK);
|
943 | 1042 | case D3DTSS_TEXCOORDINDEX:
|
944 | 1043 | *lpdwValue = texstages[dwStage].texcoordindex;
|
945 | | - return D3D_OK;
|
| 1044 | + TRACE_RET(23,D3D_OK);
|
946 | 1045 | case D3DTSS_ADDRESS:
|
947 | 1046 | case D3DTSS_ADDRESSU:
|
948 | 1047 | *lpdwValue = texstages[dwStage].addressu;
|
949 | | - return D3D_OK;
|
| 1048 | + TRACE_RET(23,D3D_OK);
|
950 | 1049 | case D3DTSS_ADDRESSV:
|
951 | 1050 | *lpdwValue = texstages[dwStage].addressv;
|
952 | | - return D3D_OK;
|
| 1051 | + TRACE_RET(23,D3D_OK);
|
953 | 1052 | case D3DTSS_BORDERCOLOR:
|
954 | 1053 | *lpdwValue = texstages[dwStage].bordercolor;
|
955 | | - return D3D_OK;
|
| 1054 | + TRACE_RET(23,D3D_OK);
|
956 | 1055 | case D3DTSS_MAGFILTER:
|
957 | 1056 | *lpdwValue = texstages[dwStage].magfilter;
|
958 | | - return D3D_OK;
|
| 1057 | + TRACE_RET(23,D3D_OK);
|
959 | 1058 | case D3DTSS_MINFILTER:
|
960 | 1059 | *lpdwValue = texstages[dwStage].minfilter;
|
961 | | - return D3D_OK;
|
| 1060 | + TRACE_RET(23,D3D_OK);
|
962 | 1061 | case D3DTSS_MIPFILTER:
|
963 | 1062 | *lpdwValue = texstages[dwStage].mipfilter;
|
964 | | - return D3D_OK;
|
| 1063 | + TRACE_RET(23,D3D_OK);
|
965 | 1064 | case D3DTSS_MIPMAPLODBIAS:
|
966 | 1065 | memcpy(lpdwValue,&texstages[dwStage].lodbias,sizeof(D3DVALUE));
|
967 | | - return D3D_OK;
|
| 1066 | + TRACE_RET(23,D3D_OK);
|
968 | 1067 | case D3DTSS_MAXMIPLEVEL:
|
969 | 1068 | *lpdwValue = texstages[dwStage].miplevel;
|
970 | | - return D3D_OK;
|
| 1069 | + TRACE_RET(23,D3D_OK);
|
971 | 1070 | case D3DTSS_MAXANISOTROPY:
|
972 | 1071 | *lpdwValue = texstages[dwStage].anisotropy;
|
973 | | - return D3D_OK;
|
| 1072 | + TRACE_RET(23,D3D_OK);
|
974 | 1073 | case D3DTSS_BUMPENVLSCALE:
|
975 | 1074 | memcpy(lpdwValue,&texstages[dwStage].bumpenvlscale,sizeof(D3DVALUE));
|
976 | | - return D3D_OK;
|
| 1075 | + TRACE_RET(23,D3D_OK);
|
977 | 1076 | case D3DTSS_BUMPENVLOFFSET:
|
978 | 1077 | memcpy(lpdwValue,&texstages[dwStage].bumpenvloffset,sizeof(D3DVALUE));
|
979 | | - return D3D_OK;
|
| 1078 | + TRACE_RET(23,D3D_OK);
|
980 | 1079 | case D3DTSS_TEXTURETRANSFORMFLAGS:
|
981 | 1080 | *lpdwValue = texstages[dwStage].textransform;
|
982 | | - return D3D_OK;
|
| 1081 | + TRACE_RET(23,D3D_OK);
|
983 | 1082 | default:
|
984 | | - return DDERR_INVALIDPARAMS;
|
| 1083 | + TRACE_RET(23,DDERR_INVALIDPARAMS);
|
985 | 1084 | }
|
986 | | - ERR(DDERR_GENERIC);
|
| 1085 | + TRACE_RET(23,DDERR_GENERIC);
|
987 | 1086 | }
|
988 | 1087 | HRESULT WINAPI glDirect3DDevice7::GetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
989 | 1088 | {
|
990 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1089 | + TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
| 1090 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
991 | 1091 | switch(dtstTransformStateType)
|
992 | 1092 | {
|
993 | 1093 | case D3DTRANSFORMSTATE_WORLD:
|
994 | 1094 | memcpy(lpD3DMatrix,&matWorld,sizeof(D3DMATRIX));
|
995 | | - return D3D_OK;
|
| 1095 | + TRACE_RET(23,D3D_OK);
|
996 | 1096 | case D3DTRANSFORMSTATE_VIEW:
|
997 | 1097 | memcpy(lpD3DMatrix,&matView,sizeof(D3DMATRIX));
|
998 | | - return D3D_OK;
|
| 1098 | + TRACE_RET(23,D3D_OK);
|
999 | 1099 | case D3DTRANSFORMSTATE_PROJECTION:
|
1000 | 1100 | memcpy(lpD3DMatrix,&matProjection,sizeof(D3DMATRIX));
|
1001 | | - return D3D_OK;
|
| 1101 | + TRACE_RET(23,D3D_OK);
|
1002 | 1102 | default:
|
1003 | | - ERR(DDERR_INVALIDPARAMS);
|
| 1103 | + TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1004 | 1104 | }
|
| 1105 | + TRACE_RET(23,DDERR_GENERIC);
|
1005 | 1106 | }
|
1006 | 1107 | HRESULT WINAPI glDirect3DDevice7::GetViewport(LPD3DVIEWPORT7 lpViewport)
|
1007 | 1108 | {
|
1008 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1109 | + TRACE_ENTER(2,14,this,14,lpViewport);
|
| 1110 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1009 | 1111 | memcpy(lpViewport,&viewport,sizeof(D3DVIEWPORT7));
|
| 1112 | + TRACE_EXIT(23,D3D_OK);
|
1010 | 1113 | return D3D_OK;
|
1011 | 1114 | }
|
1012 | 1115 | HRESULT WINAPI glDirect3DDevice7::LightEnable(DWORD dwLightIndex, BOOL bEnable)
|
1013 | 1116 | {
|
1014 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1117 | + TRACE_ENTER(3,14,this,8,dwLightIndex,22,bEnable);
|
| 1118 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1015 | 1119 | int i;
|
1016 | 1120 | D3DLIGHT7 light;
|
1017 | 1121 | bool foundlight = false;
|
1018 | 1122 | if(dwLightIndex >= lightsmax)
|
1019 | 1123 | {
|
1020 | | - if(!ExpandLightBuffer(&lights,&lightsmax,dwLightIndex-1)) return DDERR_OUTOFMEMORY;
|
| 1124 | + if(!ExpandLightBuffer(&lights,&lightsmax,dwLightIndex-1)) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
1021 | 1125 | }
|
1022 | 1126 | if(!lights[dwLightIndex]) lights[dwLightIndex] = new glDirect3DLight;
|
1023 | 1127 | if(bEnable)
|
1024 | 1128 | {
|
1025 | 1129 | for(i = 0; i < 8; i++)
|
1026 | | - if(gllights[i] == dwLightIndex) return D3D_OK;
|
| 1130 | + if(gllights[i] == dwLightIndex) TRACE_RET(23,D3D_OK);
|
1027 | 1131 | for(i = 0; i < 8; i++)
|
1028 | 1132 | {
|
1029 | 1133 | if(gllights[i] == -1)
|
— | — | @@ -1032,7 +1136,7 @@ |
1033 | 1137 | break;
|
1034 | 1138 | }
|
1035 | 1139 | }
|
1036 | | - if(!foundlight) return D3DERR_LIGHT_SET_FAILED;
|
| 1140 | + if(!foundlight) TRACE_RET(23,D3DERR_LIGHT_SET_FAILED);
|
1037 | 1141 | }
|
1038 | 1142 | else
|
1039 | 1143 | {
|
— | — | @@ -1043,71 +1147,88 @@ |
1044 | 1148 | gllights[i] = -1;
|
1045 | 1149 | }
|
1046 | 1150 | }
|
| 1151 | + TRACE_EXIT(23,D3D_OK);
|
1047 | 1152 | return D3D_OK;
|
1048 | 1153 | }
|
| 1154 | + TRACE_EXIT(23,D3D_OK);
|
1049 | 1155 | return D3D_OK;
|
1050 | 1156 | }
|
1051 | 1157 | HRESULT WINAPI glDirect3DDevice7::Load(LPDIRECTDRAWSURFACE7 lpDestTex, LPPOINT lpDestPoint, LPDIRECTDRAWSURFACE7 lpSrcTex,
|
1052 | 1158 | LPRECT lprcSrcRect, DWORD dwFlags)
|
1053 | 1159 | {
|
1054 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1160 | + TRACE_ENTER(6,14,this,14,lpDestTex,25,lpDestPoint,14,lpSrcTex,26,lprcSrcRect,9,dwFlags);
|
| 1161 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1055 | 1162 | FIXME("glDirect3DDevice7::Load: stub");
|
| 1163 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1056 | 1164 | ERR(DDERR_GENERIC);
|
1057 | 1165 | }
|
1058 | 1166 | HRESULT WINAPI glDirect3DDevice7::MultiplyTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
1059 | 1167 | {
|
1060 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1168 | + TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
| 1169 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1061 | 1170 | FIXME("glDirect3DDevice7::MultiplyTransform: stub");
|
| 1171 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1062 | 1172 | ERR(DDERR_GENERIC);
|
1063 | 1173 | }
|
1064 | 1174 | HRESULT WINAPI glDirect3DDevice7::PreLoad(LPDIRECTDRAWSURFACE7 lpddsTexture)
|
1065 | 1175 | {
|
1066 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1176 | + TRACE_ENTER(2,14,this,14,lpddsTexture);
|
| 1177 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1067 | 1178 | FIXME("glDirect3DDevice7::PreLoad: stub");
|
| 1179 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1068 | 1180 | ERR(DDERR_GENERIC);
|
1069 | 1181 | }
|
1070 | 1182 | HRESULT WINAPI glDirect3DDevice7::SetClipPlane(DWORD dwIndex, D3DVALUE* pPlaneEquation)
|
1071 | 1183 | {
|
1072 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1184 | + TRACE_ENTER(3,14,this,8,dwIndex,14,pPlaneEquation);
|
| 1185 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1073 | 1186 | FIXME("glDirect3DDevice7::SetClipPland: stub");
|
| 1187 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1074 | 1188 | ERR(DDERR_GENERIC);
|
1075 | 1189 | }
|
1076 | 1190 | HRESULT WINAPI glDirect3DDevice7::SetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
1077 | 1191 | {
|
1078 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1192 | + TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
| 1193 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1079 | 1194 | FIXME("glDirect3DDevice7::SetClipStatus: stub");
|
| 1195 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1080 | 1196 | ERR(DDERR_GENERIC);
|
1081 | 1197 | }
|
1082 | 1198 | HRESULT WINAPI glDirect3DDevice7::SetLight(DWORD dwLightIndex, LPD3DLIGHT7 lpLight)
|
1083 | 1199 | {
|
1084 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1200 | + TRACE_ENTER(3,14,this,8,dwLightIndex,14,lpLight);
|
| 1201 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1085 | 1202 | bool foundlight = false;
|
1086 | 1203 | if(dwLightIndex >= lightsmax)
|
1087 | 1204 | {
|
1088 | | - if(!ExpandLightBuffer(&lights,&lightsmax,dwLightIndex-1)) return DDERR_OUTOFMEMORY;
|
| 1205 | + if(!ExpandLightBuffer(&lights,&lightsmax,dwLightIndex-1)) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
1089 | 1206 | }
|
1090 | 1207 | if(!lights[dwLightIndex]) lights[dwLightIndex] = new glDirect3DLight;
|
1091 | 1208 | lights[dwLightIndex]->SetLight7(lpLight);
|
| 1209 | + TRACE_EXIT(23,D3D_OK);
|
1092 | 1210 | return D3D_OK;
|
1093 | 1211 | }
|
1094 | 1212 | HRESULT WINAPI glDirect3DDevice7::SetMaterial(LPD3DMATERIAL7 lpMaterial)
|
1095 | 1213 | {
|
1096 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1097 | | - if(!lpMaterial) return DDERR_INVALIDPARAMS;
|
| 1214 | + TRACE_ENTER(2,14,this,14,lpMaterial);
|
| 1215 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1216 | + if(!lpMaterial) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1098 | 1217 | memcpy(&material,lpMaterial,sizeof(D3DMATERIAL7));
|
| 1218 | + TRACE_EXIT(23,D3D_OK);
|
1099 | 1219 | return D3D_OK;
|
1100 | 1220 | }
|
1101 | 1221 |
|
1102 | 1222 | HRESULT WINAPI glDirect3DDevice7::SetRenderState(D3DRENDERSTATETYPE dwRendStateType, DWORD dwRenderState)
|
1103 | 1223 | {
|
1104 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1224 | + TRACE_ENTER(3,14,this,27,dwRendStateType,9,dwRenderState);
|
| 1225 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1105 | 1226 | switch(dwRendStateType)
|
1106 | 1227 | {
|
1107 | 1228 | case D3DRENDERSTATE_TEXTUREHANDLE:
|
1108 | | - if(dwRenderState > texturecount-1) return DDERR_INVALIDPARAMS;
|
| 1229 | + if(dwRenderState > texturecount-1) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1109 | 1230 | if(dwRenderState)
|
1110 | 1231 | {
|
1111 | | - if(!textures[dwRenderState]) return DDERR_INVALIDPARAMS;
|
| 1232 | + if(!textures[dwRenderState]) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1112 | 1233 | SetTexture(0,textures[dwRenderState]);
|
1113 | 1234 | }
|
1114 | 1235 | else SetTexture(0,NULL);
|
— | — | @@ -1166,7 +1287,7 @@ |
1167 | 1288 | }
|
1168 | 1289 | break;
|
1169 | 1290 | case D3DRENDERSTATE_TEXTUREMAPBLEND:
|
1170 | | - if(!dwRenderState || (dwRenderState > D3DTBLEND_ADD)) return DDERR_INVALIDPARAMS;
|
| 1291 | + if(!dwRenderState || (dwRenderState > D3DTBLEND_ADD)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1171 | 1292 | switch(dwRenderState)
|
1172 | 1293 | {
|
1173 | 1294 | case D3DTBLEND_DECAL:
|
— | — | @@ -1202,7 +1323,7 @@ |
1203 | 1324 | case D3DTBLEND_DECALMASK:
|
1204 | 1325 | case D3DTBLEND_MODULATEMASK:
|
1205 | 1326 | FIXME("DX5 masked blend modes not supported.");
|
1206 | | - return DDERR_UNSUPPORTED;
|
| 1327 | + TRACE_RET(23,DDERR_UNSUPPORTED);
|
1207 | 1328 | case D3DTBLEND_ADD:
|
1208 | 1329 | SetTextureStageState(0,D3DTSS_COLORARG1,D3DTA_TEXTURE);
|
1209 | 1330 | SetTextureStageState(0,D3DTSS_COLORARG2,D3DTA_CURRENT);
|
— | — | @@ -1213,127 +1334,150 @@ |
1214 | 1335 | }
|
1215 | 1336 | break;
|
1216 | 1337 | }
|
1217 | | - if(dwRendStateType > 152) return DDERR_INVALIDPARAMS;
|
1218 | | - if(dwRendStateType < 0) return DDERR_INVALIDPARAMS;
|
| 1338 | + if(dwRendStateType > 152) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1339 | + if(dwRendStateType < 0) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1219 | 1340 | renderstate[dwRendStateType] = dwRenderState;
|
| 1341 | + TRACE_EXIT(23,D3D_OK);
|
1220 | 1342 | return D3D_OK;
|
1221 | 1343 | }
|
1222 | 1344 | HRESULT WINAPI glDirect3DDevice7::SetRenderTarget(LPDIRECTDRAWSURFACE7 lpNewRenderTarget, DWORD dwFlags)
|
1223 | 1345 | {
|
1224 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1225 | | - if(!lpNewRenderTarget) return DDERR_INVALIDPARAMS;
|
1226 | | - if(dwFlags) return DDERR_INVALIDPARAMS;
|
| 1346 | + TRACE_ENTER(3,14,this,14,lpNewRenderTarget,9,dwFlags);
|
| 1347 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1348 | + if(!lpNewRenderTarget) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1349 | + if(dwFlags) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1227 | 1350 | DDSURFACEDESC2 ddsd;
|
1228 | 1351 | ddsd.dwSize = sizeof(DDSURFACEDESC2);
|
1229 | 1352 | lpNewRenderTarget->GetSurfaceDesc(&ddsd);
|
1230 | | - if(!(ddsd.ddsCaps.dwCaps & DDSCAPS_3DDEVICE)) return DDERR_INVALIDSURFACETYPE;
|
| 1353 | + if(!(ddsd.ddsCaps.dwCaps & DDSCAPS_3DDEVICE)) TRACE_RET(23,DDERR_INVALIDSURFACETYPE);
|
1231 | 1354 | glDDS7->Release();
|
1232 | 1355 | glDDS7 = (glDirectDrawSurface7*)lpNewRenderTarget;
|
1233 | 1356 | glDDS7->AddRef();
|
| 1357 | + TRACE_EXIT(23,D3D_OK);
|
1234 | 1358 | return D3D_OK;
|
1235 | 1359 | }
|
1236 | 1360 | HRESULT WINAPI glDirect3DDevice7::SetStateData(DWORD dwState, LPVOID lpStateData)
|
1237 | 1361 | {
|
1238 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1362 | + TRACE_ENTER(3,14,this,8,dwState,14,lpStateData);
|
| 1363 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1239 | 1364 | FIXME("glDirect3DDevice7::SetStateData: stub");
|
| 1365 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1240 | 1366 | ERR(DDERR_GENERIC);
|
1241 | 1367 | }
|
1242 | 1368 | HRESULT WINAPI glDirect3DDevice7::SetTexture(DWORD dwStage, LPDIRECTDRAWSURFACE7 lpTexture)
|
1243 | 1369 | {
|
1244 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1245 | | - if(dwStage > 7) return DDERR_INVALIDPARAMS;
|
| 1370 | + TRACE_ENTER(3,14,this,8,dwStage,14,lpTexture);
|
| 1371 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1372 | + if(dwStage > 7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1246 | 1373 | if(texstages[dwStage].texture) texstages[dwStage].texture->Release();
|
1247 | 1374 | texstages[dwStage].texture = (glDirectDrawSurface7*)lpTexture;
|
1248 | 1375 | texstages[dwStage].dirty = true;
|
1249 | 1376 | if(lpTexture) lpTexture->AddRef();
|
| 1377 | + TRACE_EXIT(23,D3D_OK);
|
1250 | 1378 | return D3D_OK;
|
1251 | 1379 | }
|
1252 | 1380 | HRESULT WINAPI glDirect3DDevice7::SetTextureStageState(DWORD dwStage, D3DTEXTURESTAGESTATETYPE dwState, DWORD dwValue)
|
1253 | 1381 | {
|
1254 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1255 | | - if(dwStage > 7) return DDERR_INVALIDPARAMS;
|
| 1382 | + TRACE_ENTER(4,14,this,8,dwStage,28,dwState,9,dwValue);
|
| 1383 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1384 | + if(dwStage > 7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1256 | 1385 | switch(dwState)
|
1257 | 1386 | {
|
1258 | 1387 | case D3DTSS_COLOROP:
|
1259 | | - if(!dwValue || (dwValue > 24)) return DDERR_INVALIDPARAMS;
|
| 1388 | + if(!dwValue || (dwValue > 24)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1260 | 1389 | if(dwStage == 0)renderstate[D3DRENDERSTATE_TEXTUREMAPBLEND] = 0;
|
1261 | 1390 | texstages[dwStage].colorop = (D3DTEXTUREOP)dwValue;
|
1262 | 1391 | texstages[dwStage].dirty = true;
|
| 1392 | + TRACE_EXIT(23,D3D_OK);
|
1263 | 1393 | return D3D_OK;
|
1264 | 1394 | case D3DTSS_COLORARG1:
|
1265 | | - if((dwValue & D3DTA_SELECTMASK) > 4) return DDERR_INVALIDPARAMS;
|
1266 | | - if(dwValue > 0x34) return DDERR_INVALIDPARAMS;
|
| 1395 | + if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1396 | + if(dwValue > 0x34) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1267 | 1397 | texstages[dwStage].colorarg1 = dwValue;
|
1268 | 1398 | texstages[dwStage].dirty = true;
|
| 1399 | + TRACE_EXIT(23,D3D_OK);
|
1269 | 1400 | return D3D_OK;
|
1270 | 1401 | case D3DTSS_COLORARG2:
|
1271 | | - if((dwValue & D3DTA_SELECTMASK) > 4) return DDERR_INVALIDPARAMS;
|
1272 | | - if(dwValue > 0x34) return DDERR_INVALIDPARAMS;
|
| 1402 | + if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1403 | + if(dwValue > 0x34) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1273 | 1404 | texstages[dwStage].colorarg2 = dwValue;
|
1274 | 1405 | texstages[dwStage].dirty = true;
|
| 1406 | + TRACE_EXIT(23,D3D_OK);
|
1275 | 1407 | return D3D_OK;
|
1276 | 1408 | case D3DTSS_ALPHAOP:
|
1277 | | - if(!dwValue || (dwValue > 24)) return DDERR_INVALIDPARAMS;
|
| 1409 | + if(!dwValue || (dwValue > 24)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1278 | 1410 | if(dwStage == 0)renderstate[D3DRENDERSTATE_TEXTUREMAPBLEND] = 0;
|
1279 | 1411 | texstages[dwStage].alphaop = (D3DTEXTUREOP )dwValue;
|
1280 | 1412 | texstages[dwStage].dirty = true;
|
| 1413 | + TRACE_EXIT(23,D3D_OK);
|
1281 | 1414 | return D3D_OK;
|
1282 | 1415 | case D3DTSS_ALPHAARG1:
|
1283 | | - if((dwValue & D3DTA_SELECTMASK) > 4) return DDERR_INVALIDPARAMS;
|
1284 | | - if(dwValue > 0x34) return DDERR_INVALIDPARAMS;
|
| 1416 | + if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1417 | + if(dwValue > 0x34) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1285 | 1418 | texstages[dwStage].alphaarg1 = dwValue;
|
1286 | 1419 | texstages[dwStage].dirty = true;
|
| 1420 | + TRACE_RET(23,D3D_OK);
|
1287 | 1421 | return D3D_OK;
|
1288 | 1422 | case D3DTSS_ALPHAARG2:
|
1289 | | - if((dwValue & D3DTA_SELECTMASK) > 4) return DDERR_INVALIDPARAMS;
|
1290 | | - if(dwValue > 0x34) return DDERR_INVALIDPARAMS;
|
| 1423 | + if((dwValue & D3DTA_SELECTMASK) > 4) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1424 | + if(dwValue > 0x34) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1291 | 1425 | texstages[dwStage].alphaarg2 = dwValue;
|
1292 | 1426 | texstages[dwStage].dirty = true;
|
| 1427 | + TRACE_EXIT(23,D3D_OK);
|
1293 | 1428 | return D3D_OK;
|
1294 | 1429 | case D3DTSS_BUMPENVMAT00:
|
1295 | 1430 | memcpy(&texstages[dwStage].bumpenv00,&dwValue,sizeof(D3DVALUE));
|
1296 | 1431 | texstages[dwStage].dirty = true;
|
| 1432 | + TRACE_EXIT(23,D3D_OK);
|
1297 | 1433 | return D3D_OK;
|
1298 | 1434 | case D3DTSS_BUMPENVMAT01:
|
1299 | 1435 | memcpy(&texstages[dwStage].bumpenv01,&dwValue,sizeof(D3DVALUE));
|
1300 | 1436 | texstages[dwStage].dirty = true;
|
| 1437 | + TRACE_EXIT(23,D3D_OK);
|
1301 | 1438 | return D3D_OK;
|
1302 | 1439 | case D3DTSS_BUMPENVMAT10:
|
1303 | 1440 | memcpy(&texstages[dwStage].bumpenv10,&dwValue,sizeof(D3DVALUE));
|
1304 | 1441 | texstages[dwStage].dirty = true;
|
| 1442 | + TRACE_EXIT(23,D3D_OK);
|
1305 | 1443 | return D3D_OK;
|
1306 | 1444 | case D3DTSS_BUMPENVMAT11:
|
1307 | 1445 | memcpy(&texstages[dwStage].bumpenv11,&dwValue,sizeof(D3DVALUE));
|
1308 | 1446 | texstages[dwStage].dirty = true;
|
| 1447 | + TRACE_EXIT(23,D3D_OK);
|
1309 | 1448 | return D3D_OK;
|
1310 | 1449 | case D3DTSS_TEXCOORDINDEX:
|
1311 | | - if((dwValue & 0xFFFF) > 7) return DDERR_INVALIDPARAMS;
|
1312 | | - if((dwValue >> 16) > 3) return DDERR_INVALIDPARAMS;
|
| 1450 | + if((dwValue & 0xFFFF) > 7) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1451 | + if((dwValue >> 16) > 3) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1313 | 1452 | texstages[dwStage].texcoordindex = dwValue;
|
1314 | 1453 | texstages[dwStage].dirty = true;
|
| 1454 | + TRACE_EXIT(23,D3D_OK);
|
1315 | 1455 | return D3D_OK;
|
1316 | 1456 | case D3DTSS_ADDRESS:
|
1317 | | - if(!dwValue || (dwValue > 4)) return DDERR_INVALIDPARAMS;
|
| 1457 | + if(!dwValue || (dwValue > 4)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1318 | 1458 | texstages[dwStage].addressu = (D3DTEXTUREADDRESS)dwValue;
|
1319 | 1459 | texstages[dwStage].addressv = (D3DTEXTUREADDRESS)dwValue;
|
1320 | 1460 | texstages[dwStage].dirty = true;
|
| 1461 | + TRACE_EXIT(23,D3D_OK);
|
1321 | 1462 | return D3D_OK;
|
1322 | 1463 | case D3DTSS_ADDRESSU:
|
1323 | | - if(!dwValue || (dwValue > 4)) return DDERR_INVALIDPARAMS;
|
| 1464 | + if(!dwValue || (dwValue > 4)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1324 | 1465 | texstages[dwStage].addressu = (D3DTEXTUREADDRESS)dwValue;
|
1325 | 1466 | texstages[dwStage].dirty = true;
|
| 1467 | + TRACE_EXIT(23,D3D_OK);
|
1326 | 1468 | return D3D_OK;
|
1327 | 1469 | case D3DTSS_ADDRESSV:
|
1328 | | - if(!dwValue || (dwValue > 4)) return DDERR_INVALIDPARAMS;
|
| 1470 | + if(!dwValue || (dwValue > 4)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1329 | 1471 | texstages[dwStage].addressv = (D3DTEXTUREADDRESS)dwValue;
|
1330 | 1472 | texstages[dwStage].dirty = true;
|
| 1473 | + TRACE_EXIT(23,D3D_OK);
|
1331 | 1474 | return D3D_OK;
|
1332 | 1475 | case D3DTSS_BORDERCOLOR:
|
1333 | 1476 | texstages[dwStage].bordercolor = dwValue;
|
1334 | 1477 | texstages[dwStage].dirty = true;
|
| 1478 | + TRACE_EXIT(23,D3D_OK);
|
1335 | 1479 | return D3D_OK;
|
1336 | 1480 | case D3DTSS_MAGFILTER:
|
1337 | | - if(!dwValue || (dwValue > 5)) return DDERR_INVALIDPARAMS;
|
| 1481 | + if(!dwValue || (dwValue > 5)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1338 | 1482 | texstages[dwStage].magfilter = (D3DTEXTUREMAGFILTER)dwValue;
|
1339 | 1483 | texstages[dwStage].dirty = true;
|
1340 | 1484 | switch(texstages[dwStage].magfilter)
|
— | — | @@ -1349,9 +1493,10 @@ |
1350 | 1494 | texstages[dwStage].glmagfilter = GL_LINEAR;
|
1351 | 1495 | break;
|
1352 | 1496 | }
|
| 1497 | + TRACE_EXIT(23,D3D_OK);
|
1353 | 1498 | return D3D_OK;
|
1354 | 1499 | case D3DTSS_MINFILTER:
|
1355 | | - if(!dwValue || (dwValue > 3)) return DDERR_INVALIDPARAMS;
|
| 1500 | + if(!dwValue || (dwValue > 3)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1356 | 1501 | texstages[dwStage].minfilter = (D3DTEXTUREMINFILTER)dwValue;
|
1357 | 1502 | texstages[dwStage].dirty = true;
|
1358 | 1503 | switch(texstages[dwStage].minfilter)
|
— | — | @@ -1389,9 +1534,10 @@ |
1390 | 1535 | }
|
1391 | 1536 | break;
|
1392 | 1537 | }
|
| 1538 | + TRACE_EXIT(23,D3D_OK);
|
1393 | 1539 | return D3D_OK;
|
1394 | 1540 | case D3DTSS_MIPFILTER:
|
1395 | | - if(!dwValue || (dwValue > 3)) return DDERR_INVALIDPARAMS;
|
| 1541 | + if(!dwValue || (dwValue > 3)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1396 | 1542 | texstages[dwStage].mipfilter = (D3DTEXTUREMIPFILTER)dwValue;
|
1397 | 1543 | texstages[dwStage].dirty = true;
|
1398 | 1544 | switch(texstages[dwStage].mipfilter)
|
— | — | @@ -1431,42 +1577,51 @@ |
1432 | 1578 | }
|
1433 | 1579 | break;
|
1434 | 1580 | }
|
| 1581 | + TRACE_EXIT(23,D3D_OK);
|
1435 | 1582 | return D3D_OK;
|
1436 | 1583 | case D3DTSS_MIPMAPLODBIAS:
|
1437 | 1584 | memcpy(&texstages[dwStage].lodbias,&dwValue,sizeof(D3DVALUE));
|
1438 | 1585 | texstages[dwStage].dirty = true;
|
| 1586 | + TRACE_EXIT(23,D3D_OK);
|
1439 | 1587 | return D3D_OK;
|
1440 | 1588 | case D3DTSS_MAXMIPLEVEL:
|
1441 | 1589 | texstages[dwStage].miplevel = dwValue;
|
1442 | 1590 | texstages[dwStage].dirty = true;
|
| 1591 | + TRACE_EXIT(23,D3D_OK);
|
1443 | 1592 | return D3D_OK;
|
1444 | 1593 | case D3DTSS_MAXANISOTROPY:
|
1445 | 1594 | texstages[dwStage].anisotropy = dwValue;
|
1446 | 1595 | texstages[dwStage].dirty = true;
|
| 1596 | + TRACE_EXIT(23,D3D_OK);
|
1447 | 1597 | return D3D_OK;
|
1448 | 1598 | case D3DTSS_BUMPENVLSCALE:
|
1449 | 1599 | memcpy(&texstages[dwStage].bumpenvlscale,&dwValue,sizeof(D3DVALUE));
|
1450 | 1600 | texstages[dwStage].dirty = true;
|
| 1601 | + TRACE_EXIT(23,D3D_OK);
|
1451 | 1602 | return D3D_OK;
|
1452 | 1603 | case D3DTSS_BUMPENVLOFFSET:
|
1453 | 1604 | memcpy(&texstages[dwStage].bumpenvloffset,&dwValue,sizeof(D3DVALUE));
|
1454 | 1605 | texstages[dwStage].dirty = true;
|
| 1606 | + TRACE_EXIT(23,D3D_OK);
|
1455 | 1607 | return D3D_OK;
|
1456 | 1608 | case D3DTSS_TEXTURETRANSFORMFLAGS:
|
1457 | | - if((dwValue & 0xFF) > 4) return DDERR_INVALIDPARAMS;
|
1458 | | - if((dwValue >> 8) > 1) return DDERR_INVALIDPARAMS;
|
| 1609 | + if((dwValue & 0xFF) > 4) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1610 | + if((dwValue >> 8) > 1) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1459 | 1611 | texstages[dwStage].textransform = (D3DTEXTURETRANSFORMFLAGS)dwValue;
|
1460 | 1612 | texstages[dwStage].dirty = true;
|
| 1613 | + TRACE_EXIT(23,D3D_OK);
|
1461 | 1614 | return D3D_OK;
|
1462 | 1615 | default:
|
| 1616 | + TRACE_EXIT(23,DDERR_INVALIDPARAMS);
|
1463 | 1617 | return DDERR_INVALIDPARAMS;
|
1464 | 1618 | }
|
1465 | | - FIXME("glDirect3DDevice7::SetTextureStageState: stub");
|
| 1619 | + TRACE_RET(23,DDERR_GENERIC);
|
1466 | 1620 | ERR(DDERR_GENERIC);
|
1467 | 1621 | }
|
1468 | 1622 | HRESULT WINAPI glDirect3DDevice7::SetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
1469 | 1623 | {
|
1470 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1624 | + TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
| 1625 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1471 | 1626 | switch(dtstTransformStateType)
|
1472 | 1627 | {
|
1473 | 1628 | case D3DTRANSFORMSTATE_WORLD:
|
— | — | @@ -1473,31 +1628,39 @@ |
1474 | 1629 | memcpy(&matWorld,lpD3DMatrix,sizeof(D3DMATRIX));
|
1475 | 1630 | modelview_dirty = true;
|
1476 | 1631 | transform_dirty = true;
|
| 1632 | + TRACE_EXIT(23,D3D_OK);
|
1477 | 1633 | return D3D_OK;
|
1478 | 1634 | case D3DTRANSFORMSTATE_VIEW:
|
1479 | 1635 | memcpy(&matView,lpD3DMatrix,sizeof(D3DMATRIX));
|
1480 | 1636 | modelview_dirty = true;
|
1481 | 1637 | transform_dirty = true;
|
| 1638 | + TRACE_EXIT(23,D3D_OK);
|
1482 | 1639 | return D3D_OK;
|
1483 | 1640 | case D3DTRANSFORMSTATE_PROJECTION:
|
1484 | 1641 | memcpy(&matProjection,lpD3DMatrix,sizeof(D3DMATRIX));
|
1485 | 1642 | projection_dirty = true;
|
1486 | 1643 | transform_dirty = true;
|
| 1644 | + TRACE_EXIT(23,D3D_OK);
|
1487 | 1645 | return D3D_OK;
|
1488 | 1646 | default:
|
1489 | | - ERR(DDERR_INVALIDPARAMS);
|
| 1647 | + TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1490 | 1648 | }
|
| 1649 | + TRACE_EXIT(23,DDERR_GENERIC);
|
| 1650 | + return DDERR_GENERIC;
|
1491 | 1651 | }
|
1492 | 1652 | HRESULT WINAPI glDirect3DDevice7::SetViewport(LPD3DVIEWPORT7 lpViewport)
|
1493 | 1653 | {
|
1494 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1654 | + TRACE_ENTER(2,14,this,14,lpViewport);
|
| 1655 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1495 | 1656 | memcpy(&viewport,lpViewport,sizeof(D3DVIEWPORT7));
|
1496 | 1657 | transform_dirty = true;
|
| 1658 | + TRACE_EXIT(23,D3D_OK);
|
1497 | 1659 | return D3D_OK;
|
1498 | 1660 | }
|
1499 | 1661 | HRESULT WINAPI glDirect3DDevice7::ValidateDevice(LPDWORD lpdwPasses)
|
1500 | 1662 | {
|
1501 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1663 | + TRACE_ENTER(2,14,this,14,lpdwPasses);
|
| 1664 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1502 | 1665 | for(int i = 0; i < 8; i++)
|
1503 | 1666 | {
|
1504 | 1667 | switch(texstages[i].colorop)
|
— | — | @@ -1519,7 +1682,7 @@ |
1520 | 1683 | case D3DTOP_BLENDCURRENTALPHA:
|
1521 | 1684 | break;
|
1522 | 1685 | default:
|
1523 | | - return D3DERR_UNSUPPORTEDCOLOROPERATION;
|
| 1686 | + TRACE_RET(23,D3DERR_UNSUPPORTEDCOLOROPERATION);
|
1524 | 1687 | }
|
1525 | 1688 | }
|
1526 | 1689 | for(int i = 0; i < 8; i++)
|
— | — | @@ -1543,15 +1706,18 @@ |
1544 | 1707 | case D3DTOP_BLENDCURRENTALPHA:
|
1545 | 1708 | break;
|
1546 | 1709 | default:
|
1547 | | - return D3DERR_UNSUPPORTEDALPHAOPERATION;
|
| 1710 | + TRACE_RET(23,D3DERR_UNSUPPORTEDALPHAOPERATION);
|
1548 | 1711 | }
|
1549 | 1712 | }
|
1550 | 1713 | if(lpdwPasses) *lpdwPasses = 1;
|
| 1714 | + TRACE_VAR("*lpdwPasses",8,*lpdwPasses);
|
| 1715 | + TRACE_EXIT(23,D3D_OK);
|
1551 | 1716 | return D3D_OK;
|
1552 | 1717 | }
|
1553 | 1718 |
|
1554 | 1719 | void glDirect3DDevice7::SetDepthComp()
|
1555 | 1720 | {
|
| 1721 | + TRACE_ENTER(1,14,this);
|
1556 | 1722 | switch(renderstate[D3DRENDERSTATE_ZFUNC])
|
1557 | 1723 | {
|
1558 | 1724 | case D3DCMP_NEVER:
|
— | — | @@ -1580,10 +1746,12 @@ |
1581 | 1747 | ::SetDepthComp(GL_ALWAYS);
|
1582 | 1748 | break;
|
1583 | 1749 | }
|
| 1750 | + TRACE_EXIT(0,0);
|
1584 | 1751 | }
|
1585 | 1752 |
|
1586 | 1753 | D3DMATERIALHANDLE glDirect3DDevice7::AddMaterial(glDirect3DMaterial3 *material)
|
1587 | 1754 | {
|
| 1755 | + TRACE_ENTER(2,14,this,14,material);
|
1588 | 1756 | materials[materialcount] = material;
|
1589 | 1757 | material->AddRef();
|
1590 | 1758 | materialcount++;
|
— | — | @@ -1598,15 +1766,18 @@ |
1599 | 1767 | materialcount--;
|
1600 | 1768 | materials[materialcount] = NULL;
|
1601 | 1769 | material->Release();
|
1602 | | - return -1;
|
| 1770 | + TRACE_EXIT(9,0xFFFFFFFF);
|
| 1771 | + return 0xFFFFFFFF;
|
1603 | 1772 | }
|
1604 | 1773 | materials = newmat;
|
1605 | 1774 | }
|
| 1775 | + TRACE_EXIT(9,(materialcount-1));
|
1606 | 1776 | return materialcount-1;
|
1607 | 1777 | }
|
1608 | 1778 |
|
1609 | 1779 | D3DTEXTUREHANDLE glDirect3DDevice7::AddTexture(glDirectDrawSurface7 *texture)
|
1610 | 1780 | {
|
| 1781 | + TRACE_ENTER(2,14,this,14,texture);
|
1611 | 1782 | textures[texturecount] = texture;
|
1612 | 1783 | texture->AddRef();
|
1613 | 1784 | texturecount++;
|
— | — | @@ -1621,20 +1792,23 @@ |
1622 | 1793 | texturecount--;
|
1623 | 1794 | textures[texturecount] = NULL;
|
1624 | 1795 | texture->Release();
|
1625 | | - return -1;
|
| 1796 | + TRACE_EXIT(9,0xFFFFFFFF);
|
| 1797 | + return 0xFFFFFFFF;
|
1626 | 1798 | }
|
1627 | 1799 | textures = newtex;
|
1628 | 1800 | }
|
| 1801 | + TRACE_EXIT(9,(texturecount-1));
|
1629 | 1802 | return texturecount-1;
|
1630 | 1803 | }
|
1631 | 1804 |
|
1632 | 1805 | HRESULT glDirect3DDevice7::AddViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport)
|
1633 | 1806 | {
|
1634 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1635 | | - if(!lpDirect3DViewport) return DDERR_INVALIDPARAMS;
|
| 1807 | + TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
| 1808 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1809 | + if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1636 | 1810 | for(int i = 0; i < maxviewports; i++)
|
1637 | 1811 | {
|
1638 | | - if(viewports[i] == lpDirect3DViewport) return DDERR_INVALIDPARAMS;
|
| 1812 | + if(viewports[i] == lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1639 | 1813 | }
|
1640 | 1814 | viewports[viewportcount] = (glDirect3DViewport3*)lpDirect3DViewport;
|
1641 | 1815 | viewports[viewportcount]->AddRef();
|
— | — | @@ -1650,17 +1824,19 @@ |
1651 | 1825 | viewports[viewportcount]->Release();
|
1652 | 1826 | viewports[viewportcount] = NULL;
|
1653 | 1827 | maxviewports -= 32;
|
1654 | | - return DDERR_OUTOFMEMORY;
|
| 1828 | + TRACE_RET(23,DDERR_OUTOFMEMORY);
|
1655 | 1829 | }
|
1656 | 1830 | }
|
1657 | 1831 | viewports[viewportcount-1]->SetDevice(this);
|
| 1832 | + TRACE_EXIT(23,D3D_OK);
|
1658 | 1833 | return D3D_OK;
|
1659 | 1834 | }
|
1660 | 1835 |
|
1661 | 1836 | HRESULT glDirect3DDevice7::DeleteViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport)
|
1662 | 1837 | {
|
1663 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1664 | | - if(!lpDirect3DViewport) return DDERR_INVALIDPARAMS;
|
| 1838 | + TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
| 1839 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1840 | + if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1665 | 1841 | for(int i = 0; i < maxviewports; i++)
|
1666 | 1842 | {
|
1667 | 1843 | if(viewports[i] == lpDirect3DViewport)
|
— | — | @@ -1670,36 +1846,44 @@ |
1671 | 1847 | viewports[i]->Release();
|
1672 | 1848 | if(currentviewport == viewports[i]) currentviewport = NULL;
|
1673 | 1849 | viewports[i] = NULL;
|
| 1850 | + TRACE_EXIT(23,D3D_OK);
|
1674 | 1851 | return D3D_OK;
|
1675 | 1852 | }
|
1676 | 1853 | }
|
| 1854 | + TRACE_EXIT(23,DDERR_INVALIDPARAMS);
|
1677 | 1855 | return DDERR_INVALIDPARAMS;
|
1678 | 1856 | }
|
1679 | 1857 |
|
1680 | 1858 | HRESULT glDirect3DDevice7::NextViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport, LPDIRECT3DVIEWPORT3 *lplpAnotherViewport, DWORD dwFlags)
|
1681 | 1859 | {
|
1682 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1683 | | - if(!lpDirect3DViewport) return DDERR_INVALIDPARAMS;
|
1684 | | - if(!lplpAnotherViewport) return DDERR_INVALIDPARAMS;
|
| 1860 | + TRACE_ENTER(4,14,this,14,lpDirect3DViewport,14,lplpAnotherViewport,9,dwFlags);
|
| 1861 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1862 | + if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1863 | + if(!lplpAnotherViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1685 | 1864 | FIXME("glDirect3DDevice7::NextViewport: stub");
|
| 1865 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1686 | 1866 | return DDERR_GENERIC;
|
1687 | 1867 | }
|
1688 | 1868 |
|
1689 | 1869 | HRESULT glDirect3DDevice7::GetCurrentViewport(LPDIRECT3DVIEWPORT3 *lplpd3dViewport)
|
1690 | 1870 | {
|
1691 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1692 | | - if(!lplpd3dViewport) return DDERR_INVALIDPARAMS;
|
1693 | | - if(!currentviewport) return D3DERR_NOCURRENTVIEWPORT;
|
| 1871 | + TRACE_ENTER(2,14,this,14,lplpd3dViewport);
|
| 1872 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1873 | + if(!lplpd3dViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1874 | + if(!currentviewport) TRACE_RET(23,D3DERR_NOCURRENTVIEWPORT);
|
1694 | 1875 | *lplpd3dViewport = currentviewport;
|
1695 | 1876 | currentviewport->AddRef();
|
| 1877 | + TRACE_VAR("*lplpd3dViewport",14,*lplpd3dViewport);
|
| 1878 | + TRACE_EXIT(23,D3D_OK);
|
1696 | 1879 | return D3D_OK;
|
1697 | 1880 | }
|
1698 | 1881 |
|
1699 | 1882 | HRESULT glDirect3DDevice7::SetCurrentViewport(LPDIRECT3DVIEWPORT3 lpd3dViewport)
|
1700 | 1883 | {
|
1701 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1702 | | - if(!lpd3dViewport) return DDERR_INVALIDPARAMS;
|
1703 | | - if(currentviewport == lpd3dViewport) return D3D_OK;
|
| 1884 | + TRACE_ENTER(2,14,this,14,lpd3dViewport);
|
| 1885 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1886 | + if(!lpd3dViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 1887 | + if(currentviewport == lpd3dViewport) TRACE_RET(23,D3D_OK);
|
1704 | 1888 | for(int i = 0; i < maxviewports; i++)
|
1705 | 1889 | {
|
1706 | 1890 | if(lpd3dViewport == viewports[i])
|
— | — | @@ -1706,61 +1890,76 @@ |
1707 | 1891 | {
|
1708 | 1892 | viewports[i]->SetCurrent(true);
|
1709 | 1893 | currentviewport = (glDirect3DViewport3*)lpd3dViewport;
|
| 1894 | + TRACE_EXIT(23,D3D_OK);
|
1710 | 1895 | return D3D_OK;
|
1711 | 1896 | }
|
1712 | 1897 | }
|
| 1898 | + TRACE_EXIT(23,DDERR_INVALIDPARAMS);
|
1713 | 1899 | return DDERR_INVALIDPARAMS;
|
1714 | 1900 | }
|
1715 | 1901 |
|
1716 | 1902 | HRESULT glDirect3DDevice7::Begin(D3DPRIMITIVETYPE d3dpt, DWORD dwVertexTypeDesc, DWORD dwFlags)
|
1717 | 1903 | {
|
1718 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1904 | + TRACE_ENTER(4,14,this,8,d3dpt,9,dwVertexTypeDesc,9,dwFlags);
|
| 1905 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1719 | 1906 | FIXME("glDirect3DDevice7::Begin: stub");
|
| 1907 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1720 | 1908 | return DDERR_GENERIC;
|
1721 | 1909 | }
|
1722 | 1910 | HRESULT glDirect3DDevice7::BeginIndexed(D3DPRIMITIVETYPE dptPrimitiveType, DWORD dwVertexTypeDesc, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags)
|
1723 | 1911 | {
|
1724 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1725 | | - if(!lpvVertices) return DDERR_INVALIDPARAMS;
|
| 1912 | + TRACE_ENTER(6,14,this,8,dptPrimitiveType,9,dwVertexTypeDesc,14,lpvVertices,8,dwNumVertices,9,dwFlags);
|
| 1913 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1914 | + if(!lpvVertices) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1726 | 1915 | FIXME("glDirect3DDevice7::BeginIndexed: stub");
|
| 1916 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1727 | 1917 | return DDERR_GENERIC;
|
1728 | 1918 | }
|
1729 | 1919 | HRESULT glDirect3DDevice7::Index(WORD wVertexIndex)
|
1730 | 1920 | {
|
1731 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1921 | + TRACE_ENTER(2,14,this,5,wVertexIndex);
|
| 1922 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1732 | 1923 | FIXME("glDirect3DDevice7::Index: stub");
|
| 1924 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1733 | 1925 | return DDERR_GENERIC;
|
1734 | 1926 | }
|
1735 | 1927 | HRESULT glDirect3DDevice7::Vertex(LPVOID lpVertex)
|
1736 | 1928 | {
|
1737 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1738 | | - if(!lpVertex) return DDERR_INVALIDPARAMS;
|
| 1929 | + TRACE_ENTER(2,14,this,14,lpVertex);
|
| 1930 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1931 | + if(!lpVertex) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1739 | 1932 | FIXME("glDirect3DDevice7::Vertex: stub");
|
| 1933 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1740 | 1934 | return DDERR_GENERIC;
|
1741 | 1935 | }
|
1742 | 1936 | HRESULT glDirect3DDevice7::End(DWORD dwFlags)
|
1743 | 1937 | {
|
1744 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1938 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 1939 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1745 | 1940 | FIXME("glDirect3DDevice7::End: stub");
|
| 1941 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1746 | 1942 | return DDERR_GENERIC;
|
1747 | 1943 | }
|
1748 | 1944 |
|
1749 | 1945 | HRESULT glDirect3DDevice7::ComputeSphereVisibility3(LPD3DVECTOR lpCenters, LPD3DVALUE lpRadii, DWORD dwNumSpheres, DWORD dwFlags, LPDWORD lpdwReturnValues)
|
1750 | 1946 | {
|
1751 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 1947 | + TRACE_ENTER(6,14,this,14,lpCenters,14,lpRadii,8,dwNumSpheres,9,dwFlags,14,lpdwReturnValues);
|
| 1948 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1752 | 1949 | FIXME("glDirect3DDevice3::ComputeSphereVisibility: stub");
|
| 1950 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1753 | 1951 | return DDERR_GENERIC;
|
1754 | 1952 | }
|
1755 | 1953 |
|
1756 | 1954 | HRESULT glDirect3DDevice7::GetCaps3(LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc)
|
1757 | 1955 | {
|
1758 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1759 | | - if(!lpD3DHWDevDesc && !lpD3DHELDevDesc) return DDERR_INVALIDPARAMS;
|
| 1956 | + TRACE_ENTER(3,14,this,14,lpD3DHWDevDesc,14,lpD3DHELDevDesc);
|
| 1957 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1958 | + if(!lpD3DHWDevDesc && !lpD3DHELDevDesc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1760 | 1959 | D3DDEVICEDESC desc = d3ddesc3;
|
1761 | 1960 | if(lpD3DHELDevDesc)
|
1762 | 1961 | {
|
1763 | 1962 | desc.dwSize = lpD3DHELDevDesc->dwSize;
|
1764 | | - if(desc.dwSize < sizeof(D3DDEVICEDESC1)) return DDERR_INVALIDPARAMS;
|
| 1963 | + if(desc.dwSize < sizeof(D3DDEVICEDESC1)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1765 | 1964 | if(desc.dwSize > sizeof(D3DDEVICEDESC1)) desc.dwSize = sizeof(D3DDEVICEDESC);
|
1766 | 1965 | memcpy(lpD3DHELDevDesc, &desc, desc.dwSize);
|
1767 | 1966 | }
|
— | — | @@ -1768,54 +1967,61 @@ |
1769 | 1968 | if(lpD3DHWDevDesc)
|
1770 | 1969 | {
|
1771 | 1970 | desc.dwSize = lpD3DHWDevDesc->dwSize;
|
1772 | | - if(desc.dwSize < sizeof(D3DDEVICEDESC1)) return DDERR_INVALIDPARAMS;
|
| 1971 | + if(desc.dwSize < sizeof(D3DDEVICEDESC1)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1773 | 1972 | if(desc.dwSize > sizeof(D3DDEVICEDESC1)) desc.dwSize = sizeof(D3DDEVICEDESC);
|
1774 | 1973 | memcpy(lpD3DHWDevDesc, &desc, desc.dwSize);
|
1775 | 1974 | }
|
| 1975 | + TRACE_EXIT(23,D3D_OK);
|
1776 | 1976 | return D3D_OK;
|
1777 | 1977 | }
|
1778 | 1978 |
|
1779 | 1979 | HRESULT glDirect3DDevice7::GetLightState(D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState)
|
1780 | 1980 | {
|
1781 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1782 | | - if(!lpdwLightState)return DDERR_INVALIDPARAMS;
|
| 1981 | + TRACE_ENTER(3,14,this,30,dwLightStateType,14,lpdwLightState);
|
| 1982 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 1983 | + if(!lpdwLightState)TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1783 | 1984 | switch(dwLightStateType)
|
1784 | 1985 | {
|
1785 | 1986 | default:
|
| 1987 | + TRACE_EXIT(23,DDERR_INVALIDPARAMS);
|
1786 | 1988 | return DDERR_INVALIDPARAMS;
|
1787 | 1989 | case D3DLIGHTSTATE_MATERIAL:
|
1788 | 1990 | if(currentmaterial) *lpdwLightState = currentmaterial->handle;
|
1789 | 1991 | else *lpdwLightState = 0;
|
| 1992 | + TRACE_EXIT(23,D3D_OK);
|
1790 | 1993 | return D3D_OK;
|
1791 | 1994 | case D3DLIGHTSTATE_AMBIENT:
|
1792 | | - return GetRenderState(D3DRENDERSTATE_AMBIENT,lpdwLightState);
|
| 1995 | + TRACE_RET(23,GetRenderState(D3DRENDERSTATE_AMBIENT,lpdwLightState));
|
1793 | 1996 | case D3DLIGHTSTATE_COLORMODEL:
|
1794 | 1997 | *lpdwLightState = D3DCOLOR_RGB;
|
| 1998 | + TRACE_EXIT(23,D3D_OK);
|
1795 | 1999 | return D3D_OK;
|
1796 | 2000 | case D3DLIGHTSTATE_FOGMODE:
|
1797 | | - return GetRenderState(D3DRENDERSTATE_FOGVERTEXMODE,lpdwLightState);
|
| 2001 | + TRACE_RET(23,GetRenderState(D3DRENDERSTATE_FOGVERTEXMODE,lpdwLightState));
|
1798 | 2002 | case D3DLIGHTSTATE_FOGSTART:
|
1799 | | - return GetRenderState(D3DRENDERSTATE_FOGSTART,lpdwLightState);
|
| 2003 | + TRACE_RET(23,GetRenderState(D3DRENDERSTATE_FOGSTART,lpdwLightState));
|
1800 | 2004 | case D3DLIGHTSTATE_FOGEND:
|
1801 | | - return GetRenderState(D3DRENDERSTATE_FOGEND,lpdwLightState);
|
| 2005 | + TRACE_RET(23,GetRenderState(D3DRENDERSTATE_FOGEND,lpdwLightState));
|
1802 | 2006 | case D3DLIGHTSTATE_FOGDENSITY:
|
1803 | | - return GetRenderState(D3DRENDERSTATE_FOGDENSITY,lpdwLightState);
|
| 2007 | + TRACE_RET(23,GetRenderState(D3DRENDERSTATE_FOGDENSITY,lpdwLightState));
|
1804 | 2008 | case D3DLIGHTSTATE_COLORVERTEX:
|
1805 | | - return GetRenderState(D3DRENDERSTATE_COLORVERTEX,lpdwLightState);
|
| 2009 | + TRACE_RET(23,GetRenderState(D3DRENDERSTATE_COLORVERTEX,lpdwLightState));
|
1806 | 2010 | }
|
1807 | 2011 | }
|
1808 | 2012 | HRESULT glDirect3DDevice7::SetLightState(D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState)
|
1809 | 2013 | {
|
1810 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2014 | + TRACE_ENTER(3,14,this,30,dwLightStateType,9,dwLightState);
|
| 2015 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1811 | 2016 | switch(dwLightStateType)
|
1812 | 2017 | {
|
1813 | 2018 | default:
|
| 2019 | + TRACE_EXIT(23,DDERR_INVALIDPARAMS);
|
1814 | 2020 | return DDERR_INVALIDPARAMS;
|
1815 | 2021 | case D3DLIGHTSTATE_MATERIAL:
|
1816 | | - if(!dwLightState) return DDERR_INVALIDPARAMS;
|
| 2022 | + if(!dwLightState) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1817 | 2023 | if(dwLightState < materialcount)
|
1818 | 2024 | {
|
1819 | | - if(materials[dwLightState] == currentmaterial) return D3D_OK;
|
| 2025 | + if(materials[dwLightState] == currentmaterial) TRACE_RET(23,D3D_OK);
|
1820 | 2026 | if(materials[dwLightState])
|
1821 | 2027 | {
|
1822 | 2028 | if(currentmaterial)currentmaterial->SetCurrent(false);
|
— | — | @@ -1823,44 +2029,51 @@ |
1824 | 2030 | currentmaterial = materials[dwLightState];
|
1825 | 2031 | }
|
1826 | 2032 | }
|
| 2033 | + TRACE_EXIT(23,D3D_OK);
|
1827 | 2034 | return D3D_OK;
|
1828 | 2035 | case D3DLIGHTSTATE_AMBIENT:
|
1829 | | - return SetRenderState(D3DRENDERSTATE_AMBIENT,dwLightState);
|
| 2036 | + TRACE_RET(23,SetRenderState(D3DRENDERSTATE_AMBIENT,dwLightState));
|
1830 | 2037 | case D3DLIGHTSTATE_COLORMODEL:
|
| 2038 | + TRACE_EXIT(23,D3D_OK);
|
1831 | 2039 | return D3D_OK;
|
1832 | 2040 | case D3DLIGHTSTATE_FOGMODE:
|
1833 | | - return SetRenderState(D3DRENDERSTATE_FOGVERTEXMODE,dwLightState);
|
| 2041 | + TRACE_RET(23,SetRenderState(D3DRENDERSTATE_FOGVERTEXMODE,dwLightState));
|
1834 | 2042 | case D3DLIGHTSTATE_FOGSTART:
|
1835 | | - return SetRenderState(D3DRENDERSTATE_FOGSTART,dwLightState);
|
| 2043 | + TRACE_RET(23,SetRenderState(D3DRENDERSTATE_FOGSTART,dwLightState));
|
1836 | 2044 | case D3DLIGHTSTATE_FOGEND:
|
1837 | | - return SetRenderState(D3DRENDERSTATE_FOGEND,dwLightState);
|
| 2045 | + TRACE_RET(23,SetRenderState(D3DRENDERSTATE_FOGEND,dwLightState));
|
1838 | 2046 | case D3DLIGHTSTATE_FOGDENSITY:
|
1839 | | - return SetRenderState(D3DRENDERSTATE_FOGDENSITY,dwLightState);
|
| 2047 | + TRACE_RET(23,SetRenderState(D3DRENDERSTATE_FOGDENSITY,dwLightState));
|
1840 | 2048 | case D3DLIGHTSTATE_COLORVERTEX:
|
1841 | | - return SetRenderState(D3DRENDERSTATE_COLORVERTEX,dwLightState);
|
| 2049 | + TRACE_RET(23,SetRenderState(D3DRENDERSTATE_COLORVERTEX,dwLightState));
|
1842 | 2050 | }
|
1843 | 2051 | }
|
1844 | 2052 |
|
1845 | 2053 | HRESULT glDirect3DDevice7::GetStats(LPD3DSTATS lpD3DStats)
|
1846 | 2054 | {
|
1847 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1848 | | - if(!lpD3DStats) return DDERR_INVALIDPARAMS;
|
1849 | | - if(lpD3DStats->dwSize < sizeof(D3DSTATS)) return DDERR_INVALIDPARAMS;
|
| 2055 | + TRACE_ENTER(2,14,this,14,lpD3DStats);
|
| 2056 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2057 | + if(!lpD3DStats) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2058 | + if(lpD3DStats->dwSize < sizeof(D3DSTATS)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1850 | 2059 | memcpy(lpD3DStats,&stats,sizeof(D3DSTATS));
|
| 2060 | + TRACE_EXIT(23,D3D_OK);
|
1851 | 2061 | return D3D_OK;
|
1852 | 2062 | }
|
1853 | 2063 |
|
1854 | 2064 | HRESULT glDirect3DDevice7::SwapTextureHandles(LPDIRECT3DTEXTURE2 lpD3DTex1, LPDIRECT3DTEXTURE2 lpD3DTex2)
|
1855 | 2065 | {
|
1856 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1857 | | - if(!lpD3DTex1) return DDERR_INVALIDPARAMS;
|
1858 | | - if(!lpD3DTex2) return DDERR_INVALIDPARAMS;
|
| 2066 | + TRACE_ENTER(3,14,this,14,lpD3DTex1,14,lpD3DTex2);
|
| 2067 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2068 | + if(!lpD3DTex1) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2069 | + if(!lpD3DTex2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1859 | 2070 | FIXME("glDirect3DDevice7::SwapTextureHandles: stub");
|
| 2071 | + TRACE_EXIT(23,DDERR_GENERIC);
|
1860 | 2072 | return DDERR_GENERIC;
|
1861 | 2073 | }
|
1862 | 2074 |
|
1863 | 2075 | void glDirect3DDevice7::InitDX5()
|
1864 | 2076 | {
|
| 2077 | + TRACE_ENTER(1,14,this);
|
1865 | 2078 | SetRenderState(D3DRENDERSTATE_TEXTUREHANDLE,0);
|
1866 | 2079 | SetRenderState(D3DRENDERSTATE_TEXTUREADDRESS,D3DTADDRESS_WRAP);
|
1867 | 2080 | SetRenderState(D3DRENDERSTATE_WRAPU,FALSE);
|
— | — | @@ -1869,17 +2082,19 @@ |
1870 | 2083 | SetRenderState(D3DRENDERSTATE_TEXTUREMIN,D3DFILTER_NEAREST);
|
1871 | 2084 | SetRenderState(D3DRENDERSTATE_TEXTUREMAPBLEND,D3DTBLEND_MODULATE);
|
1872 | 2085 | SetRenderState(D3DRENDERSTATE_SPECULARENABLE,TRUE);
|
| 2086 | + TRACE_EXIT(0,0);
|
1873 | 2087 | }
|
1874 | 2088 |
|
1875 | 2089 | HRESULT glDirect3DDevice7::CreateMatrix(LPD3DMATRIXHANDLE lpD3DMatHandle)
|
1876 | 2090 | {
|
1877 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1878 | | - if(!lpD3DMatHandle) return DDERR_INVALIDPARAMS;
|
| 2091 | + TRACE_ENTER(2,14,this,14,lpD3DMatHandle);
|
| 2092 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2093 | + if(!lpD3DMatHandle) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1879 | 2094 | int foundslot = 0;
|
1880 | 2095 | if(!matrices)
|
1881 | 2096 | {
|
1882 | 2097 | matrices = (D3D1MATRIX*)malloc(16*sizeof(D3D1MATRIX));
|
1883 | | - if(!matrices) return DDERR_OUTOFMEMORY;
|
| 2098 | + if(!matrices) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
1884 | 2099 | ZeroMemory(matrices,16*sizeof(D3D1MATRIX));
|
1885 | 2100 | matrixcount = 16;
|
1886 | 2101 | }
|
— | — | @@ -1898,7 +2113,7 @@ |
1899 | 2114 | D3D1MATRIX *newmatrices;
|
1900 | 2115 | newcount = matrixcount + 16;
|
1901 | 2116 | newmatrices = (D3D1MATRIX*)realloc(matrices,newcount*sizeof(D3D1MATRIX));
|
1902 | | - if(!newmatrices) return DDERR_OUTOFMEMORY;
|
| 2117 | + if(!newmatrices) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
1903 | 2118 | ZeroMemory(&newmatrices[matrixcount],16*sizeof(D3D1MATRIX));
|
1904 | 2119 | matrices = newmatrices;
|
1905 | 2120 | foundslot = matrixcount;
|
— | — | @@ -1907,43 +2122,52 @@ |
1908 | 2123 | *lpD3DMatHandle = foundslot;
|
1909 | 2124 | __gluMakeIdentityf((GLfloat*)&matrices[foundslot].matrix);
|
1910 | 2125 | matrices[foundslot].active = TRUE;
|
| 2126 | + TRACE_VAR("*lpD3DMatHandle",9,*lpD3DMatHandle);
|
| 2127 | + TRACE_EXIT(23,D3D_OK);
|
1911 | 2128 | return D3D_OK;
|
1912 | 2129 | }
|
1913 | 2130 |
|
1914 | 2131 | HRESULT glDirect3DDevice7::DeleteMatrix(D3DMATRIXHANDLE d3dMatHandle)
|
1915 | 2132 | {
|
1916 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1917 | | - if(!d3dMatHandle) return DDERR_INVALIDPARAMS;
|
1918 | | - if(d3dMatHandle >= matrixcount) return DDERR_INVALIDPARAMS;
|
1919 | | - if(!matrices[d3dMatHandle].active) return D3DERR_MATRIX_DESTROY_FAILED;
|
| 2133 | + TRACE_ENTER(2,14,this,9,d3dMatHandle);
|
| 2134 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2135 | + if(!d3dMatHandle) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2136 | + if(d3dMatHandle >= matrixcount) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2137 | + if(!matrices[d3dMatHandle].active) TRACE_RET(23,D3DERR_MATRIX_DESTROY_FAILED);
|
1920 | 2138 | matrices[d3dMatHandle].active = FALSE;
|
| 2139 | + TRACE_EXIT(23,D3D_OK);
|
1921 | 2140 | return D3D_OK;
|
1922 | 2141 | }
|
1923 | 2142 |
|
1924 | 2143 | HRESULT glDirect3DDevice7::GetMatrix(D3DMATRIXHANDLE lpD3DMatHandle, LPD3DMATRIX lpD3DMatrix)
|
1925 | 2144 | {
|
1926 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2145 | + TRACE_ENTER(3,14,this,9,lpD3DMatHandle,14,lpD3DMatrix);
|
| 2146 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
1927 | 2147 | if(!lpD3DMatHandle)
|
1928 | 2148 | {
|
1929 | 2149 | __gluMakeIdentityf((GLfloat*)lpD3DMatrix);
|
| 2150 | + TRACE_EXIT(23,D3D_OK);
|
1930 | 2151 | return D3D_OK;
|
1931 | 2152 | }
|
1932 | | - if(lpD3DMatHandle >= matrixcount) return DDERR_INVALIDPARAMS;
|
1933 | | - if(!matrices[lpD3DMatHandle].active) return D3DERR_MATRIX_GETDATA_FAILED;
|
| 2153 | + if(lpD3DMatHandle >= matrixcount) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2154 | + if(!matrices[lpD3DMatHandle].active) TRACE_RET(23,D3DERR_MATRIX_GETDATA_FAILED);
|
1934 | 2155 | memcpy(lpD3DMatrix,&matrices[lpD3DMatHandle].matrix,sizeof(D3DMATRIX));
|
| 2156 | + TRACE_EXIT(23,D3D_OK);
|
1935 | 2157 | return D3D_OK;
|
1936 | 2158 | }
|
1937 | 2159 |
|
1938 | 2160 | HRESULT glDirect3DDevice7::SetMatrix(D3DMATRIXHANDLE d3dMatHandle, LPD3DMATRIX lpD3DMatrix)
|
1939 | 2161 | {
|
1940 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1941 | | - if(!d3dMatHandle) return DDERR_INVALIDPARAMS;
|
1942 | | - if(d3dMatHandle >= matrixcount) return DDERR_INVALIDPARAMS;
|
1943 | | - if(!matrices[d3dMatHandle].active) return D3DERR_MATRIX_SETDATA_FAILED;
|
| 2162 | + TRACE_ENTER(3,14,this,9,d3dMatHandle,14,lpD3DMatrix);
|
| 2163 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2164 | + if(!d3dMatHandle) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2165 | + if(d3dMatHandle >= matrixcount) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2166 | + if(!matrices[d3dMatHandle].active) TRACE_RET(23,D3DERR_MATRIX_SETDATA_FAILED);
|
1944 | 2167 | memcpy(&matrices[d3dMatHandle].matrix,lpD3DMatrix,sizeof(D3DMATRIX));
|
1945 | 2168 | if(d3dMatHandle == mhWorld) SetTransform(D3DTRANSFORMSTATE_WORLD,lpD3DMatrix);
|
1946 | 2169 | if(d3dMatHandle == mhView) SetTransform(D3DTRANSFORMSTATE_VIEW,lpD3DMatrix);
|
1947 | 2170 | if(d3dMatHandle == mhProjection) SetTransform(D3DTRANSFORMSTATE_PROJECTION,lpD3DMatrix);
|
| 2171 | + TRACE_EXIT(23,D3D_OK);
|
1948 | 2172 | return D3D_OK;
|
1949 | 2173 | }
|
1950 | 2174 |
|
— | — | @@ -1950,14 +2174,17 @@ |
1951 | 2175 | HRESULT glDirect3DDevice7::CreateExecuteBuffer(LPD3DEXECUTEBUFFERDESC lpDesc, LPDIRECT3DEXECUTEBUFFER* lplpDirect3DExecuteBuffer,
|
1952 | 2176 | IUnknown* pUnkOuter)
|
1953 | 2177 | {
|
1954 | | - if(!this) return DDERR_INVALIDOBJECT;
|
1955 | | - if(!lpDesc) return DDERR_INVALIDPARAMS;
|
1956 | | - if(!lplpDirect3DExecuteBuffer) return DDERR_INVALIDPARAMS;
|
1957 | | - if(pUnkOuter) return DDERR_INVALIDPARAMS;
|
1958 | | - if(lpDesc->dwSize != sizeof(D3DEXECUTEBUFFERDESC)) return DDERR_INVALIDPARAMS;
|
1959 | | - if(!(lpDesc->dwFlags & D3DDEB_BUFSIZE)) return DDERR_INVALIDPARAMS;
|
| 2178 | + TRACE_ENTER(4,14,this,14,lpDesc,14,lplpDirect3DExecuteBuffer,14,pUnkOuter);
|
| 2179 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2180 | + if(!lpDesc) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2181 | + if(!lplpDirect3DExecuteBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2182 | + if(pUnkOuter) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2183 | + if(lpDesc->dwSize != sizeof(D3DEXECUTEBUFFERDESC)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2184 | + if(!(lpDesc->dwFlags & D3DDEB_BUFSIZE)) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
1960 | 2185 | *lplpDirect3DExecuteBuffer = new glDirect3DExecuteBuffer(lpDesc);
|
1961 | | - if(!*lplpDirect3DExecuteBuffer) return DDERR_OUTOFMEMORY;
|
| 2186 | + if(!*lplpDirect3DExecuteBuffer) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
| 2187 | + TRACE_VAR("*lplpDirect3DExecuteBuffer",14,*lplpDirect3DExecuteBuffer);
|
| 2188 | + TRACE_EXIT(23,D3D_OK);
|
1962 | 2189 | return D3D_OK;
|
1963 | 2190 | }
|
1964 | 2191 |
|
— | — | @@ -1984,10 +2211,12 @@ |
1985 | 2212 |
|
1986 | 2213 | void glDirect3DDevice7::UpdateTransform()
|
1987 | 2214 | {
|
| 2215 | + TRACE_ENTER(1,14,this);
|
1988 | 2216 | GLfloat mat1[16];
|
1989 | 2217 | __gluMultMatricesf(matWorld,matView,mat1);
|
1990 | 2218 | __gluMultMatricesf(mat1,matProjection,matTransform);
|
1991 | 2219 | transform_dirty = false;
|
| 2220 | + TRACE_EXIT(0,0);
|
1992 | 2221 | }
|
1993 | 2222 |
|
1994 | 2223 | void CalculateExtents(D3DRECT *extents, D3DTLVERTEX *vertices, DWORD count)
|
— | — | @@ -2087,6 +2316,7 @@ |
2088 | 2317 |
|
2089 | 2318 | INT glDirect3DDevice7::TransformAndLight(D3DTLVERTEX **output, DWORD *outsize, D3DVERTEX *input, WORD start, WORD dest, DWORD count, D3DRECT *extents)
|
2090 | 2319 | {
|
| 2320 | + TRACE_ENTER(8,14,this,14,output,14,outsize,14,input,5,start,5,dest,8,count,14,extents);
|
2091 | 2321 | D3DVALUE dir[3];
|
2092 | 2322 | D3DVALUE eye[3] = {0.0,0.0,1.0};
|
2093 | 2323 | D3DVALUE P[4];
|
— | — | @@ -2109,7 +2339,7 @@ |
2110 | 2340 | if(*outsize < (dest+count)*sizeof(D3DTLVERTEX))
|
2111 | 2341 | {
|
2112 | 2342 | D3DTLVERTEX *tmpptr = (D3DTLVERTEX*)realloc(*output,(dest+count)*sizeof(D3DTLVERTEX));
|
2113 | | - if(!tmpptr) return -1;
|
| 2343 | + if(!tmpptr) TRACE_RET(11,-1);
|
2114 | 2344 | *output = tmpptr;
|
2115 | 2345 | *outsize = (dest+count)*sizeof(D3DTLVERTEX);
|
2116 | 2346 | }
|
— | — | @@ -2208,10 +2438,12 @@ |
2209 | 2439 | }
|
2210 | 2440 | }
|
2211 | 2441 | if(extents) CalculateExtents(extents,*output,count);
|
| 2442 | + TRACE_EXIT(11,0);
|
2212 | 2443 | return 0;
|
2213 | 2444 | }
|
2214 | 2445 | INT glDirect3DDevice7::TransformOnly(D3DTLVERTEX **output, DWORD *outsize, D3DVERTEX *input, WORD start, WORD dest, DWORD count, D3DRECT *extents)
|
2215 | 2446 | {
|
| 2447 | + TRACE_ENTER(8,14,this,14,output,14,outsize,14,input,5,start,5,dest,8,count,14,extents);
|
2216 | 2448 | GLfloat in[4];
|
2217 | 2449 | in[3] = 1.0f;
|
2218 | 2450 | if(transform_dirty) UpdateTransform();
|
— | — | @@ -2218,7 +2450,7 @@ |
2219 | 2451 | if(*outsize < (dest+count)*sizeof(D3DTLVERTEX))
|
2220 | 2452 | {
|
2221 | 2453 | D3DTLVERTEX *tmpptr = (D3DTLVERTEX*)realloc(*output,(dest+count)*sizeof(D3DTLVERTEX));
|
2222 | | - if(!tmpptr) return -1;
|
| 2454 | + if(!tmpptr) TRACE_RET(11,-1);
|
2223 | 2455 | *output = tmpptr;
|
2224 | 2456 | *outsize = (dest+count)*sizeof(D3DTLVERTEX);
|
2225 | 2457 | }
|
— | — | @@ -2236,10 +2468,12 @@ |
2237 | 2469 | (*output)[i+dest].dvTV = input[i+start].dvTV;
|
2238 | 2470 | }
|
2239 | 2471 | if(extents) CalculateExtents(extents,*output,count);
|
| 2472 | + TRACE_EXIT(11,0);
|
2240 | 2473 | return 0;
|
2241 | 2474 | }
|
2242 | 2475 | INT glDirect3DDevice7::TransformOnly(D3DTLVERTEX **output, DWORD *outsize, D3DLVERTEX *input, WORD start, WORD dest, DWORD count, D3DRECT *extents)
|
2243 | 2476 | {
|
| 2477 | + TRACE_ENTER(8,14,this,14,output,14,outsize,14,input,5,start,5,dest,8,count,14,extents);
|
2244 | 2478 | GLfloat in[4];
|
2245 | 2479 | in[3] = 1.0f;
|
2246 | 2480 | if(transform_dirty) UpdateTransform();
|
— | — | @@ -2246,7 +2480,7 @@ |
2247 | 2481 | if(*outsize < (dest+count)*sizeof(D3DTLVERTEX))
|
2248 | 2482 | {
|
2249 | 2483 | D3DTLVERTEX *tmpptr = (D3DTLVERTEX*)realloc(*output,(dest+count)*sizeof(D3DTLVERTEX));
|
2250 | | - if(!tmpptr) return -1;
|
| 2484 | + if(!tmpptr) TRACE_RET(11,-1);
|
2251 | 2485 | *output = tmpptr;
|
2252 | 2486 | *outsize = (dest+count)*sizeof(D3DTLVERTEX);
|
2253 | 2487 | }
|
— | — | @@ -2264,33 +2498,38 @@ |
2265 | 2499 | (*output)[i+dest].dvTV = input[i+start].dvTV;
|
2266 | 2500 | }
|
2267 | 2501 | if(extents) CalculateExtents(extents,*output,count);
|
| 2502 | + TRACE_EXIT(11,0);
|
2268 | 2503 | return 0;
|
2269 | 2504 | }
|
2270 | 2505 | INT glDirect3DDevice7::CopyVertices(D3DTLVERTEX **output, DWORD *outsize, D3DTLVERTEX *input, WORD start, WORD dest, DWORD count, D3DRECT *extents)
|
2271 | 2506 | {
|
| 2507 | + TRACE_ENTER(8,14,this,14,output,14,outsize,14,input,5,start,5,dest,8,count,14,extents);
|
2272 | 2508 | if(transform_dirty) UpdateTransform();
|
2273 | 2509 | if(*outsize < (dest+count)*sizeof(D3DTLVERTEX))
|
2274 | 2510 | {
|
2275 | 2511 | D3DTLVERTEX *tmpptr = (D3DTLVERTEX*)realloc(*output,(dest+count)*sizeof(D3DTLVERTEX));
|
2276 | | - if(!tmpptr) return -1;
|
| 2512 | + if(!tmpptr) TRACE_RET(11,-1);
|
2277 | 2513 | *output = tmpptr;
|
2278 | 2514 | *outsize = (dest+count)*sizeof(D3DTLVERTEX);
|
2279 | 2515 | }
|
2280 | 2516 | memcpy(&(*output)[dest],&input[start],count*sizeof(D3DTLVERTEX));
|
2281 | 2517 | if(extents) CalculateExtents(extents,*output,count);
|
| 2518 | + TRACE_EXIT(11,0);
|
2282 | 2519 | return 0;
|
2283 | 2520 | }
|
2284 | 2521 |
|
2285 | 2522 | HRESULT glDirect3DDevice7::Execute(LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags)
|
2286 | 2523 | {
|
2287 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2288 | | - if(!lpDirect3DExecuteBuffer) return DDERR_INVALIDPARAMS;
|
2289 | | - if(!lpDirect3DViewport) return DDERR_INVALIDPARAMS;
|
| 2524 | + TRACE_ENTER(4,14,this,14,lpDirect3DExecuteBuffer,14,lpDirect3DViewport,9,dwFlags);
|
| 2525 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2526 | + if(!lpDirect3DExecuteBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2527 | + if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2290 | 2528 | LPDIRECT3DVIEWPORT3 vp;
|
2291 | 2529 | lpDirect3DViewport->QueryInterface(IID_IDirect3DViewport3,(void**)&vp);
|
2292 | 2530 | if(FAILED(SetCurrentViewport(vp)))
|
2293 | 2531 | {
|
2294 | 2532 | vp->Release();
|
| 2533 | + TRACE_EXIT(23,DDERR_INVALIDPARAMS);
|
2295 | 2534 | return DDERR_INVALIDPARAMS;
|
2296 | 2535 | }
|
2297 | 2536 | vp->Release();
|
— | — | @@ -2297,7 +2536,7 @@ |
2298 | 2537 | D3DEXECUTEBUFFERDESC desc;
|
2299 | 2538 | D3DEXECUTEDATA data;
|
2300 | 2539 | HRESULT err = ((glDirect3DExecuteBuffer*)lpDirect3DExecuteBuffer)->ExecuteLock(&desc,&data);
|
2301 | | - if(FAILED(err)) return err;
|
| 2540 | + if(FAILED(err)) TRACE_RET(23,err);
|
2302 | 2541 | unsigned char *opptr = (unsigned char *)desc.lpData + data.dwInstructionOffset;
|
2303 | 2542 | unsigned char *in_vertptr = (unsigned char *)desc.lpData + data.dwVertexOffset;
|
2304 | 2543 | DWORD offset;
|
— | — | @@ -2308,7 +2547,7 @@ |
2309 | 2548 | if(outbuffersize < desc.dwBufferSize)
|
2310 | 2549 | {
|
2311 | 2550 | unsigned char *tmpbuffer = (unsigned char *)realloc(outbuffer,desc.dwBufferSize);
|
2312 | | - if(!tmpbuffer) return DDERR_OUTOFMEMORY;
|
| 2551 | + if(!tmpbuffer) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
2313 | 2552 | outbuffer = tmpbuffer;
|
2314 | 2553 | outbuffersize = desc.dwBufferSize;
|
2315 | 2554 | }
|
— | — | @@ -2332,7 +2571,7 @@ |
2333 | 2572 | {
|
2334 | 2573 | if(!ExpandBuffer((void**)&ebBuffer,&ebBufferSize,(((D3DPOINT*)opptr)->wCount*sizeof(D3DVERTEX) > 1024) ?
|
2335 | 2574 | ((D3DPOINT*)opptr)->wCount*sizeof(D3DVERTEX) : 1024))
|
2336 | | - return DDERR_OUTOFMEMORY;
|
| 2575 | + TRACE_RET(23,DDERR_OUTOFMEMORY);
|
2337 | 2576 | }
|
2338 | 2577 | memcpy(&ebBuffer+offset,&vert_ptr[((D3DPOINT*)opptr)->wFirst],((D3DPOINT*)opptr)->wCount*sizeof(D3DVERTEX));
|
2339 | 2578 | offset+=((D3DPOINT*)opptr)->wCount;
|
— | — | @@ -2351,7 +2590,7 @@ |
2352 | 2591 | {
|
2353 | 2592 | if(ebBufferSize < (offset + sizeof(D3DLINE)))
|
2354 | 2593 | {
|
2355 | | - if(!ExpandBuffer((void**)&ebBuffer,&ebBufferSize,1024)) return DDERR_OUTOFMEMORY;
|
| 2594 | + if(!ExpandBuffer((void**)&ebBuffer,&ebBufferSize,1024)) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
2356 | 2595 | }
|
2357 | 2596 | memcpy(&ebBuffer+offset,opptr,sizeof(D3DLINE));
|
2358 | 2597 | offset += sizeof(D3DLINE);
|
— | — | @@ -2370,7 +2609,7 @@ |
2371 | 2610 | for(i = 0; i < instruction->wCount; i++)
|
2372 | 2611 | {
|
2373 | 2612 | result = AddTriangle(&ebBuffer,&ebBufferSize,&offset,(D3DTRIANGLE*)opptr);
|
2374 | | - if(result == -1) return DDERR_OUTOFMEMORY;
|
| 2613 | + if(result == -1) TRACE_RET(23,DDERR_OUTOFMEMORY);
|
2375 | 2614 | opptr += instruction->bSize;
|
2376 | 2615 | }
|
2377 | 2616 | if(instruction->wCount) DrawIndexedPrimitive(D3DPT_TRIANGLELIST,D3DFVF_TLVERTEX,vert_ptr,
|
— | — | @@ -2548,14 +2787,17 @@ |
2549 | 2788 | if(ebExit) break;
|
2550 | 2789 | }
|
2551 | 2790 | ((glDirect3DExecuteBuffer*)lpDirect3DExecuteBuffer)->ExecuteUnlock(&data);
|
| 2791 | + TRACE_EXIT(23,D3D_OK);
|
2552 | 2792 | return D3D_OK;
|
2553 | 2793 | }
|
2554 | 2794 |
|
2555 | 2795 | HRESULT glDirect3DDevice7::GetPickRecords(LPDWORD lpCount, LPD3DPICKRECORD lpD3DPickRec)
|
2556 | 2796 | {
|
2557 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2558 | | - if(!lpCount) return DDERR_INVALIDOBJECT;
|
| 2797 | + TRACE_ENTER(3,14,this,14,lpCount,14,lpD3DPickRec);
|
| 2798 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2799 | + if(!lpCount) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2559 | 2800 | FIXME("glDirect3DDevice1::GetPickRecords: stub");
|
| 2801 | + TRACE_EXIT(23,DDERR_GENERIC);
|
2560 | 2802 | ERR(DDERR_GENERIC);
|
2561 | 2803 | }
|
2562 | 2804 |
|
— | — | @@ -2562,11 +2804,13 @@ |
2563 | 2805 | HRESULT glDirect3DDevice7::Pick(LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags,
|
2564 | 2806 | LPD3DRECT lpRect)
|
2565 | 2807 | {
|
2566 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2567 | | - if(lpDirect3DExecuteBuffer) return DDERR_INVALIDPARAMS;
|
2568 | | - if(!lpDirect3DViewport) return DDERR_INVALIDPARAMS;
|
2569 | | - if(!lpRect) return DDERR_INVALIDPARAMS;
|
| 2808 | + TRACE_ENTER(5,14,this,14,lpDirect3DExecuteBuffer,14,lpDirect3DViewport,9,dwFlags,26,lpRect);
|
| 2809 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2810 | + if(lpDirect3DExecuteBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2811 | + if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2812 | + if(!lpRect) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2570 | 2813 | FIXME("glDirect3DDevice1::Pick: stub");
|
| 2814 | + TRACE_EXIT(23,DDERR_GENERIC);
|
2571 | 2815 | ERR(DDERR_GENERIC);
|
2572 | 2816 | }
|
2573 | 2817 |
|
— | — | @@ -2573,356 +2817,425 @@ |
2574 | 2818 | // IDirect3DDevice3 wrapper
|
2575 | 2819 | glDirect3DDevice3::glDirect3DDevice3(glDirect3DDevice7 *glD3DDev7)
|
2576 | 2820 | {
|
| 2821 | + TRACE_ENTER(2,14,this,14,glD3DDev7);
|
2577 | 2822 | this->glD3DDev7 = glD3DDev7;
|
2578 | 2823 | refcount = 1;
|
| 2824 | + TRACE_EXIT(-1,0);
|
2579 | 2825 | }
|
2580 | 2826 |
|
2581 | 2827 | glDirect3DDevice3::~glDirect3DDevice3()
|
2582 | 2828 | {
|
| 2829 | + TRACE_ENTER(1,14,this);
|
2583 | 2830 | glD3DDev7->glD3DDev3 = NULL;
|
2584 | 2831 | glD3DDev7->Release();
|
| 2832 | + TRACE_EXIT(-1,0);
|
2585 | 2833 | }
|
2586 | 2834 |
|
2587 | 2835 | HRESULT WINAPI glDirect3DDevice3::QueryInterface(REFIID riid, void** ppvObj)
|
2588 | 2836 | {
|
2589 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 2837 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 2838 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2590 | 2839 | if(riid == IID_IUnknown)
|
2591 | 2840 | {
|
2592 | 2841 | this->AddRef();
|
2593 | 2842 | *ppvObj = this;
|
| 2843 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 2844 | + TRACE_EXIT(23,DD_OK);
|
2594 | 2845 | return DD_OK;
|
2595 | 2846 | }
|
2596 | | - return glD3DDev7->QueryInterface(riid,ppvObj);
|
| 2847 | + TRACE_RET(23,glD3DDev7->QueryInterface(riid,ppvObj));
|
2597 | 2848 | }
|
2598 | 2849 |
|
2599 | 2850 | ULONG WINAPI glDirect3DDevice3::AddRef()
|
2600 | 2851 | {
|
2601 | | - if(!this) return 0;
|
| 2852 | + TRACE_ENTER(1,14,this);
|
| 2853 | + if(!this) TRACE_RET(8,0);
|
2602 | 2854 | refcount++;
|
| 2855 | + TRACE_EXIT(8,refcount);
|
2603 | 2856 | return refcount;
|
2604 | 2857 | }
|
2605 | 2858 |
|
2606 | 2859 | ULONG WINAPI glDirect3DDevice3::Release()
|
2607 | 2860 | {
|
2608 | | - if(!this) return 0;
|
| 2861 | + TRACE_ENTER(1,14,this);
|
| 2862 | + if(!this) TRACE_RET(8,0);
|
2609 | 2863 | ULONG ret;
|
2610 | 2864 | refcount--;
|
2611 | 2865 | ret = refcount;
|
2612 | 2866 | if(refcount == 0) delete this;
|
| 2867 | + TRACE_EXIT(8,ret);
|
2613 | 2868 | return ret;
|
2614 | 2869 | }
|
2615 | 2870 |
|
2616 | 2871 | HRESULT WINAPI glDirect3DDevice3::AddViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport)
|
2617 | 2872 | {
|
2618 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2619 | | - return glD3DDev7->AddViewport(lpDirect3DViewport);
|
| 2873 | + TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
| 2874 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2875 | + TRACE_RET(23,glD3DDev7->AddViewport(lpDirect3DViewport));
|
2620 | 2876 | }
|
2621 | 2877 |
|
2622 | 2878 | HRESULT WINAPI glDirect3DDevice3::Begin(D3DPRIMITIVETYPE d3dpt, DWORD dwVertexTypeDesc, DWORD dwFlags)
|
2623 | 2879 | {
|
2624 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2625 | | - return glD3DDev7->Begin(d3dpt,dwVertexTypeDesc,dwFlags);
|
| 2880 | + TRACE_ENTER(4,14,this,8,d3dpt,9,dwVertexTypeDesc,9,dwFlags);
|
| 2881 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2882 | + TRACE_RET(23,glD3DDev7->Begin(d3dpt,dwVertexTypeDesc,dwFlags));
|
2626 | 2883 | }
|
2627 | 2884 |
|
2628 | 2885 | HRESULT WINAPI glDirect3DDevice3::BeginIndexed(D3DPRIMITIVETYPE dptPrimitiveType, DWORD dwVertexTypeDesc, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags)
|
2629 | 2886 | {
|
2630 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2631 | | - return glD3DDev7->BeginIndexed(dptPrimitiveType,dwVertexTypeDesc,lpvVertices,dwNumVertices,dwFlags);
|
| 2887 | + TRACE_ENTER(6,14,this,8,dptPrimitiveType,9,dwVertexTypeDesc,14,lpvVertices,8,dwNumVertices,9,dwFlags);
|
| 2888 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2889 | + TRACE_RET(23,glD3DDev7->BeginIndexed(dptPrimitiveType,dwVertexTypeDesc,lpvVertices,dwNumVertices,dwFlags));
|
2632 | 2890 | }
|
2633 | 2891 |
|
2634 | 2892 | HRESULT WINAPI glDirect3DDevice3::BeginScene()
|
2635 | 2893 | {
|
2636 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2637 | | - return glD3DDev7->BeginScene();
|
| 2894 | + TRACE_ENTER(1,14,this);
|
| 2895 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2896 | + TRACE_RET(23,glD3DDev7->BeginScene());
|
2638 | 2897 | }
|
2639 | 2898 |
|
2640 | 2899 | HRESULT WINAPI glDirect3DDevice3::ComputeSphereVisibility(LPD3DVECTOR lpCenters, LPD3DVALUE lpRadii, DWORD dwNumSpheres, DWORD dwFlags, LPDWORD lpdwReturnValues)
|
2641 | 2900 | {
|
2642 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2643 | | - return glD3DDev7->ComputeSphereVisibility3(lpCenters,lpRadii,dwNumSpheres,dwFlags,lpdwReturnValues);
|
| 2901 | + TRACE_ENTER(6,14,this,14,lpCenters,14,lpRadii,8,dwNumSpheres,9,dwFlags,14,lpdwReturnValues);
|
| 2902 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2903 | + TRACE_RET(23,glD3DDev7->ComputeSphereVisibility3(lpCenters,lpRadii,dwNumSpheres,dwFlags,lpdwReturnValues));
|
2644 | 2904 | }
|
2645 | 2905 |
|
2646 | 2906 | HRESULT WINAPI glDirect3DDevice3::DeleteViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport)
|
2647 | 2907 | {
|
2648 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2649 | | - return glD3DDev7->DeleteViewport(lpDirect3DViewport);
|
| 2908 | + TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
| 2909 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2910 | + TRACE_RET(23,glD3DDev7->DeleteViewport(lpDirect3DViewport));
|
2650 | 2911 | }
|
2651 | 2912 |
|
2652 | 2913 | HRESULT WINAPI glDirect3DDevice3::DrawIndexedPrimitive(D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD dwVertexTypeDesc,
|
2653 | | - LPVOID lpvVertices, DWORD dwVertexCount, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
| 2914 | + LPVOID lpvVertices, DWORD dwVertexCount, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
2654 | 2915 | {
|
2655 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2656 | | - return glD3DDev7->DrawIndexedPrimitive(d3dptPrimitiveType,dwVertexTypeDesc,lpvVertices,dwVertexCount,lpwIndices,dwIndexCount,dwFlags);
|
| 2916 | + TRACE_ENTER(8,14,this,8,d3dptPrimitiveType,9,dwVertexTypeDesc,14,lpvVertices,8,dwVertexCount,14,lpwIndices,8,dwIndexCount,9,dwFlags);
|
| 2917 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2918 | + TRACE_RET(23,glD3DDev7->DrawIndexedPrimitive(d3dptPrimitiveType,dwVertexTypeDesc,lpvVertices,dwVertexCount,lpwIndices,dwIndexCount,dwFlags));
|
2657 | 2919 | }
|
2658 | 2920 |
|
2659 | 2921 | HRESULT WINAPI glDirect3DDevice3::DrawIndexedPrimitiveStrided(D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD dwVertexTypeDesc,
|
2660 | 2922 | LPD3DDRAWPRIMITIVESTRIDEDDATA lpVertexArray, DWORD dwVertexCount, LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
2661 | 2923 | {
|
2662 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2663 | | - return glD3DDev7->DrawIndexedPrimitiveStrided(d3dptPrimitiveType,dwVertexTypeDesc,lpVertexArray,dwVertexCount,lpwIndices,dwIndexCount,dwFlags);
|
| 2924 | + TRACE_ENTER(8,14,this,8,d3dptPrimitiveType,9,dwVertexTypeDesc,14,lpVertexArray,8,dwVertexCount,14,lpwIndices,8,dwIndexCount,9,dwFlags);
|
| 2925 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2926 | + TRACE_RET(23,glD3DDev7->DrawIndexedPrimitiveStrided(d3dptPrimitiveType,dwVertexTypeDesc,lpVertexArray,dwVertexCount,lpwIndices,dwIndexCount,dwFlags));
|
2664 | 2927 | }
|
2665 | 2928 |
|
2666 | 2929 | HRESULT WINAPI glDirect3DDevice3::DrawIndexedPrimitiveVB(D3DPRIMITIVETYPE d3dptPrimitiveType, LPDIRECT3DVERTEXBUFFER lpd3dVertexBuffer,
|
2667 | 2930 | LPWORD lpwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
2668 | 2931 | {
|
2669 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2670 | | - if(!lpd3dVertexBuffer) return DDERR_INVALIDPARAMS;
|
2671 | | - return glD3DDev7->DrawIndexedPrimitiveVB(d3dptPrimitiveType,
|
2672 | | - ((glDirect3DVertexBuffer1*)lpd3dVertexBuffer)->GetGLD3DVB7(),0,-1,lpwIndices,dwIndexCount,dwFlags);
|
| 2932 | + TRACE_ENTER(6,14,this,8,d3dptPrimitiveType,14,lpd3dVertexBuffer,14,lpwIndices,8,dwIndexCount,9,dwFlags);
|
| 2933 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2934 | + if(!lpd3dVertexBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2935 | + TRACE_RET(23,glD3DDev7->DrawIndexedPrimitiveVB(d3dptPrimitiveType,
|
| 2936 | + ((glDirect3DVertexBuffer1*)lpd3dVertexBuffer)->GetGLD3DVB7(),0,-1,lpwIndices,dwIndexCount,dwFlags));
|
2673 | 2937 | }
|
2674 | 2938 |
|
2675 | 2939 | HRESULT WINAPI glDirect3DDevice3::DrawPrimitive(D3DPRIMITIVETYPE dptPrimitiveType, DWORD dwVertexTypeDesc, LPVOID lpVertices,
|
2676 | 2940 | DWORD dwVertexCount, DWORD dwFlags)
|
2677 | 2941 | {
|
2678 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2679 | | - return glD3DDev7->DrawPrimitive(dptPrimitiveType,dwVertexTypeDesc,lpVertices,dwVertexCount,dwFlags);
|
| 2942 | + TRACE_ENTER(6,14,this,8,dptPrimitiveType,9,dwVertexTypeDesc,14,lpVertices,8,dwVertexCount,9,dwFlags);
|
| 2943 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2944 | + TRACE_RET(23,glD3DDev7->DrawPrimitive(dptPrimitiveType,dwVertexTypeDesc,lpVertices,dwVertexCount,dwFlags));
|
2680 | 2945 | }
|
2681 | 2946 |
|
2682 | 2947 | HRESULT WINAPI glDirect3DDevice3::DrawPrimitiveStrided(D3DPRIMITIVETYPE dptPrimitiveType, DWORD dwVertexTypeDesc,
|
2683 | 2948 | LPD3DDRAWPRIMITIVESTRIDEDDATA lpVertexArray, DWORD dwVertexCount, DWORD dwFlags)
|
2684 | 2949 | {
|
2685 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2686 | | - return glD3DDev7->DrawPrimitiveStrided(dptPrimitiveType,dwVertexTypeDesc,lpVertexArray,dwVertexCount,dwFlags);
|
| 2950 | + TRACE_ENTER(6,14,this,8,dptPrimitiveType,9,dwVertexTypeDesc,14,lpVertexArray,8,dwVertexCount,9,dwFlags);
|
| 2951 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2952 | + TRACE_RET(23,glD3DDev7->DrawPrimitiveStrided(dptPrimitiveType,dwVertexTypeDesc,lpVertexArray,dwVertexCount,dwFlags));
|
2687 | 2953 | }
|
2688 | 2954 |
|
2689 | 2955 | HRESULT WINAPI glDirect3DDevice3::DrawPrimitiveVB(D3DPRIMITIVETYPE d3dptPrimitiveType, LPDIRECT3DVERTEXBUFFER lpd3dVertexBuffer,
|
2690 | 2956 | DWORD dwStartVertex, DWORD dwNumVertices, DWORD dwFlags)
|
2691 | 2957 | {
|
2692 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2693 | | - if(!lpd3dVertexBuffer) return DDERR_INVALIDPARAMS;
|
2694 | | - return glD3DDev7->DrawPrimitiveVB(d3dptPrimitiveType,((glDirect3DVertexBuffer1*)lpd3dVertexBuffer)->GetGLD3DVB7(),
|
2695 | | - dwStartVertex,dwNumVertices,dwFlags);
|
| 2958 | + TRACE_ENTER(6,14,this,8,d3dptPrimitiveType,14,lpd3dVertexBuffer,8,dwStartVertex,8,dwNumVertices,9,dwFlags);
|
| 2959 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2960 | + if(!lpd3dVertexBuffer) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 2961 | + TRACE_RET(23,glD3DDev7->DrawPrimitiveVB(d3dptPrimitiveType,((glDirect3DVertexBuffer1*)lpd3dVertexBuffer)->GetGLD3DVB7(),
|
| 2962 | + dwStartVertex,dwNumVertices,dwFlags));
|
2696 | 2963 | }
|
2697 | 2964 | HRESULT WINAPI glDirect3DDevice3::End(DWORD dwFlags)
|
2698 | 2965 | {
|
2699 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2700 | | - return glD3DDev7->End(dwFlags);
|
| 2966 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 2967 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2968 | + TRACE_RET(23,glD3DDev7->End(dwFlags));
|
2701 | 2969 | }
|
2702 | 2970 |
|
2703 | 2971 | HRESULT WINAPI glDirect3DDevice3::EndScene()
|
2704 | 2972 | {
|
2705 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2706 | | - return glD3DDev7->EndScene();
|
| 2973 | + TRACE_ENTER(1,14,this);
|
| 2974 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2975 | + TRACE_RET(23,glD3DDev7->EndScene());
|
2707 | 2976 | }
|
2708 | 2977 |
|
2709 | 2978 | HRESULT WINAPI glDirect3DDevice3::EnumTextureFormats(LPD3DENUMPIXELFORMATSCALLBACK lpd3dEnumPixelProc, LPVOID lpArg)
|
2710 | 2979 | {
|
2711 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2712 | | - return glD3DDev7->EnumTextureFormats(lpd3dEnumPixelProc,lpArg);
|
| 2980 | + TRACE_ENTER(3,14,this,14,lpd3dEnumPixelProc,14,lpArg);
|
| 2981 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2982 | + TRACE_RET(23,glD3DDev7->EnumTextureFormats(lpd3dEnumPixelProc,lpArg));
|
2713 | 2983 | }
|
2714 | 2984 |
|
2715 | 2985 | HRESULT WINAPI glDirect3DDevice3::GetCaps(LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc)
|
2716 | 2986 | {
|
2717 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2718 | | - return glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc);
|
| 2987 | + TRACE_ENTER(3,14,this,14,lpD3DHWDevDesc,14,lpD3DHELDevDesc);
|
| 2988 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2989 | + TRACE_RET(23,glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc));
|
2719 | 2990 | }
|
2720 | 2991 |
|
2721 | 2992 | HRESULT WINAPI glDirect3DDevice3::GetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
2722 | 2993 | {
|
2723 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2724 | | - return glD3DDev7->GetClipStatus(lpD3DClipStatus);
|
| 2994 | + TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
| 2995 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 2996 | + TRACE_RET(23,glD3DDev7->GetClipStatus(lpD3DClipStatus));
|
2725 | 2997 | }
|
2726 | 2998 |
|
2727 | 2999 | HRESULT WINAPI glDirect3DDevice3::GetCurrentViewport(LPDIRECT3DVIEWPORT3 *lplpd3dViewport)
|
2728 | 3000 | {
|
2729 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2730 | | - return glD3DDev7->GetCurrentViewport(lplpd3dViewport);
|
| 3001 | + TRACE_ENTER(2,14,this,14,lplpd3dViewport);
|
| 3002 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3003 | + TRACE_RET(23,glD3DDev7->GetCurrentViewport(lplpd3dViewport));
|
2731 | 3004 | }
|
2732 | 3005 |
|
2733 | 3006 | HRESULT WINAPI glDirect3DDevice3::GetDirect3D(LPDIRECT3D3 *lplpD3D)
|
2734 | 3007 | {
|
2735 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3008 | + TRACE_ENTER(2,14,this,14,lplpD3D);
|
| 3009 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2736 | 3010 | LPDIRECT3D7 d3d7;
|
2737 | 3011 | HRESULT err = glD3DDev7->GetDirect3D(&d3d7);
|
2738 | | - if(!d3d7) return err;
|
| 3012 | + if(!d3d7) TRACE_RET(23,err);
|
2739 | 3013 | d3d7->QueryInterface(IID_IDirect3D3,(void**)lplpD3D);
|
2740 | 3014 | d3d7->Release();
|
| 3015 | + TRACE_VAR("*lplpD3D",14,*lplpD3D);
|
| 3016 | + TRACE_EXIT(23,err);
|
2741 | 3017 | return err;
|
2742 | 3018 | }
|
2743 | 3019 |
|
2744 | 3020 | HRESULT WINAPI glDirect3DDevice3::GetLightState(D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState)
|
2745 | 3021 | {
|
2746 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2747 | | - return glD3DDev7->GetLightState(dwLightStateType,lpdwLightState);
|
| 3022 | + TRACE_ENTER(3,14,this,30,dwLightStateType,14,lpdwLightState);
|
| 3023 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3024 | + TRACE_RET(23,glD3DDev7->GetLightState(dwLightStateType,lpdwLightState));
|
2748 | 3025 | }
|
2749 | 3026 |
|
2750 | 3027 | HRESULT WINAPI glDirect3DDevice3::GetRenderState(D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState)
|
2751 | 3028 | {
|
2752 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2753 | | - return glD3DDev7->GetRenderState(dwRenderStateType,lpdwRenderState);
|
| 3029 | + TRACE_ENTER(3,14,this,27,dwRenderStateType,14,lpdwRenderState);
|
| 3030 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3031 | + TRACE_RET(23,glD3DDev7->GetRenderState(dwRenderStateType,lpdwRenderState));
|
2754 | 3032 | }
|
2755 | 3033 |
|
2756 | 3034 | HRESULT WINAPI glDirect3DDevice3::GetRenderTarget(LPDIRECTDRAWSURFACE4 *lplpRenderTarget)
|
2757 | 3035 | {
|
2758 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3036 | + TRACE_ENTER(2,14,this,14,lplpRenderTarget);
|
| 3037 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2759 | 3038 | LPDIRECTDRAWSURFACE7 dds7;
|
2760 | 3039 | HRESULT err = glD3DDev7->GetRenderTarget(&dds7);
|
2761 | | - if(!dds7) return err;
|
| 3040 | + if(!dds7) TRACE_RET(23,err);
|
2762 | 3041 | dds7->QueryInterface(IID_IDirectDrawSurface4,(void**)lplpRenderTarget);
|
2763 | 3042 | dds7->Release();
|
| 3043 | + TRACE_VAR("*lplpRenderTarget",14,*lplpRenderTarget);
|
| 3044 | + TRACE_EXIT(23,err);
|
2764 | 3045 | return err;
|
2765 | 3046 | }
|
2766 | 3047 |
|
2767 | 3048 | HRESULT WINAPI glDirect3DDevice3::GetStats(LPD3DSTATS lpD3DStats)
|
2768 | 3049 | {
|
2769 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2770 | | - return glD3DDev7->GetStats(lpD3DStats);
|
| 3050 | + TRACE_ENTER(2,14,this,14,lpD3DStats);
|
| 3051 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3052 | + TRACE_RET(23,glD3DDev7->GetStats(lpD3DStats));
|
2771 | 3053 | }
|
2772 | 3054 |
|
2773 | | -HRESULT WINAPI glDirect3DDevice3::GetTexture(DWORD dwStage, LPDIRECT3DTEXTURE2 * lplpTexture)
|
| 3055 | +HRESULT WINAPI glDirect3DDevice3::GetTexture(DWORD dwStage, LPDIRECT3DTEXTURE2 *lplpTexture)
|
2774 | 3056 | {
|
2775 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3057 | + TRACE_ENTER(3,14,this,8,dwStage,14,lplpTexture);
|
| 3058 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2776 | 3059 | LPDIRECTDRAWSURFACE7 dds7;
|
2777 | 3060 | HRESULT err = glD3DDev7->GetTexture(dwStage,&dds7);
|
2778 | | - if(!dds7) return err;
|
| 3061 | + if(!dds7) TRACE_RET(23,err);
|
2779 | 3062 | dds7->QueryInterface(IID_IDirect3DTexture2,(void**)lplpTexture);
|
2780 | 3063 | dds7->Release();
|
| 3064 | + TRACE_VAR("*lplpTexture",14,*lplpTexture);
|
| 3065 | + TRACE_EXIT(23,err);
|
2781 | 3066 | return err;
|
2782 | 3067 | }
|
2783 | 3068 |
|
2784 | 3069 | HRESULT WINAPI glDirect3DDevice3::GetTextureStageState(DWORD dwStage, D3DTEXTURESTAGESTATETYPE dwState, LPDWORD lpdwValue)
|
2785 | 3070 | {
|
2786 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2787 | | - return glD3DDev7->GetTextureStageState(dwStage,dwState,lpdwValue);
|
| 3071 | + TRACE_ENTER(4,14,this,8,dwStage,28,dwState,14,lpdwValue);
|
| 3072 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3073 | + TRACE_RET(23,glD3DDev7->GetTextureStageState(dwStage,dwState,lpdwValue));
|
2788 | 3074 | }
|
2789 | 3075 |
|
2790 | 3076 | HRESULT WINAPI glDirect3DDevice3::GetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
2791 | 3077 | {
|
2792 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2793 | | - return glD3DDev7->GetTransform(dtstTransformStateType,lpD3DMatrix);
|
| 3078 | + TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
| 3079 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3080 | + TRACE_RET(23,glD3DDev7->GetTransform(dtstTransformStateType,lpD3DMatrix));
|
2794 | 3081 | }
|
2795 | 3082 |
|
2796 | 3083 | HRESULT WINAPI glDirect3DDevice3::Index(WORD wVertexIndex)
|
2797 | 3084 | {
|
2798 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2799 | | - return glD3DDev7->Index(wVertexIndex);
|
| 3085 | + TRACE_ENTER(2,14,this,5,wVertexIndex);
|
| 3086 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3087 | + TRACE_RET(23,glD3DDev7->Index(wVertexIndex));
|
2800 | 3088 | }
|
2801 | 3089 |
|
2802 | 3090 | HRESULT WINAPI glDirect3DDevice3::MultiplyTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
2803 | 3091 | {
|
2804 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2805 | | - return glD3DDev7->MultiplyTransform(dtstTransformStateType,lpD3DMatrix);
|
| 3092 | + TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
| 3093 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3094 | + TRACE_RET(23,glD3DDev7->MultiplyTransform(dtstTransformStateType,lpD3DMatrix));
|
2806 | 3095 | }
|
2807 | 3096 | HRESULT WINAPI glDirect3DDevice3::NextViewport(LPDIRECT3DVIEWPORT3 lpDirect3DViewport, LPDIRECT3DVIEWPORT3 *lplpAnotherViewport, DWORD dwFlags)
|
2808 | 3097 | {
|
2809 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2810 | | - return glD3DDev7->NextViewport(lpDirect3DViewport,lplpAnotherViewport,dwFlags);
|
| 3098 | + TRACE_ENTER(4,14,this,14,lpDirect3DViewport,14,lplpAnotherViewport,9,dwFlags);
|
| 3099 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3100 | + TRACE_RET(23,glD3DDev7->NextViewport(lpDirect3DViewport,lplpAnotherViewport,dwFlags));
|
2811 | 3101 | }
|
2812 | 3102 |
|
2813 | 3103 | HRESULT WINAPI glDirect3DDevice3::SetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
2814 | 3104 | {
|
2815 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2816 | | - return glD3DDev7->SetClipStatus(lpD3DClipStatus);
|
| 3105 | + TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
| 3106 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3107 | + TRACE_RET(23,glD3DDev7->SetClipStatus(lpD3DClipStatus));
|
2817 | 3108 | }
|
2818 | 3109 |
|
2819 | 3110 | HRESULT WINAPI glDirect3DDevice3::SetCurrentViewport(LPDIRECT3DVIEWPORT3 lpd3dViewport)
|
2820 | 3111 | {
|
2821 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2822 | | - return glD3DDev7->SetCurrentViewport(lpd3dViewport);
|
| 3112 | + TRACE_ENTER(2,14,this,14,lpd3dViewport);
|
| 3113 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3114 | + TRACE_RET(23,glD3DDev7->SetCurrentViewport(lpd3dViewport));
|
2823 | 3115 | }
|
2824 | 3116 |
|
2825 | 3117 | HRESULT WINAPI glDirect3DDevice3::SetLightState(D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState)
|
2826 | 3118 | {
|
2827 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2828 | | - return glD3DDev7->SetLightState(dwLightStateType,dwLightState);
|
| 3119 | + TRACE_ENTER(3,14,this,30,dwLightStateType,8,dwLightState);
|
| 3120 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3121 | + TRACE_RET(23,glD3DDev7->SetLightState(dwLightStateType,dwLightState));
|
2829 | 3122 | }
|
2830 | 3123 |
|
2831 | 3124 | HRESULT WINAPI glDirect3DDevice3::SetRenderState(D3DRENDERSTATETYPE dwRendStateType, DWORD dwRenderState)
|
2832 | 3125 | {
|
2833 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2834 | | - return glD3DDev7->SetRenderState(dwRendStateType,dwRenderState);
|
| 3126 | + TRACE_ENTER(3,14,this,27,dwRendStateType,9,dwRenderState);
|
| 3127 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3128 | + TRACE_RET(23,glD3DDev7->SetRenderState(dwRendStateType,dwRenderState));
|
2835 | 3129 | }
|
2836 | 3130 |
|
2837 | 3131 | HRESULT WINAPI glDirect3DDevice3::SetRenderTarget(LPDIRECTDRAWSURFACE4 lpNewRenderTarget, DWORD dwFlags)
|
2838 | 3132 | {
|
2839 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2840 | | - return glD3DDev7->SetRenderTarget(((glDirectDrawSurface4*)lpNewRenderTarget)->GetDDS7(),dwFlags);
|
| 3133 | + TRACE_ENTER(3,14,this,14,lpNewRenderTarget,9,dwFlags);
|
| 3134 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3135 | + TRACE_RET(23,glD3DDev7->SetRenderTarget(((glDirectDrawSurface4*)lpNewRenderTarget)->GetDDS7(),dwFlags));
|
2841 | 3136 | }
|
2842 | 3137 |
|
2843 | 3138 | HRESULT WINAPI glDirect3DDevice3::SetTexture(DWORD dwStage, LPDIRECT3DTEXTURE2 lpTexture)
|
2844 | 3139 | {
|
2845 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3140 | + TRACE_ENTER(3,14,this,8,dwStage,14,lpTexture);
|
| 3141 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2846 | 3142 | glDirectDrawSurface7 *dds7;
|
2847 | 3143 | if(lpTexture) dds7 = ((glDirect3DTexture2*)lpTexture)->GetDDS7();
|
2848 | 3144 | else dds7 = NULL;
|
2849 | | - return glD3DDev7->SetTexture(dwStage,dds7);
|
| 3145 | + TRACE_RET(23,glD3DDev7->SetTexture(dwStage,dds7));
|
2850 | 3146 | }
|
2851 | 3147 |
|
2852 | 3148 | HRESULT WINAPI glDirect3DDevice3::SetTextureStageState(DWORD dwStage, D3DTEXTURESTAGESTATETYPE dwState, DWORD dwValue)
|
2853 | 3149 | {
|
2854 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2855 | | - return glD3DDev7->SetTextureStageState(dwStage,dwState,dwValue);
|
| 3150 | + TRACE_ENTER(4,14,this,8,dwStage,28,dwState,9,dwValue);
|
| 3151 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3152 | + TRACE_RET(23,glD3DDev7->SetTextureStageState(dwStage,dwState,dwValue));
|
2856 | 3153 | }
|
2857 | 3154 |
|
2858 | 3155 | HRESULT WINAPI glDirect3DDevice3::SetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
2859 | 3156 | {
|
2860 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2861 | | - return glD3DDev7->SetTransform(dtstTransformStateType,lpD3DMatrix);
|
| 3157 | + TRACE_ENTER(3,14,this,27,dtstTransformStateType,14,lpD3DMatrix);
|
| 3158 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3159 | + TRACE_RET(23,glD3DDev7->SetTransform(dtstTransformStateType,lpD3DMatrix));
|
2862 | 3160 | }
|
2863 | 3161 |
|
2864 | 3162 | HRESULT WINAPI glDirect3DDevice3::ValidateDevice(LPDWORD lpdwPasses)
|
2865 | 3163 | {
|
2866 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2867 | | - return glD3DDev7->ValidateDevice(lpdwPasses);
|
| 3164 | + TRACE_ENTER(2,14,this,14,lpdwPasses);
|
| 3165 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3166 | + TRACE_RET(23,glD3DDev7->ValidateDevice(lpdwPasses));
|
2868 | 3167 | }
|
2869 | 3168 |
|
2870 | 3169 | HRESULT WINAPI glDirect3DDevice3::Vertex(LPVOID lpVertex)
|
2871 | 3170 | {
|
2872 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2873 | | - return glD3DDev7->Vertex(lpVertex);
|
| 3171 | + TRACE_ENTER(2,14,this,14,lpVertex);
|
| 3172 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3173 | + TRACE_RET(23,glD3DDev7->Vertex(lpVertex));
|
2874 | 3174 | }
|
2875 | 3175 |
|
2876 | 3176 | // IDirect3DDevice2 wrapper
|
2877 | 3177 | glDirect3DDevice2::glDirect3DDevice2(glDirect3DDevice7 *glD3DDev7)
|
2878 | 3178 | {
|
| 3179 | + TRACE_ENTER(2,14,this,14,glD3DDev7);
|
2879 | 3180 | this->glD3DDev7 = glD3DDev7;
|
2880 | 3181 | glD3DDev7->InitDX5();
|
2881 | 3182 | refcount = 1;
|
| 3183 | + TRACE_EXIT(-1,0);
|
2882 | 3184 | }
|
2883 | 3185 |
|
2884 | 3186 | glDirect3DDevice2::~glDirect3DDevice2()
|
2885 | 3187 | {
|
| 3188 | + TRACE_ENTER(1,14,this);
|
2886 | 3189 | glD3DDev7->glD3DDev2 = NULL;
|
2887 | 3190 | glD3DDev7->Release();
|
| 3191 | + TRACE_EXIT(-1,0);
|
2888 | 3192 | }
|
2889 | 3193 |
|
2890 | 3194 | HRESULT WINAPI glDirect3DDevice2::QueryInterface(REFIID riid, void** ppvObj)
|
2891 | 3195 | {
|
2892 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3196 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 3197 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2893 | 3198 | if(riid == IID_IUnknown)
|
2894 | 3199 | {
|
2895 | 3200 | this->AddRef();
|
2896 | 3201 | *ppvObj = this;
|
| 3202 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 3203 | + TRACE_EXIT(23,DD_OK);
|
2897 | 3204 | return DD_OK;
|
2898 | 3205 | }
|
2899 | | - return glD3DDev7->QueryInterface(riid,ppvObj);
|
| 3206 | + TRACE_RET(23,glD3DDev7->QueryInterface(riid,ppvObj));
|
2900 | 3207 | }
|
2901 | 3208 |
|
2902 | 3209 | ULONG WINAPI glDirect3DDevice2::AddRef()
|
2903 | 3210 | {
|
2904 | | - if(!this) return 0;
|
| 3211 | + TRACE_ENTER(1,14,this);
|
| 3212 | + if(!this) TRACE_EXIT(8,0);;
|
2905 | 3213 | refcount++;
|
| 3214 | + TRACE_EXIT(8,refcount);
|
2906 | 3215 | return refcount;
|
2907 | 3216 | }
|
2908 | 3217 |
|
2909 | 3218 | ULONG WINAPI glDirect3DDevice2::Release()
|
2910 | 3219 | {
|
2911 | | - if(!this) return 0;
|
| 3220 | + TRACE_ENTER(1,14,this);
|
| 3221 | + if(!this) TRACE_EXIT(8,0);
|
2912 | 3222 | ULONG ret;
|
2913 | 3223 | refcount--;
|
2914 | 3224 | ret = refcount;
|
2915 | 3225 | if(refcount == 0) delete this;
|
| 3226 | + TRACE_EXIT(8,ret);
|
2916 | 3227 | return ret;
|
2917 | 3228 | }
|
2918 | 3229 |
|
2919 | 3230 | HRESULT WINAPI glDirect3DDevice2::AddViewport(LPDIRECT3DVIEWPORT2 lpDirect3DViewport2)
|
2920 | 3231 | {
|
2921 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2922 | | - if(!lpDirect3DViewport2) return DDERR_INVALIDPARAMS;
|
| 3232 | + TRACE_ENTER(2,14,this,14,lpDirect3DViewport2);
|
| 3233 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3234 | + if(!lpDirect3DViewport2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
2923 | 3235 | glDirect3DViewport3 *glD3DV3;
|
2924 | 3236 | lpDirect3DViewport2->QueryInterface(IID_IDirect3DViewport3,(void**)&glD3DV3);
|
2925 | 3237 | HRESULT ret = glD3DDev7->AddViewport(glD3DV3);
|
2926 | 3238 | glD3DV3->Release();
|
| 3239 | + TRACE_EXIT(23,ret);
|
2927 | 3240 | return ret;
|
2928 | 3241 | }
|
2929 | 3242 |
|
— | — | @@ -2943,33 +3256,38 @@ |
2944 | 3257 |
|
2945 | 3258 | HRESULT WINAPI glDirect3DDevice2::Begin(D3DPRIMITIVETYPE d3dpt, D3DVERTEXTYPE d3dvt, DWORD dwFlags)
|
2946 | 3259 | {
|
2947 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3260 | + TRACE_ENTER(4,14,this,8,d3dpt,8,d3dvt,9,dwFlags);
|
| 3261 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2948 | 3262 | DWORD vertextype = d3dvttofvf(d3dvt);
|
2949 | | - if(!vertextype) return DDERR_INVALIDPARAMS;
|
2950 | | - return glD3DDev7->Begin(d3dpt,vertextype,dwFlags);
|
| 3263 | + if(!vertextype) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3264 | + TRACE_RET(23,glD3DDev7->Begin(d3dpt,vertextype,dwFlags));
|
2951 | 3265 | }
|
2952 | 3266 |
|
2953 | 3267 | HRESULT WINAPI glDirect3DDevice2::BeginIndexed(D3DPRIMITIVETYPE dptPrimitiveType, D3DVERTEXTYPE dvtVertexType, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags)
|
2954 | 3268 | {
|
2955 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3269 | + TRACE_ENTER(6,14,this,8,dptPrimitiveType,8,dvtVertexType,14,lpvVertices,8,dwNumVertices,9,dwFlags);
|
| 3270 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2956 | 3271 | DWORD vertextype = d3dvttofvf(dvtVertexType);
|
2957 | | - if(!vertextype) return DDERR_INVALIDPARAMS;
|
2958 | | - return glD3DDev7->BeginIndexed(dptPrimitiveType,vertextype,lpvVertices,dwNumVertices,dwFlags);
|
| 3272 | + if(!vertextype) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3273 | + TRACE_RET(23,glD3DDev7->BeginIndexed(dptPrimitiveType,vertextype,lpvVertices,dwNumVertices,dwFlags));
|
2959 | 3274 | }
|
2960 | 3275 |
|
2961 | 3276 | HRESULT WINAPI glDirect3DDevice2::BeginScene()
|
2962 | 3277 | {
|
2963 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2964 | | - return glD3DDev7->BeginScene();
|
| 3278 | + TRACE_ENTER(1,14,this);
|
| 3279 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3280 | + TRACE_RET(23,glD3DDev7->BeginScene());
|
2965 | 3281 | }
|
2966 | 3282 |
|
2967 | 3283 | HRESULT WINAPI glDirect3DDevice2::DeleteViewport(LPDIRECT3DVIEWPORT2 lpDirect3DViewport2)
|
2968 | 3284 | {
|
2969 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3285 | + TRACE_ENTER(2,14,this,14,lpDirect3DViewport2);
|
| 3286 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2970 | 3287 | glDirect3DViewport3 *glD3DV3;
|
2971 | 3288 | lpDirect3DViewport2->QueryInterface(IID_IDirect3DViewport3,(void**)&glD3DV3);
|
2972 | 3289 | HRESULT ret = glD3DDev7->DeleteViewport(glD3DV3);
|
2973 | 3290 | glD3DV3->Release();
|
| 3291 | + TRACE_EXIT(23,ret);
|
2974 | 3292 | return ret;
|
2975 | 3293 | }
|
2976 | 3294 |
|
— | — | @@ -2976,31 +3294,35 @@ |
2977 | 3295 | HRESULT WINAPI glDirect3DDevice2::DrawIndexedPrimitive(D3DPRIMITIVETYPE d3dptPrimitiveType, D3DVERTEXTYPE d3dvtVertexType,
|
2978 | 3296 | LPVOID lpvVertices, DWORD dwVertexCount, LPWORD dwIndices, DWORD dwIndexCount, DWORD dwFlags)
|
2979 | 3297 | {
|
2980 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3298 | + TRACE_ENTER(8,14,this,8,d3dptPrimitiveType,8,d3dvtVertexType,14,lpvVertices,8,dwVertexCount,14,dwIndices,8,dwIndexCount,9,dwFlags);
|
| 3299 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2981 | 3300 | DWORD vertextype = d3dvttofvf(d3dvtVertexType);
|
2982 | | - if(!vertextype) return DDERR_INVALIDPARAMS;
|
2983 | | - return glD3DDev7->DrawIndexedPrimitive(d3dptPrimitiveType,vertextype,lpvVertices,dwVertexCount,dwIndices,dwIndexCount,dwFlags);
|
| 3301 | + if(!vertextype) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3302 | + TRACE_RET(23,glD3DDev7->DrawIndexedPrimitive(d3dptPrimitiveType,vertextype,lpvVertices,dwVertexCount,dwIndices,dwIndexCount,dwFlags));
|
2984 | 3303 | }
|
2985 | 3304 |
|
2986 | 3305 | HRESULT WINAPI glDirect3DDevice2::DrawPrimitive(D3DPRIMITIVETYPE dptPrimitiveType, D3DVERTEXTYPE dvtVertexType, LPVOID lpvVertices,
|
2987 | 3306 | DWORD dwVertexCount, DWORD dwFlags)
|
2988 | 3307 | {
|
2989 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3308 | + TRACE_ENTER(6,14,this,8,dptPrimitiveType,8,dvtVertexType,14,lpvVertices,8,dwVertexCount,9,dwFlags);
|
| 3309 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
2990 | 3310 | DWORD vertextype = d3dvttofvf(dvtVertexType);
|
2991 | | - if(!vertextype) return DDERR_INVALIDPARAMS;
|
2992 | | - return glD3DDev7->DrawPrimitive(dptPrimitiveType,vertextype,lpvVertices,dwVertexCount,dwFlags);
|
| 3311 | + if(!vertextype) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3312 | + TRACE_RET(23,glD3DDev7->DrawPrimitive(dptPrimitiveType,vertextype,lpvVertices,dwVertexCount,dwFlags));
|
2993 | 3313 | }
|
2994 | 3314 |
|
2995 | 3315 | HRESULT WINAPI glDirect3DDevice2::End(DWORD dwFlags)
|
2996 | 3316 | {
|
2997 | | - if(!this) return DDERR_INVALIDOBJECT;
|
2998 | | - return glD3DDev7->End(dwFlags);
|
| 3317 | + TRACE_ENTER(2,14,this,9,dwFlags);
|
| 3318 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3319 | + TRACE_RET(23,glD3DDev7->End(dwFlags));
|
2999 | 3320 | }
|
3000 | 3321 |
|
3001 | 3322 | HRESULT WINAPI glDirect3DDevice2::EndScene()
|
3002 | 3323 | {
|
3003 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3004 | | - return glD3DDev7->EndScene();
|
| 3324 | + TRACE_ENTER(1,14,this);
|
| 3325 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3326 | + TRACE_RET(23,glD3DDev7->EndScene());
|
3005 | 3327 | }
|
3006 | 3328 |
|
3007 | 3329 | HRESULT WINAPI EnumTex2(LPDDPIXELFORMAT ddpf, LPVOID lpUserArg)
|
— | — | @@ -3021,322 +3343,386 @@ |
3022 | 3344 |
|
3023 | 3345 | HRESULT WINAPI glDirect3DDevice2::EnumTextureFormats(LPD3DENUMTEXTUREFORMATSCALLBACK lpd3dEnumTextureProc, LPVOID lpArg)
|
3024 | 3346 | {
|
3025 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3347 | + TRACE_ENTER(3,14,this,14,lpd3dEnumTextureProc,14,lpArg);
|
| 3348 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3026 | 3349 | LPVOID context[2];
|
3027 | 3350 | context[0] = (LPVOID)lpd3dEnumTextureProc;
|
3028 | 3351 | context[1] = lpArg;
|
3029 | | - return glD3DDev7->EnumTextureFormats(EnumTex2,&context);
|
| 3352 | + TRACE_RET(23,glD3DDev7->EnumTextureFormats(EnumTex2,&context));
|
3030 | 3353 | }
|
3031 | 3354 |
|
3032 | 3355 | HRESULT WINAPI glDirect3DDevice2::GetCaps(LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc)
|
3033 | 3356 | {
|
3034 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3035 | | - return glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc);
|
| 3357 | + TRACE_ENTER(3,14,this,14,lpD3DHWDevDesc,14,lpD3DHELDevDesc);
|
| 3358 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3359 | + TRACE_RET(23,glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc));
|
3036 | 3360 | }
|
3037 | 3361 |
|
3038 | 3362 | HRESULT WINAPI glDirect3DDevice2::GetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
3039 | 3363 | {
|
3040 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3041 | | - return glD3DDev7->GetClipStatus(lpD3DClipStatus);
|
| 3364 | + TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
| 3365 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3366 | + TRACE_RET(23,glD3DDev7->GetClipStatus(lpD3DClipStatus));
|
3042 | 3367 | }
|
3043 | 3368 |
|
3044 | 3369 | HRESULT WINAPI glDirect3DDevice2::GetCurrentViewport(LPDIRECT3DVIEWPORT2 *lplpd3dViewport2)
|
3045 | 3370 | {
|
3046 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3371 | + TRACE_ENTER(2,14,this,14,lplpd3dViewport2);
|
| 3372 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3047 | 3373 | glDirect3DViewport3 *glD3DV3;
|
3048 | 3374 | HRESULT ret = glD3DDev7->GetCurrentViewport((LPDIRECT3DVIEWPORT3*)&glD3DV3);
|
3049 | | - if(!glD3DV3) return ret;
|
| 3375 | + if(!glD3DV3) TRACE_RET(23,ret);
|
3050 | 3376 | glD3DV3->QueryInterface(IID_IDirect3DViewport2,(void**)lplpd3dViewport2);
|
3051 | 3377 | glD3DV3->Release();
|
| 3378 | + TRACE_VAR("*lplpd3dViewport2",14,*lplpd3dViewport2);
|
| 3379 | + TRACE_EXIT(23,ret);
|
3052 | 3380 | return ret;
|
3053 | 3381 | }
|
3054 | 3382 |
|
3055 | 3383 | HRESULT WINAPI glDirect3DDevice2::GetDirect3D(LPDIRECT3D2 *lplpD3D2)
|
3056 | 3384 | {
|
3057 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3385 | + TRACE_ENTER(2,14,this,14,lplpD3D2);
|
| 3386 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3058 | 3387 | LPDIRECT3D7 d3d7;
|
3059 | 3388 | HRESULT err = glD3DDev7->GetDirect3D(&d3d7);
|
3060 | | - if(!d3d7) return err;
|
| 3389 | + if(!d3d7) TRACE_RET(23,err);
|
3061 | 3390 | d3d7->QueryInterface(IID_IDirect3D2,(void**)lplpD3D2);
|
3062 | 3391 | d3d7->Release();
|
| 3392 | + TRACE_VAR("*lplpD3D2",14,*lplpD3D2);
|
| 3393 | + TRACE_EXIT(23,err);
|
3063 | 3394 | return err;
|
3064 | 3395 | }
|
3065 | 3396 |
|
3066 | 3397 | HRESULT WINAPI glDirect3DDevice2::GetLightState(D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState)
|
3067 | 3398 | {
|
3068 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3069 | | - return glD3DDev7->GetLightState(dwLightStateType,lpdwLightState);
|
| 3399 | + TRACE_ENTER(3,14,this,30,dwLightStateType,14,lpdwLightState);
|
| 3400 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3401 | + TRACE_RET(23,glD3DDev7->GetLightState(dwLightStateType,lpdwLightState));
|
3070 | 3402 | }
|
3071 | 3403 |
|
3072 | 3404 | HRESULT WINAPI glDirect3DDevice2::GetRenderState(D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState)
|
3073 | 3405 | {
|
3074 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3075 | | - return glD3DDev7->GetRenderState(dwRenderStateType,lpdwRenderState);
|
| 3406 | + TRACE_ENTER(3,14,this,27,dwRenderStateType,14,lpdwRenderState);
|
| 3407 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3408 | + TRACE_RET(23,glD3DDev7->GetRenderState(dwRenderStateType,lpdwRenderState));
|
3076 | 3409 | }
|
3077 | 3410 |
|
3078 | 3411 | HRESULT WINAPI glDirect3DDevice2::GetRenderTarget(LPDIRECTDRAWSURFACE *lplpRenderTarget)
|
3079 | 3412 | {
|
3080 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3413 | + TRACE_ENTER(2,14,this,14,lplpRenderTarget);
|
| 3414 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3081 | 3415 | LPDIRECTDRAWSURFACE7 dds7;
|
3082 | 3416 | HRESULT err = glD3DDev7->GetRenderTarget(&dds7);
|
3083 | | - if(!dds7) return err;
|
| 3417 | + if(!dds7) TRACE_RET(23,err);
|
3084 | 3418 | dds7->QueryInterface(IID_IDirectDrawSurface,(void**)lplpRenderTarget);
|
3085 | 3419 | dds7->Release();
|
| 3420 | + TRACE_VAR("*lplpRenderTarget",14,*lplpRenderTarget);
|
| 3421 | + TRACE_EXIT(23,err);
|
3086 | 3422 | return err;
|
3087 | 3423 | }
|
3088 | 3424 |
|
3089 | 3425 | HRESULT WINAPI glDirect3DDevice2::GetStats(LPD3DSTATS lpD3DStats)
|
3090 | 3426 | {
|
3091 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3092 | | - return glD3DDev7->GetStats(lpD3DStats);
|
| 3427 | + TRACE_ENTER(2,14,this,14,lpD3DStats);
|
| 3428 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3429 | + TRACE_RET(23,glD3DDev7->GetStats(lpD3DStats));
|
3093 | 3430 | }
|
3094 | 3431 |
|
3095 | 3432 | HRESULT WINAPI glDirect3DDevice2::GetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
3096 | 3433 | {
|
3097 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3098 | | - return glD3DDev7->GetTransform(dtstTransformStateType,lpD3DMatrix);
|
| 3434 | + TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
| 3435 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3436 | + TRACE_RET(23,glD3DDev7->GetTransform(dtstTransformStateType,lpD3DMatrix));
|
3099 | 3437 | }
|
3100 | 3438 |
|
3101 | 3439 | HRESULT WINAPI glDirect3DDevice2::Index(WORD wVertexIndex)
|
3102 | 3440 | {
|
3103 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3104 | | - return glD3DDev7->Index(wVertexIndex);
|
| 3441 | + TRACE_ENTER(2,14,this,5,wVertexIndex);
|
| 3442 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3443 | + TRACE_RET(23,glD3DDev7->Index(wVertexIndex));
|
3105 | 3444 | }
|
3106 | 3445 |
|
3107 | 3446 | HRESULT WINAPI glDirect3DDevice2::MultiplyTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
3108 | 3447 | {
|
3109 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3110 | | - return glD3DDev7->MultiplyTransform(dtstTransformStateType,lpD3DMatrix);
|
| 3448 | + TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
| 3449 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3450 | + TRACE_RET(23,glD3DDev7->MultiplyTransform(dtstTransformStateType,lpD3DMatrix));
|
3111 | 3451 | }
|
3112 | 3452 |
|
3113 | 3453 | HRESULT WINAPI glDirect3DDevice2::NextViewport(LPDIRECT3DVIEWPORT2 lpDirect3DViewport2, LPDIRECT3DVIEWPORT2 *lplpDirect3DViewport2, DWORD dwFlags)
|
3114 | 3454 | {
|
3115 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3116 | | - if(!lpDirect3DViewport2) return DDERR_INVALIDPARAMS;
|
3117 | | - if(!lplpDirect3DViewport2) return DDERR_INVALIDPARAMS;
|
| 3455 | + TRACE_ENTER(4,14,this,14,lpDirect3DViewport2,14,lplpDirect3DViewport2,9,dwFlags);
|
| 3456 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3457 | + if(!lpDirect3DViewport2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3458 | + if(!lplpDirect3DViewport2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
3118 | 3459 | FIXME("glDirect3DDevice2::NextViewport: stub");
|
| 3460 | + TRACE_EXIT(23,DDERR_GENERIC);
|
3119 | 3461 | ERR(DDERR_GENERIC);
|
3120 | 3462 | }
|
3121 | 3463 |
|
3122 | 3464 | HRESULT WINAPI glDirect3DDevice2::SetClipStatus(LPD3DCLIPSTATUS lpD3DClipStatus)
|
3123 | 3465 | {
|
3124 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3125 | | - return glD3DDev7->SetClipStatus(lpD3DClipStatus);
|
| 3466 | + TRACE_ENTER(2,14,this,14,lpD3DClipStatus);
|
| 3467 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3468 | + TRACE_RET(23,glD3DDev7->SetClipStatus(lpD3DClipStatus));
|
3126 | 3469 | }
|
3127 | 3470 |
|
3128 | 3471 | HRESULT WINAPI glDirect3DDevice2::SetCurrentViewport(LPDIRECT3DVIEWPORT2 lpd3dViewport2)
|
3129 | 3472 | {
|
3130 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3131 | | - if(!lpd3dViewport2) return glD3DDev7->SetCurrentViewport(NULL);
|
| 3473 | + TRACE_ENTER(2,14,this,14,lpd3dViewport2);
|
| 3474 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3475 | + if(!lpd3dViewport2) TRACE_RET(23,glD3DDev7->SetCurrentViewport(NULL));
|
3132 | 3476 | glDirect3DViewport3 *glD3DV3;
|
3133 | 3477 | lpd3dViewport2->QueryInterface(IID_IDirect3DViewport3,(void**)&glD3DV3);
|
3134 | 3478 | HRESULT ret = glD3DDev7->SetCurrentViewport(glD3DV3);
|
3135 | 3479 | glD3DV3->Release();
|
| 3480 | + TRACE_EXIT(23,ret);
|
3136 | 3481 | return ret;
|
3137 | 3482 | }
|
3138 | 3483 |
|
3139 | 3484 | HRESULT WINAPI glDirect3DDevice2::SetLightState(D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState)
|
3140 | 3485 | {
|
3141 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3142 | | - return glD3DDev7->SetLightState(dwLightStateType,dwLightState);
|
| 3486 | + TRACE_ENTER(3,14,this,30,dwLightStateType,9,dwLightState);
|
| 3487 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3488 | + TRACE_RET(23,glD3DDev7->SetLightState(dwLightStateType,dwLightState));
|
3143 | 3489 | }
|
3144 | 3490 |
|
3145 | 3491 | HRESULT WINAPI glDirect3DDevice2::SetRenderState(D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState)
|
3146 | 3492 | {
|
3147 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3148 | | - return glD3DDev7->SetRenderState(dwRenderStateType,dwRenderState);
|
| 3493 | + TRACE_ENTER(3,14,this,27,dwRenderStateType,9,dwRenderState);
|
| 3494 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3495 | + TRACE_RET(23,glD3DDev7->SetRenderState(dwRenderStateType,dwRenderState));
|
3149 | 3496 | }
|
3150 | 3497 |
|
3151 | 3498 | HRESULT WINAPI glDirect3DDevice2::SetRenderTarget(LPDIRECTDRAWSURFACE lpNewRenderTarget, DWORD dwFlags)
|
3152 | 3499 | {
|
3153 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3154 | | - return glD3DDev7->SetRenderTarget(((glDirectDrawSurface1*)lpNewRenderTarget)->GetDDS7(),dwFlags);
|
| 3500 | + TRACE_ENTER(3,14,this,14,lpNewRenderTarget,9,dwFlags);
|
| 3501 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3502 | + TRACE_RET(23,glD3DDev7->SetRenderTarget(((glDirectDrawSurface1*)lpNewRenderTarget)->GetDDS7(),dwFlags));
|
3155 | 3503 | }
|
3156 | 3504 |
|
3157 | 3505 | HRESULT WINAPI glDirect3DDevice2::SetTransform(D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix)
|
3158 | 3506 | {
|
3159 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3160 | | - return glD3DDev7->SetTransform(dtstTransformStateType,lpD3DMatrix);
|
| 3507 | + TRACE_ENTER(3,14,this,29,dtstTransformStateType,14,lpD3DMatrix);
|
| 3508 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3509 | + TRACE_RET(23,glD3DDev7->SetTransform(dtstTransformStateType,lpD3DMatrix));
|
3161 | 3510 | }
|
3162 | 3511 |
|
3163 | 3512 | HRESULT WINAPI glDirect3DDevice2::SwapTextureHandles(LPDIRECT3DTEXTURE2 lpD3DTex1, LPDIRECT3DTEXTURE2 lpD3DTex2)
|
3164 | 3513 | {
|
3165 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3166 | | - return glD3DDev7->SwapTextureHandles(lpD3DTex1,lpD3DTex2);
|
| 3514 | + TRACE_ENTER(3,14,this,14,lpD3DTex1,14,lpD3DTex2);
|
| 3515 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3516 | + TRACE_RET(23,glD3DDev7->SwapTextureHandles(lpD3DTex1,lpD3DTex2));
|
3167 | 3517 | }
|
3168 | 3518 |
|
3169 | 3519 | HRESULT WINAPI glDirect3DDevice2::Vertex(LPVOID lpVertexType)
|
3170 | 3520 | {
|
3171 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3172 | | - return glD3DDev7->Vertex(lpVertexType);
|
| 3521 | + TRACE_ENTER(2,14,this,14,lpVertexType);
|
| 3522 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3523 | + TRACE_RET(23,glD3DDev7->Vertex(lpVertexType));
|
3173 | 3524 | }
|
3174 | 3525 |
|
3175 | 3526 | // IDirect3DDevice wrapper
|
3176 | 3527 | glDirect3DDevice1::glDirect3DDevice1(glDirect3DDevice7 *glD3DDev7)
|
3177 | 3528 | {
|
| 3529 | + TRACE_ENTER(2,14,this,14,glD3DDev7);
|
3178 | 3530 | this->glD3DDev7 = glD3DDev7;
|
3179 | 3531 | glD3DDev7->InitDX5();
|
3180 | 3532 | refcount = 1;
|
| 3533 | + TRACE_EXIT(-1,0);
|
3181 | 3534 | }
|
3182 | 3535 |
|
3183 | 3536 | glDirect3DDevice1::~glDirect3DDevice1()
|
3184 | 3537 | {
|
| 3538 | + TRACE_ENTER(1,14,this);
|
3185 | 3539 | glD3DDev7->glD3DDev1 = NULL;
|
3186 | 3540 | glD3DDev7->Release();
|
| 3541 | + TRACE_EXIT(-1,0);
|
3187 | 3542 | }
|
3188 | 3543 |
|
3189 | 3544 | HRESULT WINAPI glDirect3DDevice1::QueryInterface(REFIID riid, void** ppvObj)
|
3190 | 3545 | {
|
3191 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3546 | + TRACE_ENTER(3,14,this,24,&riid,14,ppvObj);
|
| 3547 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3192 | 3548 | if(riid == IID_IUnknown)
|
3193 | 3549 | {
|
3194 | 3550 | this->AddRef();
|
3195 | 3551 | *ppvObj = this;
|
| 3552 | + TRACE_VAR("*ppvObj",14,*ppvObj);
|
| 3553 | + TRACE_EXIT(23,DD_OK);
|
3196 | 3554 | return DD_OK;
|
3197 | 3555 | }
|
3198 | | - return glD3DDev7->QueryInterface(riid,ppvObj);
|
| 3556 | + TRACE_RET(23,glD3DDev7->QueryInterface(riid,ppvObj));
|
3199 | 3557 | }
|
3200 | 3558 |
|
3201 | 3559 | ULONG WINAPI glDirect3DDevice1::AddRef()
|
3202 | 3560 | {
|
3203 | | - if(!this) return 0;
|
| 3561 | + TRACE_ENTER(1,14,this);
|
| 3562 | + if(!this) TRACE_RET(8,0);
|
3204 | 3563 | refcount++;
|
| 3564 | + TRACE_EXIT(8,refcount);
|
3205 | 3565 | return refcount;
|
3206 | 3566 | }
|
3207 | 3567 |
|
3208 | 3568 | ULONG WINAPI glDirect3DDevice1::Release()
|
3209 | 3569 | {
|
3210 | | - if(!this) return 0;
|
| 3570 | + TRACE_ENTER(1,14,this);
|
| 3571 | + if(!this) TRACE_RET(8,0);
|
3211 | 3572 | ULONG ret;
|
3212 | 3573 | refcount--;
|
3213 | 3574 | ret = refcount;
|
3214 | 3575 | if(refcount == 0) delete this;
|
| 3576 | + TRACE_EXIT(8,ret);
|
3215 | 3577 | return ret;
|
3216 | 3578 | }
|
3217 | 3579 |
|
3218 | 3580 | HRESULT WINAPI glDirect3DDevice1::AddViewport(LPDIRECT3DVIEWPORT lpDirect3DViewport)
|
3219 | 3581 | {
|
3220 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3221 | | - if(!lpDirect3DViewport) return DDERR_INVALIDPARAMS;
|
| 3582 | + TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
| 3583 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3584 | + if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
3222 | 3585 | glDirect3DViewport3 *glD3DV3;
|
3223 | 3586 | lpDirect3DViewport->QueryInterface(IID_IDirect3DViewport3,(void**)&glD3DV3);
|
3224 | 3587 | HRESULT ret = glD3DDev7->AddViewport(glD3DV3);
|
3225 | 3588 | glD3DV3->Release();
|
| 3589 | + TRACE_EXIT(23,ret);
|
3226 | 3590 | return ret;
|
3227 | 3591 | }
|
3228 | 3592 | HRESULT WINAPI glDirect3DDevice1::BeginScene()
|
3229 | 3593 | {
|
3230 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3231 | | - return glD3DDev7->BeginScene();
|
| 3594 | + TRACE_ENTER(1,14,this);
|
| 3595 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3596 | + TRACE_RET(23,glD3DDev7->BeginScene());
|
3232 | 3597 | }
|
3233 | 3598 | HRESULT WINAPI glDirect3DDevice1::CreateExecuteBuffer(LPD3DEXECUTEBUFFERDESC lpDesc,
|
3234 | 3599 | LPDIRECT3DEXECUTEBUFFER* lplpDirect3DExecuteBuffer, IUnknown* pUnkOuter)
|
3235 | 3600 | {
|
3236 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3237 | | - return glD3DDev7->CreateExecuteBuffer(lpDesc,lplpDirect3DExecuteBuffer,pUnkOuter);
|
| 3601 | + TRACE_ENTER(4,14,this,14,lpDesc,14,lplpDirect3DExecuteBuffer,14,pUnkOuter);
|
| 3602 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3603 | + TRACE_RET(23,glD3DDev7->CreateExecuteBuffer(lpDesc,lplpDirect3DExecuteBuffer,pUnkOuter));
|
3238 | 3604 | }
|
3239 | 3605 | HRESULT WINAPI glDirect3DDevice1::CreateMatrix(LPD3DMATRIXHANDLE lpD3DMatHandle)
|
3240 | 3606 | {
|
3241 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3242 | | - return glD3DDev7->CreateMatrix(lpD3DMatHandle);
|
| 3607 | + TRACE_ENTER(2,14,this,14,lpD3DMatHandle);
|
| 3608 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3609 | + TRACE_RET(23,glD3DDev7->CreateMatrix(lpD3DMatHandle));
|
3243 | 3610 | }
|
3244 | 3611 | HRESULT WINAPI glDirect3DDevice1::DeleteMatrix(D3DMATRIXHANDLE d3dMatHandle)
|
3245 | 3612 | {
|
3246 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3247 | | - return glD3DDev7->DeleteMatrix(d3dMatHandle);
|
| 3613 | + TRACE_ENTER(2,14,this,9,d3dMatHandle);
|
| 3614 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3615 | + TRACE_RET(23,glD3DDev7->DeleteMatrix(d3dMatHandle));
|
3248 | 3616 | }
|
3249 | 3617 | HRESULT WINAPI glDirect3DDevice1::DeleteViewport(LPDIRECT3DVIEWPORT lpDirect3DViewport)
|
3250 | 3618 | {
|
3251 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3619 | + TRACE_ENTER(2,14,this,14,lpDirect3DViewport);
|
| 3620 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3252 | 3621 | glDirect3DViewport3 *glD3DV3;
|
3253 | 3622 | lpDirect3DViewport->QueryInterface(IID_IDirect3DViewport3,(void**)&glD3DV3);
|
3254 | 3623 | HRESULT ret = glD3DDev7->DeleteViewport(glD3DV3);
|
3255 | 3624 | glD3DV3->Release();
|
| 3625 | + TRACE_EXIT(23,ret);
|
3256 | 3626 | return ret;
|
3257 | 3627 | }
|
3258 | 3628 | HRESULT WINAPI glDirect3DDevice1::EndScene()
|
3259 | 3629 | {
|
3260 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3261 | | - return glD3DDev7->EndScene();
|
| 3630 | + TRACE_ENTER(1,14,this);
|
| 3631 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3632 | + TRACE_RET(23,glD3DDev7->EndScene());
|
3262 | 3633 | }
|
3263 | 3634 | HRESULT WINAPI glDirect3DDevice1::EnumTextureFormats(LPD3DENUMTEXTUREFORMATSCALLBACK lpd3dEnumTextureProc, LPVOID lpArg)
|
3264 | 3635 | {
|
3265 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3636 | + TRACE_ENTER(3,14,this,14,lpd3dEnumTextureProc,14,lpArg);
|
| 3637 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3266 | 3638 | LPVOID context[2];
|
3267 | 3639 | context[0] = (LPVOID)lpd3dEnumTextureProc;
|
3268 | 3640 | context[1] = lpArg;
|
3269 | | - return glD3DDev7->EnumTextureFormats(EnumTex2,&context);
|
| 3641 | + TRACE_RET(23,glD3DDev7->EnumTextureFormats(EnumTex2,&context));
|
3270 | 3642 | }
|
3271 | 3643 | HRESULT WINAPI glDirect3DDevice1::Execute(LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags)
|
3272 | 3644 | {
|
3273 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3274 | | - return glD3DDev7->Execute(lpDirect3DExecuteBuffer,lpDirect3DViewport,dwFlags);
|
| 3645 | + TRACE_ENTER(4,14,this,14,lpDirect3DExecuteBuffer,14,lpDirect3DViewport,9,dwFlags);
|
| 3646 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3647 | + TRACE_RET(23,glD3DDev7->Execute(lpDirect3DExecuteBuffer,lpDirect3DViewport,dwFlags));
|
3275 | 3648 | }
|
3276 | 3649 | HRESULT WINAPI glDirect3DDevice1::GetCaps(LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc)
|
3277 | 3650 | {
|
3278 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3279 | | - return glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc);
|
| 3651 | + TRACE_ENTER(3,14,this,14,lpD3DHWDevDesc,14,lpD3DHELDevDesc);
|
| 3652 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3653 | + TRACE_RET(23,glD3DDev7->GetCaps3(lpD3DHWDevDesc,lpD3DHELDevDesc));
|
3280 | 3654 | }
|
3281 | 3655 | HRESULT WINAPI glDirect3DDevice1::GetDirect3D(LPDIRECT3D* lpD3D)
|
3282 | 3656 | {
|
3283 | | - if(!this) return DDERR_INVALIDOBJECT;
|
| 3657 | + TRACE_ENTER(2,14,this,14,lpD3D);
|
| 3658 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
3284 | 3659 | LPDIRECT3D7 d3d7;
|
3285 | 3660 | HRESULT err = glD3DDev7->GetDirect3D(&d3d7);
|
3286 | | - if(!d3d7) return err;
|
| 3661 | + if(!d3d7) TRACE_RET(23,err);
|
3287 | 3662 | d3d7->QueryInterface(IID_IDirect3D,(void**)lpD3D);
|
3288 | 3663 | d3d7->Release();
|
| 3664 | + TRACE_VAR("*lpD3D",14,*lpD3D);
|
| 3665 | + TRACE_EXIT(23,err);
|
3289 | 3666 | return err;
|
3290 | 3667 | }
|
3291 | 3668 |
|
3292 | 3669 | HRESULT WINAPI glDirect3DDevice1::GetMatrix(D3DMATRIXHANDLE lpD3DMatHandle, LPD3DMATRIX lpD3DMatrix)
|
3293 | 3670 | {
|
3294 | | - if(!this) return DDERR_INVALIDPARAMS;
|
3295 | | - return glD3DDev7->GetMatrix(lpD3DMatHandle,lpD3DMatrix);
|
| 3671 | + TRACE_ENTER(3,14,this,9,lpD3DMatHandle,14,lpD3DMatrix);
|
| 3672 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3673 | + TRACE_RET(23,glD3DDev7->GetMatrix(lpD3DMatHandle,lpD3DMatrix));
|
3296 | 3674 | }
|
3297 | 3675 |
|
3298 | 3676 | HRESULT WINAPI glDirect3DDevice1::GetPickRecords(LPDWORD lpCount, LPD3DPICKRECORD lpD3DPickRec)
|
3299 | 3677 | {
|
3300 | | - if(!this) return DDERR_INVALIDPARAMS;
|
3301 | | - return glD3DDev7->GetPickRecords(lpCount,lpD3DPickRec);
|
| 3678 | + TRACE_ENTER(3,14,this,14,lpCount,14,lpD3DPickRec);
|
| 3679 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3680 | + TRACE_RET(23,glD3DDev7->GetPickRecords(lpCount,lpD3DPickRec));
|
3302 | 3681 | }
|
3303 | 3682 |
|
3304 | 3683 | HRESULT WINAPI glDirect3DDevice1::GetStats(LPD3DSTATS lpD3DStats)
|
3305 | 3684 | {
|
3306 | | - if(!this) return DDERR_INVALIDPARAMS;
|
3307 | | - return glD3DDev7->GetStats(lpD3DStats);
|
| 3685 | + TRACE_ENTER(2,14,this,14,lpD3DStats);
|
| 3686 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3687 | + TRACE_RET(23,glD3DDev7->GetStats(lpD3DStats));
|
3308 | 3688 | }
|
3309 | 3689 |
|
3310 | 3690 | HRESULT WINAPI glDirect3DDevice1::Initialize(LPDIRECT3D lpd3d, LPGUID lpGUID, LPD3DDEVICEDESC lpd3ddvdesc)
|
3311 | 3691 | {
|
3312 | | - if(!this) return DDERR_INVALIDPARAMS;
|
3313 | | - return DDERR_ALREADYINITIALIZED;
|
| 3692 | + TRACE_ENTER(4,14,this,14,lpd3d,24,lpGUID,14,lpd3ddvdesc);
|
| 3693 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3694 | + TRACE_RET(23,DDERR_ALREADYINITIALIZED);
|
3314 | 3695 | }
|
3315 | 3696 | HRESULT WINAPI glDirect3DDevice1::NextViewport(LPDIRECT3DVIEWPORT lpDirect3DViewport, LPDIRECT3DVIEWPORT *lplpDirect3DViewport, DWORD dwFlags)
|
3316 | 3697 | {
|
3317 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3318 | | - if(!lpDirect3DViewport) return DDERR_INVALIDPARAMS;
|
3319 | | - if(!lplpDirect3DViewport) return DDERR_INVALIDPARAMS;
|
| 3698 | + TRACE_ENTER(4,14,this,14,lpDirect3DViewport,14,lplpDirect3DViewport,9,dwFlags);
|
| 3699 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3700 | + if(!lpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3701 | + if(!lplpDirect3DViewport) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
3320 | 3702 | FIXME("glDirect3DDevice1::NextViewport: stub");
|
| 3703 | + TRACE_EXIT(23,DDERR_GENERIC);
|
3321 | 3704 | ERR(DDERR_GENERIC);
|
3322 | 3705 | }
|
3323 | 3706 | HRESULT WINAPI glDirect3DDevice1::Pick(LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport,
|
3324 | 3707 | DWORD dwFlags, LPD3DRECT lpRect)
|
3325 | 3708 | {
|
3326 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3327 | | - return glD3DDev7->Pick(lpDirect3DExecuteBuffer, lpDirect3DViewport, dwFlags, lpRect);
|
| 3709 | + TRACE_ENTER(5,14,this,14,lpDirect3DExecuteBuffer,14,lpDirect3DViewport,9,dwFlags,26,lpRect);
|
| 3710 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3711 | + TRACE_RET(23,glD3DDev7->Pick(lpDirect3DExecuteBuffer, lpDirect3DViewport, dwFlags, lpRect));
|
3328 | 3712 | }
|
3329 | 3713 |
|
3330 | 3714 | HRESULT WINAPI glDirect3DDevice1::SetMatrix(D3DMATRIXHANDLE d3dMatHandle, LPD3DMATRIX lpD3DMatrix)
|
3331 | 3715 | {
|
3332 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3333 | | - return glD3DDev7->SetMatrix(d3dMatHandle,lpD3DMatrix);
|
| 3716 | + TRACE_ENTER(3,14,this,9,d3dMatHandle,14,lpD3DMatrix);
|
| 3717 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3718 | + TRACE_RET(23,glD3DDev7->SetMatrix(d3dMatHandle,lpD3DMatrix));
|
3334 | 3719 | }
|
3335 | 3720 |
|
3336 | 3721 | HRESULT WINAPI glDirect3DDevice1::SwapTextureHandles(LPDIRECT3DTEXTURE lpD3DTex1, LPDIRECT3DTEXTURE lpD3DTex2)
|
3337 | 3722 | {
|
3338 | | - if(!this) return DDERR_INVALIDOBJECT;
|
3339 | | - if(!lpD3DTex1) return DDERR_INVALIDPARAMS;
|
3340 | | - if(!lpD3DTex2) return DDERR_INVALIDPARAMS;
|
| 3723 | + TRACE_ENTER(3,14,this,14,lpD3DTex1,14,lpD3DTex2);
|
| 3724 | + if(!this) TRACE_RET(23,DDERR_INVALIDOBJECT);
|
| 3725 | + if(!lpD3DTex1) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
| 3726 | + if(!lpD3DTex2) TRACE_RET(23,DDERR_INVALIDPARAMS);
|
3341 | 3727 | LPDIRECT3DTEXTURE2 tex1, tex2;
|
3342 | 3728 | lpD3DTex1->QueryInterface(IID_IDirect3DTexture2,(void**)&tex1);
|
3343 | 3729 | lpD3DTex2->QueryInterface(IID_IDirect3DTexture2,(void**)&tex2);
|
— | — | @@ -3343,5 +3729,6 @@ |
3344 | 3730 | HRESULT ret = glD3DDev7->SwapTextureHandles(tex1,tex2);
|
3345 | 3731 | tex2->Release();
|
3346 | 3732 | tex1->Release();
|
| 3733 | + TRACE_EXIT(23,ret);
|
3347 | 3734 | return ret;
|
3348 | 3735 | } |
\ No newline at end of file |