Minimize and Substitute glitch: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
>Bbbbbbbbba
(Added explanation.)
>Bbbbbbbbba
m (→‎Explanation: A word.)
Line 23: Line 23:
However, both functions rely on [H_WHOSETURN] to determine which sprite should be minimized or replaced with substitute. The code handling those special cases didn't set [H_WHOSETURN], so it is possible for its value to be 0 (player) instead of 1 (enemy). In this case, the player's sprite will be affected by the animation instead, and the enemy's sprite will be drawn with the tiles of the Pokémon whose stat screen is displayed instead. The sprite looks "broken" because the front sprite shown on the stat screen is flipped, which means that each tile is flipped and the order of columns is flipped too. Displaying those flipped tiles in the unflipped order results in a "broken" sprite.
However, both functions rely on [H_WHOSETURN] to determine which sprite should be minimized or replaced with substitute. The code handling those special cases didn't set [H_WHOSETURN], so it is possible for its value to be 0 (player) instead of 1 (enemy). In this case, the player's sprite will be affected by the animation instead, and the enemy's sprite will be drawn with the tiles of the Pokémon whose stat screen is displayed instead. The sprite looks "broken" because the front sprite shown on the stat screen is flipped, which means that each tile is flipped and the order of columns is flipped too. Displaying those flipped tiles in the unflipped order results in a "broken" sprite.


Opening and closing the fight menu can help set up this glitch, because when drawing the fight menu, [H_WHOSETURN] is set to 0 so that GetCurrentMove function can correctly get the move the cursor is on, in order to display its type.
Opening and closing the fight menu can help set up this glitch, because when drawing the fight menu, [H_WHOSETURN] is set to 0 so that the GetCurrentMove function can correctly get the move the cursor is on, in order to display its type.


==Youtube Video==
==Youtube Video==