From 5280bf813dfe28547fd96a2ea002e8343a7f4d89 Mon Sep 17 00:00:00 2001 From: Anthony Pesch Date: Sat, 7 Oct 2017 13:56:21 -0400 Subject: [PATCH] fix bad texture format constants being used instead of pixel format constants --- src/guest/pvr/tex.c | 4 ++-- src/tracer.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/guest/pvr/tex.c b/src/guest/pvr/tex.c index b231dc52..5ae868de 100644 --- a/src/guest/pvr/tex.c +++ b/src/guest/pvr/tex.c @@ -593,9 +593,9 @@ void pvr_tex_decode(const uint8_t *src, int width, int height, int stride, /* for vq compressed textures the offset is only for the index data, the codebook is the same for all levels */ index += compressed_mipmap_offsets[u_size]; - } else if (pixel_fmt == PVR_TEX_PALETTE_4BPP) { + } else if (pixel_fmt == PVR_PXL_4BPP) { src += paletted_4bpp_mipmap_offsets[u_size]; - } else if (pixel_fmt == PVR_TEX_PALETTE_8BPP) { + } else if (pixel_fmt == PVR_PXL_8BPP) { src += paletted_8bpp_mipmap_offsets[u_size]; } else { src += nonpaletted_mipmap_offsets[u_size]; diff --git a/src/tracer.c b/src/tracer.c index c4ef975c..aac26f00 100644 --- a/src/tracer.c +++ b/src/tracer.c @@ -42,7 +42,6 @@ static const char *texture_fmt_names[] = { "PVR_TEX_PALETTE_8BPP_MIPMAPS", "PVR_TEX_BITMAP_RECT", NULL, - NULL, "PVR_TEX_BITMAP", NULL, "PVR_TEX_TWIDDLED_RECT",