pret / pokeplatinum

Decompilation of Pokémon Platinum
181 stars 61 forks source link

Document entrypoint for showing/hiding the Party Gauge #140

Closed lhearachel closed 7 months ago

lhearachel commented 7 months ago

For clarity, the term "Party Gauge" refers to the following elements on the battle UI, which show at the start of the battle and whenever a trainer sends in a new Pokemon after a KO:

woDHyKx

This is all foundational; the Party Gauge itself is my next target, and none of this code actually deals with graphics, but this documentation sets up a sketch of how messages are transferred between the battle back-end and what's actually rendered on the DS itself.

The indirection flow is essentially:

  1. The battle back-end enqueues a message for publication to all interested parties. In PvE settings, this will just be the player's DS, but it includes all other connected players in Link-enabled battles.
  2. Connected players consume the message, which contains a command ID that maps to a particular processing routine.
  3. The processing routine directs control to an async task, which takes care of whatever needs to be displayed and waits for the result.