Routines |
Prev: 61408 | Up: Map | Next: 62091 |
Used by the routine at RunHandlers.
|
||||
Something_Helicopter | 61710 | LD B,6 | B=6. | |
61712 | LD IX,53927 | IX=Table_SomethingHelicopters. | ||
Something_Helicopter_0 | 61716 | LD A,7 | A=236-B. | |
61718 | SUB B | |||
61719 | ADD A,229 | |||
61721 | LD (54280),A | Write A to *54280. | ||
61724 | XOR A | Write 0 to *Flag_Orientation. | ||
61725 | LD (53831),A | |||
61728 | PUSH BC | Stash BC on the stack. | ||
61729 | LD A,(IX+0) | Jump to Something_Helicopter_20 if *IX+0 is zero. | ||
61732 | OR A | |||
61733 | JP Z,Something_Helicopter_20 | |||
61736 | LD A,(IX+0) | A=*IX+0. | ||
61739 | LD C,(IX+1) | C=*IX+1. | ||
61742 | LD E,(IX+2) | E=*IX+2. | ||
61745 | LD B,(IX+3) | B=*IX+3. | ||
61748 | XOR %00000001 | Flip bit 0. | ||
61750 | LD (IX+0),A | Write A to *IX+0. | ||
61753 | AND %00000001 | Keep only bit 0. | ||
61755 | LD D,A | D=A. | ||
61756 | LD A,(IX+0) | A=*IX+0. | ||
61759 | RRCA | RRCA. | ||
61760 | AND %00000111 | Keep only bits 0-2. | ||
61762 | CP 1 | Jump to Something_Helicopter_1 if A is equal to 1. | ||
61764 | JR Z,Something_Helicopter_1 | |||
61766 | CP 2 | Jump to Something_Helicopter_5 if A is equal to 2. | ||
61768 | JR Z,Something_Helicopter_5 | |||
61770 | CP 3 | Jump to Something_Helicopter_7 if A is equal to 3. | ||
61772 | JP Z,Something_Helicopter_7 | |||
61775 | CP 4 | Jump to Something_Helicopter_15 if A is equal to 4. | ||
61777 | JP Z,Something_Helicopter_15 | |||
61780 | CP 5 | Jump to Something_Helicopter_17 if A is equal to 5. | ||
61782 | JP Z,Something_Helicopter_17 | |||
61785 | CP 6 | Jump to Something_Helicopter_1 if A is equal to 6. | ||
61787 | JP Z,Something_Helicopter_1 | |||
61790 | JP Something_Helicopter_5 | Jump to Something_Helicopter_5. | ||
Something_Helicopter_1 | 61793 | LD A,E | Jump to Something_Helicopter_2 if E is not equal to C. | |
61794 | CP C | |||
61795 | JR NZ,Something_Helicopter_2 | |||
61797 | INC (IX+2) | Increment *IX+2 by one. | ||
61800 | JR Something_Helicopter_3 | Jump to Something_Helicopter_3. | ||
Something_Helicopter_2 | 61802 | LD A,D | A=D. | |
61803 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||
61804 | LD A,232 | A=232. | ||
61806 | JP NC,Something_Helicopter_19 | Jump to Something_Helicopter_19 if the carry flag is not set. | ||
61809 | INC C | Increment C by one. | ||
61810 | LD (IX+1),C | Write C to *IX+1. | ||
61813 | LD A,230 | A=230. | ||
61815 | JP Something_Helicopter_19 | Jump to Something_Helicopter_19. | ||
Something_Helicopter_3 | 61818 | LD A,(IX+0) | A=*IX+0. | |
61821 | AND %01111111 | Keep only bits 0-6. | ||
61823 | CP 8 | Jump to Something_Helicopter_4 if A is lower than 8. | ||
61825 | JR C,Something_Helicopter_4 | |||
61827 | LD (IX+0),0 | Write 0 to *IX+0. | ||
61831 | LD A,(54262) | Decrease *NumberOnScreenHelicopters by one. | ||
61834 | DEC A | |||
61835 | LD (54262),A | |||
61838 | JP Something_Helicopter_20 | Jump to Something_Helicopter_20. | ||
Something_Helicopter_4 | 61841 | LD (IX+0),6 | Write 6 to *IX+0. | |
61845 | LD (IX+1),B | Write B to *IX+1. | ||
61848 | LD (IX+3),1 | Write 1 to *IX+3. | ||
61852 | POP BC | Restore BC from the stack. | ||
61853 | JP Something_Helicopter_0 | Jump to Something_Helicopter_0. | ||
Something_Helicopter_5 | 61856 | LD A,1 | Write 1 to *Flag_Orientation. | |
61858 | LD (53831),A | |||
61861 | LD A,E | Jump to Something_Helicopter_6 if E is not equal to C. | ||
61862 | CP C | |||
61863 | JR NZ,Something_Helicopter_6 | |||
61865 | INC (IX+2) | Increment *IX+2 by one. | ||
61868 | JR Something_Helicopter_3 | Jump to Something_Helicopter_3. | ||
Something_Helicopter_6 | 61870 | LD A,D | A=D. | |
61871 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||
61872 | LD A,232 | A=232. | ||
61874 | JP NC,Something_Helicopter_19 | Jump to Something_Helicopter_19 if the carry flag is not set. | ||
61877 | DEC C | Decrease C by one. | ||
61878 | LD (IX+1),C | Write C to *IX+1. | ||
61881 | LD A,230 | A=230. | ||
61883 | JP Something_Helicopter_19 | Jump to Something_Helicopter_19. | ||
Something_Helicopter_7 | 61886 | LD A,B | Jump to Something_Helicopter_8 if B is equal to C. | |
61887 | CP C | |||
61888 | JR Z,Something_Helicopter_8 | |||
61890 | LD B,C | B=C. | ||
61891 | LD C,E | C=E. | ||
61892 | LD A,D | A=D. | ||
61893 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||
61894 | LD A,236 | A=236. | ||
61896 | JP NC,Something_Helicopter_19 | Jump to Something_Helicopter_19 if the carry flag is not set. | ||
61899 | DEC B | Decrease B by one. | ||
61900 | LD (IX+1),B | Write B to *IX+1. | ||
61903 | LD A,234 | A=234. | ||
61905 | JP Something_Helicopter_19 | Jump to Something_Helicopter_19. | ||
Something_Helicopter_8 | 61908 | LD A,E | A=E. | |
61909 | CP 16 | Jump to Something_Helicopter_9 if A is higher than 16. | ||
61911 | JR NC,Something_Helicopter_9 | |||
61913 | LD (IX+0),8 | Write 8 to *IX+0. | ||
61917 | LD C,(IX+2) | C=*IX+2. | ||
61920 | DEC (IX+2) | Decrease *IX+2 by one. | ||
61923 | INC C | Increment C by two. | ||
61924 | INC C | |||
61925 | LD D,2 | D=2. | ||
61927 | JR Something_Helicopter_10 | Jump to Something_Helicopter_10. | ||
Something_Helicopter_9 | 61929 | LD (IX+0),10 | Write 10 to *IX+0. | |
61933 | LD C,(IX+2) | C=*IX+2. | ||
61936 | LD D,130 | D=130. | ||
Something_Helicopter_10 | 61938 | LD (IX+3),18 | Write 18 to *IX+3. | |
61942 | LD B,4 | B=4. | ||
61944 | CALL Something_Helicopter_11 | Call Something_Helicopter_11. | ||
61947 | POP BC | Restore BC from the stack. | ||
61948 | JP Something_Helicopter_0 | Jump to Something_Helicopter_0. | ||
Something_Helicopter_11 | 61951 | LD A,(54265) | A=*54265. | |
61954 | CP 16 | Return if A is higher than 16. | ||
61956 | RET NC | |||
61957 | ADD A,3 | A+=3. | ||
61959 | LD (54265),A | Write A to *54265. | ||
61962 | LD HL,53948 | HL=53948. | ||
Something_Helicopter_12 | 61965 | INC HL | Increment HL by three. | |
61966 | INC HL | |||
61967 | INC HL | |||
61968 | LD A,(HL) | Jump to Something_Helicopter_12 if *HL is not zero. | ||
61969 | AND A | |||
61970 | JR NZ,Something_Helicopter_12 | |||
61972 | LD E,3 | E=3. | ||
Something_Helicopter_13 | 61974 | LD (HL),D | Write D to *HL. | |
61975 | INC HL | Increment HL by one. | ||
61976 | LD (HL),C | Write C to *HL. | ||
61977 | INC HL | Increment HL by one. | ||
61978 | LD (HL),B | Write B to *HL. | ||
61979 | INC HL | Increment HL by one. | ||
61980 | INC B | Increment B by one. | ||
61981 | INC C | Increment C by one. | ||
61982 | LD A,D | Jump to Something_Helicopter_14 if D is equal to 2. | ||
61983 | CP 2 | |||
61985 | JR Z,Something_Helicopter_14 | |||
61987 | DEC C | Decrease C by two. | ||
61988 | DEC C | |||
Something_Helicopter_14 | 61989 | DEC E | Decrease E by one. | |
61990 | JR NZ,Something_Helicopter_13 | Jump to Something_Helicopter_13 until E is zero. | ||
|
||||
61992 | LD A,2 | Write melody ID 2 to *MelodyID. | ||
61994 | LD (65421),A | |||
61997 | RET | Return. | ||
Something_Helicopter_15 | 61998 | LD A,1 | Write 1 to *Flag_Orientation. | |
62000 | LD (53831),A | |||
62003 | LD A,B | Jump to Something_Helicopter_16 if B is equal to C. | ||
62004 | CP C | |||
62005 | JR Z,Something_Helicopter_16 | |||
62007 | LD A,238 | A=238. | ||
62009 | INC C | Increment C by one. | ||
62010 | LD (IX+1),C | Write C to *IX+1. | ||
62013 | INC E | Increment E by one. | ||
62014 | LD (IX+2),E | Write E to *IX+2. | ||
62017 | LD B,C | B=C. | ||
62018 | LD C,E | C=E. | ||
62019 | JR Something_Helicopter_19 | Jump to Something_Helicopter_19. | ||
Something_Helicopter_16 | 62021 | LD (IX+0),12 | Write 12 to *IX+0. | |
62025 | LD (IX+1),E | Write E to *IX+1. | ||
62028 | LD (IX+2),34 | Write 34 to *IX+2. | ||
62032 | POP BC | Restore BC from the stack. | ||
62033 | JP Something_Helicopter_0 | Jump to Something_Helicopter_0. | ||
Something_Helicopter_17 | 62036 | LD A,B | Jump to Something_Helicopter_18 if B is equal to C. | |
62037 | CP C | |||
62038 | JR Z,Something_Helicopter_18 | |||
62040 | LD A,238 | A=238. | ||
62042 | INC C | Increment C by one. | ||
62043 | LD (IX+1),C | Write C to *IX+1. | ||
62046 | DEC E | Decrease E by one. | ||
62047 | LD (IX+2),E | Write E to *IX+2. | ||
62050 | LD B,C | B=C. | ||
62051 | LD C,E | C=E. | ||
62052 | JR Something_Helicopter_19 | Jump to Something_Helicopter_19. | ||
Something_Helicopter_18 | 62054 | LD (IX+0),14 | Write 14 to *IX+0. | |
62058 | DEC E | Decrease E by one. | ||
62059 | LD (IX+1),E | Write E to *IX+1. | ||
62062 | LD (IX+2),250 | Write 250 to *IX+2. | ||
62066 | POP BC | Restore BC from the stack. | ||
62067 | JP Something_Helicopter_0 | Jump to Something_Helicopter_0. | ||
Something_Helicopter_19 | 62070 | CALL PrintSprite | Call PrintSprite. | |
62073 | XOR A | Write 0 to *Flag_Orientation. | ||
62074 | LD (53831),A | |||
Something_Helicopter_20 | 62077 | INC IX | Increment IX by four. | |
62079 | INC IX | |||
62081 | INC IX | |||
62083 | INC IX | |||
62085 | POP BC | Restore BC from the stack. | ||
62086 | DEC B | Decrease B by one. | ||
62087 | JP NZ,Something_Helicopter_0 | Jump to Something_Helicopter_0 until B is zero. | ||
62090 | RET | Return. |
Prev: 61408 | Up: Map | Next: 62091 |