Routines |
Prev: 54619 | Up: Map | Next: 54744 |
Used by the routine at FindScene.
|
||||
54675 | LD E,A | E=A. | ||
54676 | CP 6 | Jump to 54684 if A is not equal to 6. | ||
54678 | JR NZ,54684 | |||
54680 | LD A,1 | A=1. | ||
54682 | JR 54693 | Jump to 54693. | ||
54684 | CP 7 | Jump to 54692 if A is not equal to 7. | ||
54686 | JR NZ,54692 | |||
54688 | LD A,2 | A=2. | ||
54690 | JR 54693 | Jump to 54693. | ||
54692 | XOR A | Write 0 to *Scene_Carpet. | ||
54693 | LD (54270),A | |||
54696 | LD A,E | A=E. | ||
54697 | DEC A | Decrease A by one. | ||
54698 | ADD A,A | A*=4. | ||
54699 | ADD A,A | |||
54700 | LD E,A | E=A. | ||
54701 | ADD A,E | A+=E. | ||
54702 | ADD A,E | A+=E. | ||
54703 | LD D,0 | D=0. | ||
54705 | LD E,A | E=A. | ||
54706 | LD HL,51386 | HL=51386. | ||
54709 | ADD HL,DE | HL+=DE. | ||
54710 | LD DE,24992 | DE=24992. | ||
54713 | LD B,12 | B=12. | ||
54715 | PUSH HL | Stash HL and DE on the stack. | ||
54716 | PUSH DE | |||
54717 | LD A,(HL) | A=*HL. | ||
54718 | DEC A | Decrease A by one. | ||
54719 | ADD A,A | A*=8. | ||
54720 | ADD A,A | |||
54721 | ADD A,A | |||
54722 | LD D,0 | D=0. | ||
54724 | LD E,A | E=A. | ||
54725 | LD HL,51482 | HL=51482. | ||
54728 | ADD HL,DE | HL+=DE. | ||
54729 | POP DE | Restore DE from the stack. | ||
54730 | LD C,8 | C=8. | ||
54732 | LD A,(HL) | A=*HL. | ||
54733 | LD (DE),A | Write A to *DE. | ||
54734 | INC HL | Increment HL by one. | ||
54735 | INC DE | Increment DE by one. | ||
54736 | DEC C | Decrease C by one. | ||
54737 | JR NZ,54732 | Jump to 54732 until C is zero. | ||
54739 | POP HL | Restore HL from the stack. | ||
54740 | INC HL | Increment HL by one. | ||
54741 | DJNZ 54715 | Decrease counter by one and loop back to 54715 until counter is zero. | ||
54743 | RET | Return. |
Prev: 54619 | Up: Map | Next: 54744 |