Merge remote-tracking branch 'origin/master' into trainer_tower_to_c
This commit is contained in:
+4
-11
@@ -736,18 +736,11 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl)
|
|||||||
u32 windowId, spriteTileNum;
|
u32 windowId, spriteTileNum;
|
||||||
u8 *windowTileData;
|
u8 *windowTileData;
|
||||||
u8 text[16] = _("{LV_2}");
|
u8 text[16] = _("{LV_2}");
|
||||||
u32 xPos, var1;
|
u32 xPos;
|
||||||
void *objVram;
|
u8 *objVram;
|
||||||
|
|
||||||
xPos = (u32) ConvertIntToDecimalStringN(text + 2, lvl, STR_CONV_MODE_LEFT_ALIGN, 3);
|
objVram = ConvertIntToDecimalStringN(text + 2, lvl, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||||
// Alright, that part was unmatchable. It's basically doing:
|
xPos = 5 * (3 - (objVram - (text + 2)));
|
||||||
// xPos = 5 * (3 - (u32)(&text[2]));
|
|
||||||
xPos--;
|
|
||||||
xPos--;
|
|
||||||
xPos -= ((u32)(text));
|
|
||||||
var1 = (3 - xPos);
|
|
||||||
xPos = 4 * var1;
|
|
||||||
xPos += var1;
|
|
||||||
|
|
||||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, xPos, 3, &windowId);
|
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, xPos, 3, &windowId);
|
||||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
|
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
|
||||||
|
|||||||
Reference in New Issue
Block a user