Prev: 40660 Up: Map Next: 40734
40663: Read The Character Being Processed
Used by the routine at CharacterAction_DaphneStrachan.
Reads the gardener's state and moves him on when he has already left.
AdvanceGardenerAfterMove 40663 LD A,(HL) Jump ahead to AdvanceGardenerAfterMove_CheckTime if this byte is zero.
40664 AND A
40665 JR Z,AdvanceGardenerAfterMove_CheckTime
Handle gardener's morning state (has already moved).
40667 LD B,A Save the state in B and clear A and DE for the update.
40668 XOR A
40669 LD DE,0
40672 CALL UpdateCharacterStateAndLocation Call UpdateCharacterStateAndLocation to update the gardener's state and location.
40675 LD A,(41014) Read the current character.
40678 LD B,C
40679 LD DE,0
40682 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object to the character's location.
40685 SET 6,(IX+5) Set the special-description flag.
40689 RET Return.
Read the morning or afternoon marker, then check for the letter a, and return if they match.
AdvanceGardenerAfterMove_CheckTime 40690 LD A,(40930) Return if the AM/PM marker is 97.
40693 CP 97
40695 RET Z
Handle gardener's afternoon state (at 9am).
40696 LD A,(40928) Return if the hour is not 9.
40699 CP 9
40701 RET NZ
40702 LD DE,504 Take 504 for the character and take the Hansom Cab.
40705 LD A,30
40707 CALL GetRandomNumber Call GetRandomNumber to take a random number.
40710 ADD A,E Read the current character attribute.
40711 LD E,A
40712 LD A,(40970)
40715 CALL UpdateCharacterStateAndLocation Call UpdateCharacterStateAndLocation to update the gardener's state and location.
40718 LD A,(41014) Read the current character.
40721 LD B,16
40723 LD DE,2032
40726 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object to the new location.
40729 RES 6,(IX+5) Clear the special-description flag.
40733 RET Return.
Prev: 40660 Up: Map Next: 40734