![]() |
Routines |
| Prev: 47837 | Up: Map | Next: 47930 |
|
Type 18: 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 | 47883 | LD A,(IX+12) | Fetch the frame. | |
| 47886 | CP 3 | Jump to GiveReward to give the reward if it is three. | ||
| 47888 | JR Z,GiveReward | |||
|
Draw the sprites of this frame.
|
||||
| 47890 | LD E,A | Copy the frame into E. | ||
| 47891 | LD BC,48059 | Point BC at DyingOutlawSprites. | ||
| 47894 | CALL GetTableEntry | Fetch the pointer to the sprite list for the frame. | ||
| 47897 | EX DE,HL | Swap the pointer into DE. | ||
| 47898 | LD A,L | Fetch the frame. | ||
| 47899 | NEG | Subtract it from zero. | ||
| 47901 | ADD A,4 | Add four, to give the number of sprites for the frame. | ||
| 47903 | LD B,A | Keep the number of body sprites in B. | ||
| 47904 | LD A,(IX+2) | Fetch the horizontal position of the outlaw and keep it in L. | ||
| 47907 | LD L,A | |||
| 47908 | LD (41504),A | Store it as the horizontal pixel position for the sprites. | ||
| 47911 | LD H,(IX+4) | Fetch the vertical position of the outlaw into H. | ||
| 47914 | CALL CalculateBufferAddress | Find the address in the buffer. | ||
| 47917 | CALL DrawWideSprites | Draw the sprites into the buffer. | ||
|
Move on a frame every fourth frame.
|
||||
| 47920 | LD A,(41494) | Fetch the frame counter. | ||
| 47923 | AND %00000011 | Keep a number from 0 to 3. | ||
| 47925 | RET NZ | Return unless it is every fourth frame. | ||
| 47926 | INC (IX+12) | Move on to the next frame. | ||
| 47929 | RET | Return. | ||
| Prev: 47837 | Up: Map | Next: 47930 |