Prev: 44337 Up: Map Next: 44635
44615: Load BC with coordinates of character's arrival point when summoned and set zero flag if character refuses
Used by the routine at 44337.
Output
B Destination y-coordinate
C Destination x-coordinate
F Zero flag set if character does not want to come to room, otherwise reset
44615 LD A,(23702) Load A with index of Magic Knight's current room
44618 PUSH HL Store HL
44619 ADD A,A Double index of Magic Knight's current room
44620 LD HL,49690 Load HL with start address of table of x- and y-coordinates of positions taken by summoned characters in each room...
44623 LD C,A ...and add double room index as offset...
44624 LD B,0 ...
44626 ADD HL,BC ...
44627 LD C,(HL) Load C with destination x-coordinate
44628 INC HL Advance HL to destination y-coordinate...
44629 LD B,(HL) ...and load into B
44630 POP HL Restore HL
44631 LD A,C If destination x-coordinate is 99...
44632 CP 99 ...then set zero flag
44634 RET Return
Prev: 44337 Up: Map Next: 44635