pokered icon indicating copy to clipboard operation
pokered copied to clipboard

Comment unreferenced local labels

Open Narishma-gb opened this issue 1 month ago • 0 comments

This PR attempts to remove unused local labels, replacing them with comments. A few comments are added:

  • .checkIfUsingMultiturnMove and .MultiturnMoveCheck, to provide context for a useless instruction
  • TransformEffect_ where code optimization led to a stack of bugs
  • PokeText and UnusedPlayerNameLengthFunc with JPN context
  • ZeroMemory with short use description

PrintNicknameAndUnderscores gets new labels and more *_NAME_LENGTH constants usage.

Added AnimationUnusedShakeScreen label to include the lone instruction there.

Added an ASSERT in Colosseum_Script, since it's using the script from TradeCenter.

There's a new ASSERT in PlayerStepOutFromDoor, because BIT_EXITING_DOOR does not belong to wStatusFlags5.

I'm not sure about the hypothesis made here. As BIT_EXITING_DOOR is later either set or reset based on IsPlayerStandingOnDoorTile result, perhaps the first instruction is indeed meant to reset BIT_UNKNOWN_5_1, although it has no visible effect on gameplay.

Narishma-gb avatar Dec 07 '25 09:12 Narishma-gb