GE Debugger: Correct 16-bit CLUT display.

This commit is contained in:
Unknown W. Brackets committed 2022-08-20 15:51:46 -07:00
1 parent 5d46948eca
commit 01bfb88f15
1 file changed
+5 -3
+5 -3
View File
@@ -649,11 +649,13 @@ void CGEDebugger::SecondPreviewHover(int x, int y) {
}
DescribeSecondPreview(state, desc);
} else {
u32 pix = secondBuffer_->GetRawPixel(x, y);
if (showClut_) {
// Show the clut index, rather than coords.
DescribePixel(pix, secondBuffer_->GetFormat(), y * 16 + x, 0, desc);
// Use the clut index, rather than coords.
uint32_t clutWidth = secondBuffer_->GetStride() / 16;
u32 pix = secondBuffer_->GetRawPixel(y * clutWidth + x, 0);
DescribePixel(pix, secondBuffer_->GetFormat(), y * clutWidth + x, 0, desc);
} else {
u32 pix = secondBuffer_->GetRawPixel(x, y);
DescribePixel(pix, secondBuffer_->GetFormat(), x, y, desc);
}
}