aboutsummaryrefslogtreecommitdiff
path: root/source/tile.cpp
diff options
context:
space:
mode:
authorNebuleon Fumika2013-02-08 05:50:22 -0500
committerNebuleon Fumika2013-02-08 05:50:22 -0500
commit927d456306672110870eb3386742c1c1ef8eb4f6 (patch)
tree509da9ac1727570b02572068aefb9cdf102ad75b /source/tile.cpp
parent433749b6ef1e2b070755c3bb7fc0d81b5ecaa7b1 (diff)
parentd4fcf2697c9a45594e3ee0b8bf82e480ddd0b69b (diff)
downloadsnes9x2005-927d456306672110870eb3386742c1c1ef8eb4f6.tar.gz
snes9x2005-927d456306672110870eb3386742c1c1ef8eb4f6.tar.bz2
snes9x2005-927d456306672110870eb3386742c1c1ef8eb4f6.zip
Merge branch 'master' into 8bitsound
Conflicts: source/nds/entry.cpp
Diffstat (limited to 'source/tile.cpp')
-rw-r--r--source/tile.cpp65
1 files changed, 1 insertions, 64 deletions
diff --git a/source/tile.cpp b/source/tile.cpp
index 653a6d7..87d1fac 100644
--- a/source/tile.cpp
+++ b/source/tile.cpp
@@ -589,71 +589,8 @@ void DrawTile16 (uint32 Tile, uint32 Offset, uint32 StartLine,
{
TILE_PREAMBLE
register uint8 *bp;
- uint8 Pixel;
- uint16 *Screen = (uint16 *) GFX.S + Offset;
- uint8 *Depth = GFX.DB + Offset;
- switch (Tile & (H_FLIP | V_FLIP))
- {
- case 0:
- bp = pCache + StartLine;
- for (l = LineCount; l != 0; l--, bp += 8, Screen += GFX.PPL, Depth += GFX.PPL)
- {
- for (uint8 N = 0; N < 8; N++)
- {
- if (GFX.Z1 > Depth [N] && (Pixel = bp[N]))
- {
- Screen [N] = ScreenColors [Pixel];
- Depth [N] = GFX.Z2;
- }
- }
- }
- break;
- case H_FLIP:
- bp = pCache + StartLine;
- for (l = LineCount; l != 0; l--, bp += 8, Screen += GFX.PPL, Depth += GFX.PPL)
- {
- for (uint8 N = 0; N < 8; N++)
- {
- if (GFX.Z1 > Depth [N] && (Pixel = bp[7 - N]))
- {
- Screen [N] = ScreenColors [Pixel];
- Depth [N] = GFX.Z2;
- }
- }
- }
- break;
- case H_FLIP | V_FLIP:
- bp = pCache + 56 - StartLine;
- for (l = LineCount; l != 0; l--, bp -= 8, Screen += GFX.PPL, Depth += GFX.PPL)
- {
- for (uint8 N = 0; N < 8; N++)
- {
- if (GFX.Z1 > Depth [N] && (Pixel = bp[7 - N]))
- {
- Screen [N] = ScreenColors [Pixel];
- Depth [N] = GFX.Z2;
- }
- }
- }
- break;
- case V_FLIP:
- bp = pCache + 56 - StartLine;
- for (l = LineCount; l != 0; l--, bp -= 8, Screen += GFX.PPL, Depth += GFX.PPL)
- {
- for (uint8 N = 0; N < 8; N++)
- {
- if (GFX.Z1 > Depth [N] && (Pixel = bp[N]))
- {
- Screen [N] = ScreenColors [Pixel];
- Depth [N] = GFX.Z2;
- }
- }
- }
- break;
- default:
- break;
- }
+ RENDER_TILE(WRITE_4PIXELS16, WRITE_4PIXELS16_FLIPPED, 4)
}
void DrawClippedTile16 (uint32 Tile, uint32 Offset,