aboutsummaryrefslogtreecommitdiff
path: root/src/GPU3D_Soft.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GPU3D_Soft.cpp')
-rw-r--r--src/GPU3D_Soft.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/GPU3D_Soft.cpp b/src/GPU3D_Soft.cpp
index 282bde1..2f0f825 100644
--- a/src/GPU3D_Soft.cpp
+++ b/src/GPU3D_Soft.cpp
@@ -18,6 +18,7 @@
#include "GPU3D_Soft.h"
+#include <algorithm>
#include <stdio.h>
#include <string.h>
#include "NDS.h"
@@ -756,11 +757,10 @@ void SoftRenderer::RenderShadowMaskScanline(RendererPolygon* rp, s32 y)
rp->SlopeR.EdgeParams_YMajor(&l_edgelen, &l_edgecov);
rp->SlopeL.EdgeParams_YMajor(&r_edgelen, &r_edgecov);
- s32 tmp;
- tmp = xstart; xstart = xend; xend = tmp;
- tmp = wl; wl = wr; wr = tmp;
- tmp = zl; zl = zr; zr = tmp;
- tmp = (s32)l_filledge; l_filledge = r_filledge; r_filledge = (bool)tmp;
+ std::swap(xstart, xend);
+ std::swap(wl, wr);
+ std::swap(zl, zr);
+ std::swap(l_filledge, r_filledge);
}
else
{
@@ -977,11 +977,10 @@ void SoftRenderer::RenderPolygonScanline(RendererPolygon* rp, s32 y)
rp->SlopeR.EdgeParams_YMajor(&l_edgelen, &l_edgecov);
rp->SlopeL.EdgeParams_YMajor(&r_edgelen, &r_edgecov);
- s32 tmp;
- tmp = xstart; xstart = xend; xend = tmp;
- tmp = wl; wl = wr; wr = tmp;
- tmp = zl; zl = zr; zr = tmp;
- tmp = (s32)l_filledge; l_filledge = r_filledge; r_filledge = (bool)tmp;
+ std::swap(xstart, xend);
+ std::swap(wl, wr);
+ std::swap(zl, zr);
+ std::swap(l_filledge, r_filledge);
}
else
{