pret / pokecrystal

Disassembly of Pokémon Crystal
https://pret.github.io/pokecrystal/
2.07k stars 778 forks source link

Verify that there aren't too many OAM constants #1062

Closed Rangi42 closed 1 year ago

Rangi42 commented 1 year ago

The oamframe macro declares an OAM ID (i.e. a SPRITE_ANIM_OAM_* or BATTLEANIMOAMSET_* constant (names to change pending #1055)). The last few IDs are reserved for non-frame commands ($FC oamdelete, $FD oamwait, $FE oamrestart, $FF oamend). The oam* macros should declare a constant for the last valid OAM frame ID, and assert that the numbers of sprite and battle OAM constants are not exceeding it.