Prev: A6CC Up: Map Next: A714
A6E6: Copy Floating Hand To Screen
Used by the routine at Handler_FloatingHand.
CopyFloatingHandToScreen A6E6 LD DE,($9AC3) DE=*FloatingHandCoordinates.
A6EA DEC D Adjust the Y position.
A6EB LD HL,$7800 HL=7800.
A6EE LD B,$0A Set a counter in B of 0A for the height of the graphic.
CopyFloatingHandToScreen_Loop A6F0 PUSH BC Stash the height counter, buffer pointer and co-ordinates on the stack.
A6F1 PUSH HL
A6F2 PUSH DE
Check if this line is within the screen boundaries.
A6F3 LD A,D Jump to CopyFloatingHandToScreen_1 if the Y position is less than 00 or greater than/ equal to 18.
A6F4 CP $00
A6F6 JR C,CopyFloatingHandToScreen_1
A6F8 CP $18
A6FA JR NC,CopyFloatingHandToScreen_1
A6FC LD A,E Compare E with 19.
A6FD CP $19
A6FF LD A,$08 A=08.
A701 JR C,CopyFloatingHandToScreen_0 Jump to CopyFloatingHandToScreen_0 if E is less than 19.
A703 LD A,$21 A=21.
A705 SUB E A-=E.
CopyFloatingHandToScreen_0 A706 CALL DrawFloatingHand Call DrawFloatingHand.
CopyFloatingHandToScreen_1 A709 POP DE Restore DE and HL from the stack.
A70A POP HL
A70B LD BC,$0040 HL+=0040.
A70E ADD HL,BC
A70F INC D Increment D by one.
A710 POP BC Restore BC from the stack.
A711 DJNZ CopyFloatingHandToScreen_Loop Decrease counter by one and loop back to CopyFloatingHandToScreen_Loop until counter is zero.
A713 RET Return.
Prev: A6CC Up: Map Next: A714