Prev: B4CC Up: Map Next: B549
B4F0: Smash handling
smash B4F0 LD A,$00 Cycle A one step through 0..3 each time the routine is entered
B4F2 INC A
B4F3 AND $03
B4F5 LD ($B4F1),A
B4F8 RLCA *$B55C = table_ce33 + A * 6
B4F9 LD C,A
B4FA RLCA
B4FB ADD A,C
B4FC LD C,A
B4FD LD HL,$CE33
B500 LD B,$00
B502 ADD HL,BC
B503 LD ($B55C),HL
B506 LD A,$09 $B54A = 9
B508 LD ($B54A),A
B50B LD A,($A233) Load and increment smash_counter
B50E INC A
B50F CP $14 20 hits? [POKE $B50F for Single hit capture]
B511 JP NC,fully_smashed Exit via fully_smashed if so
B514 CP $13 19 hits?
B516 JR NZ,smash_b522 Jump to smash_b522 if not
We have 19 hits
B518 PUSH AF
B519 LD A,$0A Set priority to 10
B51B LD HL,$9926 HL = raymond_says_one_more_time
B51E CALL chatter Call chatter (priority 10)
B521 POP AF
smash_b522 B522 LD ($A233),A Set smash_counter to A
B525 LD C,$00 Set smash_factor to zero if smash_counter is zero
B527 AND A
B528 JR Z,set_smash_factor
B52A INC C Set smash_factor to 1 if smash_counter < 4
B52B CP $04
B52D JR C,set_smash_factor
B52F INC C Set smash_factor to 2 if smash_counter < 7
B530 CP $07
B532 JR C,set_smash_factor
B534 INC C Set smash_factor to 3 if smash_counter < 11
B535 CP $0B
B537 JR C,set_smash_factor
B539 INC C Set smash_factor to 4 if smash_counter < 14
B53A CP $0E
B53C JR C,set_smash_factor
B53E INC C Set smash_factor to 5 if smash_counter < 17
B53F CP $11
B541 JR C,set_smash_factor
B543 INC C Otherwise set smash_factor to 6
set_smash_factor B544 LD A,C Set smash_factor to C
B545 LD ($A232),A
B548 RET Return
Prev: B4CC Up: Map Next: B549