Jump to content

Glitch Pokédex flag: Difference between revisions

no edit summary
>Torchickens
No edit summary
>ISSOtm
No edit summary
Line 18:
For example, take Generation I and its 151 (non-glitch) Pokémon. We need to store all the flags in an integer amount of bytes, hence, 19 bytes (152 bits) are used.
 
Now, imagine we caught a Rattata (Pokédex ID 19). The game starts at address D2F7 ([url=https://github.com/pret/pokered/blob/46a94c63fc287e7290502776d02648476bc44171/wram.asm#L2339] wPokedexOwned[/url]), and advances (18 / 8 :) 2 bytes forward. Then it sets bit (18 % 8 :) 2, because we have captured it.
 
Now, this method works fine for all IDs up to 151. But what would happen with higher IDs? You guessed it, the game will go beyond the end of the Pokédex flags table. (The exception being Pokédex flag 152, which is still in-bounds, and has its own unused bit)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.