| The Hobbit (v1.0) | Routines |
| Prev: A4CA | Up: Map | Next: A4F4 |
|
Chained after the trap door's own THROW THROUGH handler (action 44, 9404), not after OPEN as I first assumed - it is throwing the barrel through the door, not merely opening the door, that starts the escape. If the object just thrown through is the barrel (object 19) and it has landed in room 33 (the forest river below the cellar), timer 0 (C973) is set to 2. Two turns later A4F4 floats the barrel away.
|
||||
| A4DB | LD A,($B5D9) | Is the object just thrown through the door the barrel (object 19)? | ||
| A4DE | CP $13 | |||
| A4E0 | RET NZ | No: this handler does nothing | ||
| A4E1 | CALL $975D | Only if this is really happening (chained after the trap door's own THROW THROUGH, 9404, which has already moved the barrel) | ||
| A4E4 | LD IX,$C2DD | IX = the barrel's own record | ||
| A4E8 | LD A,(IX+$10) | Did it land in room 33, the forest river below? | ||
| A4EB | CP $21 | |||
| A4ED | RET NZ | No: nothing happens | ||
| A4EE | LD A,$02 | Yes: start timer 0 with a count of 2 | ||
| A4F0 | LD ($C974),A | |||
| A4F3 | RET | |||
| Prev: A4CA | Up: Map | Next: A4F4 |