From 0c40d654b856e074a9885a9e5a5c01eca68e68cc Mon Sep 17 00:00:00 2001 From: "therealmogminer@gmail.com" Date: Fri, 26 Jun 2015 15:37:46 +0200 Subject: [PATCH] nw, refinement of previous fix --- src/emu/video/rgbsse.c | 2 +- src/emu/video/vooddefs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emu/video/rgbsse.c b/src/emu/video/rgbsse.c index bdac2a583c6..f2c679bcd1d 100644 --- a/src/emu/video/rgbsse.c +++ b/src/emu/video/rgbsse.c @@ -58,8 +58,8 @@ void rgbaint_t::scale_add_and_clamp(const rgbaint_t& scale, const rgbaint_t& oth void rgbaint_t::scale_imm_add_and_clamp(const INT32 scale, const rgbaint_t& other) { mul_imm(scale); - add(other); sra(8); + add(other); max(0); min(255); } diff --git a/src/emu/video/vooddefs.h b/src/emu/video/vooddefs.h index ff6b39bf478..f20ed902896 100644 --- a/src/emu/video/vooddefs.h +++ b/src/emu/video/vooddefs.h @@ -3211,7 +3211,7 @@ INLINE void applyFogging(voodoo_state *v, UINT32 fogModeReg, UINT32 fbzCpReg, I /* if fog_mult is 0, we add this to the original color */ if (FOGMODE_FOG_MULT(fogModeReg) == 0) { - tmpA.scale_imm_add_and_clamp((INT16) fogblend, tmpB); + tmpA.scale_imm_add_and_clamp((INT32) fogblend, tmpB); //color += fog; //(RR) += fr; //(GG) += fg;