aboutsummaryrefslogtreecommitdiff
path: root/source/tile.h
diff options
context:
space:
mode:
authorgameblabla2019-10-07 07:30:01 +0200
committergameblabla2019-10-07 07:30:01 +0200
commitd08ec6a5285e60c6a55c8f11117496be1b375559 (patch)
tree4e95fd96d870adc6efe16c3a5d2081cd6bebb0a3 /source/tile.h
parent3a72f304ac361da7eb681a457e66e85d51b9912f (diff)
downloadsnesemu-d08ec6a5285e60c6a55c8f11117496be1b375559.tar.gz
snesemu-d08ec6a5285e60c6a55c8f11117496be1b375559.tar.bz2
snesemu-d08ec6a5285e60c6a55c8f11117496be1b375559.zip
Merge optimisations from PocketSNES fork.
Diffstat (limited to 'source/tile.h')
-rw-r--r--source/tile.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/source/tile.h b/source/tile.h
index 1dbc1fa..74f6327 100644
--- a/source/tile.h
+++ b/source/tile.h
@@ -36,29 +36,23 @@
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); \
} \
break; \
@@ -66,10 +60,8 @@
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: \