Prev: E753 Up: Map Next: E7A2
E77E: Check for UP/DOWN and FIRE control presses after a spell is selected
Used by the routine at E641.
Also follows previous routine after the energy bar has been drawn.
Checks for an ongoing effect spell being deactivated, and for key presses once a spell has been chosen:
E77E LD A,($EAE6) Get spell counter
E781 LD C,A
E782 LD A,($EAE9) Is there currently an 'effect' spell active (e.g. SHIELD, UNSEEN)
E785 CP $00
E787 JR Z,$E78D
E789 CP C If there is, is the triggered spell the same as the currently active spell?
E78A JP Z,$E7ED If so, casting the spell will deactivate it
When a spell is selected, the player can press FIRE to activate/cast the spell, or press UP/DOWN to immediately go back to scrolling through the spell list.
Check for FIRE (activate) or UP/DOWN (back to spell list):
E78D LD A,($EB32) Check if FIRE button pressed
E790 CP $01 If pressed, skip the next few instructions
E792 JR Z,$E7A2
E794 LD A,($EAFE) Check if UP/DOWN pressed
E797 CP $00 If it's pressed, skip ahead to EA72
E799 JP NZ,$EA72
E79C CALL $DD5C Nothing pressed, so continue to print the active spell's message text
E79F JP $EAA0 Nothing more to do at this point so jump straight to a RET statement
Prev: E753 Up: Map Next: E7A2