DXGL r861 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r860‎ | r861 | r862 >
Date:14:44, 9 September 2018
Author:admin
Status:new
Tags:
Comment:
Revert r856 of glRenderer.cpp
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -3412,33 +3412,25 @@
34133413 {
34143414 ddsdSrc = cmd->src->levels[cmd->srclevel].ddsd;
34153415 if (cmd->src->levels[cmd->srclevel].dirty & 1) glTexture__Upload(cmd->src, cmd->srclevel);
3416 - if (!memcmp(&cmd->srcrect, &nullrect, sizeof(RECT)))
3417 - {
3418 - srcrect.left = 0;
3419 - srcrect.top = 0;
3420 - srcrect.right = ddsdSrc.dwWidth;
3421 - srcrect.bottom = ddsdSrc.dwHeight;
3422 - }
34233416 }
34243417 if (cmd->dest->levels[cmd->destlevel].dirty & 1)
34253418 glTexture__Upload(cmd->dest, cmd->destlevel);
 3419+ if (!memcmp(&cmd->srcrect, &nullrect, sizeof(RECT)))
 3420+ {
 3421+ srcrect.left = 0;
 3422+ srcrect.top = 0;
 3423+ srcrect.right = ddsdSrc.dwWidth;
 3424+ srcrect.bottom = ddsdSrc.dwHeight;
 3425+ }
34263426 else srcrect = cmd->srcrect;
34273427 This->bltvertices[1].x = This->bltvertices[3].x = (GLfloat)destrect.left;
34283428 This->bltvertices[0].x = This->bltvertices[2].x = (GLfloat)destrect.right;
34293429 This->bltvertices[0].y = This->bltvertices[1].y = (GLfloat)ddsd.dwHeight - (GLfloat)destrect.top;
34303430 This->bltvertices[2].y = This->bltvertices[3].y = (GLfloat)ddsd.dwHeight - (GLfloat)destrect.bottom;
3431 - if (cmd->src)
3432 - {
3433 - This->bltvertices[1].s = This->bltvertices[3].s = (GLfloat)srcrect.left / (GLfloat)ddsdSrc.dwWidth;
3434 - This->bltvertices[0].s = This->bltvertices[2].s = (GLfloat)srcrect.right / (GLfloat)ddsdSrc.dwWidth;
3435 - This->bltvertices[0].t = This->bltvertices[1].t = (GLfloat)srcrect.top / (GLfloat)ddsdSrc.dwHeight;
3436 - This->bltvertices[2].t = This->bltvertices[3].t = (GLfloat)srcrect.bottom / (GLfloat)ddsdSrc.dwHeight;
3437 - }
3438 - else
3439 - {
3440 - This->bltvertices[1].s = This->bltvertices[3].s = This->bltvertices[0].t = This->bltvertices[1].t = 0.0f;
3441 - This->bltvertices[0].s = This->bltvertices[2].s = This->bltvertices[2].t = This->bltvertices[3].t = 1.0f;
3442 - }
 3431+ This->bltvertices[1].s = This->bltvertices[3].s = (GLfloat)srcrect.left / (GLfloat)ddsdSrc.dwWidth;
 3432+ This->bltvertices[0].s = This->bltvertices[2].s = (GLfloat)srcrect.right / (GLfloat)ddsdSrc.dwWidth;
 3433+ This->bltvertices[0].t = This->bltvertices[1].t = (GLfloat)srcrect.top / (GLfloat)ddsdSrc.dwHeight;
 3434+ This->bltvertices[2].t = This->bltvertices[3].t = (GLfloat)srcrect.bottom / (GLfloat)ddsdSrc.dwHeight;
34433435 if ((cmd->bltfx.dwSize == sizeof(DDBLTFX)) && (cmd->flags & DDBLT_DDFX))
34443436 {
34453437 if (cmd->bltfx.dwDDFX & DDBLTFX_MIRRORLEFTRIGHT)

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r856Set version to 0.5.16 pre-release...admin00:20, 6 September 2018