Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

party menu HP bar palette bug #3

Closed
xCrystal opened this issue Nov 25, 2015 · 3 comments
Closed

party menu HP bar palette bug #3

xCrystal opened this issue Nov 25, 2015 · 3 comments

Comments

@xCrystal
Copy link
Contributor

Basically when you use a healing item on a party mon the hp bar that is recolored (red-yellow-green transition) is always the bar of the first pokemon. This is because it checks wCurrentMenuItem to find out which mon index it has to deal with, but wCurrentMenuItem gets cleared at some point during RemoveItemFromInventary. I'm too lazy to sumbit a PR but I got around it by just using wLastMenuItem like this: xCrystal/pokered@bac1427 (though I'm not absolutely 100% sure that I didn't break something else in the process)

@dannye
Copy link
Owner

dannye commented Nov 26, 2015

Interesting bug. Thanks for pointing it out.

@dannye dannye closed this as completed Nov 26, 2015
@xCrystal
Copy link
Contributor Author

xCrystal commented Aug 8, 2017

The recent update has brought back this bug (it was originally fixed in 1531f6b). When the last unit of an item is used, wCurrentMenuItem is set back to 0, causing healing items to animate the first Pokemon's palette always. The bug was reintroduced in 83f6d5e. To fix, replace the two wCurrentMenuItem reads in DrawHPBarWithColor with wLastMenuItem.

I'm going through all the commits to port some things to my own hack (I'm mostly interested in low level engine changes than data changes but that's another story). The point is, if I notice anything else I'll point it out as well, but it could obviously be related to my own hack changes as well. I assume this particular bug is a thing in the clean color hack too since it used to be a bug for the same reasons.

For example, I think in was bfd0d7a which introduced a bug in my own version when sending a player Pokemon into battle (it was an issue with the bank not being restored properly but I didn't look further into it, since I had patched the pokemart corruption glitch with another far less clean solution that didn't involve clearing the di/ei block, so I just went back to it instead). I'm not sure if it could be due to interrupts timing in DelayFrameHook and/or if it's a thing in the clean color hack at all and it was fixed in a latter commit.

@dannye dannye reopened this May 18, 2022
@dannye
Copy link
Owner

dannye commented May 18, 2022

dang it. forgot to come back to this and no one else has reported it for 5 years lol but confirmed it is still happening.

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

No branches or pull requests

2 participants