mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-02 22:36:00 +02:00
Fixed operator precedence issues
This commit is contained in:
parent
d0c9145655
commit
2ac478509e
7 changed files with 16 additions and 10 deletions
|
@ -77,7 +77,7 @@ namespace Beefy.gfx
|
|||
(((((color1 & 0x000000FF) * oma) + ((color2 & 0x000000FF) * a)) >> 8) & 0x000000FF) |
|
||||
(((((color1 & 0x0000FF00) * oma) + ((color2 & 0x0000FF00) * a)) >> 8) & 0x0000FF00) |
|
||||
(((((color1 & 0x00FF0000) * oma) + ((color2 & 0x00FF0000) * a)) >> 8) & 0x00FF0000) |
|
||||
(((((color1 >> 24) & 0xFF) * oma) + (((color2 >> 24) & 0xFF) * a) & 0x0000FF00) << 16);
|
||||
((((((color1 >> 24) & 0xFF) * oma) + (((color2 >> 24) & 0xFF) * a)) & 0x0000FF00) << 16);
|
||||
|
||||
return aColor;
|
||||
}
|
||||
|
|
|
@ -897,7 +897,7 @@ namespace Beefy.gfx
|
|||
{
|
||||
// This strange-looking construct is so that odd-length lines and even-length lines do not 'jitter'
|
||||
// relative to each other as we're resizing a window
|
||||
useX += ((int)(width)&~1 - (int)aWidth) / 2;
|
||||
useX += (((int)(width)&~1) - (int)aWidth) / 2;
|
||||
}
|
||||
else if (justification == 1)
|
||||
useX += width - aWidth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue