|
1 /* $Id$ */ |
|
2 |
|
3 /** @file 8bpp_debug.cpp */ |
|
4 |
1 #include "../stdafx.h" |
5 #include "../stdafx.h" |
2 #include "../zoom.hpp" |
6 #include "../zoom.hpp" |
3 #include "../gfx.h" |
7 #include "../gfx.h" |
4 #include "../functions.h" |
8 #include "../functions.h" |
5 #include "8bpp_debug.hpp" |
9 #include "8bpp_debug.hpp" |
6 |
10 |
7 static FBlitter_8bppDebug iFBlitter_8bppDebug; |
11 static FBlitter_8bppDebug iFBlitter_8bppDebug; |
8 |
12 |
9 void Blitter_8bppDebug::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) |
13 void Blitter_8bppDebug::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) |
10 { |
14 { |
11 const byte *src, *src_line; |
15 const uint8 *src, *src_line; |
12 Pixel8 *dst, *dst_line; |
16 uint8 *dst, *dst_line; |
13 |
17 |
14 /* Find where to start reading in the source sprite */ |
18 /* Find where to start reading in the source sprite */ |
15 src_line = (const byte *)bp->sprite + (bp->skip_top * bp->sprite_width + bp->skip_left) * ScaleByZoom(1, zoom); |
19 src_line = (const uint8 *)bp->sprite + (bp->skip_top * bp->sprite_width + bp->skip_left) * ScaleByZoom(1, zoom); |
16 dst_line = (Pixel8 *)bp->dst + bp->top * bp->pitch + bp->left; |
20 dst_line = (uint8 *)bp->dst + bp->top * bp->pitch + bp->left; |
17 |
21 |
18 for (int y = 0; y < bp->height; y++) { |
22 for (int y = 0; y < bp->height; y++) { |
19 dst = dst_line; |
23 dst = dst_line; |
20 dst_line += bp->pitch; |
24 dst_line += bp->pitch; |
21 |
25 |