Routines |
Prev: 94C3 | Up: Map | Next: 952F |
Used by the routine at 940C.
|
||||
94D9 | LD IX,$8D52 | Reset bit 3 in the room flags (8D52), so touching any nasty is fatal. | ||
94DD | RES 3,(IX+$00) | |||
Test for moving left.
|
||||
94E1 | LD A,($5C7B) | Is the X co-ordinate (5C7B) far left? | ||
94E4 | OR A | |||
94E5 | JR NZ,$94F6 | Jump forward if not. Moving left. | ||
94E7 | LD HL,$C522 | Get the next room to the left. | ||
94EA | LD A,(HL) | |||
94EB | LD ($9649),A | Make this the current room (9649). | ||
94EE | LD A,$EE | Set the position to the far right. | ||
94F0 | LD ($5C7B),A | |||
94F3 | JP $9526 | Jump forward. | ||
Test for moving right.
|
||||
94F6 | CP $F0 | Is the X co-ordinate far right? | ||
94F8 | JR NZ,$9505 | Jump forward if not. | ||
Moving right.
|
||||
94FA | LD HL,$C523 | Get the next room to the right. | ||
94FD | LD A,(HL) | |||
94FE | LD ($9649),A | Make this the current room (9649). | ||
9501 | LD A,$02 | Make the position the far left. | ||
9503 | JR $94F0 | Jump back to set this. | ||
Test for moving up.
|
||||
9505 | LD A,($5C7C) | Is the Y co-ordinate (5C7C) at the top? | ||
9508 | CP $AF | |||
950A | JR C,$951B | Jump forward if not. | ||
Moving up.
|
||||
950C | LD HL,$C520 | Get the next room up. | ||
950F | LD A,(HL) | |||
9510 | LD ($9649),A | Make this the current room (9649). | ||
9513 | LD A,$23 | Set the position to the bottom. | ||
9515 | LD ($5C7C),A | |||
9518 | JP $9526 | Jump forward. | ||
If the next room is not left, right or up, it must be down.
|
||||
951B | LD HL,$C521 | Get the next room down. | ||
951E | LD A,(HL) | |||
951F | LD ($9649),A | Make this the current room (9649). | ||
9522 | LD A,$AD | Make the position the top. | ||
9524 | JR $9515 | Jump back to set this. | ||
9526 | LD HL,($5C7B) | Make the new position (5C7B, 5C7C) the one to reset back to if a life is lost (964B). | ||
9529 | LD ($964B),HL | |||
952C | JP $940C | Enter the new room. |
Prev: 94C3 | Up: Map | Next: 952F |