Prev: 25460 Up: Map Next: 25547
25496: Routine at 6398
Used by the routine at PlayerReset.
NewHighScore 25496 LD HL,(23796)
25499 LD DE,(23799)
25503 LD A,L
25504 LD L,H
25505 LD H,A
25506 LD A,E
25507 LD E,D
25508 LD D,A
25509 AND A
25510 SBC HL,DE
25512 JR C,COMPARE_2UP_SCORE
25514 JR NZ,COMPARE_1UP_SCORE
25516 LD A,(23798) E=23798.
25519 LD E,A
25520 LD A,(23801) Compare E with 23801.
25523 CP E
25524 JR C,COMPARE_1UP_SCORE Jump if carry flag is set to COMPARE_1UP_SCORE
Tests to see if the highscore has been beaten by 2UP.
COMPARE_2UP_SCORE 25526 LD HL,23799 HL=2UP_Score
This entry point is used by the routine at UPDATE_HIGHSCORE.
CHECK_HIGHSCORE 25529 PUSH HL Push HL onto the stack (see UPDATE_HIGHSCORE)
25530 LD DE,23792 DE=High_Score
25533 LD B,3 B=$03
NewHighScore_0 25535 LD A,(DE) Compare A against High_Score
25536 CP (HL)
25537 JR C,UPDATE_HIGHSCORE If it's higher, update the highscore
25539 JR NZ,NewHighScore_1 Jump if not zero to NewHighScore_1 (so if it's less than the current highscore)
25541 INC HL Increase HL by one
25542 INC DE Increase DE by one
25543 DJNZ NewHighScore_0 Decrease B by one, jump to NewHighScore_0 if not zero
NewHighScore_1 25545 POP HL Fetch HL off the stack (to clear it)
25546 RET Return
Prev: 25460 Up: Map Next: 25547