X-Git-Url: https://eleni.mutantstargoat.com/git/?p=winnie;a=blobdiff_plain;f=src%2Fgfx.cc;h=c517b399a952309dcfa885a68e57794c951e67b8;hp=f0be4605174b24fbb178f9218c19b2214550c4d7;hb=32869d8ffb64be82541f48166c5e73a6c4336135;hpb=2985bfa49497805b4760c066a6288c4b3752d145 diff --git a/src/gfx.cc b/src/gfx.cc index f0be460..c517b39 100644 --- a/src/gfx.cc +++ b/src/gfx.cc @@ -47,6 +47,9 @@ void fill_rect(const Rect &rect, int r, int g, int b) void blit(unsigned char *src_img, const Rect &src_rect, unsigned char* dest_img, const Rect &dest_rect, int dest_x, int dest_y) { + int red_offs, green_offs, blue_offs; + get_rgb_order(&red_offs, &green_offs, &blue_offs); + Rect irect = rect_intersection(get_clipping_rect(), dest_rect); int width = src_rect.width; @@ -82,7 +85,11 @@ void blit(unsigned char *src_img, const Rect &src_rect, unsigned char* dest_img, unsigned char *dptr = dest_img + (dest_y * dest_rect.width + dest_x) * 4; for(int i=0; i