From e73cc7962fdd66a454de84b36b62e75e4c19b5f5 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sun, 24 Sep 2023 20:26:17 -0300 Subject: [PATCH] Clear pixel color if it was transparent --- src/v_video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/v_video.c b/src/v_video.c index 176fd2888..9e63789cb 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -1192,13 +1192,15 @@ void V_DrawIntoPatch(patch_t *dest_patch, patch_t *src_patch, fixed_t x, fixed_t continue; size_t position = (dest_x * dest_patch->height) + dest_y; + UINT8 *dest = &dest_patch->pixels[position]; + if (!in_bit_array(dpatch->pixels_opaque, position)) { set_bit_array(dpatch->pixels_opaque, position); dpatch->update_columns = true; + *dest = 0; } - UINT8 *dest = &dest_patch->pixels[position]; *dest = patchdrawfunc(dest, source, ofs); dpatch->is_dirty = true;