From eb331e4251cb26547bc4511f5f6930e67c4a2049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Thu, 19 Oct 2023 13:08:02 +0200 Subject: [PATCH] fix rgba --- depot | 2 +- engine/joint/v4k.h | 2 +- engine/split/v4k_render.c | 2 +- engine/v4k.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/depot b/depot index 118041b..660eaa0 160000 --- a/depot +++ b/depot @@ -1 +1 @@ -Subproject commit 118041b9023b74c01038723d69803f1912e870bf +Subproject commit 660eaa0992e99ed1a36c50faf7f4f5f2c84ad2c0 diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index add0e4c..cb4a01c 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -344528,7 +344528,7 @@ void shader_colormap(const char *name, colormap_t c ) { // colors unsigned rgba( uint8_t r, uint8_t g, uint8_t b, uint8_t a ) { - return (unsigned)a << 24 | r << 16 | g << 8 | b; + return (unsigned)r << 24 | g << 16 | b << 8 | a; } unsigned bgra( uint8_t b, uint8_t g, uint8_t r, uint8_t a ) { return rgba(r,g,b,a); diff --git a/engine/split/v4k_render.c b/engine/split/v4k_render.c index b9bdf92..2549f0a 100644 --- a/engine/split/v4k_render.c +++ b/engine/split/v4k_render.c @@ -533,7 +533,7 @@ void shader_colormap(const char *name, colormap_t c ) { // colors unsigned rgba( uint8_t r, uint8_t g, uint8_t b, uint8_t a ) { - return (unsigned)a << 24 | r << 16 | g << 8 | b; + return (unsigned)r << 24 | g << 16 | b << 8 | a; } unsigned bgra( uint8_t b, uint8_t g, uint8_t r, uint8_t a ) { return rgba(r,g,b,a); diff --git a/engine/v4k.c b/engine/v4k.c index a445ccf..492e16b 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -13453,7 +13453,7 @@ void shader_colormap(const char *name, colormap_t c ) { // colors unsigned rgba( uint8_t r, uint8_t g, uint8_t b, uint8_t a ) { - return (unsigned)a << 24 | r << 16 | g << 8 | b; + return (unsigned)r << 24 | g << 16 | b << 8 | a; } unsigned bgra( uint8_t b, uint8_t g, uint8_t r, uint8_t a ) { return rgba(r,g,b,a);