Routines |
Prev: 28787 | Up: Map | Next: 29365 |
Used by the routine at StartGame.
|
||||
Debounce the key press.
|
||||
WinnersTableNameEntry | 29338 | CALL 654 | Call KEY_SCAN. | |
Handle if no keys are being pressed, for reference:
In all instances the E register is returned with a value in the range of +0 to +39 the value being different for each of the forty keys of the keyboard, or the value +255 for no-key. |
||||
29341 | INC E | Set the zero flag if no keys have been pressed. | ||
29342 | JR NZ,WinnersTableNameEntry | Jump to WinnersTableNameEntry unless no keys are being pressed. | ||
29344 | LD A,(39139) | A=*CurrentStage. | ||
29347 | LD B,8 | Set a counter of 8 which is the total number of scores held by the game. | ||
29349 | LD HL,29544 | HL=TablePointersWinnersData. | ||
29352 | LD D,A | Copy *CurrentStage into D. | ||
Loop through each winners data in the table to find a good match for the players stage.
|
||||
FindStage_Loop | 29353 | LD A,(HL) | Jump to CollectName if *HL is lower than or equal to D. | |
29354 | CP D | |||
29355 | JR C,CollectName | |||
Move onto the next entry.
|
||||
29357 | INC HL | Increment HL by three. | ||
29358 | INC HL | |||
29359 | INC HL | |||
29360 | DJNZ FindStage_Loop | Decrease counter by one and loop back to FindStage_Loop until counter is zero. | ||
The players stage wasn't higher than any of the stored stages.
|
||||
29362 | JP TitleScreen | Jump to TitleScreen. |
Prev: 28787 | Up: Map | Next: 29365 |