Prev: 40598 Up: Map Next: 40658
40614: Room-specific routine: Enable / disable entry to castle depending upon disquise worn and whether Newspaper is held
Used by the routine at 40190.
40614 NOP Do nothing...
40615 NOP ...
40616 NOP ...
40617 NOP ...
40618 NOP ...
40619 LD A,255 Set right exit from Outdoors, 15 (The Castle Entrance) to 255...
40621 LD (48844),A ...i.e. disable right exit
40624 LD A,1 If Magic Knight is not wearing the Disquise...
40626 CALL 45505 ...
40629 RET NZ ...then return
40630 LD A,(23438) Load B with zero-based index of current disquise...
40633 DEC A ...
40634 LD B,A ...
40635 LD A,(23703) Load A with index of required disquise...
40638 CP B ...and if this is not the same as the disquise currently being worn...
40639 RET NZ ...then return
40640 LD A,33 If Magic Knight is not carrying the Newspaper (33)...
40642 CALL 45510 ...
40645 RET NZ ...then return
40646 LD A,(23702) Load A with index Magic Knight's current room...
40649 INC A ...plus one...
40650 LD (48844),A ...and set right exit from Outdoors, 15 (The Castle Entrance) to A
40653 XOR A Set Magic Knight's temporary-movement flags to zero (so Magic Knight can move both left and right)...
40654 LD (23451),A ...
40657 RET Return
Prev: 40598 Up: Map Next: 40658