Prev: B9AC Up: Map Next: B9FB
B9D6: Draw any characters that are in this room
Used by the routines at 813B, 81AE and B3C3.
Input
IY The buffer containing the current character's data (#$RBC67 - BC6B)
B9D6 LD A,(IY+$0F) Get the current room in A.
B9D9 LD ($B951),A Store this temporarily so all characters can use it. (B951)
B9DC LD B,$05 Update 5 character.
B9DE PUSH IY Store the pointer to the current character.
B9E0 LD IY,$BC6B Point IY at the last character. (Harry)
B9E4 PUSH BC Store the character count in BC.
B9E5 LD A,($B951) Put the current room in A.
B9E8 CP (IY+$0F) Is the character in this room?
B9EB JR NZ,$B9F0 If they are, copy their data to the sprite buffer.
B9ED CALL $B0E6
B9F0 DEC IY Point IY to the next character.
B9F2 POP BC Restore the character count in BC.
B9F3 DJNZ $B9E4 Loop while there are more characters to draw.
B9F5 POP IY Restore the pointer to the current character.
B9F7 CALL $B9FB Put the sprite buffer on screen and return.
B9FA RET
Prev: B9AC Up: Map Next: B9FB