Support UTF-8 in mineral names (bug #770).

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1861 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2005-08-25 00:03:27 +00:00
parent 2ff1972afb
commit c085c06f72
2 changed files with 16 additions and 7 deletions
+15 -7
View File
@@ -798,28 +798,36 @@ CheckObjectCollision (COUNT index)
(SURFACE_HEIGHT >> 1)
+ (ElementControl.EndPoint.y
- LanderControl.EndPoint.y);
pPSD->MineralText[0].CharCount = (COUNT)~0;
pPSD->MineralText[0].CharCount =
(COUNT)~0;
pPSD->MineralText[1].pStr = pStr;
while ((ch = *pStr++) && ch != ' ')
;
if (ch == '\0')
{
pPSD->MineralText[1].CharCount = (COUNT)~0;
pPSD->MineralText[1].CharCount =
(COUNT)~0;
pPSD->MineralText[2].CharCount = 0;
}
else
else /* ch == ' ' */
{
// Name contains a space. Print over
// two lines.
pPSD->MineralText[1].CharCount =
(pStr - pPSD->MineralText[1].pStr) - 1;
utf8StringCountN(
pPSD->MineralText[1].pStr,
pStr - 1);
pPSD->MineralText[2].pStr = pStr;
pPSD->MineralText[2].CharCount = (COUNT)~0;
pPSD->MineralText[2].CharCount =
(COUNT)~0;
}
}
break;
}
PlaySound (SetAbsSoundIndex (
LanderSounds, LANDER_FULL
), NotPositional (), NULL, GAME_SOUND_PRIORITY);
LanderSounds, LANDER_FULL),
NotPositional (), NULL,
GAME_SOUND_PRIORITY);
continue;
case BIOLOGICAL_SCAN:
if (pPSD->BiologicalLevel < MAX_SCROUNGED)