Index: ddraw/glDirect3D.cpp |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | D3DDEVCAPS_TEXTUREVIDEOMEMORY | D3DDEVCAPS_TLVERTEXSYSTEMMEMORY | D3DDEVCAPS_TLVERTEXVIDEOMEMORY, // dwDevCaps
|
36 | 36 | { //dpcLineCaps
|
37 | 37 | sizeof(D3DPRIMCAPS),
|
38 | | - 0, // dwMiscCaps
|
| 38 | + D3DPMISCCAPS_CULLCCW | D3DPMISCCAPS_CULLCW | D3DPMISCCAPS_CULLNONE, // dwMiscCaps
|
39 | 39 | D3DPRASTERCAPS_SUBPIXEL | D3DPRASTERCAPS_ZTEST, //dwRasterCaps
|
40 | 40 | D3DPCMPCAPS_LESSEQUAL, //dwZCmpCaps
|
41 | 41 | D3DPBLENDCAPS_ZERO | D3DPBLENDCAPS_ONE | D3DPBLENDCAPS_SRCCOLOR | D3DPBLENDCAPS_INVSRCCOLOR |
|
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | },
|
63 | 63 | { //dpcTriCaps
|
64 | 64 | sizeof(D3DPRIMCAPS),
|
65 | | - 0, // dwMiscCaps
|
| 65 | + D3DPMISCCAPS_CULLCCW | D3DPMISCCAPS_CULLCW | D3DPMISCCAPS_CULLNONE, // dwMiscCaps
|
66 | 66 | D3DPRASTERCAPS_SUBPIXEL | D3DPRASTERCAPS_ZTEST, //dwRasterCaps
|
67 | 67 | D3DPCMPCAPS_LESSEQUAL, //dwZCmpCaps
|
68 | 68 | D3DPBLENDCAPS_ZERO | D3DPBLENDCAPS_ONE | D3DPBLENDCAPS_SRCCOLOR | D3DPBLENDCAPS_INVSRCCOLOR |
|
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | 0.0f, //dvExtentsAdjust
|
104 | 104 | 0, //dwStencilCaps
|
105 | 105 | 8, //dwFVFCaps
|
106 | | - D3DTEXOPCAPS_SELECTARG1 | D3DTEXOPCAPS_SELECTARG2 | D3DTEXOPCAPS_MODULATE |
|
| 106 | + D3DTEXOPCAPS_DISABLE | D3DTEXOPCAPS_SELECTARG1 | D3DTEXOPCAPS_SELECTARG2 | D3DTEXOPCAPS_MODULATE |
|
107 | 107 | D3DTEXOPCAPS_MODULATE2X | D3DTEXOPCAPS_MODULATE4X | D3DTEXOPCAPS_ADD |
|
108 | 108 | D3DTEXOPCAPS_ADDSIGNED | D3DTEXOPCAPS_ADDSIGNED2X | D3DTEXOPCAPS_SUBTRACT |
|
109 | 109 | D3DTEXOPCAPS_ADDSMOOTH | D3DTEXOPCAPS_BLENDDIFFUSEALPHA | D3DTEXOPCAPS_BLENDTEXTUREALPHA |
|
Index: ddraw/glDirectDraw.cpp |
— | — | @@ -695,7 +695,7 @@ |
696 | 696 | }
|
697 | 697 | if(riid == IID_IDirectDrawGammaControl)
|
698 | 698 | {
|
699 | | - FIXME("Add IDirect3D Interfaces\n");
|
| 699 | + FIXME("Add gamma control\n");
|
700 | 700 | ERR(DDERR_GENERIC);
|
701 | 701 | }
|
702 | 702 | /*if(riid == IID_IDDVideoPortContainer)
|
— | — | @@ -836,7 +836,7 @@ |
837 | 837 | ddCaps.dwCaps |= DDCAPS_3D;
|
838 | 838 | #endif
|
839 | 839 | ddCaps.dwCaps2 = DDCAPS2_CANRENDERWINDOWED | DDCAPS2_WIDESURFACES | DDCAPS2_NOPAGELOCKREQUIRED |
|
840 | | - DDCAPS2_FLIPINTERVAL | DDCAPS2_FLIPNOVSYNC;
|
| 840 | + DDCAPS2_FLIPINTERVAL | DDCAPS2_FLIPNOVSYNC | DDCAPS2_NONLOCALVIDMEM;
|
841 | 841 | ddCaps.dwFXCaps = DDFXCAPS_BLTSHRINKX | DDFXCAPS_BLTSHRINKY |
|
842 | 842 | DDFXCAPS_BLTSTRETCHX | DDFXCAPS_BLTSTRETCHY;
|
843 | 843 | ddCaps.dwPalCaps = DDPCAPS_8BIT | DDPCAPS_PRIMARYSURFACE;
|
Index: ddraw/shadergen.cpp |
— | — | @@ -608,6 +608,7 @@ |
609 | 609 | string texarg;
|
610 | 610 | int args[4];
|
611 | 611 | bool texfail;
|
| 612 | + bool alphadisabled = false;
|
612 | 613 | const string blendargs[] = {"color","gl_Color","texture2DProj(texX,gl_TexCoord[Y])",
|
613 | 614 | "","texfactor","gl_SecondaryColor","vec3(1,1,1)","1",".rgb",".a",".aaa"};
|
614 | 615 | for(i = 0; i < 8; i++)
|
— | — | @@ -733,7 +734,8 @@ |
734 | 735 | fsrc->append("color.rgb = " + arg1 + " * color.a + " + arg2 + " * (1.0-color.a);\n");
|
735 | 736 | break;
|
736 | 737 | }
|
737 | | - if(((texstate[i].shaderid>>17) & 31) == D3DTOP_DISABLE)break;
|
| 738 | + if(((texstate[i].shaderid>>17) & 31) == D3DTOP_DISABLE)alphadisabled = true;
|
| 739 | + if(alphadisabled) continue;
|
738 | 740 | // Alpha stage
|
739 | 741 | texfail = false;
|
740 | 742 | args[2] = (texstate[i].shaderid>>22)&63;
|
— | — | @@ -794,7 +796,7 @@ |
795 | 797 | }
|
796 | 798 | if(args[3] & D3DTA_COMPLEMENT)
|
797 | 799 | arg2 = "(1.0 - " + arg2 + ")";
|
798 | | - if(!texfail) switch(texstate[i].shaderid & 31)
|
| 800 | + if(!texfail) switch((texstate[i].shaderid>>17) & 31)
|
799 | 801 | {
|
800 | 802 | case D3DTOP_DISABLE:
|
801 | 803 | default:
|
Index: ddraw/texture.cpp |
— | — | @@ -110,8 +110,8 @@ |
111 | 111 | texture->format = GL_RGBA;
|
112 | 112 | texture->type = GL_UNSIGNED_INT_8_8_8_8_REV;
|
113 | 113 | break;
|
114 | | - case 7: // 16-bit RGBA3328
|
115 | | - FIXME("Unusual texture format RGBA3328 not supported");
|
| 114 | + case 7: // 16-bit RGBA8332
|
| 115 | + FIXME("Unusual texture format RGBA8332 not supported");
|
116 | 116 | break;
|
117 | 117 | case 8: // 16-bit RGBA4444
|
118 | 118 | texture->internalformat = GL_RGBA4;
|
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | texture->format = GL_BGRA;
|
120 | 120 | texture->type = GL_UNSIGNED_SHORT_4_4_4_4_REV;
|
121 | 121 | break;
|
122 | | - case 9: // 16-bit RGBA5551
|
| 122 | + case 9: // 16-bit RGBA1555
|
123 | 123 | texture->internalformat = GL_RGB5_A1;
|
124 | 124 | texture->format = GL_BGRA;
|
125 | 125 | texture->type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
|