![]() |
Routines |
| Prev: 64498 | Up: Map | Next: 64569 |
|
Used by the routines at RunHandlers and SelectionScreen.
|
|||||||
|
Return if this scene doesn't contain the carpet.
|
|||||||
| Scene_DisplayCarpet | 64538 | LD A,(54270) | Return if *Scene_Carpet is 0. | ||||
| 64541 | AND A | ||||||
| 64542 | RET Z | ||||||
| 64543 | LD BC,5382 | BC=5382 (screen co-ordinates). | |||||
|
The carpet, or whatever it is, has two different positions.
|
|||||||
| 64546 | CP 1 | Jump to DrawCarpet if *Scene_Carpet is 1. | |||||
| 64548 | JR Z,DrawCarpet | ||||||
| 64550 | LD C,22 | Update the X position to 22. | |||||
|
Draw the carpet to the buffer.
|
|||||||
| DrawCarpet | 64552 | LD A,127 | A=sprite ID 127.
|
||||
| 64554 | PUSH BC | Stash co-ordinates on the stack. | |||||
| 64555 | CALL PrintSprite | Call PrintSprite. | |||||
| 64558 | POP BC | Restore co-ordinates from the stack. | |||||
| 64559 | LD A,C | Add 4 to the X position to draw the next section of the carpet. | |||||
| 64560 | ADD A,4 | ||||||
| 64562 | LD C,A | ||||||
| 64563 | LD A,127 | A=sprite ID 127.
|
|||||
| 64565 | CALL PrintSprite_Mirrored | Call PrintSprite_Mirrored. | |||||
| 64568 | RET | Return. | |||||
| Prev: 64498 | Up: Map | Next: 64569 |