mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Fixed arithmetic overflow in palette generator; some basic fixes related to recent update of the Draw package.
git-svn-id: svn://ultimatepp.org/upp/trunk@1371 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a438f12393
commit
7ae5221acb
7 changed files with 129 additions and 125 deletions
|
|
@ -182,7 +182,7 @@ void sPalMaker::Update(Box& x, int ii)
|
|||
|
||||
static byte sRc(int avg, int pop, int div)
|
||||
{
|
||||
return Saturate255(255 * (avg + (pop >> 1)) / pop / (div - 1));
|
||||
return Saturate255(iscale(avg + (pop >> 1), 255, pop * (div - 1)));
|
||||
}
|
||||
|
||||
sPalMaker::sPalMaker(Raster& raster, RGBA *palette, int ncolors)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue