Prev: 33574 Up: Map Next: 33663
33593: Process command to call lift
Used by the routines at 27176 and 31153.
33593 LD A,(65532) If call-lift-enabled flag is not set...
33596 BIT 7,A ...
33598 JP Z,27189 ...then jump into main game loop (process keyboard input and move Magic Knight, enter menus or execute other command)
33601 CALL 38075 Play upward scale sound
33604 CALL 37654 Print command summary window at bottom of screen
33607 LD DE,51271 Point DE to "CALL LIFT" text...
33610 CALL 38693 ...and print in command summary window at bottom of screen
33613 CALL 38725 Display execute / reject command window and return if execute chosen, else exit
33616 CALL 33770 Set the lift as not being at any floor at all
33619 LD A,(65529) Load A with Magic Knight's current room
33622 DEC A Decrease index by one...
33623 RRCA ...divide by eight...
33624 RRCA ...
33625 RRCA ...
33626 AND 7 ...and leave number 0-7 (0=Roof, 1=4th Floor, ..., 6=Basement)
33628 LD (23382),A Update light on lift control panel to show current floor
33631 LD A,(65529) Load A with Magic Knight's current room...
33634 ADD A,A ...and double the value
33635 LD HL,41711 Point HL at room connectivity data table
33638 LD E,A Load double the room number into DE...
33639 LD D,0 ...
33641 ADD HL,DE Add DE to HL as offset so HL now points to room connectivity entry for current room
33642 LD (HL),D Set left-hand exit of current room to lead to the lift
33643 LD A,(65529) Set the right-hand exit of "the lift" screen to be Magic Knight's current room
33646 LD (41712),A ...
33649 CALL 38175 Play "LIFT HAS ARRIVED" sound
33652 LD A,(23410) Reset Magic-Knight-can't-move-left temporary-movement flag, as the room's left exit has opened...
33655 AND 2 ...
33657 LD (23410),A ...
33660 JP 34544 Display "THE LIFT IS HERE" window
Prev: 33574 Up: Map Next: 33663