![]() |
Routines |
| Prev: 703F | Up: Map |
|
||||||||||||||||||||||||||||||
| 7040 | PUSH HL | |||||||||||||||||||||||||||||
| 7041 | LD HL,$7FF4 | 7FF4 holds the doors flags | ||||||||||||||||||||||||||||
| 7044 | LD C,A | Copy the door identifier to C | ||||||||||||||||||||||||||||
| 7045 | LD A,(HL) | Pick up the doors flags in A | ||||||||||||||||||||||||||||
| 7046 | OR C | |||||||||||||||||||||||||||||
| 7047 | DEC B | Are we opening the door/window? | ||||||||||||||||||||||||||||
| 7048 | JR Z,$704B | Jump if so | ||||||||||||||||||||||||||||
| 704A | XOR C | |||||||||||||||||||||||||||||
| 704B | LD (HL),A | Restore the doors flags with the appropriate bit set or reset | ||||||||||||||||||||||||||||
| 704C | LD A,C | A=door identifier | ||||||||||||||||||||||||||||
| 704D | LD HL,$E155 | Point HL at the appropriate entry in the doors and windows table at E156 | ||||||||||||||||||||||||||||
| 7050 | INC L | |||||||||||||||||||||||||||||
| 7051 | INC L | |||||||||||||||||||||||||||||
| 7052 | RRCA | |||||||||||||||||||||||||||||
| 7053 | JR NC,$7050 | |||||||||||||||||||||||||||||
| 7055 | LD A,(HL) | Pick up the MSB of the entry in A | ||||||||||||||||||||||||||||
| 7056 | ADC A,B | Add 1 if opening the door/window | ||||||||||||||||||||||||||||
| 7057 | DEC L | Point HL at the LSB of the entry | ||||||||||||||||||||||||||||
| 7058 | LD L,(HL) | Pick this up in L | ||||||||||||||||||||||||||||
| 7059 | LD H,A | Now HL=address from the doors and windows table (+0100 if opening) | ||||||||||||||||||||||||||||
| 705A | CALL $6C18 | Alter UDG references in the play area and update the SRB for the newly opened or closed door/window | ||||||||||||||||||||||||||||
| 705D | POP HL | |||||||||||||||||||||||||||||
| 705E | RET | |||||||||||||||||||||||||||||
| Prev: 703F | Up: Map |