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

Consistently format WRAM values #288

Closed
Rangi42 opened this issue Aug 19, 2020 · 1 comment · Fixed by #476
Closed

Consistently format WRAM values #288

Rangi42 opened this issue Aug 19, 2020 · 1 comment · Fixed by #476

Comments

@Rangi42
Copy link
Member

Rangi42 commented Aug 19, 2020

macros/wram.asm uses db for one-byte values (like box_struct Species) and dw for two-byte values (like box_struct HPExp), leaving ds for larger values (like ds 3 for box_struct Exp) and free space. Meanwhile, wram.asm never uses dw and only uses db for wWaterRate and wWaterMons.

It could also use more UNIONs for overlapping values (like $60-byte wMonPartySpritesSavedOAM, $40-byte wTrainerCardBlkPacket, and many subsequent single bytes).

@Rangi42
Copy link
Member Author

Rangi42 commented Oct 6, 2024

Things that should be UNIONs:

; number of hits by enemy in attacks like Double Slap, etc.
wEnemyNumHits:: ; db
; the amount of damage accumulated by the enemy while biding
wEnemyBideAccumulatedDamage:: dw
wSerialPlayerDataBlock:: ; ds $1a8
wSerialEnemyDataBlock:: ; ds $1a8

Edit: Actually wSerialPlayerDataBlock and wSerialEnemyDataBlock would span multiple sections, so they can stay as-is.

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

Successfully merging a pull request may close this issue.

1 participant