(svn r2617) - Fix: fix some warnings, and reenable vs.net2003 signed/unsigned warnings

This commit is contained in:
Darkvater
2005-07-17 18:11:17 +00:00
parent b9a6c16461
commit ff2662ebe7
6 changed files with 15 additions and 13 deletions

8
gfx.c
View File

@@ -261,9 +261,9 @@ enum {
* @param *dest string that is checked and possibly truncated
* @param maxw maximum width in pixels of the string
* @return new width of (truncated) string */
static int TruncateString(char *str, uint maxw)
static uint TruncateString(char *str, uint maxw)
{
int w = 0;
uint w = 0;
int base = _stringwidth_base;
int ddd, ddd_w;
@@ -305,7 +305,7 @@ static int TruncateString(char *str, uint maxw)
return w;
}
static inline int TruncateStringID(StringID src, char *dest, uint maxw)
static inline uint TruncateStringID(StringID src, char *dest, uint maxw)
{
GetString(dest, src);
return TruncateString(dest, maxw);
@@ -361,7 +361,7 @@ int DrawStringCentered(int x, int y, StringID str, uint16 color)
int DrawStringCenteredTruncated(int x, int y, StringID str, uint16 color, uint maxw)
{
char buffer[512];
int w = TruncateStringID(str, buffer, maxw);
uint w = TruncateStringID(str, buffer, maxw);
return DoDrawString(buffer, x - (w / 2), y, color);
}