pret / pokered

Disassembly of Pokémon Red/Blue
4.01k stars 983 forks source link

Incorrect reference #411

Closed SnDream closed 11 months ago

SnDream commented 1 year ago

https://github.com/pret/pokered/blob/17eaf761e38cea827320f984cfaaa1527276ab15/engine/items/item_effects.asm#L1176-L1180

The code here defines the coordinates of the HPBar, which initially uses negative coordinates since the count starts at 1 (inc d). However, it is incorrectly interpreted as an OAM-related address. It is not related to OAM. I recommend changing the ld hl, wShadowOAMSprite36 into the corresponding coordinate address, e.g., hlcoord 4, -1.