Prev: 55653 Up: Map Next: 55945
55730: Routine at 55730
Used by the routine at L58392.
Input
This routine might handle collision detection
L55730 55730 LD A,(59644)
55733 CP 255
55735 JP NZ,L55730_2
55738 LD A,(59786)
55741 AND A
55742 RET NZ
55743 LD A,(59646)
55746 DEC A
55747 LD (59646),A
55750 RET NZ
55751 LD HL,60357
55754 LD B,8
55756 LD C,0
L55730_0 55758 LD A,(HL)
55759 CP 127
55761 JR Z,L55730_1
55763 INC C
55764 INC HL
55765 DJNZ L55730_0
55767 LD A,1
55769 LD (59646),A
55772 RET
L55730_1 55773 SLA C
55775 SLA C
55777 LD B,C
55778 LD C,64
55780 LD (59642),BC
55784 LD A,(59645)
55787 LD (59644),A
55790 LD A,1
55792 LD (59647),A
55795 RET
L55730_2 55796 LD DE,(59642)
55800 CALL L54122
55803 PUSH HL
55804 POP IX
55806 LD A,(59643)
55809 AND 3
55811 JP NZ,L55730_7
55814 LD A,(59643)
55817 CP 0
55819 JP NZ,L55730_3
55822 LD A,1
55824 LD (59647),A
55827 LD A,(IX+1)
55830 CP 127
55832 JP Z,L55730_7
55835 JP L55730_6
L55730_3 55838 CP 28
55840 JP NZ,L55730_4
55843 XOR A Clear carry flag, set A to zero
55844 LD (59647),A
55847 LD A,(IX-1)
55850 CP 127
55852 JP Z,L55730_7
55855 JP L55730_6
L55730_4 55858 LD A,(IX-1)
55861 CP 127
55863 JP Z,L55730_5
55866 LD A,1
55868 LD (59647),A
55871 LD A,(IX+1)
55874 CP 127
55876 JP Z,L55730_7
55879 JP L55730_6
L55730_5 55882 LD A,(IX+1)
55885 CP 127
55887 JP Z,L55730_7
55890 XOR A Clear carry flag, set A to zero
55891 LD (59647),A
55894 LD A,(IX-1)
55897 CP 127
55899 JP Z,L55730_7
55902 JP L55730_6
L55730_6 55905 LD A,(59642)
55908 DEC A
55909 LD (59642),A
55912 CP 4
55914 RET NZ
55915 LD A,255
55917 LD (59644),A
55920 RET
L55730_7 55921 LD A,(59647)
55924 RRA
55925 LD A,(59643)
55928 JP NC,L55730_8
55931 INC A
55932 LD (59643),A
55935 JP L55730_6
L55730_8 55938 DEC A
55939 LD (59643),A
55942 JP L55730_6
Prev: 55653 Up: Map Next: 55945