![]() |
Routines |
| Prev: 44015 | Up: Map | Next: 44068 |
|
Used by the routines at HandlerWulf and HandlerTribesman.
Every other frame, moves an actor on to the next frame of its animation by incrementing the lowest two bits of the sprite ID (so the animation is the four frames of the sprite with the same upper bits).
|
||||||||
| AnimateActor | 44046 | LD A,(38547) | Fetch the low byte of the game timer from GameTimer. | |||||
| 44049 | AND %00000001 | Keep only bit 0. | ||||||
| 44051 | RET NZ | Return if bit 0 is set (the actor only animates on alternate passes). | ||||||
| 44052 | LD A,(IX+0) | Fetch the sprite ID of the actor. | ||||||
| 44055 | LD C,A | Stash the sprite ID in C. | ||||||
| 44056 | INC A | Move on to the next frame. | ||||||
| 44057 | AND %00000011 | Keep only bits 0-1. | ||||||
| 44059 | LD B,A | Stash the new frame in B. | ||||||
| 44060 | LD A,C | Fetch the old sprite ID. | ||||||
| 44061 | AND %11111100 | Keep only bits 2-7. | ||||||
| 44063 | OR B | Merge in the new frame. | ||||||
| 44064 | LD (IX+0),A | Set the new sprite ID of the actor. | ||||||
| 44067 | RET | Return. | ||||||
| Prev: 44015 | Up: Map | Next: 44068 |