mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Fixed bug in gDPFillRectangle, caused by commit bcde07a978
This commit is contained in:
parent
d69f722539
commit
1db0c7a75e
|
@ -758,18 +758,23 @@ void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry )
|
|||
} else if (lry == uly)
|
||||
++lry;
|
||||
|
||||
bool bClearBuffer = false;
|
||||
if (gDP.depthImageAddress == gDP.colorImage.address) {
|
||||
// Game may use depth texture as auxilary color texture. Example: Mario Tennis
|
||||
// If color is not depth clear color, that is most likely the case
|
||||
if (gDP.fillColor.color == DepthClearColor) {
|
||||
gDPFillRDRAM(gDP.colorImage.address, ulx, uly, lrx, lry, gDP.colorImage.width, gDP.colorImage.size, gDP.fillColor.color);
|
||||
render.clearDepthBuffer(uly, lry);
|
||||
bClearBuffer = true;
|
||||
}
|
||||
} else if (gDP.fillColor.color == DepthClearColor && gDP.otherMode.cycleType == G_CYC_FILL) {
|
||||
depthBufferList().saveBuffer(gDP.colorImage.address);
|
||||
gDPFillRDRAM(gDP.colorImage.address, ulx, uly, lrx, lry, gDP.colorImage.width, gDP.colorImage.size, gDP.fillColor.color);
|
||||
render.clearDepthBuffer(uly, lry);
|
||||
} else {
|
||||
bClearBuffer = true;
|
||||
}
|
||||
|
||||
if (!bClearBuffer) {
|
||||
frameBufferList().setBufferChanged();
|
||||
f32 fillColor[4];
|
||||
gDPGetFillColor(fillColor);
|
||||
|
|
Loading…
Reference in New Issue
Block a user