![]() |
Routines |
| Prev: 53386 | Up: Map | Next: 53460 |
|
Used by the routine at DisplayIntroductionScreen.
|
||||
| AnimateTitleScreen | 53420 | LD HL,16384 | HL=16384 (screen buffer destination). | |
| 53423 | LD DE,27000 | DE=IntroductionScreen (source). | ||
|
Find the next instance of "5" in the source data.
|
||||
| AnimateTitleScreen_Loop | 53426 | LD A,(DE) | Jump to AnimateTitleScreen_Increment if *DE is not equal to 5. | |
| 53427 | CP 5 | |||
| 53429 | JR NZ,AnimateTitleScreen_Increment | |||
| 53431 | LD A,(HL) | Seems to do nothing; as both A and the flags are overwritten in the UpdateAnimationCounter call. | ||
| 53432 | CP 0 | |||
| 53434 | CALL UpdateAnimationCounter | Call UpdateAnimationCounter. | ||
|
On returning; A=(*55407*5)+1.
|
||||
| 53437 | CP 128 | Jump to AnimateTitleScreen_Reset if A is higher than 128. | ||
| 53439 | JR NC,AnimateTitleScreen_Reset | |||
| 53441 | LD (HL),A | Write A to the screen buffer pointer address. | ||
| 53442 | JR AnimateTitleScreen_Increment | Jump to AnimateTitleScreen_Increment. | ||
|
This byte has finished its cycle, so reset it.
|
||||
| AnimateTitleScreen_Reset | 53444 | LD A,0 | Reset the current byte in the screen buffer back to 0. | |
| 53446 | LD (HL),A | |||
|
Increment both source and destination pointers and loop back until the entire screen buffer has been processed.
|
||||
| AnimateTitleScreen_Increment | 53447 | INC HL | Increment screen buffer pointer by one. | |
| 53448 | INC DE | Increment source data pointer by one. | ||
| 53449 | LD A,H | Jump to AnimateTitleScreen_Loop if H is not equal to 88. | ||
| 53450 | CP 88 | |||
| 53452 | JR NZ,AnimateTitleScreen_Loop | |||
| 53454 | LD A,L | Jump to AnimateTitleScreen_Loop if L is not equal to 0. | ||
| 53455 | CP 0 | |||
| 53457 | JR NZ,AnimateTitleScreen_Loop | |||
|
The end of the screen buffer has been reached, so return.
|
||||
| 53459 | RET | Return. | ||
| Prev: 53386 | Up: Map | Next: 53460 |