Routines |
Prev: 62673 | Up: Map | Next: 63135 |
Used by the routine at 62544.
|
||||
62694 | LD DE,319 | DE=319. | ||
62697 | LD BC,(53800) | BC=*53800. | ||
62701 | INC C | Increment C by one. | ||
62702 | CALL 57551 | Call 57551. | ||
62705 | LD A,(54268) | A=*54268. | ||
62708 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||
62709 | JR C,62713 | Jump to 62713 if the carry flag is set. | ||
62711 | JR Z,62721 | Jump to 62721 if A is zero. | ||
62713 | LD BC,1 | BC=0001. | ||
62716 | LD E,2 | E=2. | ||
62718 | CALL 62787 | Call 62787. | ||
62721 | LD DE,319 | DE=319. | ||
62724 | LD BC,(53800) | BC=*53800. | ||
62728 | INC B | Increment B by one. | ||
62729 | CALL 57551 | Call 57551. | ||
62732 | LD A,(54268) | A=*54268. | ||
62735 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||
62736 | JR C,62740 | Jump to 62740 if the carry flag is set. | ||
62738 | JR Z,62748 | Jump to 62748 if A is zero. | ||
62740 | LD BC,32 | BC=0032. | ||
62743 | LD E,3 | E=3. | ||
62745 | CALL 62787 | Call 62787. | ||
62748 | LD DE,319 | DE=319. | ||
62751 | LD BC,(53800) | BC=*53800. | ||
62755 | INC B | Increment B by one. | ||
62756 | INC C | Increment C by one. | ||
62757 | CALL 57551 | Call 57551. | ||
62760 | LD A,(54268) | A=*54268. | ||
62763 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||
62764 | JR C,62768 | Jump to 62768 if the carry flag is set. | ||
62766 | JR Z,62776 | Jump to 62776 if A is zero. | ||
62768 | LD BC,33 | BC=0033. | ||
62771 | LD E,4 | E=4. | ||
62773 | CALL 62787 | Call 62787. | ||
62776 | XOR A | Write 0 to: | ||
62777 | LD (54267),A | |||
62780 | LD (54268),A | |||
62783 | LD (53785),A | |||
62786 | RET | Return. | ||
This entry point is used by the routine at 62544.
|
||||
62787 | LD A,(54268) | A=*54268. | ||
62790 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||
62791 | LD A,(53781) | A=*53781. | ||
62794 | JR NC,62801 | Jump to 62801 if the carry flag is not set. | ||
62796 | LD A,16 | A=16. | ||
62798 | LD (53781),A | Write A to *53781. | ||
62801 | AND A | Return if A is zero. | ||
62802 | RET Z | |||
62803 | CP 9 | Jump to 62826 if A is lower than 9. | ||
62805 | JR C,62826 | |||
62807 | CP 14 | Jump to 62821 if A is higher than 14. | ||
62809 | JR NC,62821 | |||
62811 | LD A,E | A=E. | ||
62812 | AND %00000001 | Keep only bit 0. | ||
62814 | XOR %00000001 | Flip bit 0. | ||
62816 | ADD A,14 | A+=14. | ||
62818 | JP 63007 | Jump to 63007. | ||
62821 | CP 16 | Jump to 62950 if A is not equal to 16. | ||
62823 | JP NZ,62950 | |||
62826 | LD A,E | A=E. | ||
62827 | CP 1 | Jump to 62834 if A is not equal to 1. | ||
62829 | JR NZ,62834 | |||
62831 | LD (53785),A | Write A to *53785. | ||
62834 | CP 4 | Jump to 62878 if A is not equal to 4. | ||
62836 | JR NZ,62878 | |||
62838 | LD A,(53785) | Jump to 62878 if *53785 is zero. | ||
62841 | AND A | |||
62842 | JR Z,62878 | |||
62844 | LD A,(54268) | Jump to 62878 if *54268 is not zero. | ||
62847 | AND A | |||
62848 | JR NZ,62878 | |||
62850 | PUSH DE | Stash DE on the stack. | ||
62851 | CALL RandomNumber | Call RandomNumber. | ||
62854 | POP DE | Restore DE from the stack. | ||
62855 | CP 16 | Jump to 62878 if A is higher than 16. | ||
62857 | JP NC,62878 | |||
62860 | LD A,(54263) | A=*54263. | ||
62863 | CP 8 | Jump to 62878 if A is equal to 8. | ||
62865 | JR Z,62878 | |||
62867 | INC A | Increment A by one. | ||
62868 | LD (54263),A | Write A to *54263. | ||
62871 | PUSH DE | Stash DE on the stack. | ||
62872 | CALL 62884 | Call 62884. | ||
62875 | POP DE | Restore DE from the stack. | ||
62876 | JR 62776 | Jump to 62776. | ||
62878 | LD A,E | A=E. | ||
62879 | ADD A,47 | A+=47. | ||
62881 | JP 63007 | Jump to 63007. | ||
62884 | CALL RandomNumber | Get a random number between 0-3. | ||
62887 | AND %00000011 | |||
62889 | CP 3 | Jump to 62884 if A is equal to 3. | ||
62891 | JR Z,62884 | |||
62893 | ADD A,A | C=A*4. | ||
62894 | ADD A,A | |||
62895 | LD C,A | |||
62896 | CALL RandomNumber | Get a random number between 0-3. | ||
62899 | AND %00000011 | |||
62901 | OR C | Set the bits from C. | ||
62902 | ADD A,A | E=77+A*4. | ||
62903 | ADD A,A | |||
62904 | ADD A,77 | |||
62906 | LD E,A | |||
62907 | LD A,(53784) | D=*53784. | ||
62910 | LD D,A | |||
62911 | LD BC,(53802) | BC=*53802. | ||
62915 | CALL 62936 | Call 62936. | ||
62918 | INC C | Increment C by one. | ||
62919 | CALL 62936 | Call 62936. | ||
62922 | LD HL,31 | HL=0031. | ||
62925 | ADD HL,BC | HL+=BC. | ||
62926 | LD B,H | B=H. | ||
62927 | LD C,L | C=L. | ||
62928 | CALL 62936 | Call 62936. | ||
62931 | INC C | Increment C by one. | ||
62932 | CALL 62936 | Call 62936. | ||
62935 | RET | Return. | ||
62936 | PUSH DE | Stash DE and BC on the stack. | ||
62937 | PUSH BC | |||
62938 | CALL 55869 | Call 55869. | ||
62941 | POP BC | Restore BC and DE from the stack. | ||
62942 | POP DE | |||
62943 | INC E | Increment E by one. | ||
|
||||
62944 | LD A,1 | Write melody ID 1 to *MelodyID. | ||
62946 | LD (65421),A | |||
62949 | RET | Return. | ||
62950 | CP 17 | Jump to 62964 if A is not equal to 17. | ||
62952 | JR NZ,62964 | |||
62954 | LD A,E | A=E. | ||
62955 | CP 3 | Compare A with 3... | ||
62957 | LD A,19 | A=19. | ||
62959 | JR NC,63007 | Jump to 63007 if A was higher than 3 on line 62955. | ||
62961 | DEC A | Decrease A by one. | ||
62962 | JR 63007 | Jump to 63007. | ||
62964 | CP 14 | Return if A is equal to 14. | ||
62966 | RET Z | |||
62967 | CP 15 | Return if A is equal to 15. | ||
62969 | RET Z | |||
62970 | CP 18 | Return if A is equal to 18. | ||
62972 | RET Z | |||
62973 | CP 19 | Return if A is equal to 19. | ||
62975 | RET Z | |||
62976 | CP 21 | Return if A is equal to 21. | ||
62978 | RET Z | |||
62979 | CP 22 | Return if A is equal to 22. | ||
62981 | RET Z | |||
62982 | CP 20 | Jump to 62996 if A is not equal to 20. | ||
62984 | JR NZ,62996 | |||
62986 | LD A,E | A=E. | ||
62987 | CP 3 | Compare A with 3... | ||
62989 | LD A,22 | A=22. | ||
62991 | JR NC,63007 | Jump to 63007 A was higher than 3 on line 62987. | ||
62993 | DEC A | Decrease A by one. | ||
62994 | JR 63007 | Jump to 63007. | ||
62996 | CP 48 | Jump to 62826 if A is lower than 48. | ||
62998 | JP C,62826 | |||
63001 | CP 52 | Jump to 62826 if A is higher than 52. | ||
63003 | JP NC,62826 | |||
63006 | RET | Return. | ||
63007 | LD E,A | E=A. | ||
63008 | PUSH BC | Stash BC and DE on the stack. | ||
63009 | PUSH DE | |||
63010 | LD BC,(53800) | BC=*53800. | ||
63014 | CALL 63038 | Call 63038. | ||
63017 | POP DE | Restore DE and BC from the stack. | ||
63018 | POP BC | |||
63019 | LD HL,(53802) | HL=*53802. | ||
63022 | ADD HL,BC | HL+=BC. | ||
63023 | LD B,H | B=H. | ||
63024 | LD C,L | C=L. | ||
63025 | LD A,(53784) | D=*53784. | ||
63028 | LD D,A | |||
63029 | CALL 55869 | Call 55869. | ||
|
||||
63032 | LD A,1 | Write melody ID 1 to *MelodyID. | ||
63034 | LD (65421),A | |||
63037 | RET | Return. | ||
63038 | LD HL,54047 | HL=54047. | ||
63041 | LD D,0 | D=0. | ||
63043 | LD E,C | E=C. | ||
63044 | ADD HL,DE | HL+=DE. | ||
63045 | LD A,(HL) | A=*HL. | ||
63046 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
63047 | LD E,1 | E=1. | ||
63049 | LD A,(HL) | A=*HL. | ||
63050 | CP 8 | Jump to 63060 if A is lower than 8. | ||
63052 | JR C,63060 | |||
63054 | RRCA | RRCA. | ||
63055 | RRCA | |||
63056 | RRCA | |||
63057 | AND %00000111 | Keep only bits 0-2. | ||
63059 | INC E | Increment E by one. | ||
63060 | LD HL,53784 | HL=53784. | ||
63063 | LD (HL),E | Write E to *HL. | ||
63064 | DEC A | Decrease A by one. | ||
63065 | ADD A,A | A+=A. | ||
63066 | LD H,A | H=A. | ||
63067 | ADD A,A | A+=A. | ||
63068 | LD L,A | L=A. | ||
63069 | ADD A,A | A+=A. | ||
63070 | ADD A,H | A+=H. | ||
63071 | ADD A,L | A+=L. | ||
63072 | LD E,A | E=A. | ||
63073 | LD IX,54175 | IX=Table_Buildings. | ||
63077 | ADD IX,DE | IX+=DE. | ||
63079 | LD A,(IX+0) | A=*IX+0. | ||
63082 | CP 3 | Return if A is higher than 3. | ||
63084 | RET NC | |||
63085 | LD A,19 | A=19. | ||
63087 | SUB (IX+5) | A-=*IX+5. | ||
63090 | LD B,A | B=A. | ||
63091 | LD A,(53801) | A=*53801. | ||
63094 | DEC A | Decrease A by one. | ||
63095 | CP B | Jump to 63105 if A is higher than B. | ||
63096 | JR NC,63105 | |||
63098 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
63099 | AND %00000111 | Keep only bits 0-2. | ||
63101 | LD E,1 | E=1. | ||
63103 | JR 63060 | Jump to 63060. | ||
63105 | LD A,(IX+9) | A=*IX+9. | ||
63108 | SUB 2 | A-=2. | ||
63110 | LD (IX+9),A | Write A to *IX+9. | ||
63113 | JR NC,63124 | Jump to 63124 if {} is higher. | ||
63115 | LD (IX+9),0 | Write 0 to *IX+9. | ||
63119 | LD (IX+0),2 | Write 2 to *IX+0. | ||
63123 | RET | Return. | ||
63124 | LD D,1 | D=1. | ||
63126 | LD E,2 | E=2. | ||
63128 | LD A,(57157) | A=*Temp_MonsterID. | ||
63131 | CALL Handler_AddPoints | Call Handler_AddPoints. | ||
63134 | RET | Return. |
Prev: 62673 | Up: Map | Next: 63135 |