![]() |
Routines |
| Prev: 49468 | Up: Map | Next: 49618 |
|
Used by the routine at HandleTurningLegs.
Sets the sprite of the player and its flip flag from a table of pairs of bytes. The entry is picked by the lowest two bits of A.
|
||||||||||||
|
Pick the pair and set the sprite.
|
||||||||||||
| SetSpriteFromTable | 49597 | RLCA | Double the index. | |||||||||
| 49598 | AND %00000110 | Keep only bits 1 and 2. | ||||||||||
| 49600 | CALL AddAToHL | Call AddAToHL. | ||||||||||
| 49603 | LD A,(HL) | Fetch the sprite number. | ||||||||||
| 49604 | INC HL | Move on to the flags. | ||||||||||
| 49605 | LD (IX+0),A | Set the sprite number. | ||||||||||
| 49608 | LD A,(IX+7) | Fetch the flags of the player. | ||||||||||
| 49611 | AND %10111111 | Clear bit 6. | ||||||||||
| 49613 | OR (HL) | Merge the flags from the table. | ||||||||||
| 49614 | LD (IX+7),A | Store the flags. | ||||||||||
| 49617 | RET | Return. | ||||||||||
| Prev: 49468 | Up: Map | Next: 49618 |