Prev: 9218 Up: Map Next: 92A7
9253: Reveal Dartboard
Used by the routine at MainMenu.
Input
DE Dart pointer co-ordinates
Creates a "zipper" transition effect that reveals the dartboard from the selected menu item expanding both upwards and downwards simultaneously.
The zipper trails behind the dartboard pointer.
RevealDartboard 9253 DEC E Move one position left to start the reveal.
9254 LD ($9AB9),DE Store this position to *ZipperPosition_Upper.
9258 INC D Move one position down.
9259 LD ($9ABB),DE Store this position to *ZipperPosition_Lower.
Process the upper half of the reveal.
RevealDartboard_Loop 925D LD DE,($9AB9) DE=*ZipperPosition_Upper.
9261 LD A,E Jump to RevealDartboard_Done if E becomes negative (if it's gone past the left edge).
9262 AND A
9263 JP M,RevealDartboard_Done
9266 PUSH DE Stash the upper position on the stack.
9267 LD A,D Jump to UpperReveal_Done if D becomes negative (if it's gone past the top of the screen).
9268 AND A
9269 JP M,UpperReveal_Done
Set up the right-shifting mask for the upper reveal.
Self-modifying code;
RevealDartboard_ModifyMaskForUpper 926C LD HL,$92C7 Set the mask value to FF at *92C7.
926F LD (HL),$FF
RevealDartboard_ModifyToShiftRight 9271 LD HL,$92CD Write SRL C (CB+39) to *Reveal_ShiftCommand.
9274 LD (HL),$CB
9276 INC HL
9277 LD (HL),$39
9279 CALL ProcessRevealLine Call ProcessRevealLine.
UpperReveal_Done 927C POP DE Restore the original upper position from the stack.
927D DEC D Move up one line and left one column for the next upper reveal position.
927E DEC E
927F LD ($9AB9),DE Store the updated upper position at *ZipperPosition_Upper.
Process the lower half of the reveal.
9283 LD DE,($9ABB) DE=*ZipperPosition_Lower.
9287 LD A,D Jump to RevealDartboard_Done if D is greater than or equal to 18 (if it's gone past the bottom of the screen).
9288 CP $18
928A JR NC,RevealDartboard_Done
Set up the left-shifting mask for the lower reveal.
928C PUSH DE Stash the lower position on the stack.
Self-modifying code;
RevealDartboard_ModifyMaskForLower 928D LD HL,$92C7 Set the mask value to 01 at *92C7.
9290 LD (HL),$01
RevealDartboard_ModifyToShiftLeft 9292 LD HL,$92CD Write SLL C (CB+31) to *Reveal_ShiftCommand.
9295 LD (HL),$CB
9297 INC HL
9298 LD (HL),$31
929A CALL ProcessRevealLine Call ProcessRevealLine.
929D POP DE Restore the original lower position from the stack.
929E INC D Move down one line and left one column for the next lower reveal position.
929F DEC E
92A0 LD ($9ABB),DE Store the updated lower position at *ZipperPosition_Lower.
92A4 JR RevealDartboard_Loop Jump to RevealDartboard_Loop.
All finished for this frame, so return.
RevealDartboard_Done 92A6 RET Return.
Prev: 9218 Up: Map Next: 92A7