Prev: 57978 Up: Map Next: 58050
57997: Draw an upward-firing bullet
Used by the routine at DRAW_ALL_UP_BULLETS. IX points at upward-firing bullet from UP_BULLETS onwards
DRAW_UP_BULLET 57997 LD A,(IX+2)
58000 CP 255
58002 RET Z Return if bullet is disabled
58003 LD D,(IX+0) Get bullet coordinates
58006 LD E,(IX+1)
58009 LD HL,60387 Point HL at SCREEN_BUFFER
58012 ADD HL,DE
58013 LD B,8
58015 LD A,(59786)
58018 RRA
58019 JP NC,DRAW_UP_BULLET_1
58022 LD DE,32
58025 LD C,24
DRAW_UP_BULLET_0 58027 LD A,(HL)
58028 XOR C
58029 LD (HL),A
58030 ADD HL,DE
58031 DJNZ DRAW_UP_BULLET_0
58033 RET
DRAW_UP_BULLET_1 58034 LD DE,31
DRAW_UP_BULLET_2 58037 LD A,(HL)
58038 XOR 1
58040 LD (HL),A
58041 INC HL
58042 LD A,(HL)
58043 XOR 128
58045 LD (HL),A
58046 ADD HL,DE
58047 DJNZ DRAW_UP_BULLET_2
58049 RET
Prev: 57978 Up: Map Next: 58050