ability pop up apostrophes

This commit is contained in:
ghoulslash 2021-03-17 14:26:33 -06:00
parent d270dee6bc
commit 539806d176

View File

@ -2857,7 +2857,34 @@ static void PrintOnAbilityPopUp(const u8 *str, u8 *spriteTileData1, u8 *spriteTi
static void PrintBattlerOnAbilityPopUp(u8 battlerId, u8 spriteId1, u8 spriteId2) static void PrintBattlerOnAbilityPopUp(u8 battlerId, u8 spriteId1, u8 spriteId2)
{ {
PrintOnAbilityPopUp(gBattleMons[battlerId].nickname, int i;
u8 lastChar;
u8* name;
u8 monName[POKEMON_NAME_LENGTH + 3] = {0};
u8* nick = gBattleMons[battlerId].nickname;
for (i = 0; i < POKEMON_NAME_LENGTH; ++i)
{
monName[i] = nick[i];
if (nick[i] == EOS || i + 1 == POKEMON_NAME_LENGTH)
break;
}
name = monName + i + 1;
if (*(name - 1) == EOS)
name--;
lastChar = *(name - 1);
name[0] = CHAR_SGL_QUOT_RIGHT; // apostraphe
name++;
if (lastChar != CHAR_S && lastChar != CHAR_s)
{
name[0] = CHAR_s;
name++;
}
name[0] = EOS;
PrintOnAbilityPopUp((const u8 *)monName,
(void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32), (void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32),
(void*)(OBJ_VRAM0) + (gSprites[spriteId2].oam.tileNum * 32), (void*)(OBJ_VRAM0) + (gSprites[spriteId2].oam.tileNum * 32),
7, 0, 7, 0,