Prev: 52965 Up: Map Next: 53000
52984: Next Sprite Number
Moves an object on to the next of its four sprites, by adding one to the lowest two bits of the type and wrapping around.
Input
IX Object
NextSpriteNumber 52984 LD A,(IX+0) Add one to the lowest two bits of the type, wrapping round, to choose the next sprite.
52987 LD C,A
52988 INC A
52989 AND 3
52991 LD B,A
52992 LD A,C Put them back in the type of the object.
52993 AND 252
52995 OR B
52996 LD (IX+0),A
52999 RET Return.
View the equivalent code in;
Prev: 52965 Up: Map Next: 53000