Skip to content

Document healthbar#931

Open
Viperio19 wants to merge 3 commits intopret:mainfrom
Viperio19:healthbar
Open

Document healthbar#931
Viperio19 wants to merge 3 commits intopret:mainfrom
Viperio19:healthbar

Conversation

@Viperio19
Copy link
Contributor

This PR names almost all struct members of Healthbar and partially documents healthbar.c. The remaining undocumented parts of healthbar.c are mostly graphics related stuff that I'm leaving for someone else.

@lhearachel lhearachel self-assigned this Feb 4, 2026
healthbar->damage = message->hpCalcTemp;
healthbar->level = message->level;

if (message->hpCalcTemp == 0x7fff) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: This should be a special value reserved for use by Self-Destruct / Explosion. Maybe worth annotating as much.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logically it makes sense to me that it should be that, but I can't find 0x7fff getting set as the value anywhere (although I might just be missing it in a sea of other 0x7fff's), so I'd prefer to just keep it like this for now (unless you have found where it gets set to that value).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so it also gets mentioned here and not only on discord: 0x7fff was used as a decimal value in a subscript, so I added a constant HP_CALC_INSTANT_ZERO for it in constants/battle/battle_display.h.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments