Routines |
Prev: D616 | Up: Map | Next: D771 |
Used by the routines at D4CC and Handler_SeaCreatures.
|
||||
D647 | LD DE,$A0EC | DE=A0EC. | ||
D64A | LD HL,$A06C | HL=Graphics_MaskSprite. | ||
D64D | LD BC,$0080 | BC=0080. | ||
D650 | LDIR | Copy 0080 bytes of data from Graphics_MaskSprite to A0EC. | ||
D652 | LD A,$10 | Set INK: *IX+09. | ||
D654 | RST $10 | |||
D655 | LD A,(IX+$09) | |||
D658 | RST $10 | |||
D659 | LD HL,($5C36) | HL=*CHARS. | ||
D65C | PUSH HL | Stash HL on the stack. | ||
D65D | PUSH IY | Stash IY on the stack. | ||
D65F | PUSH IX | Stash IX on the stack. | ||
D661 | LD E,(IX+$06) | DE=(*IX+06)*08. | ||
D664 | LD D,$00 | |||
D666 | SLA E | |||
D668 | RL D | |||
D66A | SLA E | |||
D66C | RL D | |||
D66E | SLA E | |||
D670 | RL D | |||
D672 | ADD HL,DE | HL+=DE. | ||
D673 | LD B,(IX+$02) | B=*IX+02. | ||
D676 | INC B | Increment B by one. | ||
D677 | LD C,$00 | C=00. | ||
D679 | LD ($DB38),BC | Write BC to *DB38. | ||
D67D | LD E,(IX+$07) | E=*IX+07. | ||
D680 | LD D,(IX+$08) | D=*IX+08. | ||
D683 | LD A,D | A=D. | ||
D684 | INC A | Increment A by one. | ||
D685 | SLA A | Shift A left three positions (with carry). | ||
D687 | SLA A | |||
D689 | SLA A | |||
D68B | LD C,A | C=A. | ||
D68C | LD B,$00 | B=00. | ||
D68E | LD IY,$A0F4 | IY=A0F4. | ||
D692 | ADD IY,BC | IY+=BC. | ||
D694 | LD C,E | C=E. | ||
D695 | SLA C | Shift C left three positions (with carry). | ||
D697 | SLA C | |||
D699 | SLA C | |||
D69B | LD B,$00 | B=00. | ||
D69D | LD ($DB36),BC | Write BC to *DB36. | ||
D6A1 | LD IX,$A0F4 | IX=A0F4. | ||
D6A5 | PUSH HL | Stash HL, DE and HL on the stack. | ||
D6A6 | PUSH DE | |||
D6A7 | PUSH HL | |||
D6A8 | LD B,$08 | B=08. | ||
D6AA | PUSH BC | Stash BC on the stack. | ||
D6AB | LD A,(HL) | A=*HL. | ||
D6AC | LD BC,($DB38) | BC=*DB38. | ||
D6B0 | SLA A | Shift A left (with carry). | ||
D6B2 | RL C | Rotate C left. | ||
D6B4 | SLA A | Shift A left (with carry). | ||
D6B6 | RL C | Rotate C left. | ||
D6B8 | DJNZ $D6B0 | Decrease counter by one and loop back to D6B0 until counter is zero. | ||
D6BA | LD (IY+$00),A | Write A to *IY+00. | ||
D6BD | LD A,C | A=C. | ||
D6BE | OR (IX+$00) | Merge the bits from *IX+00. | ||
D6C1 | LD (IX+$00),A | Write A to *IX+00. | ||
D6C4 | INC HL | Increment HL by one. | ||
D6C5 | INC IX | Increment IX by one. | ||
D6C7 | INC IY | Increment IY by one. | ||
D6C9 | POP BC | Restore BC from the stack. | ||
D6CA | DJNZ $D6AA | Decrease counter by one and loop back to D6AA until counter is zero. | ||
D6CC | POP HL | Restore HL from the stack. | ||
D6CD | LD BC,($DB36) | BC=*DB36. | ||
D6D1 | ADD HL,BC | HL+=BC. | ||
D6D2 | DEC D | Decrease D by one. | ||
D6D3 | JR NZ,$D6A7 | Jump to D6A7 until D is zero. | ||
D6D5 | POP DE | Restore DE from the stack. | ||
D6D6 | LD BC,$0008 | BC=0008. | ||
D6D9 | ADD IX,BC | IX+=BC. | ||
D6DB | ADD IY,BC | IY+=BC. | ||
D6DD | POP HL | Restore HL from the stack. | ||
D6DE | ADD HL,BC | HL+=BC. | ||
D6DF | DEC E | Decrease E by one. | ||
D6E0 | JR NZ,$D6A5 | Jump to D6A5 until E is zero. | ||
D6E2 | LD HL,$9FEC | HL=Graphics_GoldfishGamePlayer. | ||
D6E5 | POP IX | Restore IX from the stack. | ||
D6E7 | LD A,(IX+$03) | A=*IX+03. | ||
D6EA | INC A | Increment A by one. | ||
D6EB | SLA A | Shift A left (with carry). | ||
D6ED | LD E,A | E=A. | ||
D6EE | LD D,$00 | D=00. | ||
D6F0 | ADD HL,DE | HL+=DE. | ||
D6F1 | LD ($5C36),HL | Write HL to *CHARS. | ||
D6F4 | LD D,(IX+$08) | D=*IX+08. | ||
D6F7 | LD E,(IX+$07) | E=*IX+07. | ||
D6FA | LD A,(IX+$02) | Jump to D702 if *IX+02 is equal to 03. | ||
D6FD | CP $03 | |||
D6FF | JR Z,$D702 | |||
D701 | INC E | Increment E by one. | ||
D702 | INC D | Increment D by one. | ||
D703 | LD A,D | A=D. | ||
D704 | LD ($DB38),A | Write A to *DB38. | ||
D707 | LD A,$03 | Jump to D70F if 03 is not equal to *IX+03. | ||
D709 | CP (IX+$03) | |||
D70C | JR NZ,$D70F | |||
D70E | DEC D | Decrease D by one. | ||
D70F | LD B,(IX+$01) | B=*IX+01. | ||
D712 | LD C,(IX+$00) | C=*IX+00. | ||
D715 | LD A,D | A=D. | ||
D716 | LD A,$20 | A=20. | ||
D718 | POP IY | Restore IY from the stack. | ||
D71A | LD A,$20 | A=20. | ||
D71C | PUSH AF | Stash AF, DE and BC on the stack. | ||
D71D | PUSH DE | |||
D71E | PUSH BC | |||
D71F | LD D,A | D=A. | ||
D720 | LD A,C | Jump to D759 if C is higher than 22. | ||
D721 | CP $22 | |||
D723 | JR NC,$D759 | |||
D725 | PUSH DE | Stash DE on the stack. | ||
D726 | CALL $0DD9 | Call CL_SET. | ||
D729 | POP DE | Restore DE and BC from the stack. | ||
D72A | POP BC | |||
D72B | PUSH BC | Stash BC on the stack. | ||
D72C | LD A,D | A=D. | ||
D72D | CALL GoldfishGame_PrintColourUDG | Call GoldfishGame_PrintColourUDG. | ||
D730 | LD A,C | A=C. | ||
D731 | CP $02 | Compare A with 02. | ||
D733 | CALL Z,$D74C | Call D74C zero. | ||
D736 | DEC C | Decrease C by one. | ||
D737 | LD A,($DB38) | D+=*DB38. | ||
D73A | ADD A,D | |||
D73B | LD D,A | |||
D73C | DEC E | Decrease E by one. | ||
D73D | JR NZ,$D72D | Jump to D72D until E is zero. | ||
D73F | POP BC | Restore BC, DE and AF from the stack. | ||
D740 | POP DE | |||
D741 | POP AF | |||
D742 | DEC B | Decrease B by one. | ||
D743 | INC A | Increment A by one. | ||
D744 | DEC D | Decrease D by one. | ||
D745 | JR NZ,$D71C | Jump to D71C until D is zero. | ||
D747 | POP HL | Restore HL from the stack. | ||
D748 | LD ($5C36),HL | Write HL to *CHARS. | ||
D74B | RET | Return. | ||
D74C | DEC E | Decrease E by one. | ||
D74D | PUSH AF | Stash AF on the stack. | ||
D74E | INC E | Increment E by one. | ||
D74F | POP AF | Restore AF from the stack. | ||
D750 | RET Z | Return if E is zero. | ||
D751 | DEC E | Decrease E by one. | ||
D752 | LD A,($DB38) | D+=*DB38. | ||
D755 | ADD A,D | |||
D756 | LD D,A | |||
D757 | JR $D74C | Jump to D74C. | ||
D759 | LD A,($DB38) | D+=*DB38. | ||
D75C | ADD A,D | |||
D75D | LD D,A | |||
D75E | DEC E | Decrease E by one. | ||
D75F | JP Z,$D76B | Jump to D76B if E is zero. | ||
D762 | DEC C | Decrease C by one. | ||
D763 | LD A,C | Jump to D759 if C is higher than 22. | ||
D764 | CP $22 | |||
D766 | JR NC,$D759 | |||
D768 | JP $D725 | Jump to D725. | ||
D76B | POP BC | Restore BC, BC and BC from the stack. | ||
D76C | POP BC | |||
D76D | POP BC | |||
D76E | JP $D747 | Jump to D747. |
Prev: D616 | Up: Map | Next: D771 |