summaryrefslogtreecommitdiff
path: root/src/menus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/menus.c')
-rw-r--r--src/menus.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/menus.c b/src/menus.c
index 1679d00..6c862a2 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -374,7 +374,7 @@ int LengthOfMenuText(const char *textPtr)
int width = 0;
while (textPtr && *textPtr) {
- width += IntroFont_Light.FontWidth[(unsigned int) *textPtr];
+ width += IntroFont_Light.FontWidth[(unsigned char) *textPtr];
textPtr++;
}
@@ -386,7 +386,7 @@ int LengthOfSmallMenuText(char *textPtr)
int width = 0;
while (textPtr && *textPtr) {
- width += AAFontWidths[(unsigned int) *textPtr];
+ width += AAFontWidths[(unsigned char) *textPtr];
textPtr++;
}
@@ -445,7 +445,7 @@ int RenderMenuText(const char *textPtr, int sx, int sy, int alpha, enum AVPMENUF
unsigned int topLeftU = 0;
unsigned int topLeftV = 1+(c-32)*33;
unsigned int x, y;
- unsigned int width = IntroFont_Light.FontWidth[(unsigned int) c];
+ unsigned int width = IntroFont_Light.FontWidth[(unsigned char) c];
unsigned int remainder = 0;
unsigned int stride = width;
@@ -550,7 +550,7 @@ int RenderMenuText_Clipped(char *textPtr, int sx, int sy, int alpha, enum AVPMEN
unsigned int topLeftU = 0;
unsigned int topLeftV = 1+(c-32)*33;
unsigned int x, y;
- unsigned int width = IntroFont_Light.FontWidth[(unsigned int) c];
+ unsigned int width = IntroFont_Light.FontWidth[(unsigned char) c];
unsigned int remainder = 0;
unsigned int stride = width;
@@ -665,7 +665,7 @@ static int RenderSmallFontString(char *textPtr,int sx,int sy,int alpha, int red,
}
srcPtr += (image->w - HUD_FONT_WIDTH) * 4;
}
- sx += AAFontWidths[(unsigned int) c];
+ sx += AAFontWidths[(unsigned char) c];
}
}
@@ -699,11 +699,11 @@ Determine area used by text , so we can draw it centrally
int widthFromChars=0;
while(*textPtr2 && *textPtr2==' ') {
- widthFromSpaces+=AAFontWidths[(unsigned int) *textPtr2++];
+ widthFromSpaces+=AAFontWidths[(unsigned char) *textPtr2++];
}
while(*textPtr2 && *textPtr2!=' ') {
- widthFromChars+=AAFontWidths[(unsigned int) *textPtr2++];
+ widthFromChars+=AAFontWidths[(unsigned char) *textPtr2++];
}
wordWidth=widthFromSpaces+widthFromChars;
@@ -762,11 +762,11 @@ Determine area used by text , so we can draw it centrally
wordWidth=0;
while(*textPtr2 && *textPtr2==' ') {
- wordWidth+=AAFontWidths[(unsigned int) *textPtr2++];
+ wordWidth+=AAFontWidths[(unsigned char) *textPtr2++];
}
while(*textPtr2 && *textPtr2!=' ') {
- wordWidth+=AAFontWidths[(unsigned int) *textPtr2++];
+ wordWidth+=AAFontWidths[(unsigned char) *textPtr2++];
}
if(wordWidth> area->right-sx) {
@@ -790,7 +790,7 @@ Determine area used by text , so we can draw it centrally
}
while(*textPtr && *textPtr==' ') {
- sx+=AAFontWidths[(unsigned int) *textPtr++];
+ sx+=AAFontWidths[(unsigned char) *textPtr++];
}
if(sx>area->right) {
@@ -804,7 +804,7 @@ Determine area used by text , so we can draw it centrally
while(*textPtr && *textPtr!=' ') {
char c = *textPtr++;
- int letterWidth = AAFontWidths[(unsigned int) c];
+ int letterWidth = AAFontWidths[(unsigned char) c];
if(sx+letterWidth>area->right) {
sx=area->left;
@@ -847,7 +847,7 @@ Determine area used by text , so we can draw it centrally
}
srcPtr += (image->w - HUD_FONT_WIDTH) * 4;
}
- sx += AAFontWidths[(unsigned int) c];
+ sx += AAFontWidths[(unsigned char) c];
}
}
}
@@ -876,7 +876,7 @@ int RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORM
ptr = textPtr;
while (*ptr) {
- length+=AAFontWidths[(unsigned int) *ptr++];
+ length+=AAFontWidths[(unsigned char) *ptr++];
}
x -= length;
@@ -886,7 +886,7 @@ int RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORM
ptr = textPtr;
while (*ptr) {
- length+=AAFontWidths[(unsigned int) *ptr++];
+ length+=AAFontWidths[(unsigned char) *ptr++];
}
x -= length / 2;
@@ -914,7 +914,7 @@ int RenderSmallMenuText_Coloured(char *textPtr, int x, int y, int alpha, enum AV
ptr = textPtr;
while (*ptr) {
- length+=AAFontWidths[(unsigned int) *ptr++];
+ length+=AAFontWidths[(unsigned char) *ptr++];
}
x -= length;
@@ -924,7 +924,7 @@ int RenderSmallMenuText_Coloured(char *textPtr, int x, int y, int alpha, enum AV
ptr = textPtr;
while (*ptr) {
- length+=AAFontWidths[(unsigned int) *ptr++];
+ length+=AAFontWidths[(unsigned char) *ptr++];
}
x -= length / 2;