Prev: 45445 Up: Map Next: 45468
45452: Next Sprite Number
Steps on to the next of the four animation frames of the object, by adding one to the lowest two bits of its sprite number (wrapping from three to zero).
Input
IX The address of the object
Output
A The new sprite number
Keep the upper bits and step the frame.
NextSpriteNumber 45452 LD A,(IX+0) Fetch the sprite number.
45455 LD C,A Keep it in C.
45456 AND %11111100 Keep bits 2 to 7.
45458 LD B,A Keep them in B.
45459 LD A,C Fetch it again and add one.
45460 INC A
45461 AND %00000011 Keep bits 0 and 1.
45463 OR B Combine them with the upper bits.
This entry point is used by the routine at ToggleSpriteNumber.
NextSpriteNumber_StoreSpriteNumber 45464 LD (IX+0),A Store the sprite number.
45467 RET Return.
View the equivalent code in;
Prev: 45445 Up: Map Next: 45468