int width = (x + xpos + slot->bitmap_left + bm->width >= 800) ? (799 - x - xpos - slot->bitmap_left) : bm->width;
for (xx = 0; xx < width; xx++) {
- *dst = (*dst * (256-*src) + r * *src) >> 8;
+ *dst = (*dst * (256-*src) + b * *src) >> 8;
*dst++;
*dst = (*dst * (256-*src) + g * *src) >> 8;
*dst++;
- *dst = (*dst * (256-*src) + b * *src) >> 8;
+ *dst = (*dst * (256-*src) + r * *src) >> 8;
*dst++;
*dst++ = 0;
src++;