1
0
Fork 0

(svn r10100) -Fix r10093: some code now became obsolete as it never did something

release/0.6
truelight 2007-06-11 14:45:26 +00:00
parent 81c7c87ed7
commit 31ade47910
1 changed files with 1 additions and 4 deletions

View File

@ -137,18 +137,15 @@ Sprite *Blitter_8bppOptimized::Encode(SpriteLoader::Sprite *sprite, Blitter::All
for (int x = 0; x < UnScaleByZoom(sprite->width, (ZoomLevel)i); x++) { for (int x = 0; x < UnScaleByZoom(sprite->width, (ZoomLevel)i); x++) {
uint color = 0; uint color = 0;
int count = 0;
/* Get the color keeping in mind the zoom-level */ /* Get the color keeping in mind the zoom-level */
for (int j = 0; j < ScaleByZoom(1, (ZoomLevel)i); j++) { for (int j = 0; j < ScaleByZoom(1, (ZoomLevel)i); j++) {
if (src->m != 0) { color = src->m; count++; } if (src->m != 0) color = src->m;
src++; src++;
rx++; rx++;
/* Because of the scaling it might happen we read outside the buffer. Avoid that. */ /* Because of the scaling it might happen we read outside the buffer. Avoid that. */
if (rx == sprite->width) break; if (rx == sprite->width) break;
} }
/* If more than 12.5% of the pixels are non-transparent, make thisone non-transparent too */
if (count < ScaleByZoom(1, (ZoomLevel)i) / 8) color = 0;
if (last_color == 0 || color == 0) { if (last_color == 0 || color == 0) {
if (count_index != 0) { if (count_index != 0) {