From 8774d4c3fbfe653425c6b922ddf595dbd656bcb6 Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Thu, 28 Dec 2023 16:59:36 +0100 Subject: [PATCH] adding transparency support to pixel put --- src/core/bridge.cpp | 6 +++--- test/main.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/bridge.cpp b/src/core/bridge.cpp index abecaa8..8b97a54 100644 --- a/src/core/bridge.cpp +++ b/src/core/bridge.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:35:20 by maldavid #+# #+# */ -/* Updated: 2023/12/21 15:50:47 by maldavid ### ########.fr */ +/* Updated: 2023/12/28 16:56:23 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -181,8 +181,8 @@ extern "C" unsigned char color_bits[4]; color_bits[0] = (color & 0x00FF0000) >> 16; color_bits[1] = (color & 0x0000FF00) >> 8; - color_bits[2] = color & 0x000000FF; - color_bits[3] = 0xFF; + color_bits[2] = (color & 0x000000FF); + color_bits[3] = (color & 0xFF000000) >> 24; static_cast(mlx)->pixelPut(win, x, y, *reinterpret_cast(color_bits)); return 0; } diff --git a/test/main.c b/test/main.c index 402ae5b..e44202d 100644 --- a/test/main.c +++ b/test/main.c @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:55:21 by maldavid #+# #+# */ -/* Updated: 2023/12/24 16:02:35 by kbz_8 ### ########.fr */ +/* Updated: 2023/12/28 16:55:21 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */