changed incorrect (int)char casts to (unsigned char)char casts.
This commit is contained in:
parent
edfaaf9b96
commit
638b22362e
3 changed files with 10 additions and 10 deletions
|
@ -2043,8 +2043,8 @@ static void ActUponUsersInput(void)
|
||||||
{
|
{
|
||||||
extern char AAFontWidths[256];
|
extern char AAFontWidths[256];
|
||||||
//using small font
|
//using small font
|
||||||
if(AvPMenus.WidthLeftForText<AAFontWidths[(int)c]) break;
|
if(AvPMenus.WidthLeftForText<AAFontWidths[(unsigned char)c]) break;
|
||||||
AvPMenus.WidthLeftForText-=AAFontWidths[(int)c];
|
AvPMenus.WidthLeftForText-=AAFontWidths[(unsigned char)c];
|
||||||
}
|
}
|
||||||
|
|
||||||
elementPtr->c.TextPtr[AvPMenus.PositionInTextField++] = c;
|
elementPtr->c.TextPtr[AvPMenus.PositionInTextField++] = c;
|
||||||
|
@ -5305,7 +5305,7 @@ void RenderBriefingText(int centreY, int brightness)
|
||||||
|
|
||||||
while(*ptr)
|
while(*ptr)
|
||||||
{
|
{
|
||||||
length+=AAFontWidths[(int)(*ptr++)];
|
length+=AAFontWidths[(unsigned char)(*ptr++)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
12
src/opengl.c
12
src/opengl.c
|
@ -1643,7 +1643,7 @@ if (stringPtr == NULL) return;
|
||||||
colour
|
colour
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
x += AAFontWidths[(int)c];
|
x += AAFontWidths[(unsigned char)c];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1691,7 +1691,7 @@ if (stringPtr == NULL) return;
|
||||||
colour
|
colour
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
x += AAFontWidths[(int)c];
|
x += AAFontWidths[(unsigned char)c];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1705,7 +1705,7 @@ if (stringPtr == NULL) return;
|
||||||
|
|
||||||
while(*ptr)
|
while(*ptr)
|
||||||
{
|
{
|
||||||
length+=AAFontWidths[(int)*ptr++];
|
length+=AAFontWidths[(unsigned char)*ptr++];
|
||||||
}
|
}
|
||||||
length = MUL_FIXED(HUDScaleFactor,length);
|
length = MUL_FIXED(HUDScaleFactor,length);
|
||||||
|
|
||||||
|
@ -1747,7 +1747,7 @@ if (stringPtr == NULL) return;
|
||||||
colour
|
colour
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
x += MUL_FIXED(HUDScaleFactor,AAFontWidths[(int)c]);
|
x += MUL_FIXED(HUDScaleFactor,AAFontWidths[(unsigned char)c]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1763,7 +1763,7 @@ void RenderStringCentred(char *stringPtr, int centreX, int y, int colour)
|
||||||
|
|
||||||
while(*ptr)
|
while(*ptr)
|
||||||
{
|
{
|
||||||
length+=AAFontWidths[(int)*ptr++];
|
length+=AAFontWidths[(unsigned char)*ptr++];
|
||||||
}
|
}
|
||||||
D3D_RenderHUDString(stringPtr,centreX-length/2,y,colour);
|
D3D_RenderHUDString(stringPtr,centreX-length/2,y,colour);
|
||||||
}
|
}
|
||||||
|
@ -1808,7 +1808,7 @@ void RenderStringVertically(char *stringPtr, int centreX, int bottomY, int colou
|
||||||
colour
|
colour
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
y -= AAFontWidths[(int)c];
|
y -= AAFontWidths[(unsigned char)c];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1151,7 +1151,7 @@ static int DHM_MoveBufferToQueue(int* pPosX,int* pPosY,int fZeroLeftMargin)
|
||||||
/* It is a standard character or a space */
|
/* It is a standard character or a space */
|
||||||
DHM_AddToQueue(*pPosX,(*pPosY)+textprint_Y_offset, *pCh);
|
DHM_AddToQueue(*pPosX,(*pPosY)+textprint_Y_offset, *pCh);
|
||||||
|
|
||||||
(*pPosX)+=AAFontWidths[(int)*pCh];//CharWidthInPixels(*pCh);
|
(*pPosX)+=AAFontWidths[(unsigned char)*pCh];//CharWidthInPixels(*pCh);
|
||||||
|
|
||||||
if ((*pPosX)>LastDisplayableXForChars())
|
if ((*pPosX)>LastDisplayableXForChars())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue