![]() |
Routines |
| Prev: BADD | Up: Map | Next: BB3A |
|
Type 12: an outlaw who is dying. He sinks out of sight, a sprite fewer each four frames, and when he has gone the player is rewarded.
|
||||
|
Give the reward when the last frame is over.
|
||||
| HandleDyingOutlaw | BB0B | LD A,(IX+$0C) | Fetch the frame. | |
| BB0E | CP $03 | Jump to GiveReward to give the reward if it is three. | ||
| BB10 | JR Z,GiveReward | |||
|
Draw the sprites of this frame.
|
||||
| BB12 | LD E,A | Copy the frame into E. | ||
| BB13 | LD BC,$BBBB | Point BC at DyingOutlawSprites. | ||
| BB16 | CALL GetTableEntry | Fetch the pointer to the sprite list for the frame. | ||
| BB19 | EX DE,HL | Swap the pointer into DE. | ||
| BB1A | LD A,L | Fetch the frame. | ||
| BB1B | NEG | Subtract it from zero. | ||
| BB1D | ADD A,$04 | Add four, to give the number of sprites for the frame. | ||
| BB1F | LD B,A | Keep the number of body sprites in B. | ||
| BB20 | LD A,(IX+$02) | Fetch the horizontal position of the outlaw and keep it in L. | ||
| BB23 | LD L,A | |||
| BB24 | LD ($A220),A | Store it as the horizontal pixel position for the sprites. | ||
| BB27 | LD H,(IX+$04) | Fetch the vertical position of the outlaw into H. | ||
| BB2A | CALL CalculateBufferAddress | Find the address in the buffer. | ||
| BB2D | CALL DrawWideSprites | Draw the sprites into the buffer. | ||
|
Move on a frame every fourth frame.
|
||||
| BB30 | LD A,($A216) | Fetch the frame counter. | ||
| BB33 | AND %00000011 | Keep a number from 00 to 03. | ||
| BB35 | RET NZ | Return unless it is every fourth frame. | ||
| BB36 | INC (IX+$0C) | Move on to the next frame. | ||
| BB39 | RET | Return. | ||
| Prev: BADD | Up: Map | Next: BB3A |