| Index: common/version.h |
| — | — | @@ -3,13 +3,13 @@ |
| 4 | 4 | #define __VERSION_H
|
| 5 | 5 |
|
| 6 | 6 | #define DXGLMAJOR 0
|
| 7 | | -#define DXGLMINOR 1
|
| 8 | | -#define DXGLPOINT 6
|
| | 7 | +#define DXGLMINOR 2
|
| | 8 | +#define DXGLPOINT 0
|
| 9 | 9 | #define DXGLBUILD 0
|
| 10 | 10 |
|
| 11 | 11 | #define DXGLVERNUMBER DXGLMAJOR,DXGLMINOR,DXGLPOINT,DXGLBUILD
|
| 12 | 12 | #define DXGLVERQWORD (((unsigned __int64)DXGLMAJOR<<48)+((unsigned __int64)DXGLMINOR<<32)+((unsigned __int64)DXGLPOINT<<16)+(unsigned __int64)DXGLBUILD)
|
| 13 | | -#define DXGLVERSTRING "0.1.6.0"
|
| | 13 | +#define DXGLVERSTRING "0.2.0.0"
|
| 14 | 14 |
|
| 15 | 15 |
|
| 16 | 16 | #endif //__VERSION_H
|
| Index: common/version.nsh |
| — | — | @@ -1 +1 @@ |
| 2 | | -!define PRODUCT_VERSION "0.1.6" |
| \ No newline at end of file |
| | 2 | +!define PRODUCT_VERSION "0.2.0" |
| \ No newline at end of file |
| Index: ddraw/glDirect3DDevice.cpp |
| — | — | @@ -567,12 +567,15 @@ |
| 568 | 568 |
|
| 569 | 569 | // Use EXACTLY one line per entry. Don't change layout of the list.
|
| 570 | 570 | const int TEXFMT_START = __LINE__;
|
| 571 | | -const DDPIXELFORMAT texformats[] =
|
| | 571 | +const DDPIXELFORMAT texpixelformats[] =
|
| 572 | 572 | {
|
| 573 | 573 | {sizeof(DDPIXELFORMAT),DDPF_RGB|DDPF_ALPHAPIXELS,0,16,0xF00,0xF0,0xF,0xF000},
|
| 574 | 574 | {sizeof(DDPIXELFORMAT),DDPF_RGB|DDPF_ALPHAPIXELS,0,16,0x7C00,0x3E0,0x1F,0x8000},
|
| | 575 | + {sizeof(DDPIXELFORMAT),DDPF_RGB,0,16,0x7C00,0x3E0,0x1F,0},
|
| 575 | 576 | {sizeof(DDPIXELFORMAT),DDPF_RGB,0,16,0xF800,0x7E0,0x1F,0},
|
| 576 | | - {sizeof(DDPIXELFORMAT),DDPF_RGB|DDPF_ALPHAPIXELS,0,32,0xFF0000,0xFF00,0xFF,0xFF000000}
|
| | 577 | + {sizeof(DDPIXELFORMAT),DDPF_RGB|DDPF_ALPHAPIXELS,0,32,0xFF0000,0xFF00,0xFF,0xFF000000},
|
| | 578 | + {sizeof(DDPIXELFORMAT),DDPF_RGB,0,32,0xFF0000,0xFF00,0xFF,0},
|
| | 579 | + {sizeof(DDPIXELFORMAT),DDPF_RGB,0,24,0xFF0000,0xFF00,0xFF,0}
|
| 577 | 580 | };
|
| 578 | 581 | const int TEXFMT_END = __LINE__ - 4;
|
| 579 | 582 | const int numtexfmt = TEXFMT_END-TEXFMT_START;
|
| — | — | @@ -584,7 +587,7 @@ |
| 585 | 588 | DDPIXELFORMAT fmt;
|
| 586 | 589 | for(int i = 0; i < numtexfmt; i++)
|
| 587 | 590 | {
|
| 588 | | - memcpy(&fmt,&texformats[i],sizeof(DDPIXELFORMAT));
|
| | 591 | + memcpy(&fmt,&texpixelformats[i],sizeof(DDPIXELFORMAT));
|
| 589 | 592 | result = lpd3dEnumPixelProc(&fmt,lpArg);
|
| 590 | 593 | if(result != D3DENUMRET_OK) return D3D_OK;
|
| 591 | 594 | }
|
| — | — | @@ -664,6 +667,7 @@ |
| 665 | 668 | {
|
| 666 | 669 | if(!this) return DDERR_INVALIDPARAMS;
|
| 667 | 670 | if(!lplpRenderTarget) return DDERR_INVALIDPARAMS;
|
| | 671 | + glDDS7->AddRef();
|
| 668 | 672 | *lplpRenderTarget = glDDS7;
|
| 669 | 673 | return D3D_OK;
|
| 670 | 674 | }
|
| Index: ddraw/glDirectDrawSurface.cpp |
| — | — | @@ -1106,6 +1106,7 @@ |
| 1107 | 1107 | HRESULT WINAPI glDirectDrawSurface7::GetDDInterface(LPVOID FAR *lplpDD)
|
| 1108 | 1108 | {
|
| 1109 | 1109 | if(!this) return DDERR_INVALIDPARAMS;
|
| | 1110 | + ddInterface->AddRef();
|
| 1110 | 1111 | *lplpDD = ddInterface;
|
| 1111 | 1112 | return DD_OK;
|
| 1112 | 1113 | }
|
| Index: ddraw/shadergen.cpp |
| — | — | @@ -535,7 +535,7 @@ |
| 536 | 536 | int args[4];
|
| 537 | 537 | bool texfail;
|
| 538 | 538 | const string blendargs[] = {"color","gl_Color","texture2DProj(texX,gl_TexCoord[Y]).rgb",
|
| 539 | | - "texture2DProj(texX,gl_TexCoord[Y]).a","texfactor","gl_SecondaryColor","vec3(1,1,1)","1"};
|
| | 539 | + "texture2DProj(texX,gl_TexCoord[Y]).a","texfactor","gl_SecondaryColor","vec3(1,1,1)","1",".rgb",".a"};
|
| 540 | 540 | for(i = 0; i < 8; i++)
|
| 541 | 541 | {
|
| 542 | 542 | if((texstate[i].shaderid & 31) == D3DTOP_DISABLE)break;
|
| — | — | @@ -549,7 +549,7 @@ |
| 550 | 550 | arg1 = blendargs[0];
|
| 551 | 551 | break;
|
| 552 | 552 | case D3DTA_DIFFUSE:
|
| 553 | | - arg1 = blendargs[1];
|
| | 553 | + arg1 = blendargs[1]+blendargs[8];
|
| 554 | 554 | break;
|
| 555 | 555 | case D3DTA_TEXTURE:
|
| 556 | 556 | if((texstate[i].shaderid >> 59)&1)
|
| — | — | @@ -565,7 +565,7 @@ |
| 566 | 566 | arg1 = blendargs[4];
|
| 567 | 567 | break;
|
| 568 | 568 | case D3DTA_SPECULAR:
|
| 569 | | - arg1 = blendargs[5];
|
| | 569 | + arg1 = blendargs[5]+blendargs[8];
|
| 570 | 570 | break;
|
| 571 | 571 | }
|
| 572 | 572 | args[1] = (texstate[i].shaderid>>11)&63;
|
| — | — | @@ -576,7 +576,7 @@ |
| 577 | 577 | arg2 = blendargs[0];
|
| 578 | 578 | break;
|
| 579 | 579 | case D3DTA_DIFFUSE:
|
| 580 | | - arg2 = blendargs[1];
|
| | 580 | + arg2 = blendargs[1]+blendargs[8];
|
| 581 | 581 | break;
|
| 582 | 582 | case D3DTA_TEXTURE:
|
| 583 | 583 | if((texstate[i].shaderid >> 59)&1)
|
| — | — | @@ -592,7 +592,7 @@ |
| 593 | 593 | arg2 = blendargs[4];
|
| 594 | 594 | break;
|
| 595 | 595 | case D3DTA_SPECULAR:
|
| 596 | | - arg2 = blendargs[5];
|
| | 596 | + arg2 = blendargs[5]+blendargs[8];
|
| 597 | 597 | break;
|
| 598 | 598 | }
|
| 599 | 599 | if(!texfail) switch(texstate[i].shaderid & 31)
|
| — | — | @@ -610,10 +610,10 @@ |
| 611 | 611 | fsrc->append("color = " + arg1 + " * " + arg2 + ";\n");
|
| 612 | 612 | break;
|
| 613 | 613 | case D3DTOP_MODULATE2X:
|
| 614 | | - fsrc->append("color = (" + arg1 + " * " + arg2 + ") * 2;\n");
|
| | 614 | + fsrc->append("color = (" + arg1 + " * " + arg2 + ") * 2.0;\n");
|
| 615 | 615 | break;
|
| 616 | 616 | case D3DTOP_MODULATE4X:
|
| 617 | | - fsrc->append("color = (" + arg1 + " * " + arg2 + ") * 4;\n");
|
| | 617 | + fsrc->append("color = (" + arg1 + " * " + arg2 + ") * 4.0;\n");
|
| 618 | 618 | break;
|
| 619 | 619 | case D3DTOP_ADD:
|
| 620 | 620 | fsrc->append("color = " + arg1 + " + " + arg2 + ";\n");
|