Prev: 30123 Up: Map Next: 30170
30129: Draw lift doors if Magic Knight is at lift entrance on a different floor to the lift
Used by the routine at 28092.
30129 LD A,(65529) Load Magic Knight's current room into A
30132 DEC A If room number is not a multiple of 8...
30133 AND 7 ...(i.e. not a room from which the lift can be called)...
30135 RET NZ ...then return
30136 LD A,(65529) Load Magic Knight's current room into A...
30139 ADD A,A ...double it...
30140 LD C,A ...and copy into BC...
30141 LD B,0 ...
30143 LD HL,41711 Point HL at room connectivity data table
30146 ADD HL,BC Add BC as offset
30147 LD A,(HL) Load index of room to left of current room...
30148 CP 255 ...and if this is not set to 255 (i.e. the lift is here)...
30150 RET NZ ...then return...
30151 LD A,69 ...otherwise store 69 (cyan INK, black PAPER, BRIGHT) at 23695...
30153 LD (23695),A ...
30156 LD A,224 Set terrain interaction parameter (impassable-horizontally, impassable-vertically, and preserve-attribute)...
30158 LD (23483),A ...
30161 LD BC,3584 Set coordinates and...
30164 LD A,83 ...draw a graphic #83 (lift doors)
30166 CALL 29960 ...
30169 RET Return
Prev: 30123 Up: Map Next: 30170