From 68a0b5f48e3ec57c11f88d46b299459225413b23 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 23 Mar 2017 21:43:41 -0700 Subject: [PATCH] DS GX: Implement 16-bit textures --- src/ds/gx/software.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ds/gx/software.c b/src/ds/gx/software.c index 2e8aa5636..de70a81e7 100644 --- a/src/ds/gx/software.c +++ b/src/ds/gx/software.c @@ -171,7 +171,8 @@ static color_t _lookupColor(struct DSGXSoftwareRenderer* renderer, struct DSGXSo texel &= 0x7; break; case 7: - return _finishColor(0x3F, 0x3F, 0x3F, pa); + texel = poly->texBase[texelCoord]; + break; } uint8_t r, g, b; unsigned wr, wg, wb, wa; @@ -232,7 +233,7 @@ static color_t _lookupColor(struct DSGXSoftwareRenderer* renderer, struct DSGXSo if (b) { texel = _mixTexels(a, texel, b, texel2); } - } else { + } else if (poly->texFormat != 7) { if (poly->texFormat < 5 && poly->texFormat > 1 && DSGXTexParamsIs0Transparent(poly->texParams) && !texel) { return 0; } @@ -450,7 +451,6 @@ static void _preparePoly(struct DSGXRenderer* renderer, struct DSGXVertex* verts } else { switch (poly->texFormat) { case 0: - case 7: poly->texBase = NULL; poly->palBase = NULL; break;