Prev: 8A61 Up: Map Next: 8B31
8A84: High Score Table
Used by the routine at Handler_SubGame.
high-scores
HighScoreTable 8A84 LD B,$04 B=04.
8A86 LD IX,$8E08 IX=Messaging_HighScores.
HighScoreTable_0 8A8A LD HL,($EFF2) HL=*Pointer_ActivePlayer.
8A8D LD DE,$000C HL+=000C.
8A90 ADD HL,DE
8A91 LD A,(HL) Jump to HighScoreTable_2 if *HL is higher than *IX+0A.
8A92 CP (IX+$0A)
8A95 JR NC,HighScoreTable_2
HighScoreTable_1 8A97 LD DE,$000B IX+=000B.
8A9A ADD IX,DE
8A9C DJNZ HighScoreTable_0 Decrease counter by one and loop back to HighScoreTable_0 until counter is zero.
8A9E LD HL,$EFFB HL=GameState_2.
8AA1 RES 6,(HL) Reset bit 6 of *HL.
8AA3 RET Return.
HighScoreTable_2 8AA4 JR NZ,HighScoreTable_3 Jump to HighScoreTable_3 if is not zero.
8AA6 DEC HL Decrease HL by one.
8AA7 LD A,(HL) Jump to HighScoreTable_1 if *HL is lower than *IX+09.
8AA8 CP (IX+$09)
8AAB JR C,HighScoreTable_1
8AAD JR NZ,HighScoreTable_3 Jump to HighScoreTable_3 if *HL is not equal to *IX+09.
8AAF DEC HL Decrease HL by one.
8AB0 LD A,(HL) Jump to HighScoreTable_1 if *HL is lower than *IX+08.
8AB1 CP (IX+$08)
8AB4 JR C,HighScoreTable_1
8AB6 JR Z,HighScoreTable_1 Jump to HighScoreTable_1 if *HL is equal to *IX+08.
HighScoreTable_3 8AB8 DEC B Decrease B by one.
8AB9 JR Z,HighScoreTable_5 Jump to HighScoreTable_5 if B is zero.
8ABB LD A,$00 A=00.
HighScoreTable_4 8ABD ADD A,$0B A+=0B.
8ABF DJNZ HighScoreTable_4 Decrease counter by one and loop back to HighScoreTable_4 until counter is zero.
8AC1 LD C,A C=A.
8AC2 LD HL,$8E28 HL=8E28.
8AC5 LD DE,$8E33 DE=8E33.
8AC8 LDDR LDDR.
HighScoreTable_5 8ACA PUSH IX DE=IX (using the stack).
8ACC POP DE
8ACD LD HL,($EFF2) HL=*Pointer_ActivePlayer.
8AD0 LD BC,$0008 BC=0008.
8AD3 LDIR LDIR.
8AD5 INC HL Increment HL by two.
8AD6 INC HL
8AD7 LD BC,$0003 BC=0003.
8ADA LDIR LDIR.
8ADC LD HL,$EFFB HL=GameState_2.
8ADF SET 6,(HL) Set bit 6 of *HL.
This entry point is used by the routine at Handler_SubGame.
HighScoreTable_6 8AE1 CALL ClearMenuScreenAreas Call ClearMenuScreenAreas.
Prints "FAMOUS TRASHMEN".
8AE4 LD HL,$8DF9 HL=Messaging_FamousTrashmen.
8AE7 LD DE,$5049 DE=5049 (screen buffer location).
8AEA CALL Print_String Call Print_String.
8AED LD HL,$5069 HL=5069 (screen buffer location).
8AF0 LD B,$0F Underline the header with 0F character blocks of FF.
8AF2 CALL Underline
8AF5 LD B,$04 B=04.
Cycle through each high score and print the details.
8AF7 LD HL,$8E08 HL=Messaging_HighScores.
8AFA LD DE,$5089 DE=5089 (screen buffer location).
PrintHighScore_Loop 8AFD PUSH BC Stash BC, HL and DE on the stack.
8AFE PUSH HL
8AFF PUSH DE
8B00 CALL Print_String Call Print_String.
8B03 INC DE Increment DE by two.
8B04 INC DE
8B05 INC HL Increment HL by two.
8B06 INC HL
8B07 LD BC,$0203 BC=0203.
8B0A CALL PrintNumbers Call PrintNumbers.
8B0D POP DE Restore DE from the stack.
8B0E LD HL,$0020 DE+=0020.
8B11 ADD HL,DE
8B12 EX DE,HL
8B13 POP HL Restore HL from the stack.
8B14 LD BC,$000B HL+=000B.
8B17 ADD HL,BC
8B18 POP BC Restore BC from the stack.
8B19 DJNZ PrintHighScore_Loop Decrease counter by one and loop back to PrintHighScore_Loop until counter is zero.
8B1B LD B,$64 Call 8055 with a count of 64.
8B1D CALL $8055
8B20 CALL PauseCheck Call PauseCheck.
HighScoreTable_7 8B23 LD B,$01 Call 8055 with a count of 01.
8B25 CALL $8055
8B28 CALL Handler_Controls Call Handler_Controls.
8B2B LD A,E Jump to HighScoreTable_7 if E is not equal to 20.
8B2C CP $20
8B2E JR NZ,HighScoreTable_7
8B30 RET Return.
Prev: 8A61 Up: Map Next: 8B31