Routines |
Prev: 37400 | Up: Map | Next: 37543 |
Used by the routine at MainMenu.
|
||||||||
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 | 37459 | DEC E | Move one position left to start the reveal. | |||||
37460 | LD (39609),DE | Store this position to *ZipperPosition_Upper. | ||||||
37464 | INC D | Move one position down. | ||||||
37465 | LD (39611),DE | Store this position to *ZipperPosition_Lower. | ||||||
Process the upper half of the reveal.
|
||||||||
RevealDartboard_Loop | 37469 | LD DE,(39609) | DE=*ZipperPosition_Upper. | |||||
37473 | LD A,E | Jump to RevealDartboard_Done if E becomes negative (if it's gone past the left edge). | ||||||
37474 | AND A | |||||||
37475 | JP M,RevealDartboard_Done | |||||||
37478 | PUSH DE | Stash the upper position on the stack. | ||||||
37479 | LD A,D | Jump to UpperReveal_Done if D becomes negative (if it's gone past the top of the screen). | ||||||
37480 | AND A | |||||||
37481 | JP M,UpperReveal_Done | |||||||
Set up the right-shifting mask for the upper reveal.
Self-modifying code;
|
||||||||
RevealDartboard_ModifyMaskForUpper | 37484 | LD HL,37575 | Set the mask value to 255 at *37575. | |||||
37487 | LD (HL),255 | |||||||
RevealDartboard_ModifyToShiftRight | 37489 | LD HL,37581 | Write SRL C (203+57) to *Reveal_ShiftCommand. |
|||||
37492 | LD (HL),203 | |||||||
37494 | INC HL | |||||||
37495 | LD (HL),57 | |||||||
37497 | CALL ProcessRevealLine | Call ProcessRevealLine. | ||||||
UpperReveal_Done | 37500 | POP DE | Restore the original upper position from the stack. | |||||
37501 | DEC D | Move up one line and left one column for the next upper reveal position. | ||||||
37502 | DEC E | |||||||
37503 | LD (39609),DE | Store the updated upper position at *ZipperPosition_Upper. | ||||||
Process the lower half of the reveal.
|
||||||||
37507 | LD DE,(39611) | DE=*ZipperPosition_Lower. | ||||||
37511 | LD A,D | Jump to RevealDartboard_Done if D is greater than or equal to 24 (if it's gone past the bottom of the screen). | ||||||
37512 | CP 24 | |||||||
37514 | JR NC,RevealDartboard_Done | |||||||
Set up the left-shifting mask for the lower reveal.
|
||||||||
37516 | PUSH DE | Stash the lower position on the stack. | ||||||
Self-modifying code;
|
||||||||
RevealDartboard_ModifyMaskForLower | 37517 | LD HL,37575 | Set the mask value to 1 at *37575. | |||||
37520 | LD (HL),1 | |||||||
RevealDartboard_ModifyToShiftLeft | 37522 | LD HL,37581 | Write SLL C (203+49) to *Reveal_ShiftCommand. |
|||||
37525 | LD (HL),203 | |||||||
37527 | INC HL | |||||||
37528 | LD (HL),49 | |||||||
37530 | CALL ProcessRevealLine | Call ProcessRevealLine. | ||||||
37533 | POP DE | Restore the original lower position from the stack. | ||||||
37534 | INC D | Move down one line and left one column for the next lower reveal position. | ||||||
37535 | DEC E | |||||||
37536 | LD (39611),DE | Store the updated lower position at *ZipperPosition_Lower. | ||||||
37540 | JR RevealDartboard_Loop | Jump to RevealDartboard_Loop. | ||||||
All finished for this frame, so return.
|
||||||||
RevealDartboard_Done | 37542 | RET | Return. |
Prev: 37400 | Up: Map | Next: 37543 |