Pass gr_rle_expand_scanline_generic arg by &
This commit is contained in:
parent
63cbff3b82
commit
9b2ef9cfa4
|
@ -495,7 +495,7 @@ static void gr_bm_ubitblt0x_rle(int w, int h, int dx, int dy, int sx, int sy, gr
|
||||||
sbits += (int)(INTEL_SHORT(src->bm_data[4+(i*data_offset)]));
|
sbits += (int)(INTEL_SHORT(src->bm_data[4+(i*data_offset)]));
|
||||||
|
|
||||||
for (int y1=0; y1 < h; y1++ ) {
|
for (int y1=0; y1 < h; y1++ ) {
|
||||||
gr_rle_expand_scanline_generic( dest, dx, dy+y1, sbits, sx, sx+w-1);
|
gr_rle_expand_scanline_generic(*dest, dx, dy+y1, sbits, sx, sx+w-1);
|
||||||
if ( src->bm_flags & BM_FLAG_RLE_BIG )
|
if ( src->bm_flags & BM_FLAG_RLE_BIG )
|
||||||
sbits += (int)INTEL_SHORT(*((short *)&(src->bm_data[4+((y1+sy)*data_offset)])));
|
sbits += (int)INTEL_SHORT(*((short *)&(src->bm_data[4+((y1+sy)*data_offset)])));
|
||||||
else
|
else
|
||||||
|
|
|
@ -447,7 +447,7 @@ grs_bitmap *_rle_expand_texture(const grs_bitmap &bmp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void gr_rle_expand_scanline_generic( grs_bitmap * dest, int dx, int dy, ubyte *src, int x1, int x2 )
|
void gr_rle_expand_scanline_generic(grs_bitmap &dest, int dx, int dy, const ubyte *src, int x1, int x2 )
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int count;
|
int count;
|
||||||
|
@ -475,12 +475,12 @@ void gr_rle_expand_scanline_generic( grs_bitmap * dest, int dx, int dy, ubyte *s
|
||||||
if ( x1+count > x2 ) {
|
if ( x1+count > x2 ) {
|
||||||
count = x2-x1+1;
|
count = x2-x1+1;
|
||||||
for ( int j=0; j<count; j++ )
|
for ( int j=0; j<count; j++ )
|
||||||
gr_bm_pixel(*dest, dx++, dy, color );
|
gr_bm_pixel(dest, dx++, dy, color );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( int j=0; j<count; j++ )
|
for ( int j=0; j<count; j++ )
|
||||||
gr_bm_pixel(*dest, dx++, dy, color );
|
gr_bm_pixel(dest, dx++, dy, color );
|
||||||
i += count;
|
i += count;
|
||||||
|
|
||||||
while( i <= x2 ) {
|
while( i <= x2 ) {
|
||||||
|
@ -496,12 +496,12 @@ void gr_rle_expand_scanline_generic( grs_bitmap * dest, int dx, int dy, ubyte *s
|
||||||
// we know have '*count' pixels of 'color'.
|
// we know have '*count' pixels of 'color'.
|
||||||
if ( i+count <= x2 ) {
|
if ( i+count <= x2 ) {
|
||||||
for ( int j=0; j<count; j++ )
|
for ( int j=0; j<count; j++ )
|
||||||
gr_bm_pixel(*dest, dx++, dy, color );
|
gr_bm_pixel(dest, dx++, dy, color );
|
||||||
i += count;
|
i += count;
|
||||||
} else {
|
} else {
|
||||||
count = x2-i+1;
|
count = x2-i+1;
|
||||||
for ( int j=0; j<count; j++ )
|
for ( int j=0; j<count; j++ )
|
||||||
gr_bm_pixel(*dest, dx++, dy, color );
|
gr_bm_pixel(dest, dx++, dy, color );
|
||||||
i += count;
|
i += count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ void rle_cache_close();
|
||||||
void rle_cache_flush();
|
void rle_cache_flush();
|
||||||
void rle_swap_0_255(grs_bitmap *bmp);
|
void rle_swap_0_255(grs_bitmap *bmp);
|
||||||
void rle_remap(grs_bitmap *bmp, array<color_t, 256> &colormap);
|
void rle_remap(grs_bitmap *bmp, array<color_t, 256> &colormap);
|
||||||
void gr_rle_expand_scanline_generic( grs_bitmap * dest, int dx, int dy, ubyte *src, int x1, int x2 );
|
void gr_rle_expand_scanline_generic(grs_bitmap &dest, int dx, int dy, const ubyte *src, int x1, int x2 );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue