pokegold
pokegold copied to clipboard
Identify more bit flags
Pretty self-explanatory; a similar effort to some of the recent pokered commits.
Some things to note:
- I did this in pokegold, not pokecrystal, so the unidentified mobile stuff wouldn't be a distraction. This will need porting to there once it's approved.
- There are many
bit/res/set 7
s left, because of a convention to set the high bit of jumptable indexes to mean "exit the jumptable". I may add a genericEXIT_JUMPTABLE_F
constant in a separate PR. - I edited the
shift_const
macro to automatically define\1
(bit mask) and\1_F
(0-7 bit flag) constants. This does make it harder to grep forNAME_F
definitions, but otherwise we'd have a lot of redundant definition lines. - We don't have a perfect convention of naming flag constants with
_F
or not. I usually went for local consistency, i.e. imitate nearby constant names. - A few of these are surprising/weird, like how
GetMovementPermissions
in home/map.asm sets theRIGHT
bit in all four directional cases. I may have made mistakes there, but AFAICT that's what the bit means.