Lines 537-542
Link Here
|
537 |
|
537 |
|
538 |
/* Add 1 pixel for the shadow on the medium font. Our sprite must be at least 1x1 pixel */ |
538 |
/* Add 1 pixel for the shadow on the medium font. Our sprite must be at least 1x1 pixel */ |
539 |
int width = max(1, slot->bitmap.width + (this->fs == FS_NORMAL)); |
539 |
unsigned int width = max(1U, (unsigned int)slot->bitmap.width + (this->fs == FS_NORMAL)); |
540 |
int height = max(1, slot->bitmap.rows + (this->fs == FS_NORMAL)); |
540 |
unsigned int height = max(1U, (unsigned int)slot->bitmap.rows + (this->fs == FS_NORMAL)); |
541 |
|
541 |
|
542 |
/* Limit glyph size to prevent overflows later on. */ |
542 |
/* Limit glyph size to prevent overflows later on. */ |
Lines 554-559
Link Here
|
554 |
/* Draw shadow for medium size */ |
554 |
/* Draw shadow for medium size */ |
555 |
if (this->fs == FS_NORMAL && !aa) { |
555 |
if (this->fs == FS_NORMAL && !aa) { |
556 |
for (int y = 0; y < slot->bitmap.rows; y++) { |
556 |
for (unsigned int y = 0; y < (unsigned int)slot->bitmap.rows; y++) { |
557 |
for (int x = 0; x < slot->bitmap.width; x++) { |
557 |
for (unsigned int x = 0; x < (unsigned int)slot->bitmap.width; x++) { |
558 |
if (aa ? (slot->bitmap.buffer[x + y * slot->bitmap.pitch] > 0) : HasBit(slot->bitmap.buffer[(x / 8) + y * slot->bitmap.pitch], 7 - (x % 8))) { |
558 |
if (aa ? (slot->bitmap.buffer[x + y * slot->bitmap.pitch] > 0) : HasBit(slot->bitmap.buffer[(x / 8) + y * slot->bitmap.pitch], 7 - (x % 8))) { |
559 |
sprite.data[1 + x + (1 + y) * sprite.width].m = SHADOW_COLOUR; |
559 |
sprite.data[1 + x + (1 + y) * sprite.width].m = SHADOW_COLOUR; |
Lines 564-569
Link Here
|
564 |
} |
564 |
} |
565 |
|
565 |
|
566 |
for (int y = 0; y < slot->bitmap.rows; y++) { |
566 |
for (unsigned int y = 0; y < (unsigned int)slot->bitmap.rows; y++) { |
567 |
for (int x = 0; x < slot->bitmap.width; x++) { |
567 |
for (unsigned int x = 0; x < (unsigned int)slot->bitmap.width; x++) { |
568 |
if (aa ? (slot->bitmap.buffer[x + y * slot->bitmap.pitch] > 0) : HasBit(slot->bitmap.buffer[(x / 8) + y * slot->bitmap.pitch], 7 - (x % 8))) { |
568 |
if (aa ? (slot->bitmap.buffer[x + y * slot->bitmap.pitch] > 0) : HasBit(slot->bitmap.buffer[(x / 8) + y * slot->bitmap.pitch], 7 - (x % 8))) { |
569 |
sprite.data[x + y * sprite.width].m = FACE_COLOUR; |
569 |
sprite.data[x + y * sprite.width].m = FACE_COLOUR; |