aboutsummaryrefslogtreecommitdiff
path: root/source/tile.h
diff options
context:
space:
mode:
authorAutechre2020-10-15 18:54:26 +0200
committerGitHub2020-10-15 18:54:26 +0200
commitfed55b71325a5cd2ead019b2fe355644f7a6e794 (patch)
tree976ef8cf2b58958ad4888f97fa736916d6064386 /source/tile.h
parent5f03bb288e72cc19c04060549b486a6311afe9c9 (diff)
parent23294848d036e19ca45b8b511d343c95b9f914e6 (diff)
downloadsnes9x2005-fed55b71325a5cd2ead019b2fe355644f7a6e794.tar.gz
snes9x2005-fed55b71325a5cd2ead019b2fe355644f7a6e794.tar.bz2
snes9x2005-fed55b71325a5cd2ead019b2fe355644f7a6e794.zip
Merge pull request #76 from jdgleaver/optimisations
Backports: Colour operations from Snes9x 1.60 + MIPS optimisations from PocketSNES
Diffstat (limited to 'source/tile.h')
-rw-r--r--source/tile.h24
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: \