(svn r6462) -Codechange: Have GetStringWidth() return width as well as the height bounding

box of the string. Therefore rename the function to GetStringBoundingRect()
 and have it return a BoundingRect type of width/height
This commit is contained in:
Darkvater
2006-09-16 13:20:14 +00:00
parent dca7aa29f6
commit 552570f9e6
9 changed files with 53 additions and 27 deletions

View File

@@ -344,7 +344,7 @@ verify_name:;
}
GetString(buffer, str);
if (strlen(buffer) >= 32 || GetStringWidth(buffer) >= 150)
if (strlen(buffer) >= 32 || GetStringBoundingBox(buffer).width >= 150)
goto bad_town_name;
set_name:;
@@ -451,7 +451,7 @@ restart:;
SetDParam(0, p->president_name_2);
GetString(buffer, p->president_name_1);
if (strlen(buffer) >= 32 || GetStringWidth(buffer) >= 94)
if (strlen(buffer) >= 32 || GetStringBoundingBox(buffer).width >= 94)
continue;
FOR_ALL_PLAYERS(pp) {