From 8f63135415371ad6feba49cd3f79ecad9f8d9b76 Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Mon, 17 Aug 2026 19:45:25 +0200 Subject: [PATCH] Changed texture transparent color to 0x0001 for future compatibility with fxsdk and gint. --- src/headers/texture.h | 2 ++ src/texture.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/headers/texture.h b/src/headers/texture.h index 3431453..bcd641e 100644 --- a/src/headers/texture.h +++ b/src/headers/texture.h @@ -3,6 +3,8 @@ #include +#define TEXTURE_TRANSPARENT_COLOR 0x0001 + typedef SDL_Texture texture_t; texture_t *load_texture(void); diff --git a/src/texture.c b/src/texture.c index 6412ef4..b36130a 100644 --- a/src/texture.c +++ b/src/texture.c @@ -42,7 +42,7 @@ texture_t *load_texture(void) return NULL; } - if(!SDL_SetSurfaceColorKey(tmp_surface, true, 0xF81F)) + if(!SDL_SetSurfaceColorKey(tmp_surface, true, TEXTURE_TRANSPARENT_COLOR)) { error_printf("Failed to set color key of temporary surface : %s", SDL_GetError()); SDL_DestroySurface(tmp_surface);