From b0053228d8d38fa42fa2a1b9167470ce1461bb1e Mon Sep 17 00:00:00 2001 From: Samuel Gomes <47574584+a740g@users.noreply.github.com> Date: Thu, 13 Oct 2022 07:06:18 +0530 Subject: [PATCH] Update falcon.h --- InForm/falcon.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/InForm/falcon.h b/InForm/falcon.h index fb40321..63c505e 100644 --- a/InForm/falcon.h +++ b/InForm/falcon.h @@ -168,7 +168,7 @@ void uprint_extra(int32 startx, int32 starty, int32 str_in, int64 bytelen, int32 if (max_width && (pen_x + 8 > startx + max_width)) break; if (cp > 255) - continue; + cp = 32; switch (write_page->font) { case 8: builtin_start = &charset8x8[cp][0][0]; @@ -209,8 +209,14 @@ void uprint_extra(int32 startx, int32 starty, int32 str_in, int64 bytelen, int32 if (do_render) { for (draw_y = pen_y - fhandle->glyph->bitmap_top, pixmap_y = 0; pixmap_y < fhandle->glyph->bitmap.rows; draw_y++, pixmap_y++) { for (draw_x = pen_x + fhandle->glyph->bitmap_left, pixmap_x = 0; pixmap_x < fhandle->glyph->bitmap.width; draw_x++, pixmap_x++) { - pset_and_clip(draw_x, draw_y, - ((int)(fhandle->glyph->bitmap.buffer[pixmap_y * fhandle->glyph->bitmap.width + pixmap_x] * alpha) << 24) | rgb); + if (write_page->compatible_mode == 32 && !write_page->alpha_disabled) { + pset_and_clip(draw_x, draw_y, + ((int)(fhandle->glyph->bitmap.buffer[pixmap_y * fhandle->glyph->bitmap.width + pixmap_x] * alpha) << 24) | rgb); + } else { + if (fhandle->glyph->bitmap.buffer[pixmap_y * fhandle->glyph->bitmap.width + pixmap_x] > 102) { + pset_and_clip(draw_x, draw_y, colour); + } + } } } }