Prev: 47581 Up: Map Next: 47687
47611: Handle Waiting Outlaw
Type 12: the outlaw in the duel before he draws. He wanders about the screen, changing direction a random number of times (the count in IX+10), and at the end of the last move he draws his gun. If the player moves or fires before then he draws at once. He is hit if the crosshair is on him when the player fires.
waiting-outlaw
Count down the current move, and draw if he has finished.
HandleWaitingOutlaw 47611 CALL CheckForEarlyDraw Check whether the player has provoked the outlaw.
47614 DEC (IX+11) Count down the timer for the current move.
47617 LD A,(IX+11) Fetch the timer.
47620 JR NZ,HandleWaitingOutlaw_Move Jump if the move is not over.
47622 OR (IX+10) Combine the timer, which is zero, with the number of moves left.
47625 JP Z,StartOutlawDrawing Jump to make the outlaw draw if he has made all his moves.
47628 CALL ChooseOutlawMove Choose a new move.
Keep him on the screen and move him.
HandleWaitingOutlaw_Move 47631 CALL KeepOutlawOnScreen Keep the outlaw on the screen, which reverses his speed at an edge.
47634 LD A,(IX+5) Fetch the flags which show whether he has reached an edge.
47637 AND %00001111 Keep the four bits.
47639 JR Z,HandleWaitingOutlaw_Update Jump if he has not reached an edge.
47641 LD (IX+11),1 Make the move end on the next frame.
HandleWaitingOutlaw_Update 47645 CALL MoveDuelOutlaw Move the outlaw.
This entry point is used by the routines at StartOutlawDrawing and HandleDrawingOutlaw.
Check whether the crosshair has hit him.
HandleWaitingOutlaw_CheckHit 47648 CALL CheckCrosshairOnOutlaw Check whether the crosshair is on the outlaw.
47651 JR NC,HandleWaitingOutlaw_DrawBody Jump if the outlaw has not been hit.
47653 LD A,128 Set the flag which shows that the outlaw has been hit.
47655 LD (41490),A Store the flag which shows the outlaw has been hit.
47658 LD (IX+0),17 Turn the outlaw into a shot outlaw.
47662 LD (IX+12),0 Start at the first frame of falling.
Draw the body of the outlaw.
HandleWaitingOutlaw_DrawBody 47666 LD A,(IX+2) Fetch the horizontal position of the outlaw and keep it in L.
47669 LD L,A
47670 LD (41504),A Store it as the horizontal pixel position for the sprites.
47673 LD H,(IX+4) Fetch the vertical position of the outlaw into H.
47676 CALL CalculateBufferAddress Find the address in the buffer.
47679 CALL ChooseOutlawBody Choose the sprites of the body of the outlaw.
47682 LD B,3 Set the number of sprites to three.
47684 CALL DrawWideSprites Draw the body of the outlaw into the buffer.
Continue on to DrawOutlawFace.
Prev: 47581 Up: Map Next: 47687