![]() |
Routines |
| Prev: B9DD | Up: Map | Next: BA47 |
|
Type 0C: the outlaw in the duel before he draws. He wanders about the screen, changing direction a random number of times (the count in IX+0A), 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.
|
|||||
|
Count down the current move, and draw if he has finished.
|
|||||
| HandleWaitingOutlaw | B9FB | CALL CheckForEarlyDraw | Check whether the player has provoked the outlaw. | ||
| B9FE | DEC (IX+$0B) | Count down the timer for the current move. | |||
| BA01 | LD A,(IX+$0B) | Fetch the timer. | |||
| BA04 | JR NZ,HandleWaitingOutlaw_Move | Jump if the move is not over. | |||
| BA06 | OR (IX+$0A) | Combine the timer, which is zero, with the number of moves left. | |||
| BA09 | JP Z,StartOutlawDrawing | Jump to make the outlaw draw if he has made all his moves. | |||
| BA0C | CALL ChooseOutlawMove | Choose a new move. | |||
|
Keep him on the screen and move him.
|
|||||
| HandleWaitingOutlaw_Move | BA0F | CALL KeepOutlawOnScreen | Keep the outlaw on the screen, which reverses his speed at an edge. | ||
| BA12 | LD A,(IX+$05) | Fetch the flags which show whether he has reached an edge. | |||
| BA15 | AND %00001111 | Keep the four bits. | |||
| BA17 | JR Z,HandleWaitingOutlaw_Update | Jump if he has not reached an edge. | |||
| BA19 | LD (IX+$0B),$01 | Make the move end on the next frame. | |||
| HandleWaitingOutlaw_Update | BA1D | 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 | BA20 | CALL CheckCrosshairOnOutlaw | Check whether the crosshair is on the outlaw. | ||
| BA23 | JR NC,HandleWaitingOutlaw_DrawBody | Jump if the outlaw has not been hit. | |||
| BA25 | LD A,$80 | Set the flag which shows that the outlaw has been hit. | |||
| BA27 | LD ($A212),A | Store the flag which shows the outlaw has been hit. | |||
| BA2A | LD (IX+$00),$11 | Turn the outlaw into a shot outlaw. | |||
| BA2E | LD (IX+$0C),$00 | Start at the first frame of falling. | |||
|
Draw the body of the outlaw.
|
|||||
| HandleWaitingOutlaw_DrawBody | BA32 | LD A,(IX+$02) | Fetch the horizontal position of the outlaw and keep it in L. | ||
| BA35 | LD L,A | ||||
| BA36 | LD ($A220),A | Store it as the horizontal pixel position for the sprites. | |||
| BA39 | LD H,(IX+$04) | Fetch the vertical position of the outlaw into H. | |||
| BA3C | CALL CalculateBufferAddress | Find the address in the buffer. | |||
| BA3F | CALL ChooseOutlawBody | Choose the sprites of the body of the outlaw. | |||
| BA42 | LD B,$03 | Set the number of sprites to three. | |||
| BA44 | CALL DrawWideSprites | Draw the body of the outlaw into the buffer. | |||
|
Continue on to DrawOutlawFace.
|
|||||
| Prev: B9DD | Up: Map | Next: BA47 |