![]() |
Routines |
| Prev: 9ED4 | Up: Map | Next: 9F1E |
|
Used by the routine at CharacterAction_DaphneStrachan.
Reads the gardener's state and moves him on when he has already left.
|
||||
| AdvanceGardenerAfterMove | 9ED7 | LD A,(HL) | Jump ahead to AdvanceGardenerAfterMove_CheckTime if this byte is zero. | |
| 9ED8 | AND A | |||
| 9ED9 | JR Z,AdvanceGardenerAfterMove_CheckTime | |||
|
Handle gardener's morning state (has already moved).
|
||||
| 9EDB | LD B,A | Save the state in B and clear A and DE for the update. | ||
| 9EDC | XOR A | |||
| 9EDD | LD DE,$0000 | |||
| 9EE0 | CALL UpdateCharacterStateAndLocation | Call UpdateCharacterStateAndLocation to update the gardener's state and location. | ||
| 9EE3 | LD A,($A036) | Read the current character. | ||
| 9EE6 | LD B,C | |||
| 9EE7 | LD DE,$0000 | |||
| 9EEA | CALL UpdateObjectLocation | Call UpdateObjectLocation to move the object to the character's location. | ||
| 9EED | SET 6,(IX+$05) | Set the special-description flag. | ||
| 9EF1 | RET | Return. | ||
|
Read the morning or afternoon marker, then check for the letter a, and return if they match.
|
||||
| AdvanceGardenerAfterMove_CheckTime | 9EF2 | LD A,($9FE2) | Return if the AM/PM marker is 61. | |
| 9EF5 | CP $61 | |||
| 9EF7 | RET Z | |||
|
Handle gardener's afternoon state (at 9am).
|
||||
| 9EF8 | LD A,($9FE0) | Return if the hour is not 09. | ||
| 9EFB | CP $09 | |||
| 9EFD | RET NZ | |||
| 9EFE | LD DE,$01F8 | Take 01F8 for the character and take the Hansom Cab. | ||
| 9F01 | LD A,$1E | |||
| 9F03 | CALL GetRandomNumber | Call GetRandomNumber to take a random number. | ||
| 9F06 | ADD A,E | Read the current character attribute. | ||
| 9F07 | LD E,A | |||
| 9F08 | LD A,($A00A) | |||
| 9F0B | CALL UpdateCharacterStateAndLocation | Call UpdateCharacterStateAndLocation to update the gardener's state and location. | ||
| 9F0E | LD A,($A036) | Read the current character. | ||
| 9F11 | LD B,$10 | |||
| 9F13 | LD DE,$07F0 | |||
| 9F16 | CALL UpdateObjectLocation | Call UpdateObjectLocation to move the object to the new location. | ||
| 9F19 | RES 6,(IX+$05) | Clear the special-description flag. | ||
| 9F1D | RET | Return. | ||
| Prev: 9ED4 | Up: Map | Next: 9F1E |