From 8c24c86a49b23086941814e3ae1d58a2993dac7a Mon Sep 17 00:00:00 2001 From: jdgleaver Date: Thu, 15 Oct 2020 14:37:46 +0100 Subject: Backports: Colour operations from Snes9x 1.60 + MIPS optimisations from PocketSNES --- source/tile.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'source/tile.h') diff --git a/source/tile.h b/source/tile.h index 1dbc1fa..1484f31 100644 --- a/source/tile.h +++ b/source/tile.h @@ -36,40 +36,32 @@ bp = pCache + StartLine; \ for (l = LineCount; l != 0; l--, bp += 8, Offset += GFX.PPL) \ { \ - if (*(uint32_t *) bp) \ - NORMAL (Offset, bp, ScreenColors); \ - if (*(uint32_t *) (bp + 4)) \ - NORMAL (Offset + N, bp + 4, ScreenColors); \ + NORMAL (Offset, bp, ScreenColors); \ + NORMAL (Offset + N, bp + 4, ScreenColors); \ } \ break; \ case H_FLIP: \ bp = pCache + StartLine; \ for (l = LineCount; l != 0; l--, bp += 8, Offset += GFX.PPL) \ { \ - if (*(uint32_t *) (bp + 4)) \ - FLIPPED (Offset, bp + 4, ScreenColors); \ - if (*(uint32_t *) bp) \ - FLIPPED (Offset + N, bp, ScreenColors); \ + FLIPPED (Offset, bp + 4, ScreenColors); \ + FLIPPED (Offset + N, bp, ScreenColors); \ } \ break; \ case H_FLIP | V_FLIP: \ bp = pCache + 56 - StartLine; \ for (l = LineCount; l != 0; l--, bp -= 8, Offset += GFX.PPL) \ { \ - if (*(uint32_t *) (bp + 4)) \ - FLIPPED (Offset, bp + 4, ScreenColors); \ - if (*(uint32_t *) bp) \ - FLIPPED (Offset + N, bp, ScreenColors); \ + FLIPPED (Offset, bp + 4, ScreenColors); \ + FLIPPED (Offset + N, bp, ScreenColors); \ } \ break; \ case V_FLIP: \ bp = pCache + 56 - StartLine; \ for (l = LineCount; l != 0; l--, bp -= 8, Offset += GFX.PPL) \ { \ - if (*(uint32_t *) bp) \ - NORMAL (Offset, bp, ScreenColors); \ - if (*(uint32_t *) (bp + 4)) \ - NORMAL (Offset + N, bp + 4, ScreenColors); \ + NORMAL (Offset, bp, ScreenColors); \ + NORMAL (Offset + N, bp + 4, ScreenColors); \ } \ break; \ default: \ -- cgit v1.2.3