Back to Skool Routines
25012: Update SRB for current animatory state and location of character
Used by several routines. Returns with the character's coordinates in DE and animatory state in A.
H Character number (183-214)
25012 LD L,2 Point HL at byte 2 of the character's buffer
25014 LD D,(HL) D=character's y-coordinate (0-17)
25015 DEC L L=1
25016 LD E,(HL) E=character's x-coordinate (0-189)
25017 DEC L L=0
25018 LD C,(HL) C=character's animatory state
25019 PUSH DE Save the character's coordinates briefly
25020 CALL 24888 Set the appropriate bits in the screen refresh buffer for the character's current animatory state and location
25023 POP DE Restore the character's coordinates to DE
25024 LD A,(HL) A=character's animatory state
25025 RET