Mercurial > hg > openttd
changeset 13371:c2e0dde6ce94 draft
(svn r17880) -Codechange: pass 'blitter' as parameter instead of determining it again in DrawSmallMapStuff()
author | smatz <smatz@openttd.org> |
---|---|
date | Mon, 26 Oct 2009 20:26:34 +0000 |
parents | 3b5a2d007df2 |
children | a8bd5e6bde5b |
files | src/smallmap_gui.cpp |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -590,9 +590,8 @@ * @param proc Pointer to the colour function * @see GetSmallMapPixels(TileIndex) */ - void DrawSmallMapStuff(void *dst, uint xc, uint yc, int pitch, int reps, uint32 mask, GetSmallMapPixels *proc) + void DrawSmallMapStuff(void *dst, uint xc, uint yc, int pitch, int reps, uint32 mask, Blitter *blitter, GetSmallMapPixels *proc) { - Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter(); void *dst_ptr_abs_end = blitter->MoveTo(_screen.dst_ptr, 0, _screen.height); void *dst_ptr_end = blitter->MoveTo(dst_ptr_abs_end, -4, 0); @@ -839,7 +838,7 @@ /* number of lines */ int reps = (dpi->height - y + 1) / 2; if (reps > 0) { - this->DrawSmallMapStuff(ptr, tile_x, tile_y, dpi->pitch * 2, reps, mask, _smallmap_draw_procs[this->map_type]); + this->DrawSmallMapStuff(ptr, tile_x, tile_y, dpi->pitch * 2, reps, mask, blitter, _smallmap_draw_procs[this->map_type]); } }