![]() |
Routines |
H | Character number of messenger |
29696 | LD L,1 | Point HL at byte 1 of the character's buffer |
29698 | LD E,(HL) | E=character's x-coordinate |
29699 | INC E | E=x-coordinate of the character's head |
29700 | DEC L | L=0 |
29701 | LD A,(HL) | A=character's animatory state |
29702 | AND 7 | Keep only bits 0-2 |
29704 | CP 6 | Is the character sitting on the floor? |
29706 | LD A,0 | y-coordinate offset is 0 if the character is standing |
29708 | JR NZ,29711 | Jump if not |
29710 | INC A | A=1 (one level lower if the character is sitting on the floor) |
29711 | LD L,2 | Point HL at byte 2 of the character's buffer |
29713 | ADD A,(HL) | Add the character's y-coordinate and the offset |
29714 | LD D,A | D=y-coordinate of the character's head |
29715 | RET |