Index: ddraw/trace.cpp |
— | — | @@ -44,11 +44,12 @@ |
45 | 45 | 22 - int BOOL
|
46 | 46 | 23 - HRESULT
|
47 | 47 | 24 - GUID pointer
|
48 | | -25 - SIZE pointer
|
| 48 | +25 - SIZE or POINT pointer
|
49 | 49 | 26 - RECT pointer
|
50 | 50 | 27 - D3DRENDERSTATETYPE
|
51 | 51 | 28 - D3DTEXTURESTAGESTATETYPE
|
52 | 52 | 29 - D3DTRANSFORMSTATETYPE
|
| 53 | +30 - D3DLIGHTSTATETYPE
|
53 | 54 | */
|
54 | 55 |
|
55 | 56 | #ifdef _TRACE
|
— | — | @@ -751,6 +752,43 @@ |
752 | 753 | WriteFile(outfile,str,strlen(str),&byteswritten,NULL);
|
753 | 754 | }
|
754 | 755 |
|
| 756 | +static void trace_decode_d3dlightstate(DWORD ls)
|
| 757 | +{
|
| 758 | + DWORD byteswritten;
|
| 759 | + char str[64];
|
| 760 | + switch(ls)
|
| 761 | + {
|
| 762 | + case D3DLIGHTSTATE_MATERIAL:
|
| 763 | + strcpy(str,"D3DLIGHTSTATE_MATERIAL");
|
| 764 | + break;
|
| 765 | + case D3DLIGHTSTATE_AMBIENT:
|
| 766 | + strcpy(str,"D3DLIGHTSTATE_AMBIENT");
|
| 767 | + break;
|
| 768 | + case D3DLIGHTSTATE_COLORMODEL:
|
| 769 | + strcpy(str,"D3DLIGHTSTATE_COLORMODEL");
|
| 770 | + break;
|
| 771 | + case D3DLIGHTSTATE_FOGMODE:
|
| 772 | + strcpy(str,"D3DLIGHTSTATE_FOGMODE");
|
| 773 | + break;
|
| 774 | + case D3DLIGHTSTATE_FOGSTART:
|
| 775 | + strcpy(str,"D3DLIGHTSTATE_FOGSTART");
|
| 776 | + break;
|
| 777 | + case D3DLIGHTSTATE_FOGEND:
|
| 778 | + strcpy(str,"D3DLIGHTSTATE_FOGEND");
|
| 779 | + break;
|
| 780 | + case D3DLIGHTSTATE_FOGDENSITY:
|
| 781 | + strcpy(str,"D3DLIGHTSTATE_FOGDENSITY");
|
| 782 | + break;
|
| 783 | + case D3DLIGHTSTATE_COLORVERTEX:
|
| 784 | + strcpy(str,"D3DLIGHTSTATE_COLORVERTEX");
|
| 785 | + break;
|
| 786 | + default:
|
| 787 | + sprintf(str,"(D3DTRANSFORMSTATETYPE)%u",ls);
|
| 788 | + break;
|
| 789 | + }
|
| 790 | + WriteFile(outfile,str,strlen(str),&byteswritten,NULL);
|
| 791 | +}
|
| 792 | +
|
755 | 793 | static void trace_decode_guid(GUID *guid)
|
756 | 794 | {
|
757 | 795 | DWORD byteswritten;
|
— | — | @@ -980,7 +1018,7 @@ |
981 | 1019 | else if(arg == (void*)DDCREATE_EMULATIONONLY) WriteFile(outfile,"DDCREATE_EMULATIONONLY",22,&byteswritten,NULL);
|
982 | 1020 | else trace_decode_guid((GUID*)arg);
|
983 | 1021 | break;
|
984 | | - case 25: // SIZE pointer
|
| 1022 | + case 25: // SIZE or POINT pointer
|
985 | 1023 | if(!arg) WriteFile(outfile,"NULL",4,&byteswritten,NULL);
|
986 | 1024 | else trace_decode_size((SIZE*)arg);
|
987 | 1025 | break;
|
— | — | @@ -997,6 +1035,9 @@ |
998 | 1036 | case 29: // D3DTRANSFORMSTATETYPE
|
999 | 1037 | trace_decode_d3dtransformstate((DWORD)arg);
|
1000 | 1038 | break;
|
| 1039 | + case 30: // D3DLIGHTSTATETYPE
|
| 1040 | + trace_decode_d3dlightstate((DWORD)arg);
|
| 1041 | + break;
|
1001 | 1042 | default:
|
1002 | 1043 | WriteFile(outfile,"Unknown type",12,&byteswritten,NULL);
|
1003 | 1044 | break;
|