| The Hobbit (v1.0) | Routines |
| Prev: 93ED | Up: Map | Next: 9436 |
|
The actor must be carrying the target. The instrument (the thing thrown across or through, such as a river or a window) must be one of the exits of the room (9E71), and if it is a door it must be open ('the window is closed'). The target is then dropped and moved to the room on the other side, and 9B38 reports it.
|
||||
| 9404 | CALL $8C3A | Is the actor holding the target? | ||
| 9407 | LD A,($B5DA) | A = the instrument (the river, window or similar being thrown across or through) | ||
| 940A | CALL $9E71 | Find the room's exit that passes through it | ||
| 940D | CP $FF | |||
| 940F | JP Z,$9EBF | No such exit exists: fail with the usual "you cannot go that way"-style message | ||
| 9412 | LD IY,($B5FA) | IY = the instrument's own record | ||
| 9416 | BIT 5,(IY+$07) | Is it open (or is that even required)? | ||
| 941A | LD A,$05 | A = the state code for OPEN/CLOSED | ||
| 941C | JP Z,$A094 | Closed: say so and stop | ||
| 941F | CALL $9C99 | Dry run? Then stop here: it would work | ||
| 9422 | LD B,(IX+$02) | B = this exit's destination room | ||
| 9425 | LD IX,($B5F8) | IX = the target's own record | ||
| 9429 | LD (IX+$01),$FF | It is held by nobody now... | ||
| 942D | LD (IX+$10),B | ...and lands in the room on the far side | ||
| 9430 | LD A,($B5D9) | Move it there, telling Bilbo about it if he can see it | ||
| 9433 | JP $9B38 | |||
| Prev: 93ED | Up: Map | Next: 9436 |