![]() |
Routines |
| Prev: 6C53 | Up: Map | Next: 6CE1 |
|
Used by the routine at UpdateLeaf.
Finds the sprite for the frame of a leaf. There are four frames for a leaf on the right and four for a leaf on the left.
|
||||||||||||
| GetLeafSprite | 6CC7 | LD A,(IX+$00) | A=the state of the leaf. | |||||||||
| 6CCA | RRCA | Rotate bit 6 round to bit 3. | ||||||||||
| 6CCB | RRCA | |||||||||||
| 6CCC | RRCA | |||||||||||
| 6CCD | AND %00001000 | Keep only bit 3. | ||||||||||
| 6CCF | LD C,A | C=08 if the leaf is on the left, or 00 if not. | ||||||||||
| 6CD0 | LD A,(IX+$06) | A=the frame of the leaf. | ||||||||||
| 6CD3 | SLA A | Double the frame to make an offset into the table. | ||||||||||
| 6CD5 | OR C | Add the offset for the side of the flower. | ||||||||||
| 6CD6 | LD HL,$6CE1 | HL=LeafSpriteTable. | ||||||||||
|
This entry point is used by the routine at GetFlowerSprite.
|
||||||||||||
| GetSpriteFromTable | 6CD9 | LD C,A | C=the offset. | |||||||||
| 6CDA | LD B,$00 | B=00. | ||||||||||
| 6CDC | ADD HL,BC | Add the offset to HL. | ||||||||||
| 6CDD | LD E,(HL) | E=the low byte of the sprite address. | ||||||||||
| 6CDE | INC HL | Move onto the high byte. | ||||||||||
| 6CDF | LD D,(HL) | D=the high byte of the sprite address. | ||||||||||
| 6CE0 | RET | Return. | ||||||||||
| Prev: 6C53 | Up: Map | Next: 6CE1 |