Fixed some really silly typos in the 9th decoder.

svn-id: r3593
This commit is contained in:
James Brown 2002-02-15 16:02:24 +00:00
parent 224b744e58
commit 4bd4e619e3

16
gfx.cpp
View file

@ -1276,7 +1276,7 @@ void Gdi::unkDecode8() {
} }
} }
void Gdi::unkDecode9() { /* FIXME: This one doesn't work.. */ void Gdi::unkDecode9() {
byte *src = _smap_ptr; byte *src = _smap_ptr;
byte *dst = _bgbak_ptr; byte *dst = _bgbak_ptr;
unsigned char c, bits, color, run; unsigned char c, bits, color, run;
@ -1285,14 +1285,15 @@ void Gdi::unkDecode9() { /* FIXME: This one doesn't work.. */
int h = _numLinesToProcess; int h = _numLinesToProcess;
x = y = i = z = run = 0; x = y = i = z = run = 0;
while (x < 8) { _currentX = 8;
for(;;) {
c = 0; c = 0;
for (i = 0; i < 4; i++) {READ_256BIT; c+=(bits<<i);} for (i = 0; i < 4; i++) {READ_256BIT; c+=(bits<<i);}
/* printf("%d,", c>>2); */
switch ((c>>2)) { switch ((c>>2)) {
case 0: case 0:
color=0; color=0;
for (i=0; i<4; i++) {READ_256BIT; color+=bits<<i;}// color+=getbit(-1)<<i; for (i=0; i<4; i++) {READ_256BIT; color+=bits<<i;}
for (i=0; i<((c&3)+2); i++) { for (i=0; i<((c&3)+2); i++) {
*dst = (run * 16 + color); *dst = (run * 16 + color);
NEXT_ROW NEXT_ROW
@ -1302,19 +1303,18 @@ void Gdi::unkDecode9() { /* FIXME: This one doesn't work.. */
case 1: case 1:
for (i=0; i<((c&3)+1); i++) { for (i=0; i<((c&3)+1); i++) {
color = 0; color = 0;
for (z=0; z < 4; z++) {READ_256BIT; color+=bits<<i;} for (z=0; z < 4; z++) {READ_256BIT; color+=bits<<z;}
*dst = (run *16 + color); *dst = (run *16 + color);
NEXT_ROW // y++; if (y>=height) {y=0; x++;}} NEXT_ROW
} }
break; break;
case 2: case 2:
run = 0; run = 0;
for (i = 0; i < 4; i++) {READ_256BIT; c+=run<<i;} for (i = 0; i < 4; i++) {READ_256BIT; run+=bits<<i;}
break; break;
} }
} }
/* printf("\n"); */
} }
void Gdi::unkDecode10() { void Gdi::unkDecode10() {