diff options
author | jdgleaver | 2020-10-15 14:37:46 +0100 |
---|---|---|
committer | jdgleaver | 2020-10-15 14:37:46 +0100 |
commit | 8c24c86a49b23086941814e3ae1d58a2993dac7a (patch) | |
tree | c830b654a33225b1340cd6f8a32fd8bfd926bc3b /source/tile.h | |
parent | 5f03bb288e72cc19c04060549b486a6311afe9c9 (diff) | |
download | snes9x2005-8c24c86a49b23086941814e3ae1d58a2993dac7a.tar.gz snes9x2005-8c24c86a49b23086941814e3ae1d58a2993dac7a.tar.bz2 snes9x2005-8c24c86a49b23086941814e3ae1d58a2993dac7a.zip |
Backports: Colour operations from Snes9x 1.60 + MIPS optimisations from PocketSNES
Diffstat (limited to 'source/tile.h')
-rw-r--r-- | source/tile.h | 24 |
1 files changed, 8 insertions, 16 deletions
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: \ |