Prev: 52375 Up: Map Next: 52414
52398: Next Sprite Number
Used by the routine at HandleOutlaw.
Moves on to the next of the four walking frames of a figure. They are the lowest two bits of the walking frame.
Input
IX The address of the figure
Add one to the lowest two bits of the walking frame.
NextSpriteNumber 52398 LD A,(IX+12) Fetch the walking frame and keep it in C.
52401 LD C,A
52402 INC A Add one.
52403 AND %00000011 Keep the lowest two bits.
52405 LD B,A Keep them in B.
Put them back in the walking frame.
52406 LD A,C Fetch the walking frame again.
52407 AND %11111100 Clear the lowest two bits.
52409 OR B Put in the new frame.
52410 LD (IX+12),A Set the walking frame and return.
52413 RET
View the equivalent code in;
Prev: 52375 Up: Map Next: 52414