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:
Tony Wasserka 2014-12-06 21:52:21 +01:00
parent 0fba1d48a6
commit 3df88d59b0
4 changed files with 41 additions and 55 deletions

View file

@ -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()));
}
}