DXGL r666 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r665‎ | r666 | r667 >
Date:00:23, 10 June 2016
Author:admin
Status:new
Tags:
Comment:
Fix Blt to "Adjust primary resolution" primary.
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -1415,24 +1415,10 @@
14161416 srcrect.bottom = ddsdSrc.dwHeight;
14171417 }
14181418 else srcrect = cmd->srcrect;
1419 - if (cmd->destlevel == 0)
1420 - {
1421 - This->bltvertices[1].x = This->bltvertices[3].x =
1422 - (GLfloat)destrect.left * ((GLfloat)cmd->dest->bigwidth / (GLfloat)ddsd.dwWidth);
1423 - This->bltvertices[0].x = This->bltvertices[2].x =
1424 - (GLfloat)destrect.right * ((GLfloat)cmd->dest->bigwidth / (GLfloat)ddsd.dwWidth);
1425 - This->bltvertices[0].y = This->bltvertices[1].y =
1426 - (GLfloat)cmd->dest->bigheight - ((GLfloat)destrect.top * ((GLfloat)cmd->dest->bigheight / (GLfloat)ddsd.dwHeight));
1427 - This->bltvertices[2].y = This->bltvertices[3].y =
1428 - (GLfloat)cmd->dest->bigheight - ((GLfloat)destrect.bottom * ((GLfloat)cmd->dest->bigheight / (GLfloat)ddsd.dwHeight));
1429 - }
1430 - else
1431 - {
1432 - This->bltvertices[1].x = This->bltvertices[3].x = (GLfloat)destrect.left;
1433 - This->bltvertices[0].x = This->bltvertices[2].x = (GLfloat)destrect.right;
1434 - This->bltvertices[0].y = This->bltvertices[1].y = (GLfloat)ddsd.dwHeight - (GLfloat)destrect.top;
1435 - This->bltvertices[2].y = This->bltvertices[3].y = (GLfloat)ddsd.dwHeight - (GLfloat)destrect.bottom;
1436 - }
 1419+ This->bltvertices[1].x = This->bltvertices[3].x = (GLfloat)destrect.left;
 1420+ This->bltvertices[0].x = This->bltvertices[2].x = (GLfloat)destrect.right;
 1421+ This->bltvertices[0].y = This->bltvertices[1].y = (GLfloat)ddsd.dwHeight - (GLfloat)destrect.top;
 1422+ This->bltvertices[2].y = This->bltvertices[3].y = (GLfloat)ddsd.dwHeight - (GLfloat)destrect.bottom;
14371423 This->bltvertices[1].s = This->bltvertices[3].s = (GLfloat)srcrect.left / (GLfloat)ddsdSrc.dwWidth;
14381424 This->bltvertices[0].s = This->bltvertices[2].s = (GLfloat)srcrect.right / (GLfloat)ddsdSrc.dwWidth;
14391425 This->bltvertices[0].t = This->bltvertices[1].t = (GLfloat)srcrect.top / (GLfloat)ddsdSrc.dwHeight;