Skip to content

Commit

Permalink
Update ui.c
Browse files Browse the repository at this point in the history
changes to how my code looks
  • Loading branch information
ThothWhatsThis authored Jan 21, 2024
1 parent d40e4ce commit db4fb73
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,16 +457,20 @@ void DrawChargeBar(void) {
u32 chargeFrame;

tmp1 = FALSE;
if (!(gHUD.hideFlags & HUD_HIDE_CHARGE_BAR)) tmp1 = gPlayerState.chargeState.action != 0;
if (!tmp1) return EraseChargeBar();

if (!(gHUD.hideFlags & HUD_HIDE_CHARGE_BAR))
tmp1 = gPlayerState.chargeState.action != 0;
if (!tmp1) {
EraseChargeBar();
return
}
if (gHUD.maxHealth > 10 * 4)
BufferPos = &gBG0Buffer[0x60];
else
BufferPos = &gBG0Buffer[0x40];

chargeTime = Div(gPlayerState.chargeState.chargeTimer + 19, 20);
if (chargeTime > 40) chargeTime = 40;
if (chargeTime > 40)
chargeTime = 40;

if (gHUD.unk_6 == 0 || gHUD.unk_7 != chargeTime) {
gHUD.unk_6 = 1;
Expand Down Expand Up @@ -496,7 +500,8 @@ void DrawChargeBar(void) {
break;
}

if (chargeState == gHUD.unk_8) return;
if (chargeState == gHUD.unk_8)
return;

gHUD.unk_8 = chargeState;

Expand Down

0 comments on commit db4fb73

Please sign in to comment.