diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-05-11 12:13:18 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-05-11 12:13:18 -0400 |
commit | aa202b06245aa4c65f10379ecf9dc8c440a049ed (patch) | |
tree | f72101dbdd9880e287178709f769d5b226049c67 /src/battle_interface.c | |
parent | 7b1ae6e629980c6bc1ed1a70f6b74c679f96f38e (diff) | |
parent | 4767019e4f541a19577a9bfd09851a94b2e3c745 (diff) |
Merge remote-tracking branch 'origin/master' into sync_bery_crush
Diffstat (limited to 'src/battle_interface.c')
-rw-r--r-- | src/battle_interface.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/battle_interface.c b/src/battle_interface.c index 23614e4b1..cd4445fad 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -733,18 +733,11 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) u32 windowId, spriteTileNum; u8 *windowTileData; u8 text[16] = _("{LV_2}"); - u32 xPos, var1; - void *objVram; + u32 xPos; + u8 *objVram; - xPos = (u32) ConvertIntToDecimalStringN(text + 2, lvl, STR_CONV_MODE_LEFT_ALIGN, 3); - // Alright, that part was unmatchable. It's basically doing: - // xPos = 5 * (3 - (u32)(&text[2])); - xPos--; - xPos--; - xPos -= ((u32)(text)); - var1 = (3 - xPos); - xPos = 4 * var1; - xPos += var1; + objVram = ConvertIntToDecimalStringN(text + 2, lvl, STR_CONV_MODE_LEFT_ALIGN, 3); + xPos = 5 * (3 - (objVram - (text + 2))); windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, xPos, 3, &windowId); spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP; |