| Routines

38098: Move Willy into the room below

Used by the routine at 36307.
38098 | LD A,(33004) | Pick up the number of the room below from 33004
38101 | LD (33824),A | Make it the current room number by copying it to 33824
38104 | XOR A | Set Willy's y-coordinate (at 34255) to 0
38105 | LD (34255),A
38108 | LD A,(34257) | Pick up the airborne status indicator from 34257
38111 | CP 11 | Is it 11 or greater (meaning Willy has already been falling for a while)?
38113 | JR NC,38120 | Jump if so
38115 | LD A,2 | Otherwise set the airborne status indicator to 2 (Willy will start falling here if there's no floor beneath him)
38117 | LD (34257),A
38120 | LD A,(34259) | Willy should now appear at the top of the room, so adjust his attribute buffer coordinates (at 34259) accordingly
38123 | AND 31
38125 | LD (34259),A
38128 | LD A,92
38130 | LD (34260),A
38133 | POP HL | Drop the return address (35281, in the main loop) from the stack
38134 | JP 35090 | Draw the room and re-enter the main loop