Routines |
Prev: 43636 | Up: Map | Next: 43936 |
Used by the routine at 64623.
|
||||
43874 | LD B,5 | Print or update command summary window at top of screen... | ||
43876 | CALL 45206 | ...with "CAST A SPELL" text | ||
43879 | LD HL,55513 | Point HL at "WHICH SPELL DO YOU WANT TO [Current Command] ?" full menu text | ||
43882 | LD DE,49276 | Adjust height of window 30 to accommodate text... | ||
43885 | CALL 45617 | ... | ||
43888 | PUSH HL | Store HL (pointer to menu text to print) | ||
43889 | LD A,30 | Draw menu window 30... | ||
43891 | CALL 47185 | ... | ||
43894 | POP HL | Restore HL (pointer to menu text to print) | ||
43895 | CALL 46902 | Print text to screen | ||
43898 | CALL 47502 | Process keyboard / joystick input on a menu and load A with selected item index | ||
43901 | LD (43929),A | Store index of spell selected in this routine at 43929 | ||
43904 | CP 4 | If selected spell is 4 (TRAVEL TO PERSON)... | ||
43906 | JR Z,43928 | ...then skip ahead to 43928 | ||
43908 | CALL 63399 | Print or update command summary window at top of screen | ||
43911 | LD HL,55926 | Point HL at "CAST DIMENSION MERGE" text (i.e. first in list of "CAST [SPELL]" strings) | ||
43914 | LD A,(43929) | Load index of spell selected into B... | ||
43917 | LD B,A | ... | ||
43918 | CALL 63335 | ...and advance HL to relevant "CAST [SPELL]" string | ||
43921 | EX DE,HL | Swap DE (now points to "CAST [SPELL]" text) and HL... | ||
43922 | CALL 63349 | ...and print in command summary window at top of screen | ||
43925 | CALL 64207 | Display execute / reject command window and return here if execute chosen, else exit to main game loop | ||
The operand of the instruction at 43928 represents the index of the selected spell. This is modified by the instruction at 43901.
|
||||
43928 | LD A,0 | Load A with index of selected spell | ||
43930 | LD HL,43936 | Point HL at table of cast a spell routine addresses | ||
43933 | JP 64623 | Load HL with address of appropriate cast a spell routine and jump to it |
Prev: 43636 | Up: Map | Next: 43936 |