Prev: BEE4 Up: Map Next: BF11
BEFE: Handle Player Appearing
The handler for the sparkles in which the player appears at the start of a life (graphics 78 to 7E). On every other frame it moves on to the next of the animation frames and plays a sound.
Input
IX The address of the object
Advance the sparkle on every other frame.
HandlePlayerAppearing BEFE CALL SetPixelAdjustments_Sparkle Call SetPixelAdjustments_Sparkle.
BF01 LD A,($5BA2) Fetch FrameCounter.
BF04 CPL Invert it.
BF05 AND %00000001 Keep only bit 0.
BF07 RET NZ Return on every other frame.
BF08 INC (IX+$00) Move on to the next sprite number.
BF0B CALL PlayAppearingSound Call PlayAppearingSound.
BF0E JP SetWipeAndDrawFlags Jump to SetWipeAndDrawFlags.
View the equivalent code in;
Prev: BEE4 Up: Map Next: BF11