mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
*** empty log message ***
svn path=/trunk/; revision=1410
This commit is contained in:
parent
14b2a471ce
commit
201009ddd9
|
@ -64,3 +64,31 @@ static unsigned char saved_GC_mask; /* 0x08 */
|
||||||
static unsigned char leftMask;
|
static unsigned char leftMask;
|
||||||
static int byteCounter;
|
static int byteCounter;
|
||||||
static unsigned char rightMask;
|
static unsigned char rightMask;
|
||||||
|
|
||||||
|
static void
|
||||||
|
get_masks(int x, int w)
|
||||||
|
{
|
||||||
|
register int tmp;
|
||||||
|
|
||||||
|
leftMask = rightMask = 0;
|
||||||
|
byteCounter = w;
|
||||||
|
/* right margin */
|
||||||
|
tmp = (x+w) & 7;
|
||||||
|
if (tmp) {
|
||||||
|
byteCounter -= tmp;
|
||||||
|
rightMask = (unsigned char)(0xff00 >> tmp);
|
||||||
|
}
|
||||||
|
/* left margin */
|
||||||
|
tmp = x & 7;
|
||||||
|
if (tmp) {
|
||||||
|
byteCounter -= (8 - tmp);
|
||||||
|
leftMask = (0xff >> tmp);
|
||||||
|
}
|
||||||
|
/* too small ? */
|
||||||
|
if (byteCounter < 0) {
|
||||||
|
leftMask &= rightMask;
|
||||||
|
rightMask = 0;
|
||||||
|
byteCounter = 0;
|
||||||
|
}
|
||||||
|
byteCounter /= 8;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue