Prev: 93BB Up: Map Next: 93F2
93BE: Update high score table from current player score.
Compares player 1's score with the appropriate high score slot (based on starting bridge) and updates if higher. In 2-player mode, first checks if player 2 beat player 1.
update_high_score 93BE LD A,($923A) If 2-player mode, call check_player2_high_score to check player 2 score first.
93C1 BIT 0,A
93C3 CALL NZ,check_player2_high_score
93C6 LD HL,$90C8 Calculate high score slot address: base (high_score_bridge_1) + ((game_mode AND $FE) * 3).
93C9 LD A,($923A)
93CC AND $FE
93CE LD E,A
93CF LD A,($923A)
93D2 AND $FE
93D4 SLA A
93D6 SLA A
93D8 SUB E
93D9 LD D,$00
93DB LD E,A
93DC ADD HL,DE
93DD EX DE,HL Compare player 1 score with high score slot. Return if not higher.
93DE LD HL,$90BC
93E1 PUSH DE
93E2 CALL compare_scores
93E5 POP DE
93E6 CP $01
93E8 RET NZ
93E9 LD HL,$90BC Copy player 1 score (6 bytes) to high score slot.
93EC LD BC,$0006
93EF LDIR
93F1 RET
Prev: 93BB Up: Map Next: 93F2