Fix for ibara by Haze (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2011-10-12 12:21:29 +00:00
parent e141dd4c4c
commit 0367d7a349
2 changed files with 14 additions and 6 deletions

View File

@ -232,6 +232,14 @@ INLINE void clr_mul_fixed_rev(clr_t *clr, const UINT8 val, const clr_t *clr0)
clr->b = cavesh3_colrtable_rev[(clr0->b)][val];
}
INLINE void clr_copy(clr_t *clr, const clr_t *clr0)
{
clr->r = clr0->r;
clr->g = clr0->g;
clr->b = clr0->b;
}
// (1|s|d) * s_factor * s + (1|s|d) * d_factor * d
// 0: +alpha
@ -3355,8 +3363,8 @@ static MACHINE_RESET( cavesh3 )
cavesh3_colrtable[x][y] = (x*y) / 0x1f;
if (cavesh3_colrtable[x][y]>0x1f) cavesh3_colrtable[x][y] = 0x1f;
cavesh3_colrtable_rev[x^0x1f][y] = (x*y) / 0x1f;
if (cavesh3_colrtable_rev[x^0x1f][y]>0x1f) cavesh3_colrtable_rev[x^0x1f][y] = 0x1f;
cavesh3_colrtable_rev[x][y^0x1f] = (x*y) / 0x1f;
if (cavesh3_colrtable_rev[x][y^0x1f]>0x1f) cavesh3_colrtable_rev[x][y^0x1f] = 0x1f;
}
}

View File

@ -104,7 +104,7 @@ const void FUNCNAME(bitmap_t *bitmap,
clr0.b = d_clr.b;
clr_mul(&clr0, &s_clr);
#elif _SMODE == 3
clr_mul_fixed(&clr0, 0x1f, &s_clr);
clr_copy(&clr0, &s_clr);
#elif _SMODE == 4
clr_mul_fixed_rev(&clr0, s_alpha, &s_clr);
@ -119,7 +119,7 @@ const void FUNCNAME(bitmap_t *bitmap,
clr0.b = d_clr.b;
clr_mul_rev(&clr0, &s_clr);
#elif _SMODE == 7
clr_mul_fixed_rev(&clr0, 0x1f, &s_clr);
clr_copy(&clr0, &s_clr);
#endif
@ -137,7 +137,7 @@ const void FUNCNAME(bitmap_t *bitmap,
clr1.b = d_clr.b;
clr_mul(&clr1, &d_clr);
#elif _DMODE == 3
clr_mul_fixed(&clr1, 0x1f, &d_clr);
clr_copy(&clr1, &d_clr);
#elif _DMODE == 4
clr_mul_fixed_rev(&clr1, d_alpha, &d_clr);
@ -152,7 +152,7 @@ const void FUNCNAME(bitmap_t *bitmap,
clr1.b = d_clr.b;
clr_mul_rev(&clr1, &d_clr);
#elif _DMODE == 7
clr_mul_fixed_rev(&clr1, 0x1f, &d_clr);
clr_copy(&clr1, &d_clr);
#endif