![]() |
Routines |
| Prev: 9BDC | Up: Map | Next: 9C17 |
|
Used by the routines at MOVE, DO_GIVE, INTO_THE_RIVER, THROW_THROUGH, DO_CAPTURE, BARREL_REACHES_LAKE, THROW_ROPE_ACROSS, PULL_ROPE and JUMP_ONTO_BARREL.
Everything held by the object in A, at any depth, goes to location B through MOVE_HELD. If the player was among it, the move is played out for them: MOVE's own step at MOVE_THERE puts them there, with the sentence made about the player for the length of it, and NOTE_LIGHT follows.
|
||||||||||
| MOVE_CONTENTS | 9BDD | LD HL,PLAYER_MOVED | Say the player is not among it, and move it all | |||||||
| 9BE0 | LD (HL),$01 | |||||||||
| 9BE2 | CALL MOVE_HELD | |||||||||
| 9BE5 | LD A,(HL) | Not among it: done | ||||||||
| 9BE6 | AND A | |||||||||
| 9BE7 | RET NZ | |||||||||
| 9BE8 | PUSH HL | |||||||||
| 9BE9 | LD A,(PLAYER_WHERE) | Nowhere? Nothing more to do | ||||||||
| 9BEC | AND A | |||||||||
| 9BED | JR Z,MOVE_CONTENTS_0 | |||||||||
| 9BEF | LD A,(ACTING) | The sentence is about the player for now | ||||||||
| 9BF2 | PUSH AF | |||||||||
| 9BF3 | LD HL,(ACTOR) | |||||||||
| 9BF6 | PUSH HL | |||||||||
| 9BF7 | LD HL,PLAYER | |||||||||
| 9BFA | LD (ACTOR),HL | |||||||||
| 9BFD | XOR A | |||||||||
| 9BFE | LD (ACTING),A | |||||||||
| 9C01 | LD A,B | Move the player there | ||||||||
| 9C02 | LD (DESTINATION),A | |||||||||
| 9C05 | CALL MOVE_THERE | |||||||||
| 9C08 | CALL NOTE_LIGHT | |||||||||
| 9C0B | POP HL | Put the sentence back | ||||||||
| 9C0C | LD (ACTOR),HL | |||||||||
| 9C0F | POP AF | |||||||||
| 9C10 | LD (ACTING),A | |||||||||
| MOVE_CONTENTS_0 | 9C13 | POP HL | ||||||||
| 9C14 | XOR A | |||||||||
| 9C15 | LD (HL),A | |||||||||
| 9C16 | RET | |||||||||
| Prev: 9BDC | Up: Map | Next: 9C17 |