make special characters print for platforms where a char is signed by default

This commit is contained in:
kreatordxx 2008-01-13 02:10:40 +00:00
parent 0837b91f53
commit 7719e5afe0
2 changed files with 11 additions and 10 deletions

View file

@ -204,7 +204,7 @@ int gr_internal_string0(int x, int y, char *s )
get_char_width(text_ptr[0],text_ptr[1],&width,&spacing);
letter = *text_ptr-FMINCHAR;
letter = (unsigned char)*text_ptr-FMINCHAR;
if (!INFONT(letter)) { //not in font, draw as space
VideoOffset += spacing;
@ -303,9 +303,9 @@ int gr_internal_string0m(int x, int y, char *s )
get_char_width(text_ptr[0],text_ptr[1],&width,&spacing);
letter = *text_ptr-FMINCHAR;
letter = (unsigned char)*text_ptr-FMINCHAR;
if (!INFONT(letter) || *text_ptr<=0x06) { //not in font, draw as space
if (!INFONT(letter) || (unsigned char)*text_ptr<=0x06) { //not in font, draw as space
CHECK_EMBEDDED_COLORS() else{
VideoOffset += spacing;
text_ptr++;
@ -413,7 +413,7 @@ int gr_internal_string2(int x, int y, char *s )
Assert(width==spacing); //no kerning support here
letter = *text_ptr-FMINCHAR;
letter = (unsigned char)*text_ptr-FMINCHAR;
if (!INFONT(letter)) { //not in font, draw as space
VideoOffset += spacing;
@ -616,7 +616,7 @@ int gr_internal_string2m(int x, int y, char *s )
get_char_width(text_ptr[0],text_ptr[1],&width,&spacing);
letter = *text_ptr-FMINCHAR;
letter = (unsigned char)*text_ptr-FMINCHAR;
if (!INFONT(letter)) { //not in font, draw as space
VideoOffset += width;
@ -764,7 +764,7 @@ int gr_internal_color_string(int x, int y, char *s )
break;
}
letter = *text_ptr-FMINCHAR;
letter = (unsigned char)*text_ptr-FMINCHAR;
get_char_width(text_ptr[0],text_ptr[1],&width,&spacing);
@ -1005,11 +1005,11 @@ int ogl_internal_string(int x, int y, char *s )
break;
}
letter = *text_ptr-FMINCHAR;
letter = (unsigned char)*text_ptr-FMINCHAR;
get_char_width(text_ptr[0],text_ptr[1],&width,&spacing);
if (!INFONT(letter) || *text_ptr<=0x06) { //not in font, draw as space
if (!INFONT(letter) || (unsigned char)*text_ptr<=0x06) { //not in font, draw as space
CHECK_EMBEDDED_COLORS() else{
xx += spacing;
text_ptr++;
@ -1405,7 +1405,7 @@ int gr_internal_string_clipped(int x, int y, char *s )
get_char_width(text_ptr[0],text_ptr[1],&width,&spacing);
letter = *text_ptr-FMINCHAR;
letter = (unsigned char)*text_ptr-FMINCHAR;
if (!INFONT(letter)) { //not in font, draw as space
x += spacing;
@ -1494,7 +1494,7 @@ int gr_internal_string_clipped_m(int x, int y, char *s )
get_char_width(text_ptr[0],text_ptr[1],&width,&spacing);
letter = *text_ptr-FMINCHAR;
letter = (unsigned char)*text_ptr-FMINCHAR;
if (!INFONT(letter)) { //not in font, draw as space
x += spacing;

View file

@ -4,6 +4,7 @@ D1X-Rebirth Changelog
--------
main/network.c: fix typo causing compiler error on bigendian computers
2d/font.c, 2d/pcx.c, 3d/interp.c, cfile/cfile.c, include/cfile.h, include/pstypes.h, main/bm.c, main/cntrlcen.c, main/cntrlcen.h, main/custom.c, main/custom.h, main/effects.c, main/effects.h, main/fuelcen.c, main/fuelcen.h, main/gamemine.c, main/gamesave.c, main/loadrl2.c, main/newdemo.c, main/piggy.c, main/piggy.h, main/playsave.c, main/polyobj.c, main/powerup.c, main/powerup.h, main/robot.c, main/robot.h, main/scores.c, main/switch.c, main/switch.h, main/vclip.c, main/vclip.h, main/wall.c, main/wall.h, main/weapon.c, main/weapon.h: complete bigendian support, without touching network code
2d/font.c: make special characters print for platforms where a char is signed by default
20080110
--------