Flag: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
>Torchickens
No edit summary
old->Torchickens
No edit summary
 
Line 1: Line 1:
{{wikipedia2|Flag (computing)}}
{{wikipedia2|Flag (computing)}}


A '''flag''' or '''switch''' is basically any value or set of values that activates an event. For example, a flag other than having the AuroraTicket needs to be checked in Pokémon Emerald to be able to ride the ferry in Slateport City to Birth Island.
A '''flag''' or '''switch''' is basically any value or set of values that activates an event. For example, a certain flag needs to be checked in Pokémon Emerald to be able to ride the ferry in Slateport City to Birth Island and simply having the AuroraTicket won't work.


Another example of flags in action is how the registered 'seen' and 'own' Pokémon in the Pokédex works. Here, [[binary]] switches are used for a total of 19 'seen' bytes [D30A-D31C] (the bytes are offset by -1 in Yellow) and a total of 19 'own' bytes [D2F7-D309]. Bulbasaur's seen flag is a value of bin:01 in D30A (2^0), while Ivysaur's own flag is bin:10 (2^1) in D2F7.
Another example of flags in action is how the registered 'seen' and 'own' Pokémon in the Pokédex works. Here, [[binary]] switches are used for a total of 19 'seen' bytes [D30A-D31C] (the bytes are offset by -1 in Yellow) and a total of 19 'own' bytes [D2F7-D309]. Bulbasaur's seen flag is a value of bin:01 in D30A (2^0), while Ivysaur's own flag is bin:10 (2^1) in D2F7.