Pass destination bitmap to scale_bitmap
This commit is contained in:
parent
590a025a89
commit
beaa49a7ba
|
@ -351,9 +351,8 @@ static void scale_bitmap_c_rle(const grs_bitmap &source_bmp, grs_bitmap &dest_bm
|
|||
#define FIND_SCALED_NUM(x,x0,x1,y0,y1) (fixmuldiv((x)-(x0),(y1)-(y0),(x1)-(x0))+(y0))
|
||||
|
||||
// Scales bitmap, bp, into vertbuf[0] to vertbuf[1]
|
||||
void scale_bitmap(const grs_bitmap &bp, const array<grs_point, 3> &vertbuf, int orientation )
|
||||
void scale_bitmap(const grs_bitmap &bp, const array<grs_point, 3> &vertbuf, int orientation, grs_bitmap &dbp)
|
||||
{
|
||||
auto &dbp = grd_curcanv->cv_bitmap;
|
||||
fix x0, y0, x1, y1;
|
||||
fix u0, v0, u1, v1;
|
||||
fix clipped_x0, clipped_y0, clipped_x1, clipped_y1;
|
||||
|
|
|
@ -163,7 +163,7 @@ void g3_draw_bitmap(const vms_vector &pos,fix width,fix height,grs_bitmap &bm)
|
|||
{blob1x, blob0y},
|
||||
{blob1x, pnt.p3_sy + h},
|
||||
}};
|
||||
scale_bitmap(bm, blob_vertices, 0);
|
||||
scale_bitmap(bm, blob_vertices, 0, grd_curcanv->cv_bitmap);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ std::pair<const char *, unsigned> gr_get_string_wrap(const char *s, unsigned lim
|
|||
void gr_get_string_size(const grs_font &, const char *s, int *string_width, int *string_height, int *average_width);
|
||||
|
||||
// From scale.c
|
||||
void scale_bitmap(const grs_bitmap &bp, const array<grs_point, 3> &vertbuf, int orientation);
|
||||
void scale_bitmap(const grs_bitmap &bp, const array<grs_point, 3> &vertbuf, int orientation, grs_bitmap &);
|
||||
|
||||
//===========================================================================
|
||||
// Global variables
|
||||
|
|
|
@ -648,7 +648,7 @@ static int state_callback(newmenu *menu,const d_event &event, state_userdata *co
|
|||
{0,0},
|
||||
{i2f(THUMBNAIL_W*2),i2f(THUMBNAIL_H*24/10)}
|
||||
}};
|
||||
scale_bitmap(*sc_bmp[citem-1].get(), vertbuf, 0);
|
||||
scale_bitmap(*sc_bmp[citem-1].get(), vertbuf, 0, grd_curcanv->cv_bitmap);
|
||||
gr_set_current_canvas( save_canv );
|
||||
#if !DXX_USE_OGL
|
||||
gr_bitmap(*grd_curcanv, (grd_curcanv->cv_bitmap.bm_w / 2) - fspacx(THUMBNAIL_W / 2), items[0].y - 3, temp_canv->cv_bitmap);
|
||||
|
|
Loading…
Reference in a new issue