cleanup
svn-id: r6984
This commit is contained in:
parent
bab3f0d9f9
commit
a236803241
1 changed files with 16 additions and 19 deletions
|
@ -1046,12 +1046,12 @@ next_iter:
|
||||||
|
|
||||||
void Gdi::decodeStripEGA(byte *dst, byte *src, int height) {
|
void Gdi::decodeStripEGA(byte *dst, byte *src, int height) {
|
||||||
byte color = 0;
|
byte color = 0;
|
||||||
int run = 0, x = 0, y = 0;
|
int run = 0, x = 0, y = 0, z;
|
||||||
|
|
||||||
while(x < 8) {
|
while(x < 8) {
|
||||||
color = *src++;
|
color = *src++;
|
||||||
|
|
||||||
if(color >= 0x80) {
|
if(color & 0x80) {
|
||||||
run = color & 0x3f;
|
run = color & 0x3f;
|
||||||
|
|
||||||
if(color & 0x40) {
|
if(color & 0x40) {
|
||||||
|
@ -1060,14 +1060,10 @@ void Gdi::decodeStripEGA(byte *dst, byte *src, int height) {
|
||||||
if(run == 0) {
|
if(run == 0) {
|
||||||
run = *src++;
|
run = *src++;
|
||||||
}
|
}
|
||||||
|
const register byte colors[2] = { color >> 4, color & 0xf };
|
||||||
|
for(z = 0; z < run; z++) {
|
||||||
|
|
||||||
for(int z = 0; z < run; z++) {
|
*(dst + y * _vm->_realWidth + x) = _vm->_shadowPalette[ colors[z&1] ];
|
||||||
|
|
||||||
if(z & 1) {
|
|
||||||
*(dst + y * _vm->_realWidth + x) = _vm->_shadowPalette[color & 0xf];
|
|
||||||
} else {
|
|
||||||
*(dst + y * _vm->_realWidth + x) = _vm->_shadowPalette[color >> 4];
|
|
||||||
}
|
|
||||||
|
|
||||||
y++;
|
y++;
|
||||||
if(y >= height) {
|
if(y >= height) {
|
||||||
|
@ -1080,8 +1076,9 @@ void Gdi::decodeStripEGA(byte *dst, byte *src, int height) {
|
||||||
run = *src++;
|
run = *src++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int z = 0; z < run; z++) {
|
for(z = 0; z < run; z++) {
|
||||||
*(dst + y * _vm->_realWidth + x) = *(dst + y * _vm->_realWidth + x - 1);
|
*(dst + y * _vm->_realWidth + x) = *(dst + y * _vm->_realWidth + x - 1);
|
||||||
|
|
||||||
y++;
|
y++;
|
||||||
if(y >= height) {
|
if(y >= height) {
|
||||||
y = 0;
|
y = 0;
|
||||||
|
@ -1089,16 +1086,16 @@ void Gdi::decodeStripEGA(byte *dst, byte *src, int height) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(color < 0x80){
|
} else {
|
||||||
run = color >> 4;
|
run = color >> 4;
|
||||||
if(run == 0) {
|
if(run == 0) {
|
||||||
run = *src++;
|
run = *src++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int z = 0; z < run; z++) {
|
for(z = 0; z < run; z++) {
|
||||||
*(dst + y * _vm->_realWidth + x) = _vm->_shadowPalette[color & 0xf];
|
*(dst + y * _vm->_realWidth + x) = _vm->_shadowPalette[color & 0xf];
|
||||||
y++;
|
|
||||||
|
|
||||||
|
y++;
|
||||||
if(y >= height) {
|
if(y >= height) {
|
||||||
y = 0;
|
y = 0;
|
||||||
x++;
|
x++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue