all repos — mgba @ 68a0b5f48e3ec57c11f88d46b299459225413b23

mGBA Game Boy Advance Emulator

DS GX: Implement 16-bit textures
Vicki Pfau vi@endrift.com
Thu, 23 Mar 2017 21:43:41 -0700
commit

68a0b5f48e3ec57c11f88d46b299459225413b23

parent

8f58343e2b3ff091f51254983c54e581581b118e

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M src/ds/gx/software.csrc/ds/gx/software.c

@@ -171,7 +171,8 @@ ta = (texel >> 3) & 0x1F;

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 @@ }

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 @@ poly->palBase = NULL;

} else { switch (poly->texFormat) { case 0: - case 7: poly->texBase = NULL; poly->palBase = NULL; break;