Prev: C13C Up: Map Next: C1D2
C1BD: Set Sprite From Table
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.
Input
A The index into the table
HL The address of the table
IX The address of the object
Pick the pair and set the sprite.
SetSpriteFromTable C1BD RLCA Double the index.
C1BE AND %00000110 Keep only bits 1 and 2.
C1C0 CALL AddAToHL Call AddAToHL.
C1C3 LD A,(HL) Fetch the sprite number.
C1C4 INC HL Move on to the flags.
C1C5 LD (IX+$00),A Set the sprite number.
C1C8 LD A,(IX+$07) Fetch the flags of the player.
C1CB AND %10111111 Clear bit 6.
C1CD OR (HL) Merge the flags from the table.
C1CE LD (IX+$07),A Store the flags.
C1D1 RET Return.
Prev: C13C Up: Map Next: C1D2