B4F0: Smash handling
smash |
B4F0 |
LD A,$00 |
|
B4F2 |
INC A |
|
B4F3 |
AND $03 |
|
B4F5 |
LD ($B4F1),A |
|
B4F8 |
RLCA |
|
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 |
|
B508 |
LD ($B54A),A |
|
B50B |
LD A,($A233) |
|
B50E |
INC A |
|
B50F |
CP $14 |
|
B511 |
JP NC,fully_smashed |
|
B514 |
CP $13 |
|
B516 |
JR NZ,smash_b522 |
|
B518 |
PUSH AF |
|
B519 |
LD A,$0A |
|
B51B |
LD HL,$9926 |
|
B51E |
CALL chatter |
|
B521 |
POP AF |
smash_b522 |
B522 |
LD ($A233),A |
|
B525 |
LD C,$00 |
|
B527 |
AND A |
|
B528 |
JR Z,set_smash_factor |
|
B52A |
INC C |
|
B52B |
CP $04 |
|
B52D |
JR C,set_smash_factor |
|
B52F |
INC C |
|
B530 |
CP $07 |
|
B532 |
JR C,set_smash_factor |
|
B534 |
INC C |
|
B535 |
CP $0B |
|
B537 |
JR C,set_smash_factor |
|
B539 |
INC C |
|
B53A |
CP $0E |
|
B53C |
JR C,set_smash_factor |
|
B53E |
INC C |
|
B53F |
CP $11 |
|
B541 |
JR C,set_smash_factor |
|
B543 |
INC C |
set_smash_factor |
B544 |
LD A,C |
|
B545 |
LD ($A232),A |
|
B548 |
RET |