From d65319a9fc85b01841003c3ab790c94205e4cd37 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 27 Sep 2026 17:15:19 +0200 Subject: [PATCH 1/5] fix "Modulative" blendmode in software forgot to account it when the gamma correction stuff was ported --- src/r_draw.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/r_draw.cpp b/src/r_draw.cpp index 24073a4d4..3746f50a9 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -174,15 +174,10 @@ static void BlendTab_Translucent(UINT8 *table, int style, UINT8 blendamt) { frontrgba = pGammaCorrectedPalette[fg]; -#if 0 // perfect implementation - result.rgba = ASTBlendPixel(backrgba, frontrgba, style, 0xFF); - result.rgba = ASTBlendPixel(result, frontrgba, AST_TRANSLUCENT, blendamt); - table[((bg * 0x100) + fg)] = GetColorLUT(&transtab_lut, result.s.red, result.s.green, result.s.blue); -#else // performance scrabbler result.rgba = ASTBlendPixel(backrgba, frontrgba, style, 0xFF); result.rgba = ASTBlendPixel(result, frontrgba, AST_TRANSLUCENT, blendamt); + table[((bg * 0x100) + fg)] = GetColorLUT(&transtab_lut_corrected, result.s.red, result.s.green, result.s.blue); // pGammaCorrectedPalette -#endif } } } @@ -190,6 +185,7 @@ static void BlendTab_Translucent(UINT8 *table, int style, UINT8 blendamt) static void BlendTab_Subtractive(UINT8 *table, int style, UINT8 blendamt) { INT16 bg, fg; + RGBA_t backrgba, frontrgba, result; if (table == NULL) I_Error("BlendTab_Subtractive: input table was NULL!"); @@ -202,11 +198,11 @@ static void BlendTab_Subtractive(UINT8 *table, int style, UINT8 blendamt) for (bg = 0; bg < 0x100; bg++) { + backrgba = pLocalPalette[bg]; // intentionally uses pLocalPalette + for (fg = 0; fg < 0x100; fg++) { - RGBA_t backrgba = V_GetColor(bg); - RGBA_t frontrgba = V_GetColor(fg); - RGBA_t result; + frontrgba = pLocalPalette[fg]; result.rgba = ASTBlendPixel(backrgba, frontrgba, style, 0xFF); result.s.red = std::max(0, result.s.red - blendamt); @@ -221,17 +217,19 @@ static void BlendTab_Subtractive(UINT8 *table, int style, UINT8 blendamt) static void BlendTab_Modulative(UINT8 *table) { INT16 bg, fg; + RGBA_t backrgba, frontrgba, result; if (table == NULL) I_Error("BlendTab_Modulative: input table was NULL!"); for (bg = 0; bg < 0x100; bg++) { + backrgba = pGammaCorrectedPalette[bg]; + for (fg = 0; fg < 0x100; fg++) { - RGBA_t backrgba = V_GetColor(bg); - RGBA_t frontrgba = V_GetColor(fg); - RGBA_t result; + frontrgba = pGammaCorrectedPalette[fg]; + result.rgba = ASTBlendPixel(backrgba, frontrgba, AST_MODULATE, 0); table[((bg * 0x100) + fg)] = GetColorLUT(&transtab_lut_corrected, result.s.red, result.s.green, result.s.blue); } From 3fc5f572bb38e6659a3e6e2690e630a50ec0cba8 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 27 Sep 2026 17:34:55 +0200 Subject: [PATCH 2/5] fix CMake again............ --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4bf2e5132..2618d4077 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -586,7 +586,7 @@ if(${SRB2_CONFIG_SATURNJOIN}) add_definitions(-DDOSATURNJOIN) endif() -if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_SCREENFBO}) +if(${SRB2_CONFIG_PHOBOS}) add_definitions(-DPHOBOS_BUILD) endif() From 36d13734f6e67467317d2f68c102e8edd1e9d941 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 27 Sep 2026 17:28:37 +0200 Subject: [PATCH 3/5] v10.1 --- src/doomdef.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doomdef.h b/src/doomdef.h index fe6e8c5e2..f37a79bfc 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -144,8 +144,8 @@ extern char logfilename[1024]; #define CLIENTNAMEW L"Saturn" #endif -#define VERSIONSTRING CLIENTNAME " v10" -#define VERSIONSTRINGW CLIENTNAMEW L" v10" +#define VERSIONSTRING CLIENTNAME " v10.1" +#define VERSIONSTRINGW CLIENTNAMEW L" v10.1" #define SATURN_TESTING // comment out for saturn release builds! From 4749d1a108435680781f47ba24581513a363d8d3 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 1 Oct 2026 19:29:07 +0200 Subject: [PATCH 4/5] OpenGL: prefer GL_RGBA for fbo texture as recommended per https://wikis.khronos.org/opengl/Common_Mistakes --- src/hardware/r_opengl/r_opengl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 8fe1dff4b..77e0ef9d9 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -3283,7 +3283,7 @@ static void GL_Framebuffer_Generate(void) { pglGenTextures(1, &framebufferobject.tex); pglBindTexture(GL_TEXTURE_2D, framebufferobject.tex); - pglTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, screen_width, screen_height, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); + pglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, screen_width, screen_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); Clamp2D(GL_TEXTURE_WRAP_S); From d66020e3a98c365444b7dfcc721fcc882415320d Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 4 Oct 2026 00:56:25 +0200 Subject: [PATCH 5/5] fix localskin menu not showing localskin 3d models this should use the skins localnumber not the "actual" skinnumber yeah localskin code still sucks.... fixes https://github.com/Indev450/SRB2Kart-Saturn/issues/230 --- src/m_menu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/m_menu.c b/src/m_menu.c index 7b08296af..06eb773b6 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -9929,6 +9929,7 @@ static void M_DrawLocalSkinMenu(void) V_DrawFill(mx + 220 - (charw/2), my+54, charw, 84, 239); #undef charw + // FIXME: is skins[displayskin.localnum] even correct? UINT8 *colormap = R_GetLocalTranslationColormap(&skins[displayskin.localnum], (displayskin.localskin ? &localskins[displayskin.localnum] : NULL), cv_playercolor.value, GTC_MENUCACHE, displayskin.localskin); V_DrawMappedPatch(mx, my+50, 0, (patch_t *)W_CachePatchName(displayskin.facewant, PU_PATCH), colormap); @@ -9946,7 +9947,7 @@ static void M_DrawLocalSkinMenu(void) my += 120; #ifdef HWRENDER - md2_t *md2 = (displayskin.localskin ? &md2_localplayermodels[skintodisplay] : &md2_playermodels[skintodisplay]); + md2_t *md2 = (displayskin.localskin ? &md2_localplayermodels[displayskin.localnum] : &md2_playermodels[skintodisplay]); // if we have 3d models enabled and a model exists // try to show it instead of the sprite