![]() |
Routines |
| Prev: 26871 | Up: Map | Next: 26977 |
|
Used by the routine at Handle_Level_Complete.
|
||||||||||||
| LevelCompleteSoundStep | 26939 | PUSH BC | Stash the step counter, pitch and pitch adjustment on the stack. | |||||||||
| 26940 | PUSH HL | |||||||||||
| 26941 | PUSH DE | |||||||||||
| 26942 | LD A,25 | Call AddToScore to add 25 points to the score. | ||||||||||
| 26944 | CALL AddToScore | |||||||||||
|
Pick a random border colour using the Memory Refresh Register.
|
||||||||||||
| 26947 | LD A,R | L=the contents of the Memory Refresh Register. | ||||||||||
| 26949 | LD L,A | |||||||||||
| 26950 | LD H,0 | Set the low byte in H to 0 so only low memory is accessed. | ||||||||||
| 26952 | LD A,(HL) | A=*HL. | ||||||||||
| 26953 | LD (24500),A | Write A to *ChickAnimationStates. | ||||||||||
| 26956 | AND %00111000 | Keep only bits 3-5. | ||||||||||
| 26958 | LD (23624),A | Write A to *BORDCR. | ||||||||||
|
Play a beep at the current pitch.
|
||||||||||||
| 26961 | POP DE | Restore pitch adjustment and pitch from the stack. | ||||||||||
| 26962 | POP HL | |||||||||||
| 26963 | PUSH HL | Stash the pitch and pitch adjustment on the stack. | ||||||||||
| 26964 | PUSH DE | |||||||||||
| 26965 | CALL 949 | Call BEEP. | ||||||||||
| 26968 | POP DE | Restore the pitch adjustment and pitch from the stack. | ||||||||||
| 26969 | POP HL | |||||||||||
|
Lower the pitch for the next step by subtracting the pitch adjustment.
|
||||||||||||
| 26970 | LD BC,15 | BC=0015. | ||||||||||
| 26973 | SBC HL,DE | HL-=DE (with carry). | ||||||||||
| 26975 | POP BC | Restore the step counter from the stack. | ||||||||||
| 26976 | RET | Return. | ||||||||||
| Prev: 26871 | Up: Map | Next: 26977 |