From 6629a61c3bde7a79c7ac32d6bffbc72e31e91fc3 Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Sat, 16 Sep 2017 03:21:15 +0200 Subject: * Removed unneeded -g flag from Makefile. * Aircraft now prevents collision against other aircraft if state == STATE_TAXIING. * Game: new event handlers for new Aircraft collision prevention algorithm. * Font: although not compulsory, _blend_effect_lum should be volatile. * Other minor changes. --- Source/Font.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source/Font.c') diff --git a/Source/Font.c b/Source/Font.c index 5907594..3a216b8 100644 --- a/Source/Font.c +++ b/Source/Font.c @@ -24,7 +24,7 @@ * *************************************/ static char _internal_text[FONT_INTERNAL_TEXT_BUFFER_MAX_SIZE]; -static unsigned char _blend_effect_lum; +static volatile unsigned char _blend_effect_lum; bool FontLoadImage(char* strPath, TYPE_FONT * ptrFont) { @@ -107,6 +107,8 @@ void FontPrintText(TYPE_FONT * ptrFont, short x, short y, char* str, ...) va_list ap; + // Do not print anything if either 1Hz or 2Hz flags are configured + // and 1/2Hz signal has not been yet emitted by Gfx. if (ptrFont->flags & FONT_1HZ_FLASH) { if (Gfx1HzFlash() == false) @@ -149,7 +151,7 @@ void FontPrintText(TYPE_FONT * ptrFont, short x, short y, char* str, ...) y += ptrFont->char_h; break; default: - if ( (ptrFont->flags & FONT_WRAP_LINE) && (ptrFont->max_ch_wrap != 0) ) + if ( (ptrFont->flags & FONT_WRAP_LINE) && (ptrFont->max_ch_wrap != 0) ) { if (++line_count >= ptrFont->max_ch_wrap) { -- cgit v1.2.3