diff --git a/common/2d/bitblt.cpp b/common/2d/bitblt.cpp index 22c607780..6b7a5ba1c 100644 --- a/common/2d/bitblt.cpp +++ b/common/2d/bitblt.cpp @@ -279,7 +279,7 @@ void gr_bm_ubitblt(unsigned w, unsigned h, int dx, int dy, int sx, int sy, const for (uint_fast32_t y1 = 0; y1 != h; ++y1) for (uint_fast32_t x1 = 0; x1 != w; ++x1) - gr_bm_pixel(dest, dx+x1, dy+y1, gr_gpixel(src,sx+x1,sy+y1) ); + gr_bm_pixel(*grd_curcanv, dest, dx + x1, dy + y1, gr_gpixel(src, sx + x1, sy + y1)); } #endif @@ -370,7 +370,7 @@ void gr_bm_ubitbltm(unsigned w, unsigned h, unsigned dx, unsigned dy, unsigned s for (uint_fast32_t y1 = 0; y1 != h; ++y1) for (uint_fast32_t x1 = 0; x1 != w; ++x1) if ((c=gr_gpixel(src,sx+x1,sy+y1))!=255) - gr_bm_pixel(dest, dx+x1, dy+y1,c ); + gr_bm_pixel(*grd_curcanv, dest, dx + x1, dy + y1, c); } #endif diff --git a/common/2d/pixel.cpp b/common/2d/pixel.cpp index fa78ca3e5..6d0a20396 100644 --- a/common/2d/pixel.cpp +++ b/common/2d/pixel.cpp @@ -72,11 +72,11 @@ static inline void gr_bm_upixel(grs_canvas &canvas, grs_bitmap &bm, const uint_f } } -void gr_bm_pixel(grs_bitmap &bm, uint_fast32_t x, uint_fast32_t y, uint8_t color ) +void gr_bm_pixel(grs_canvas &canvas, grs_bitmap &bm, const uint_fast32_t x, const uint_fast32_t y, const uint8_t color) { if (unlikely(x >= bm.bm_w || y >= bm.bm_h)) return; - gr_bm_upixel(*grd_curcanv, bm, x, y, color); + gr_bm_upixel(canvas, bm, x, y, color); } } diff --git a/common/2d/rle.cpp b/common/2d/rle.cpp index 91eabfd87..f188e10a3 100644 --- a/common/2d/rle.cpp +++ b/common/2d/rle.cpp @@ -469,12 +469,12 @@ void gr_rle_expand_scanline_generic(grs_bitmap &dest, int dx, int dy, const ubyt if ( x1+count > x2 ) { count = x2-x1+1; for ( int j=0; j