![]() |
Routines |
| Prev: 43236 | Up: Map | Next: 43298 |
|
Handles the first frame of the Wulf pouncing (sprite IDs 88 and 92). The timer in IX+2 counts down while the player is not attacking in the direction the Wulf is facing, and when it runs out the Wulf moves on to the second frame, which is handled by HandlerWulfLanding. The Wulf can hurt the player in the same way as in HandlerWulf.
|
||||||||
| HandlerWulfPouncing | 43253 | CALL StoreEntity | Remember the previous position of the Wulf. | |||||
| 43256 | LD A,(38659) | Fetch the room of the player from 38659. | ||||||
| 43259 | CP (IX+1) | Jump to HandlerWulfPouncing_Timer if the Wulf is in a different room to the player. | ||||||
| 43262 | JR NZ,HandlerWulfPouncing_Timer | |||||||
| 43264 | LD A,(38658) | Fetch the sprite ID of the player from ImmortalData. | ||||||
| 43267 | SUB 32 | Subtract 32 (the first attacking Sabreman sprite ID). | ||||||
| 43269 | CP 16 | Jump to HandlerWulfPouncing_Timer if the player is not attacking. | ||||||
| 43271 | JR NC,HandlerWulfPouncing_Timer | |||||||
| 43273 | RRCA | Rotate right, so that the direction of the attack is in bit 2. | ||||||
| 43274 | AND %00000100 | Keep only bit 2. | ||||||
| 43276 | XOR (IX+0) | Combine with the sprite ID of the Wulf, so bit 2 shows whether the directions differ. | ||||||
| 43279 | AND %00000100 | Keep only bit 2. | ||||||
| 43281 | JR NZ,HandlerWulfPouncing_Touch | Jump to HandlerWulfPouncing_Touch if the player is attacking in the other direction. | ||||||
| HandlerWulfPouncing_Timer | 43283 | DEC (IX+2) | Decrease the pounce timer by one and jump to HandlerWulfPouncing_Touch if it is not zero. | |||||
| 43286 | JR NZ,HandlerWulfPouncing_Touch | |||||||
| 43288 | INC (IX+0) | Move the Wulf on to the second frame of the pounce. | ||||||
| 43291 | LD (IX+2),8 | Set the pounce timer of the Wulf to 8. | ||||||
| HandlerWulfPouncing_Touch | 43295 | JP HandlerWulf_Touch | Jump to HandlerWulf_Touch to test whether the Wulf is touching the player. | |||||
| Prev: 43236 | Up: Map | Next: 43298 |