mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
More fixes for 32 bit
This commit is contained in:
parent
3ee1cb72ec
commit
efa55998b4
@ -315,7 +315,7 @@ INLINE void rgbint_scale_channel_and_clamp(rgbint *color, const rgbint *colorsca
|
||||
*color = _mm_min_epi16(*color, *(__m128i *)&rgbsse_statics.maxbyte);
|
||||
}
|
||||
|
||||
INLINE void rgbint_scale_immediate_add_and_clamp(rgbint *color1, INT16 colorscale, const rgbaint *color2)
|
||||
INLINE void rgbaint_scale_immediate_add_and_clamp(rgbaint *color1, INT16 colorscale, const rgbaint *color2)
|
||||
{
|
||||
// color2 will get mutiplied by 2^8 (256) and then divided by 2^8 by the shift by 8
|
||||
__m128i mscale = _mm_unpacklo_epi16(_mm_set1_epi16(colorscale), _mm_set_epi16(0, 0, 0, 0, 256, 256, 256, 256));
|
||||
|
@ -3216,7 +3216,7 @@ ATTR_FORCE_INLINE void applyFogging(voodoo_state *v, UINT32 fogModeReg, UINT32 f
|
||||
/* if fog_mult is 0, we add this to the original color */
|
||||
if (FOGMODE_FOG_MULT(fogModeReg) == 0)
|
||||
{
|
||||
rgbint_scale_immediate_add_and_clamp(&tmpA, fogblend, &tmpB);
|
||||
rgbaint_scale_immediate_add_and_clamp(&tmpA, fogblend, &tmpB);
|
||||
//color += fog;
|
||||
//(RR) += fr;
|
||||
//(GG) += fg;
|
||||
@ -4315,7 +4315,7 @@ ATTR_FORCE_INLINE bool combineColor(voodoo_state *VV, stats_block *STATS, UINT32
|
||||
sub_val.u &= 0x00ffffff;
|
||||
|
||||
rgba_to_rgbaint(&tmpB, (rgb_t) sub_val.u);
|
||||
rgbint_sub(&tmpA, &tmpB);
|
||||
rgbaint_sub(&tmpA, &tmpB);
|
||||
}
|
||||
|
||||
/* blend RGB */
|
||||
@ -4847,7 +4847,7 @@ ATTR_FORCE_INLINE UINT32 combineTexture(tmu_state *TT, const UINT32 TEXMODE, rgb
|
||||
sub_val.u &= 0x00ffffff;
|
||||
|
||||
rgba_to_rgbaint(&tmpB, (rgb_t) sub_val.u);
|
||||
rgbint_sub(&tmpA, &tmpB);
|
||||
rgbaint_sub(&tmpA, &tmpB);
|
||||
}
|
||||
|
||||
/* blend RGB */
|
||||
|
Loading…
Reference in New Issue
Block a user