1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Minor code refactor in gDPFillRectangle

This commit is contained in:
Sergey Lipskiy 2018-10-17 15:49:21 +07:00
parent 57ad2e96c6
commit fe6447070e

View File

@ -707,7 +707,6 @@ void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry )
if (gDP.fillColor.color == DepthClearColor) {
depthBuffer = dbFound;
if (config.generalEmulation.enableFragmentDepthWrite == 0) {
frameBufferList().fillRDRAM(ulx, uly, lrx, lry);
drawer.clearDepthBuffer();
depthBuffer = dbCleared;
} else
@ -718,7 +717,6 @@ void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry )
depthBufferList().saveBuffer(gDP.colorImage.address);
if (config.generalEmulation.enableFragmentDepthWrite == 0 ||
(config.generalEmulation.hacks & hack_Snap) != 0) {
frameBufferList().fillRDRAM(ulx, uly, lrx, lry);
drawer.clearDepthBuffer();
depthBuffer = dbCleared;
} else
@ -727,7 +725,6 @@ void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry )
if (depthBuffer != dbCleared) {
if (gDP.otherMode.cycleType == G_CYC_FILL) {
frameBufferList().fillRDRAM(ulx, uly, lrx, lry);
f32 fillColor[4];
gDPGetFillColor(fillColor);
gDP.rectColor.r = fillColor[0];
@ -740,6 +737,9 @@ void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry )
drawer.drawRect(ulx, uly, lrx, lry);
}
if (gDP.otherMode.cycleType == G_CYC_FILL)
frameBufferList().fillRDRAM(ulx, uly, lrx, lry);
frameBufferList().setBufferChanged(f32(lry));
DebugMsg( DEBUG_NORMAL, "gDPFillRectangle #%i- #%i ( %i, %i, %i, %i );\n", gSP.tri_num, gSP.tri_num +1, ulx, uly, lrx, lry );