![]() |
Routines |
| Prev: 68F7 | Up: Map | Next: 6961 |
|
Used by the routine at Handle_Level_Complete.
|
||||||||||||
| LevelCompleteSoundStep | 693B | PUSH BC | Stash the step counter, pitch and pitch adjustment on the stack. | |||||||||
| 693C | PUSH HL | |||||||||||
| 693D | PUSH DE | |||||||||||
| 693E | LD A,$19 | Call AddToScore to add 19 points to the score. | ||||||||||
| 6940 | CALL AddToScore | |||||||||||
|
Pick a random border colour using the Memory Refresh Register.
|
||||||||||||
| 6943 | LD A,R | L=the contents of the Memory Refresh Register. | ||||||||||
| 6945 | LD L,A | |||||||||||
| 6946 | LD H,$00 | Set the low byte in H to 00 so only low memory is accessed. | ||||||||||
| 6948 | LD A,(HL) | A=*HL. | ||||||||||
| 6949 | LD ($5FB4),A | Write A to *ChickAnimationStates. | ||||||||||
| 694C | AND %00111000 | Keep only bits 3-5. | ||||||||||
| 694E | LD ($5C48),A | Write A to *BORDCR. | ||||||||||
|
Play a beep at the current pitch.
|
||||||||||||
| 6951 | POP DE | Restore pitch adjustment and pitch from the stack. | ||||||||||
| 6952 | POP HL | |||||||||||
| 6953 | PUSH HL | Stash the pitch and pitch adjustment on the stack. | ||||||||||
| 6954 | PUSH DE | |||||||||||
| 6955 | CALL $03B5 | Call BEEP. | ||||||||||
| 6958 | POP DE | Restore the pitch adjustment and pitch from the stack. | ||||||||||
| 6959 | POP HL | |||||||||||
|
Lower the pitch for the next step by subtracting the pitch adjustment.
|
||||||||||||
| 695A | LD BC,$000F | BC=000F. | ||||||||||
| 695D | SBC HL,DE | HL-=DE (with carry). | ||||||||||
| 695F | POP BC | Restore the step counter from the stack. | ||||||||||
| 6960 | RET | Return. | ||||||||||
| Prev: 68F7 | Up: Map | Next: 6961 |