9D2E: Calculate overtake bonus
calc_overtake_bonus |
9D2E |
LD A,($A22B) |
|
9D31 |
AND A |
|
9D32 |
RET Z |
|
9D33 |
LD B,A |
|
9D34 |
LD HL,$A13C |
cob_overtake_loop |
9D37 |
LD A,(HL) |
|
9D38 |
ADD A,$02 |
|
9D3A |
DAA |
|
9D3B |
CP $80 |
|
9D3D |
JR C,calc_overtake_bonus_0 |
|
9D3F |
LD A,$80 |
calc_overtake_bonus_0 |
9D41 |
LD (HL),A |
|
9D42 |
EXX |
|
9D43 |
LD E,A |
|
9D44 |
XOR A |
|
9D45 |
LD D,A |
|
9D46 |
CALL bonus |
|
9D49 |
EXX |
|
9D4A |
DJNZ cob_overtake_loop |
|
9D4C |
XOR A |
|
9D4D |
LD ($A22B),A |
|
9D50 |
RET |