mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 06:10:03 -06:00
use std::swap 🔃
This commit is contained in:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user