![]() |
Routines |
| Prev: 51173 | Up: Map | Next: 51545 |
|
Used by the routine at Init_Title_Screen.
|
||||
|
This routine is called at the start of each phase, and makes it faster than than the previous by decreasing the wait time. This starts at 1280 (slowest) and is decreased by 64 for each call, so things generally open faster.
|
||||
| 51521 | PUSH AF | Remember some registers. | ||
| 51522 | PUSH HL | |||
| 51523 | LD HL,(52764) | Get the current speed. | ||
| 51526 | LD BC,64 | Subtract 64 from it. (The AND A clears the carry flag so SBC gives the desired result). | ||
| 51529 | AND A | |||
| 51530 | SBC HL,BC | |||
| 51532 | LD A,H | Is the speed now zero? | ||
| 51533 | OR L | |||
| 51534 | JR NZ,51539 | Jump forward if not. | ||
| 51536 | LD HL,64 | The fastest speed is 64. | ||
| 51539 | LD (52764),HL | Set this as the new speed. | ||
| 51542 | POP HL | Restore registers. | ||
| 51543 | POP AF | |||
| 51544 | RET | |||
| Prev: 51173 | Up: Map | Next: 51545 |