Bicolour was slightly broken (dodgy x++ without going through normal
loop). Hopefully this should be the last of our bitmap decompression problems. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@18 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
e65e389116
commit
a7bb5b3af9
16
bitmap.c
16
bitmap.c
@ -32,7 +32,7 @@ BOOL bitmap_decompress(unsigned char *output, int width, int height,
|
||||
unsigned char *end = input + size;
|
||||
unsigned char *prevline = NULL, *line = NULL;
|
||||
int opcode, count, offset, isfillormix, x = width;
|
||||
int lastopcode = -1, insertmix = False;
|
||||
int lastopcode = -1, insertmix = False, bicolour = False;
|
||||
uint8 code, colour1 = 0, colour2 = 0;
|
||||
uint8 mixmask, mask = 0, mix = 0xff;
|
||||
|
||||
@ -178,7 +178,19 @@ BOOL bitmap_decompress(unsigned char *output, int width, int height,
|
||||
break;
|
||||
|
||||
case 8: /* Bicolour */
|
||||
REPEAT(line[x] = colour1; line[++x] = colour2)
|
||||
REPEAT(
|
||||
if (bicolour)
|
||||
{
|
||||
line[x] = colour2;
|
||||
bicolour = False;
|
||||
}
|
||||
else
|
||||
{
|
||||
line[x] = colour1;
|
||||
bicolour = True;
|
||||
count++;
|
||||
}
|
||||
)
|
||||
break;
|
||||
|
||||
case 13: /* White */
|
||||
|
Loading…
Reference in New Issue
Block a user