Pica: Merge texture lookup logic for DebugUtils and Rasterizer.
This effectively adds support for a lot texture formats in the rasterizer.
This commit is contained in:
parent
0fba1d48a6
commit
3df88d59b0
4 changed files with 41 additions and 55 deletions
|
@ -24,7 +24,7 @@ QImage LoadTexture(u8* src, const Pica::DebugUtils::TextureInfo& info) {
|
|||
QImage decoded_image(info.width, info.height, QImage::Format_ARGB32);
|
||||
for (int y = 0; y < info.height; ++y) {
|
||||
for (int x = 0; x < info.width; ++x) {
|
||||
Math::Vec4<u8> color = Pica::DebugUtils::LookupTexture(src, x, y, info);
|
||||
Math::Vec4<u8> color = Pica::DebugUtils::LookupTexture(src, x, y, info, true);
|
||||
decoded_image.setPixel(x, y, qRgba(color.r(), color.g(), color.b(), color.a()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue