I'm having issues figuring out how to handle tile flipping (byte 2 of sprite OAM memory).
Consider if the bit is set to flip a sprite horizontally and its an 8x8 tile at 0,0 that looks like this (for simplicity):
Would a horizontal flip result in this? My rationale is that it flips in the middle, on a "horizon" as the pivot point.
For a vertical flip, same idea:
(Original)
(Vertical flip bit set)
Does any of this look right? Its rendering terribly in my emulator so I'm guessing I'm not interpreting this correctly.
Consider if the bit is set to flip a sprite horizontally and its an 8x8 tile at 0,0 that looks like this (for simplicity):
Code:
a 0 0 0 0 0 0 b
e 0 0 0 0 0 0 f
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
c 0 0 0 0 0 0 d
e 0 0 0 0 0 0 f
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
c 0 0 0 0 0 0 d
Would a horizontal flip result in this? My rationale is that it flips in the middle, on a "horizon" as the pivot point.
Code:
c 0 0 0 0 0 0 d
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
e 0 0 0 0 0 0 f
a 0 0 0 0 0 0 b
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
e 0 0 0 0 0 0 f
a 0 0 0 0 0 0 b
For a vertical flip, same idea:
(Original)
Code:
a 0 0 0 0 0 0 b
e 0 0 0 0 0 0 f
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
c 0 0 0 0 0 0 d
e 0 0 0 0 0 0 f
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
c 0 0 0 0 0 0 d
(Vertical flip bit set)
Code:
b 0 0 0 0 0 0 a
f 0 0 0 0 0 0 e
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
d 0 0 0 0 0 0 c
f 0 0 0 0 0 0 e
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
d 0 0 0 0 0 0 c
Does any of this look right? Its rendering terribly in my emulator so I'm guessing I'm not interpreting this correctly.