comparison Discovery/Src/gfx_engine.c @ 699:01f40cb1057e

Cleanup warnings: The code still contained several warnings which have now been resolved. Big thank you to Thomas :-)
author Ideenmodellierer
date Tue, 18 Oct 2022 20:56:19 +0200
parents 2c2b9c6eb089
children 158d612a9f4d
comparison
equal deleted inserted replaced
698:2c2b9c6eb089 699:01f40cb1057e
3051 pText = backup + 2; 3051 pText = backup + 2;
3052 } 3052 }
3053 else 3053 else
3054 pText = 0; 3054 pText = 0;
3055 } 3055 }
3056 if((*(char*)pText) & 0x80) 3056 if(0 != pText && ((*(char*)pText) & 0x80))
3057 { 3057 {
3058 backup = pText; 3058 backup = pText;
3059 3059
3060 found = 0; 3060 found = 0;
3061 j = 0; 3061 j = 0;
3157 else 3157 else
3158 { 3158 {
3159 ptargetFont = (tFont *)cfg->font; 3159 ptargetFont = (tFont *)cfg->font;
3160 } 3160 }
3161 3161
3162 decodeUTF8 = *(char*)pText; /* place ASCII char */
3162 if((*(char*)pText == '\005') || (*(char*)pText == '\006')) 3163 if((*(char*)pText == '\005') || (*(char*)pText == '\006'))
3163 { 3164 {
3164 Xsum += 45; 3165 Xsum += 45;
3165 } 3166 }
3166 else 3167 else
3918 break; 3919 break;
3919 } 3920 }
3920 } 3921 }
3921 if (!found && Font == &FontT54) 3922 if (!found && Font == &FontT54)
3922 { 3923 {
3923 Font = &FontT54Extra; 3924 Font = (tFont *)&FontT54Extra;
3924 } 3925 }
3925 else if (!found && (Font == &FontT84 || Font == &FontT84Spaced)) 3926 else if (!found && (Font == &FontT84 || Font == &FontT84Spaced))
3926 { 3927 {
3927 Font = &FontT84Extra; 3928 Font = (tFont *)&FontT84Extra;
3928 } 3929 }
3929 else if (!found && Font == &FontT105) 3930 else if (!found && Font == &FontT105)
3930 { 3931 {
3931 Font = &FontT105Extra; 3932 Font = (tFont *)&FontT105Extra;
3932 } 3933 }
3933 3934
3934 return Font; 3935 return Font;
3935 } 3936 }
3936 3937
3949 3950
3950 found = 0; 3951 found = 0;
3951 if (Font == &FontT54) 3952 if (Font == &FontT54)
3952 { 3953 {
3953 found = 1; 3954 found = 1;
3954 Font = &FontT54Extra; 3955 Font = (tFont *)&FontT54Extra;
3955 } 3956 }
3956 else if (Font == &FontT84 || Font == &FontT84Spaced) 3957 else if (Font == &FontT84 || Font == &FontT84Spaced)
3957 { 3958 {
3958 found = 1; 3959 found = 1;
3959 Font = &FontT84Extra; 3960 Font = (tFont *)&FontT84Extra;
3960 } 3961 }
3961 else if (Font == &FontT105) 3962 else if (Font == &FontT105)
3962 { 3963 {
3963 found = 1; 3964 found = 1;
3964 Font = &FontT105Extra; 3965 Font = (tFont *)&FontT105Extra;
3965 } 3966 }
3966 3967
3967 if (found) 3968 if (found)
3968 { 3969 {
3969 for(i=0;i<Font->length;i++) 3970 for(i=0;i<Font->length;i++)