Prev: BADA Up: Map Next: BB0B
BADD: Handle Shot Outlaw
Type 11: an outlaw who has been hit. For six frames he is drawn with the two body sprites at DyingOutlawSprites_Shot and then he starts to die.
HandleShotOutlaw BADD INC (IX+$0C) Move on to the next frame.
BAE0 LD A,(IX+$0C) Fetch the frame.
BAE3 CP $06 Jump to HandleShotOutlaw_Die if the six frames are over.
BAE5 JR Z,HandleShotOutlaw_Die
BAE7 LD A,(IX+$02) Fetch the horizontal position of the outlaw and keep it in L.
BAEA LD L,A
BAEB LD ($A220),A Store it as the horizontal pixel position for the sprites.
BAEE LD H,(IX+$04) Fetch the vertical position of the outlaw into H.
BAF1 CALL CalculateBufferAddress Find the address in the buffer.
BAF4 LD DE,$BBC8 Point DE at DyingOutlawSprites_Shot.
BAF7 LD B,$02 Set the number of sprites to two.
BAF9 CALL DrawWideSprites Draw the body into the buffer.
BAFC LD BC,$FF88 Five buffer rows up is one hundred and twenty bytes.
BAFF ADD HL,BC Move the address up five rows of the buffer.
BB00 JP DrawOutlawFace Jump to DrawOutlawFace.
Start the outlaw dying.
HandleShotOutlaw_Die BB03 LD (IX+$00),$12 Turn the outlaw into a dying outlaw.
BB07 LD (IX+$0C),$00 Start at the first frame of dying.
Continue on to HandleDyingOutlaw.
Prev: BADA Up: Map Next: BB0B