Const correctness for some new functions.
[bertos.git] / gfx / bitmap.c
index f0681ea4238f71917ff7dfedfeb0cf42cdf8cc75..8aef8a84f80cb2f132f2a05bb5de60d314da72da 100755 (executable)
 
 /*#*
  *#* $Log$
+ *#* Revision 1.3  2006/01/26 00:36:48  bernie
+ *#* Const correctness for some new functions.
+ *#*
+ *#* Revision 1.2  2006/01/24 21:55:43  aleph
+ *#* gfx_blit_P(): use RASTER_SIZE() to calculate raster size
+ *#*
  *#* Revision 1.1  2006/01/24 02:17:49  bernie
  *#* Split out gfx.c into bitmap.c and line.c.
  *#*
@@ -83,7 +89,7 @@ void gfx_bitmapClear(Bitmap *bm)
  */
 void gfx_blit_P(Bitmap *bm, const pgm_uint8_t *raster)
 {
-       memcpy_P(bm->raster, raster, (bm->height / 8) * bm->width);
+       memcpy_P(bm->raster, raster, RASTER_SIZE(bm->width, bm->height));
 }
 #endif /* CPU_HARVARD */
 
@@ -99,7 +105,7 @@ void gfx_blit_P(Bitmap *bm, const pgm_uint8_t *raster)
  * \param dst Bitmap where the operation writes
  *
  */
-void gfx_blit(Bitmap *dst, Rect *rect, Bitmap *src, coord_t srcx, coord_t srcy)
+void gfx_blit(Bitmap *dst, const Rect *rect, const Bitmap *src, coord_t srcx, coord_t srcy)
 {
        coord_t dxmin, dymin, dxmax, dymax;
        coord_t dx, dy, sx, sy;