summaryrefslogtreecommitdiff
path: root/src/battle_interface.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-11-03 13:56:22 -0400
committerGitHub <noreply@github.com>2021-11-03 13:56:22 -0400
commit3e49ac804b53cdb4d39b4f92de949eb858efcee4 (patch)
treef3598d27d0511ad5cd3457edeef60ef96cbb4305 /src/battle_interface.c
parentafb9ff3a40dcfb2681ef274752bceb726d14b783 (diff)
parente14210ce1f9be3ae894490a4e3050832aecbdde7 (diff)
Merge branch 'master' into doc-finalmisc
Diffstat (limited to 'src/battle_interface.c')
-rw-r--r--src/battle_interface.c35
1 files changed, 11 insertions, 24 deletions
diff --git a/src/battle_interface.c b/src/battle_interface.c
index 08da2da5f..17497cb2f 100644
--- a/src/battle_interface.c
+++ b/src/battle_interface.c
@@ -718,21 +718,8 @@ static const struct SpriteTemplate sStatusSummaryBallsSpriteTemplates[2] =
}
};
-// possibly text
-static const u8 sUnknown_0832C3C4[] =
-{
- 0xfc, 0x01, 0x01, 0xfc, 0x02, 0x02, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
-};
-
-// possibly text
-static const u8 sUnknown_0832C3D8[] =
-{
- 0xfc, 0x01, 0x01, 0xfc, 0x02, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
-};
+static const u8 sEmptyWhiteText_GrayHighlight[] = __("{COLOR WHITE}{HIGHLIGHT DARK_GRAY} ");
+static const u8 sEmptyWhiteText_TransparentHighlight[] = __("{COLOR WHITE}{HIGHLIGHT TRANSPARENT} ");
enum
{
@@ -1166,7 +1153,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
{
u8 battler;
- memcpy(text, sUnknown_0832C3C4, sizeof(sUnknown_0832C3C4));
+ memcpy(text, sEmptyWhiteText_GrayHighlight, sizeof(sEmptyWhiteText_GrayHighlight));
battler = gSprites[healthboxSpriteId].hMain_Battler;
if (IsDoubleBattle() == TRUE || GetBattlerSide(battler) == B_SIDE_OPPONENT)
{
@@ -1193,7 +1180,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
}
ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3);
- RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, 9, text);
+ RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text);
for (i = 0; i < 3; i++)
{
@@ -1245,7 +1232,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
{
u8 battlerId;
- memcpy(text, sUnknown_0832C3D8, sizeof(sUnknown_0832C3D8));
+ memcpy(text, sEmptyWhiteText_TransparentHighlight, sizeof(sEmptyWhiteText_TransparentHighlight));
battlerId = gSprites[healthboxSpriteId].hMain_Battler;
if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars) // don't print text if only bars are visible
@@ -1262,7 +1249,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
txtPtr = ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3);
if (!maxOrCurrent)
StringCopy(txtPtr, gText_Slash);
- RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, 9, text);
+ RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text);
for (i = var; i < var + 3; i++)
{
@@ -1308,12 +1295,12 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
u8 *barFontGfx;
u8 i, var, nature, healthBarSpriteId;
- memcpy(text, sUnknown_0832C3C4, sizeof(sUnknown_0832C3C4));
+ memcpy(text, sEmptyWhiteText_GrayHighlight, sizeof(sEmptyWhiteText_GrayHighlight));
barFontGfx = &gMonSpritesGfxPtr->barFontGfx[0x520 + (GetBattlerPosition(gSprites[healthboxSpriteId].hMain_Battler) * 384)];
var = 5;
nature = GetNature(mon);
StringCopy(text + 6, gNatureNamePointers[nature]);
- RenderTextFont9(barFontGfx, 9, text);
+ RenderTextHandleBold(barFontGfx, FONT_BOLD, text);
for (j = 6, i = 0; i < var; i++, j++)
{
@@ -1345,7 +1332,7 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
ConvertIntToDecimalStringN(text + 9, gBattleStruct->safariEscapeFactor, STR_CONV_MODE_RIGHT_ALIGN, 2);
text[5] = CHAR_SPACE;
text[8] = CHAR_SLASH;
- RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, 9, text);
+ RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text);
j = healthBarSpriteId; // Needed to match for some reason.
for (j = 0; j < 5; j++)
@@ -2130,7 +2117,7 @@ static void UpdateLeftNoOfBallsTextOnHealthbox(u8 healthboxSpriteId)
txtPtr = StringCopy(text, gText_SafariBallLeft);
ConvertIntToDecimalStringN(txtPtr, gNumSafariBalls, STR_CONV_MODE_LEFT_ALIGN, 2);
- windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, GetStringRightAlignXOffset(0, text, 0x2F), 3, 2, &windowId);
+ windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, GetStringRightAlignXOffset(FONT_SMALL, text, 0x2F), 3, 2, &windowId);
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x2C0) + spriteTileNum, windowTileData, 2);
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0xA00) + spriteTileNum, windowTileData + 0x40, 4);
@@ -2538,7 +2525,7 @@ static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y,
color[1] = 1;
color[2] = 3;
- AddTextPrinterParameterized4(winId, 0, x, y, 0, 0, color, -1, str);
+ AddTextPrinterParameterized4(winId, FONT_SMALL, x, y, 0, 0, color, -1, str);
*windowId = winId;
return (u8*)(GetWindowAttribute(winId, WINDOW_TILE_DATA));