Routines |
Prev: 42700 | Up: Map | Next: 42772 |
Used by the routine at Handler_FloatingHand.
|
||||
CopyFloatingHandToScreen | 42726 | LD DE,(39619) | DE=*FloatingHandCoordinates. | |
42730 | DEC D | Adjust the Y position. | ||
42731 | LD HL,30720 | HL=30720. | ||
42734 | LD B,10 | Set a counter in B of 10 for the height of the graphic. | ||
CopyFloatingHandToScreen_Loop | 42736 | PUSH BC | Stash the height counter, buffer pointer and co-ordinates on the stack. | |
42737 | PUSH HL | |||
42738 | PUSH DE | |||
Check if this line is within the screen boundaries.
|
||||
42739 | LD A,D | Jump to CopyFloatingHandToScreen_1 if the Y position is less than 0 or greater than/ equal to 24. | ||
42740 | CP 0 | |||
42742 | JR C,CopyFloatingHandToScreen_1 | |||
42744 | CP 24 | |||
42746 | JR NC,CopyFloatingHandToScreen_1 | |||
42748 | LD A,E | Compare E with 25. | ||
42749 | CP 25 | |||
42751 | LD A,8 | A=8. | ||
42753 | JR C,CopyFloatingHandToScreen_0 | Jump to CopyFloatingHandToScreen_0 if E is less than 25. | ||
42755 | LD A,33 | A=33. | ||
42757 | SUB E | A-=E. | ||
CopyFloatingHandToScreen_0 | 42758 | CALL DrawFloatingHand | Call DrawFloatingHand. | |
CopyFloatingHandToScreen_1 | 42761 | POP DE | Restore DE and HL from the stack. | |
42762 | POP HL | |||
42763 | LD BC,64 | HL+=0064. | ||
42766 | ADD HL,BC | |||
42767 | INC D | Increment D by one. | ||
42768 | POP BC | Restore BC from the stack. | ||
42769 | DJNZ CopyFloatingHandToScreen_Loop | Decrease counter by one and loop back to CopyFloatingHandToScreen_Loop until counter is zero. | ||
42771 | RET | Return. |
Prev: 42700 | Up: Map | Next: 42772 |