Prev: A4D8 Up: Map Next: A4FD
A4E4: Character event: breakfast (common)
This is the common end of the above two routines. It sets routes for prisoners and guards.
Input
A Character index.
HL Pointer to route.
charevnt_breakfast_common A4E4 INC HL Set the route's step to zero
A4E5 LD (HL),$00
A4E7 CP $13 Is the character index less than or equal to character_19_GUARD_DOG_4?
A4E9 JP Z,charevnt_breakfast_common_0 Jump to hostile handling if so
A4EC JP C,charevnt_breakfast_common_0
A4EF SUB $02 Map prisoner 1..6 to route 18..23 (routes to sitting)
A4F1 JR charevnt_breakfast_common_1 Jump to store
charevnt_breakfast_common_0 A4F3 BIT 0,A Is the character index odd?
A4F5 LD A,$18 Route index is 24 if even
A4F7 JR Z,charevnt_breakfast_common_1 Jump to store if even
A4F9 INC A Route index is 25 if odd
charevnt_breakfast_common_1 A4FA DEC HL Store route index
A4FB LD (HL),A
A4FC RET Return
Prev: A4D8 Up: Map Next: A4FD